Repository navigation
fix(agc): skip prim state preparation for a patch/hull mismatch - #2293
Merged
oneandonlydean merged 1 commit intoOct 10, 2026
Merged
oneandonlydean merged 1 commit into
oneandonlydean merged 1 commit into
Conversation
sceAgcCreatePrimState only packs registers, but it now also 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 with another type. No draw can use such a state, so leave it to draw time and return the registers. Bit 2 of VGT_SHADER_STAGES_EN is HS_EN, not an NGG bit. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
9 tasks done
Contributor
oneandonlydean
added a commit
to oneandonlydean/AnyPS5
that referenced
this pull request
Oct 10, 2026
oneandonlydean
added a commit
to oneandonlydean/AnyPS5
that referenced
this pull request
Oct 10, 2026
SleglJan
pushed a commit
to SleglJan/AnyPS5
that referenced
this pull request
Oct 10, 2026
…rim-state-patch-hs fix(agc): skip prim state preparation for a patch/hull mismatch
9 tasks done
VohminV
added a commit
to VohminV/-AnyPS5-
that referenced
this pull request
Oct 17, 2026
…llation fixes - skip graphics ABI preparation on patch/hull stage mismatch (PR boykopovar#2293), rename NGG_BIT to HS_BIT - accept user-data presence and type header aliases; tolerate unregistered shader programs at draw decode - resolve PackedAncillary pixel inputs instead of failing validation - permit bit 25 in tessellation routing; default zero tess config to triangular/odd/clockwise - always commit the graphics ABI transaction so a skip cannot poison later preparations - rate-limited SubmitFlip/present diagnostics for VideoOut
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
maind70b899.agc_shader_helpers(with the new case) andguest_shader_linkpass.shader image heap capacity exceeded(Sampled image heap of 16 rejects a retail shader before the metadata limit #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