fix(agc): defer unrouted vertex barriers #6150
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/6150"
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 BasilF-dev on 2026-10-14T23:34:32Z.
What
s_barrierwhileVGT_SHADER_STAGES_ENrouting is still unset.This progresses Marvel's Wolverine (PPSA03671), Game bring-up #5516. That report has 131 registered shaders failing with:
stage=1 opcode=Barrier reason=s_barrier in a vertex program that accesses LDS or GDS or writes memory is not implementedThe regression registers a type-2 shader with an LDS write plus
s_barrier, then resolves it with the Wolverine GS_FAST_LAUNCH state already supported by #4702 (VGT_SHADER_STAGES_EN=0x482030, point list,GE_CNTL=0x201). On unmodified main, registration prepares it as a Vertex shader and hits the barrier error. With this change, registration defers until draw routing is available and the same program resolves through the mesh/workgroup path.Tested
Linux Mint 22.3, x86_64, NVIDIA GeForce RTX 2050, driver 595.99.02.
git diff HEAD^ --check— passedpython3 tools/check_conventions.py --base origin/main— passedagc_driver— passedagc_driver_graphics— passedagc_driver_mesh— passed on GPUagc_driver_prepared_shaders_registered_workgroup— passedagc_driver_prepared_shaders_registered_workgroup_sync— passedagc_vertex_barrier— passedpython3 tools/pr_overlap.py --base main --branch basil/wolverine-barrier --repo boykopovar/AnyPS5— no overlap with open pull requestsctest --test-dir build-wolverine-final --output-on-failure -j2— 1216/1216 passed, 12 skippedPPSA03671 is not present on this machine, so the title itself was not run locally. The title-side failure is from Game bring-up #5516; the regression reproduces the registration-to-fast-launch path with the same routing state.
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-15T12:15:35Z.
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/Execution/src/Driver/Shaders/ShaderRegistry.cppL903-904Some 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/Execution/src/Driver/Shaders/ShaderRegistry.cppcore/libs/prx/libSceAgcDriver/Execution/src/Driver/Shaders/ShaderRegistry.cppcore/libs/prx/libSceAgcDriver/Execution/src/Driver/Shaders/ShaderRegistry.cppcore/libs/prx/libSceAgcDriver/Execution/src/Driver/Shaders/ShaderRegistry.cppcore/libs/prx/libSceAgcDriver/Execution/src/Driver/Shaders/ShaderRegistry.cppImported from boykopovar/AnyPS5. Originally posted by nicolasfalesy on 2026-10-16T08:52:26Z.
Tested on Linux (Arch),
c++ (GCC) 16.2.1 20260810, Release,BUILD_TESTING=ON,mainat5d9dcc42d2ec5401aebd089028b8d4d7410a77b4.This PR does not compile on current
main. Merged ontomain,libSceAgcDriverfails (2 of 2 builds):ShaderRegistry.cppalone compiles onmain(2 of 2). With this PR merged it fails (2 of 2).Most likely cause: the PR is based on
4bdfc9c80, before54f5c4187("perf(agc): free a registered shader's decoded program once it is planned") moved the decoded program out ofRegisteredPreparationinto the localdecodedinPlanRegistered. The newunroutedBarriercheck atShaderRegistry.cpp:804of this PR still readsplan->decoded.instructions.Suggested fix: rebase and read
decoded.instructionsthere. I checked that this one-line change makesShaderRegistry.cppcompile on the merge.AI-assisted: yes
Imported from boykopovar/AnyPS5. Originally posted by nicolasfalesy on 2026-10-17T13:49:36Z.
Re-tested on Linux (Arch),
c++ (GCC) 16.2.1 20260810, Release,BUILD_TESTING=ON: headded05f528merged ontomainat47a266cf9.The compile error from my earlier report is gone. The merge is clean, and
libSceAgcDriver(includingShaderRegistry.cpp) builds.AGC tests (
ctest -R agc, 656 tests, 2 runs): 655 pass, 3 skip, 1 fails in both runs.agc_vertex_barrierpasses. The one failure isagc_driver_sample_multisample_target("storage image multisampling is unavailable on the target device"). It fails the same way onmainalone on this GPU (Intel Arc, Mesa ANV), so it is not caused by this PR.AI-assisted: yes
Imported from boykopovar/AnyPS5. Originally posted by Neithennn on 2026-10-17T17:02:54Z.
Windows NVIDIA run, since the description lists Linux only.
Windows 11 Pro 26200, NVIDIA GeForce RTX 4080 (driver 617.42), AMD Ryzen 7 5800X, WinLibs GCC 15.2.0 r7, Ninja, Release, bundled dependencies,
BUILD_TESTING=ON,ANYPS5_NO_SHADER_CACHE=1. Headded05f528merged onto mainf51724078; full build succeeds.agc_driver,agc_driver_graphics,agc_driver_mesh,agc_driver_prepared_shaders_registered_workgroup,agc_driver_prepared_shaders_registered_workgroup_sync,agc_vertex_barrier: pass, withANYPS5_REQUIRE_VULKAN=1.ctest -j 8: 1398/1398. Unchanged main on the same machine: 1398/1398.No title run.
AI-assisted: yes (runs done with Claude Code).