fix(agc): skip prim state preparation for a patch/hull mismatch #2293
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/2293"
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 MichonGoddijn231849 on 2026-10-09T14:52:25Z.
What
Since #639,
sceAgcCreatePrimStatealso resolves the graphics ABI ahead of time, and that resolve throws when the primitive type is a patch list without HS_EN, or a hull stage is set with another primitive type. GTA V (PPSA04264) creates such a prim state while it loads, so on currentmainit aborts a few seconds after launch withAGC graphics: VGT_SHADER_STAGES_EN=0x2002000: Patch topology and HS_EN disagree.No draw can use a state like that, so the ahead-of-time preparation is skipped for it and the packed registers are still returned. A draw that does use such a state still fails in the draw-time check, as before. Bit 2 of
VGT_SHADER_STAGES_ENis HS_EN, not an NGG bit, so the constant is renamed.The fix and its test are by @CouchRiv, who prepared it on Linux and asked me to open it.
Tested
Windows 11 Pro, AMD Ryzen 5 7600, NVIDIA GeForce RTX 5080, MinGW-w64 GCC 15.2.0, on
maind70b8998.agc_shader_helpers(with the new case) andguest_shader_linkpass.shader image heap capacity exceeded(#1789).mainand passes with the change; fullctest516/516 on RADV and lavapipe.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🤖 Generated with Claude Code
Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-09T21:12:01Z.
I updated PR #2066 onto current
mainand moved its regression cases into a dedicated helper, so the test additions no longer share the same insertion hunk. #2066 covers optional geometry output register handling; #2293 covers the patch/hull mismatch path. They are separate fixes with no dependency.