feat(shader): carry the shader float mode into the recompile request #1816
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/1816"
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 adriadam10 on 2026-10-08T20:17:36Z.
What
Step 2 of #981: carry each shader's float mode into the
RecompileRequest. No behaviour change.ShaderFloatMode(floatMode,dx10Clamp,ieeeMode,fp16Overflow) as an optional last member ofGuestContext, so the existing positional initializers keep compiling. Empty means unknown (tests, tools).RegisteredFloatModedecodes it fromRSRC1of the registered shader header:COMPUTE_PGM_RSRC1(0x212) for compute,SPI_SHADER_PGM_RSRC1_PS(0x00a),_GS(0x08a) for vertex/geometry and_HS(0x10a) for local/hull. Bit positions are from Mesa'ssrc/amd/registers/gfx10.jsonandgfx103.json:FLOAT_MODE12-19,DX10_CLAMP21 andIEEE_MODE23 in all four.FP16_OVFLis at a different bit in each: 26 (CS), 29 (PS), 31 (GS), 30 (HS).sh_registers, both at registration and at draw/dispatch, so the prepared-artifact keys match by construction. Reading the live queue registers at draw time could miss a prepared artifact whenever they differed. Run-time RSRC1 writes are not seen (TechnicalDebt).appendInterfaceandContextHash, which feed the in-memory, prepared and disk cache keys. The request serializer writes it as version 13 and still reads 12 without it.Tested
Linux (CachyOS), full ctest 488/488 on the merge with
main.agc_driverdecodes all seven shader types from RSRC1 (FLOAT_MODE 0xc0 + DX10_CLAMP as in Astro's Playroom, IEEE_MODE, FP16_OVFL from each stage's own bit and never from another stage's bit), and returns no mode without registered state or RSRC1. Negative check: reading the pixel FP16_OVFL from bit 26 fails atstage type 1: FP16_OVFL not read from bit 29.agc_shader_disk_cache: each field of the mode, and its presence, changes both the disk key andContextHash. The mode survives a serializer round trip, and an unknown mode comes back empty.agc_shader_memory: new requests are version 13, 14 is rejected, and older versions still load.Checklist
main; no other open PR implements the same functionsNotImplemented_nid_no_patch); silent stubs are listed in TechnicalDebt.mdfiles or images added to the repository (attach them to this PR)Imported from boykopovar/AnyPS5. Originally posted by github-actions[bot] on 2026-10-08T20:42:38Z.
Other open pull requests touch the same code. Merging one will break the other, or both implement the same thing. If this one builds on them, list them in Depends on.
main)core/libs/prx/libSceAgcDriver/tests/Submit.cppL482core/libs/prx/libSceAgcDriver/tests/Submit.cppL482