fix(shader): plan image tables through invariant descriptor phis #6417
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/6417"
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 UnhealthyKraken on 2026-10-15T14:33:18Z.
What
Resolve invariant Phi words before matching an image or sampler descriptor to a runtime table column. The existing invariant proof already follows cyclic Phi webs and requires equivalent reads and operands; the table planner previously inspected the Phi directly and rejected it. Varying or unresolved Phis still take the existing rejection/splitting paths.
Adds synthetic CPU and GPU regressions with a loop that merges equivalent descriptor reads. A differing-offset CPU case must be refused or split, and the GPU case compares sampled pixels with a loop that retains the original descriptor.
Tested
Windows 11 build 26200, MinGW-w64 GCC 15.2.0, NVIDIA GeForce RTX 5090, driver 617.42.
agc_shader_bindlessfails without this change withGetImageResource dword 0 is not a valid runtime value, and passes with it.agc_driver_image_tablefails without this change on the same invariant descriptor chain. With it, all sampled output words match the control shader, with no table faults and unchanged distinct image count.0x11d1418800from Marvel's Wolverine (PPSA03671, content 01.001.005, bring-up #5516) reproduces the rejection on main and recompiles with this change.mainf633042dfdwith local #6150, #6187 and #6308 for the Windows runtime. This branch contains only the descriptor fix and its tests, based on main940eba9a26. The captured shader replay uses the shader recompiler directly.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)Imported from boykopovar/AnyPS5. Originally posted by github-actions[bot] on 2026-10-15T14:39:58Z.
Some comparisons could not be completed because a pull request conflicts with the base branch. Review these shared files manually before concluding that there is no overlap.
core/libs/prx/libSceAgcDriver/tests/ShaderMemory.cppcore/libs/prx/libSceAgcDriver/tests/ShaderMemory.cppcore/libs/prx/libSceAgcDriver/tests/ShaderMemory.cppcore/libs/prx/libSceAgcDriver/tests/ShaderMemory.cppcore/libs/prx/libSceAgcDriver/tests/ShaderMemory.cppcore/shader/recompiler/Optimization/src/ResourceTracker.cppcore/libs/prx/libSceAgcDriver/tests/ShaderMemory.cppcore/libs/prx/libSceAgcDriver/tests/execution/ImageTable.cppcore/libs/prx/libSceAgcDriver/tests/ShaderMemory.cppcore/shader/recompiler/Optimization/src/ResourceTracker.cppcore/libs/prx/libSceAgcDriver/tests/ShaderMemory.cppcore/libs/prx/libSceAgcDriver/tests/ShaderMemory.cppcore/libs/prx/libSceAgcDriver/tests/ShaderMemory.cppcore/libs/prx/libSceAgcDriver/tests/ShaderMemory.cppcore/libs/prx/libSceAgcDriver/tests/ShaderMemory.cppcore/libs/prx/libSceAgcDriver/tests/ShaderMemory.cppcore/shader/recompiler/Optimization/src/ResourceTracker.cppcore/libs/prx/libSceAgcDriver/tests/execution/ImageTable.cppcore/shader/recompiler/Optimization/src/ResourceTracker.cppcore/libs/prx/libSceAgcDriver/tests/ShaderMemory.cppcore/shader/recompiler/Optimization/src/ResourceTracker.cppcore/libs/prx/libSceAgcDriver/tests/ShaderMemory.cppcore/shader/recompiler/Optimization/src/ResourceTracker.cppImported from boykopovar/AnyPS5. Originally posted by Tamalero on 2026-10-17T06:54:00Z.
Title check, since two titles in #6191 stop on the same
GetImageResource dword 0 is not a valid runtime valuemessage: this PR doesn't change either stop, and I saw no regression.Phiatpc=0x6b6c/0x6b80mainf26eb67c8+ #6814pc=0x4380main5d9dcc42d+ #6232 + #6606Both look like shapes this PR isn't meant to cover (two independently selected keys in Ratchet; no
Phiin the Guardians key), so this is just a no-regression data point. Linux, RTX 4090, GCC 16.2.1.Tested and written by Claude (AI assistant) on a contributor's machine.
Imported from boykopovar/AnyPS5. Originally posted by UnhealthyKraken on 2026-10-22T14:28:26Z.
Recorded these as contributor-reported no-regression data points. The two independently selected keys and the key without a Phi remain outside this invariant-descriptor-Phi change and belong with the remaining cases in #6191. I have not rerun either title or treated this report as broader shader coverage.