fix(agc): accept reported vertex stage state #4341
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/4341"
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 MarcZX10 on 2026-10-12T07:05:39Z.
What
Fixes #4329. Accepts the exact reported
VGT_SHADER_STAGES_EN=0x02002008state on the existing vertex path. Other vertex routing states retain the current mask and validation.Tested
Linux Release, GCC 12.2.0, Ninja:
agc_driver_graphics_testsfrom a clean current-main worktree.agc_driver_graphics_testspasses, including the exact reported state and neighboring invalid encodings.python3 tools/check_conventions.py --base upstream/mainpasses.git diff --checkpasses.The local graphics validation suite runs on llvmpipe; no Wobbly Life title or discrete GPU run was available.
Checklist
main; no other open PR implements the same changeImported from boykopovar/AnyPS5. Originally posted by exefer on 2026-10-12T08:20:23Z.
Tested with #4328 alongside on Wobbly Life (PPSA29413, Linux (CachyOS), GCC 16.2.1, Intel i5-12400 + NVIDIA RTX 3060 Ti (615.71.09), current
mainplus both PRs, stock build plus relink): theVGT_SHADER_STAGES_EN=0x2002008abort from #4329 is gone in 5 runs, played and unplayed. New endpoints past it: 2x compute-shader depth/stencil storage abort when opening the map, 1x segfault afterstorage image destroyed with GPU results pendingwarnings, 1xstd::__ios_failureduring teardown, 1x killed by me mid-run.Map abort matches open #1409.
Imported from boykopovar/AnyPS5. Originally posted by kr4y4 on 2026-10-12T21:00:38Z.
Windows run on two GPUs, since the description's run was on llvmpipe.
Setup: Windows 11 (26200), WinLibs GCC 15.2.0 r7, Release, CI configure flags, an RTX 4070 Laptop GPU and an Intel Raptor Lake-S iGPU. The head
632331d1amerged intomain42496c5e5.agc_driver_graphicspasses with--repeat until-fail:3. On the iGPU one run failed after 0.17 s withwrite-watched arena contained no host exclusion to test. That check depends on the process's address layout and also fails onmain(#4660, #4746). It passed on the iGPU in the full-suite run.main'sState.cppand the new checks,agc_driver_graphicsfails on both GPUs:VGT_SHADER_STAGES_EN=0x2002008: unsupported vertex routing, scheduling or wave-ID state.ctest --timeout 120 --parallel 4): 1007 of 1007 on both GPUs.Written with AI assistance.
Imported from boykopovar/AnyPS5. Originally posted by oneandonlydean on 2026-10-12T21:22:21Z.
State.cpp:569accepts one literal value. What 0x02002008 adds to the accepted set is ES_EN=1 (bit 3) without HS_EN; please decode that field instead: say what ES_EN=1 selects on a non-patch draw and why the vertex path draws it correctly, and accept it with the other bits the mask already takes (wave32, the scheduling bits), or throw where it differs.Imported from boykopovar/AnyPS5. Originally posted by xXPBSXx on 2026-10-12T23:24:48Z.
Windows test (MinGW GCC 15.2, Release, Windows 10, RTX 4080 SUPER). Built in a batch with five other open GPU PRs cherry-picked onto main
44ab0c39e(not current main, which needs a submodule that isn't checked out here), so only the tests that belong to this PR say anything about it:tests/Graphics.cpp(agc_driver_graphics): see below.agc_driver_graphicsover the batch: 9 of 10 runs passed. The one failure is the known address-layout flake from #4660 as far as I can tell: I kept only the first lines of that run's log (thehost import ... vkAllocateMemory (-2)lines, which appear in passing runs as well), not its final error message, so I can't confirm the cause for that one run. Plainmainfailed 2 of 10 on the same machine earlier.Not tested: no game run; the batch was not rebuilt per PR, so a failure would have needed a bisect (there was none besides the flake).
AI-assisted (Claude Code).
Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-13T07:50:37Z.
I checked the field before widening the accepted mask. AMD’s CIK register reference calls
ES_EN=1ES_STAGE_DSand describes it as the ES acting as the DS shader for tessellation evaluation. That does not explain why this value appears on a non-patch draw, nor establish the behavior for the PS5 GPU. The exact-value regression shows the reported state reaches the vertex path, but it does not establish the stage semantics or justify accepting other combinations.I do not have stronger source or hardware evidence for those points, so I have not generalized the mask or claimed that
ES_EN=1is generally safe for non-patch draws. The existing report is for0x02002008specifically.Imported from boykopovar/AnyPS5. Originally posted by oneandonlydean on 2026-10-13T10:32:12Z.
Then keep the one value, but record it: a line in
docs/dev/debt/libSceAgcDriver.mdthatVGT_SHADER_STAGES_EN0x02002008 (ES_EN=1 without HS_EN on a non-patch draw) is drawn as the vertex path, seen only on PPSA29413 and not verified on the console.Imported from boykopovar/AnyPS5. Originally posted by oneandonlydean on 2026-10-14T22:16:06Z.
Added the debt line for 0x02002008 (drawn as the vertex path, seen only on PPSA29413, not verified on the console), which was the open point from 10-13.