Skip to content

feat(ps3): add native libretro RSX hardware rendering support - #19930

Closed
jhonathanc wants to merge 2 commits into
libretro:masterfrom
jhonathanc:master
Closed

jhonathanc wants to merge 2 commits into
libretro:masterfrom
jhonathanc:master

Conversation

@jhonathanc

Copy link
Copy Markdown
Contributor

Description

Expose an experimental libretro RSX context and versioned rendering interface for PSL1GHT cores. Present core-owned RSX textures without CPU uploads, share the command FIFO and unused host mapping, and defer allocation retirement until queued GPU work completes.

Integrate context negotiation and enforce main-thread rendering. Restore frontend GPU state before compositing and use fenced per-font vertex pages to prevent oversized Ozone batches from corrupting queued text. Invalidate the vertex cache before menu and font draws.

Make the RSX host allocation configurable at build time. Extend regression coverage for hardware image validation, deferred resource retirement, oversized font batches and allocation failures.

Reviewers

@LibretroAdmin

jhonathanc and others added 2 commits October 27, 2026 04:30
Expose an experimental libretro RSX context and versioned rendering
interface for PSL1GHT cores. Present core-owned RSX textures without CPU
uploads, share the command FIFO and unused host mapping, and defer
allocation retirement until queued GPU work completes.

Integrate context negotiation and enforce main-thread rendering. Restore
frontend GPU state before compositing and use fenced per-font vertex
pages to prevent oversized Ozone batches from corrupting queued text.
Invalidate the vertex cache before menu and font draws.

Make the RSX host allocation configurable at build time. Extend regression
coverage for hardware image validation, deferred resource retirement,
oversized font batches and allocation failures.
Give the RSX context and render interface proper IDs in libretro.h
(RETRO_HW_CONTEXT_RSX = 11, RETRO_HW_RENDER_INTERFACE_RSX = 6) and ship
one interface, version 1, with retire_memory in it, instead of two
versions picked through the context's version_major.

Retired memory goes on a ring and is covered by one label write per
frame, with no wait-for-idle and no flush per call.

Font vertex pages are all allocated with the font, and batches bigger
than a page are drawn in page-sized pieces, so nothing is allocated
while drawing.

When the menu shows over a duped frame from a hardware core, the core's
image is drawn behind it rather than the software texture. The frontend
state reset runs only on frames the core rendered.

The host mapping default stays 32 MB; RSX_HOST_SIZE still overrides it.
The PSL1GHT guards around the new code are dropped: the driver only
builds with HAVE_GCM, which only Makefile.psl1ght sets.
@LibretroAdmin

Copy link
Copy Markdown
Contributor

Check if everything still works with my rebased patch

@LibretroAdmin

Copy link
Copy Markdown
Contributor

This has been pushed to master already. Superseded. Let me know if theres anything wrong with the implementation and if so, send a followup PR

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants