feat(libSceFont): graphics services and surface textures through the Gnm backend #16199
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/16199"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Imported from boykopovar/AnyPS5. Originally posted by ntamas94 on 2026-11-05T20:39:45Z.
What
Start porting the PS4 libSceFontGs Gnm rendering backend that
sceFontSelectGraphicsGnm(0)returns, together with the libSceFont side that consumes it. Stacked on #16125: only the last two commits are new here.sceFontSelectGraphicsGnm(0)returns a host table with the PS4 10.71 layout: header (tag 0x0e08, instance slot, 0x20000-byte instance size, enumerate function), the 21 opcode entries in module order and the list descriptor. Opcode 02 is the original no-op, 03/04 keep their values, opcode 05 is ported, and the other 17 handlers (init 01 included) throw throughNotImplemented_nid_no_patchuntil ported.sceFontCreateGraphicsService,sceFontCreateGraphicsServiceWithEditionandsceFontDestroyGraphicsServicefollow the PS4 bodies: validation order and codes reported through the graphics error callback, the 0x100-byte service, the direct-memory instance, the slot spin-lock, the refcount and the opcode dispatch fill. A Gnm-backed service still throws at the opcode 01 init.sceFontGraphicsStructureSurfaceTexture,sceFontGraphicsTextureRefersSurfaceand the surface-texture case ofsceFontGraphicsReleasereach it.The debt files list what still throws: the device heap path for a surface without a base address, the other
sceFontGraphicsReleasetags, and every unported backend handler.sceFontCreateGraphicsDeviceis not ported yet, so the surface-texture exports are tested with constructed devices.Tested
Windows (MSYS2 UCRT64): all 16
guest_font*tests andpublic_headerspass;check_conventions.pypasses. Off-console, the decrypted PS4 10.71 libSceFont and libSceFontGs code was loaded with its relocations and run against the host: the backend table and dispatch fill, 26 service create/destroy cases, opcode 05 on 3,000,000 random and 200,000 SurfaceInit-built inputs, and 250,143 steps of StructureSurfaceTexture, RefersSurface and Release over 20,000 random device and pool shapes all matched byte for byte. Nothing in this PR was measured on a console, and no title was tested.Checklist
main; no other open PR implements the same functionsNotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file.mdfiles or images added to the repository (attach them to this PR)