Skip to content

fix(agc): decode a fast-launch draw as one point per subgroup whatever its input type - #8395

Merged
oneandonlydean merged 7 commits into
boykopovar:mainfrom
hugodearaujo:fix/agc-fast-launch-input-topology
Nov 2, 2026
Merged

oneandonlydean merged 7 commits into
boykopovar:mainfrom
hugodearaujo:fix/agc-fast-launch-input-topology

Conversation

@hugodearaujo

@hugodearaujo hugodearaujo commented Oct 20, 2026 •

Copy link
Copy Markdown
Contributor

What

DecodeState accepts VGT_SHADER_STAGES_EN.GS_FAST_LAUNCH = 1 only with a point list in VGT_PRIMITIVE_TYPE (#4702). A fast-launch draw with any other type and the same GE_CNTL group of one vertex and one primitive stops the title with fast launch other than one point per subgroup is unsupported.

This PR decodes such a draw as one point per subgroup whatever VGT_PRIMITIVE_TYPE holds:

  • Fast launch starts subgroups without assembling input primitives. RADV, which drives mesh shaders through this mode on gfx10.3, sets the input topology to a point list and takes the workgroup index from the vertex id (radv_shader_info.c; ac_nir_lower_ngg_mesh.c: "the vertex ID which is equivalent to the index of the current workgroup within the current dispatch").
  • GE_CNTL asks for one vertex per subgroup, which no line or triangle can fill, so the type cannot be what sizes the subgroup.

Other group sizes, fast launch 2 and indexed fast-launch draws still throw; the message for other group sizes now reads fast launch other than one vertex and one primitive per subgroup is unsupported. That a console starts one subgroup per vertex for a line or triangle type is assumed, not measured, and the technical debt entry says so.

Title

CONTROL Resonant (PPSA34547) makes fast-launch draws with VGT_SHADER_STAGES_EN 0x482030, VGT_PRIMITIVE_TYPE 6 (triangle strip) and GE_CNTL 0x201 right after New Game, as @ps54all reported in #7302; they got past it with a local change that treats the input as a point list.

On main 06d97be with #7064 (needed to reach New Game), Linux, RX 9070 XT with RADV, in the same run directory with only libSceAgcDriver.prx swapped:

  • without this PR, after New Game the title creates 8 pipelines whose programs are refused and deferred to their first use, for example Shader 0x10041aa500 could not be prepared when the title created its pipeline (AGC graphics: VGT_SHADER_STAGES_EN=0x482030: fast launch other than one point per subgroup is unsupported);
  • with it, no program is refused, and within 22 s of New Game APS5_TRACE_DRAW_PROGRAMS shows 6 of those 8 programs drawn on the mesh path (0x10041aa500 60 times). I stopped the run there.

Further on, the title loses the GPU after New Game with or without this PR: the run without it lost the device 2 min after New Game, before any of those programs was drawn. That loss is tracked in #7302.

Tested

  • main 5454cd2 merged in (f296350), by a merge commit; history is not rewritten. State.cpp conflicted because main moved the geometry subgroup decode into a meshConfiguration(inputPrimitive, fastLaunch) helper that the tessellation-geometry path also uses. The resolution keeps that helper and makes the same change as before: the fast-launch check no longer requires a point list, and the geometry path passes a point list as the input primitive for a fast-launch draw (meshConfiguration(fastLaunch ? 1u : primitive, fastLaunch)). The tests and the debt entry merged without conflicts. Against main, the diff is still 4 files, +16/-6.

  • Paired validation on one machine and GPU: AMD Radeon RX 9070 XT (RADV GFX1201, Mesa 26.2.6), Arch Linux with kernel 7.2.11, GCC 16.2.1, Release. ctest -V -R '^(agc_driver|agc_driver_graphics|agc_driver_mesh)$' with VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation (Khronos layer 1.4.363), ANYPS5_NO_SHADER_CACHE=1, ANYPS5_REQUIRE_VULKAN=1 and VK_LOADER_DEBUG=layer:

    Commit Result Insert instance layer "VK_LAYER_KHRONOS_validation" was not found but was requested VUID- lines
    main 5454cd2 3 of 3 pass 3 0 0
    this head f296350 3 of 3 pass 3 0 0

    In each run agc_driver inserts the layer twice and agc_driver_mesh once; agc_driver_graphics, which holds the decode test, creates no Vulkan instance.

  • Negative control, main 5454cd2 with only this PR's test changes, same settings: both tests that hold the new checks fail. agc_driver_graphics fails with AGC graphics: unexpected failure: AGC graphics: VGT_SHADER_STAGES_EN=0x482030: fast launch other than one point per subgroup is unsupported, and agc_driver with a registered fast-launch program resolved with a triangle strip was not prepared as for a point list. agc_driver_mesh passes.

  • c65b4ef, on top of that head, only adds type 21 (the polygon type, which DecodeState also accepts on this path) to the decode test: the three tests pass on it with the layer inserted and no VUID- lines.

  • agc_driver_graphics: with fast launch and GE_CNTL 0x201, VGT_PRIMITIVE_TYPE 2 to 6 and 21 decode as the point list does (one point per subgroup, PRIM_AMP_FACTOR primitives); GE_CNTL 0x402 is still refused.

  • agc_driver: the registered fast-launch program from fix(agc): defer unrouted vertex barriers #6150 is resolved with a triangle strip before the point list, and the point list has to reuse the artifact the strip prepared (Driver::PreparedEntryHashes is the same after both resolves). On the RX 9070 XT the strip prepares one entry, with the same hash as the entry main prepares for the point list. With main's State.cpp the strip's decode fails and the stage stays deferred (without a log line, since it is already deferred at registration), so the point list prepares the program itself and the check fails. A device that cannot prepare the program for either type has nothing to compare; the decode itself is covered by agc_driver_graphics, which needs no GPU.

  • The fast-launch mesh draws of agc_driver_mesh pass unchanged: the draw side still receives a point list.

  • Earlier revisions of the same change, not repeated on this base:

  • tools/check_conventions.py --base origin/main --head f29635063c with this title and description passes, and git diff --check is clean.

Checklist

  • Based on current main; no other open PR implements the same functions
  • One topic per PR; follow-ups go in a new PR
  • No comments in code except technical debt
  • Unimplemented paths throw (NotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file
  • No notes, investigation .md files or images added to the repository (attach them to this PR)
  • New third-party code is a submodule built from source
  • Generic behaviour, not specific to one title
  • Depends on: none
  • Fixes: none
  • Unblocks: PPSA34547 CONTROL Resonant (PPSA34547) #7302
  • GPUs tested: AMD Radeon RX 9070 XT, RADV (Mesa 26.2.5 and 26.2.6), Arch Linux
  • AI-assisted: yes

@github-actions github-actions Bot added the unblocks title Names a title ID on the Unblocks line label Oct 20, 2026
@github-actions

github-actions Bot commented Oct 20, 2026 •

Copy link
Copy Markdown

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.

Pull request Conflicting files (lines on main) Same exports Same new files
PR 6146 docs/dev/debt/libSceAgcDriver.md L68-69
PR 11998 docs/dev/debt/libSceAgcDriver.md L68-69

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.

Pull request Shared files not compared
PR 1395 core/libs/prx/libSceAgcDriver/Graphics/src/State.cpp
core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
PR 4040 core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
PR 5925 core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
docs/dev/debt/libSceAgcDriver.md
PR 6186 docs/dev/debt/libSceAgcDriver.md
PR 6188 core/libs/prx/libSceAgcDriver/Graphics/src/State.cpp
PR 6194 core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
docs/dev/debt/libSceAgcDriver.md
PR 6223 docs/dev/debt/libSceAgcDriver.md
PR 6235 core/libs/prx/libSceAgcDriver/Graphics/src/State.cpp
core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
PR 6273 docs/dev/debt/libSceAgcDriver.md
PR 6280 core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
docs/dev/debt/libSceAgcDriver.md
PR 6300 docs/dev/debt/libSceAgcDriver.md
PR 6412 docs/dev/debt/libSceAgcDriver.md
PR 6481 core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
docs/dev/debt/libSceAgcDriver.md
PR 6548 core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
docs/dev/debt/libSceAgcDriver.md
PR 6808 core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
docs/dev/debt/libSceAgcDriver.md
PR 6970 core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
PR 6977 core/libs/prx/libSceAgcDriver/Graphics/src/State.cpp
docs/dev/debt/libSceAgcDriver.md
PR 7048 docs/dev/debt/libSceAgcDriver.md
PR 7256 core/libs/prx/libSceAgcDriver/Graphics/src/State.cpp
core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
docs/dev/debt/libSceAgcDriver.md
PR 7410 core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
PR 7449 docs/dev/debt/libSceAgcDriver.md
PR 7604 docs/dev/debt/libSceAgcDriver.md
PR 7642 core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
docs/dev/debt/libSceAgcDriver.md
PR 7963 core/libs/prx/libSceAgcDriver/tests/Submit.cpp
PR 7978 core/libs/prx/libSceAgcDriver/tests/Submit.cpp
docs/dev/debt/libSceAgcDriver.md
PR 8592 docs/dev/debt/libSceAgcDriver.md
PR 8707 docs/dev/debt/libSceAgcDriver.md
PR 9020 core/libs/prx/libSceAgcDriver/Graphics/src/State.cpp
core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
docs/dev/debt/libSceAgcDriver.md
PR 9335 core/libs/prx/libSceAgcDriver/Graphics/src/State.cpp
core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
docs/dev/debt/libSceAgcDriver.md
PR 9356 core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
docs/dev/debt/libSceAgcDriver.md
PR 9387 core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
docs/dev/debt/libSceAgcDriver.md
PR 9432 core/libs/prx/libSceAgcDriver/Graphics/src/State.cpp
docs/dev/debt/libSceAgcDriver.md
PR 9489 core/libs/prx/libSceAgcDriver/Graphics/src/State.cpp
core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
PR 9592 docs/dev/debt/libSceAgcDriver.md
PR 9712 core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
PR 9915 core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
docs/dev/debt/libSceAgcDriver.md
PR 9950 docs/dev/debt/libSceAgcDriver.md
PR 10233 docs/dev/debt/libSceAgcDriver.md
PR 10249 core/libs/prx/libSceAgcDriver/Graphics/src/State.cpp
PR 10256 docs/dev/debt/libSceAgcDriver.md
PR 10359 docs/dev/debt/libSceAgcDriver.md
PR 11551 core/libs/prx/libSceAgcDriver/Graphics/src/State.cpp
core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
docs/dev/debt/libSceAgcDriver.md
PR 12120 docs/dev/debt/libSceAgcDriver.md
PR 14212 docs/dev/debt/libSceAgcDriver.md

@hugodearaujo

Copy link
Copy Markdown
Contributor Author

On the two pull requests with conflicting lines, neither implements this change nor depends on it:

@github-actions github-actions Bot added docs agc libSceAgc* labels Oct 20, 2026
@TheSovietWaffle

Copy link
Copy Markdown
Contributor

NVIDIA and AMD proprietary data point: RTX 3080 (NVIDIA 617.42) and AMD Radeon RDNA 2 iGPU (1002:164e, 32.0.21045.5002), Windows 10 Pro 22H2, WinLibs GCC 15.2.0, Release, head 75720e0de: agc_driver_graphics, agc_driver, agc_driver_mesh and agc_driver_tessellation pass 3 of 3 on both GPUs (this Radeon driver reports no mesh shaders).

AI-assisted: yes (Claude Code).

@hugodearaujo

Copy link
Copy Markdown
Contributor Author

@TheSovietWaffle Thanks, that is the first run of this change on NVIDIA and on AMD's own driver; I only had RADV. I added it to the Tested section.

@github-actions github-actions Bot added the needs rebase Conflicts with main, rebase needed label Oct 21, 2026
@github-actions github-actions Bot removed the needs rebase Conflicts with main, rebase needed label Oct 23, 2026
@adriadam10 adriadam10 self-assigned this Oct 23, 2026
@hugodearaujo

Copy link
Copy Markdown
Contributor Author

Merged current main (74acfad), without conflicts, and updated Tested: the paired run of agc_driver, agc_driver_graphics and agc_driver_mesh on main and this head with the Khronos validation layer (3 of 3 on both, no VUID- lines), the negative control, and the full CTest on both.

The agc_driver case that resolves the registered fast-launch program with a
triangle strip passed with main's State.cpp too: the program is already
deferred at registration, so the resolve defers the stage it cannot decode
without logging anything. Resolve the strip first and require the point list
to find the artifact the strip prepared (the same prepared entry hashes).
With main's State.cpp the strip prepares nothing and the point list then
prepares the program, so the case fails. A device that prepares the program
for neither type has nothing to compare.
@hugodearaujo

Copy link
Copy Markdown
Contributor Author

Added f4a2740, test only: the agc_driver case now resolves the registered fast-launch program with a triangle strip before the point list and checks that the point list reuses the artifact the strip prepared (Driver::PreparedEntryHashes). With main's State.cpp it fails (the strip stays deferred and prepares nothing), so the negative control now fails both agc_driver and agc_driver_graphics. The paired validation on this head is unchanged: 3 of 3 on main and here, no VUID- lines. I also corrected the program's origin to #6150 in Tested.

@github-actions github-actions Bot removed the needs rebase Conflicts with main, rebase needed label Oct 29, 2026

@XairRrR XairRrR left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed — approved

The change decodes a GS_FAST_LAUNCH = 1 draw with a one-vertex, one-primitive GE_CNTL group as one point per subgroup whatever VGT_PRIMITIVE_TYPE holds. It merges cleanly, builds, and the focused AGC tests pass with the Khronos validation layer and no VUID- lines on either side. The negative control fails both new checks on an NVIDIA GPU as well as on the author's RADV.

What I ran

  • PR head: f29635063ca9e80488a1f6f18b1e4d12147e3742
  • main: 899ae3d1ad32ccea94dc24e66fdc948ce8a88171
  • Merged tree (main + head, --no-ff): d99ad97ab97e7d05f3625c86c3646bacc1e270fa, no conflicts
  • Machine: Arch Linux 7.2.11-zen, GCC 16.2.1, Release, Intel Core i9-14900KF, NVIDIA GeForce RTX 4070 Ti SUPER (driver 615.78.08), in a clean worktree
git fetch origin main pull/8395/head:refs/review/8395
git checkout --detach origin/main && git merge --no-ff --no-edit refs/review/8395
git diff --check origin/main...refs/review/8395
python3 tools/check_conventions.py --base origin/main
nice -n 10 cmake --build build -j10 --target agc_driver_tests agc_driver_graphics_tests agc_driver_mesh_tests
nice -n 10 cmake --build build -j10 --target libs agc_driver_tests agc_driver_graphics_tests agc_driver_mesh_tests
VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation ANYPS5_NO_SHADER_CACHE=1 ANYPS5_REQUIRE_VULKAN=1 VK_LOADER_DEBUG=error,warn,layer \
  nice -n 10 ctest --test-dir build -R '^(agc_driver|agc_driver_graphics|agc_driver_mesh)$' -V --output-on-failure -j4
# the same build and ctest command on origin/main (899ae3d1ad) in the same worktree
# negative control: git checkout origin/main -- core/libs/prx/libSceAgcDriver/Graphics/src/State.cpp, rebuild, the same ctest command

Results

Check Result
Merge with main Clean
git diff --check Clean
tools/check_conventions.py --base origin/main All conventions checks passed.
Build (libs and the three test targets) OK
agc_driver, agc_driver_graphics, agc_driver_mesh on the merged tree, with validation 3 of 3 pass
The same on main 3 of 3 pass
Insert instance layer "VK_LAYER_KHRONOS_validation" 3 on main, 3 on the merged tree
was not found but was requested by env var VK_INSTANCE_LAYERS 0 on both
VUID- lines 0 on both
Test durations 1.6 s, 4.7 s and 6.1 s; all under 30 s
Negative control agc_driver and agc_driver_graphics fail, agc_driver_mesh passes
Merged tree
959: Mesh tests passed
1/3 Test #959: agc_driver_mesh ..................   Passed    1.58 sec
934: AGC driver submit tests passed
2/3 Test #934: agc_driver .......................   Passed    4.67 sec
957: Graphics validation tests passed
3/3 Test #957: agc_driver_graphics ..............   Passed    6.14 sec
100% tests passed out of 3
main
1/3 Test #959: agc_driver_mesh ..................   Passed    1.75 sec
2/3 Test #934: agc_driver .......................   Passed    4.66 sec
3/3 Test #957: agc_driver_graphics ..............   Passed    5.52 sec
100% tests passed out of 3

Negative control

I restored only core/libs/prx/libSceAgcDriver/Graphics/src/State.cpp from main, kept the PR's tests, rebuilt and ran the same command. Both tests that hold the new checks fail:

Output
957: AGC graphics: unexpected failure: AGC graphics: VGT_SHADER_STAGES_EN=0x482030: fast launch other than one point per subgroup is unsupported
1/3 Test #957: agc_driver_graphics ..............***Failed    0.17 sec
934: a registered fast-launch program resolved with a triangle strip was not prepared as for a point list
2/3 Test #934: agc_driver .......................***Failed    0.82 sec
3/3 Test #959: agc_driver_mesh ..................   Passed    1.54 sec
33% tests passed, 2 tests failed out of 3

This confirms the description's negative control on a second vendor. The PreparedEntryHashes comparison in agc_driver also detects the change on NVIDIA, so on this device it is not just two empty sets compared with each other.

Findings

Blocking

None.

Non-blocking

  1. state.topology still follows VGT_PRIMITIVE_TYPE for a fast-launch draw, so the provoking-vertex checks can refuse the draw with a misleading message. DecodeShaderStages now gives the mesh a point list (State.cpp:1332). DecodeState still sets topology from the raw type, so types 5 and 21 give TRIANGLE_FAN (State.cpp:1512-1515). With last provoking vertex observed, a fast-launch draw of type 5 or 21 therefore throws last provoking vertex is unsupported for triangle fans assembled for a geometry program (Pipeline.cpp:234-236), although this path assembles no fan. A strip type hits the same problem through the per-vertex triangle-strip interpolation check (Pipeline.cpp:242). Both checks throw instead of drawing anything wrong, so this is not a correctness bug. Still, once a title reaches them they will point at the wrong cause. A follow-up could key the fan check on state.stages.mesh->inputPrimitive rather than state.topology.
  2. Type 21 is accepted but not tested. The decode test loops over types 2 to 6 (tests/Graphics.cpp:1187). DecodeState also accepts type 21 on this path (State.cpp:1513), and now decodes it as a point list. Adding 21u to the list would cover every type that the PR newly accepts on the fast-launch path. Types 7, 17 and 19 still throw because they require vertex routing.

Not verified

  • Whether the console starts one subgroup per vertex for a line or triangle VGT_PRIMITIVE_TYPE under fast launch. The PR states this as an assumption and records it in the debt entry. I did not check the RADV sources that the description cites.
  • The CONTROL Resonant (PPSA34547) runs. I launched no title.
  • AMD and Windows runs. I ran on NVIDIA under Linux only.

@hugodearaujo

hugodearaujo commented Oct 29, 2026 •

Copy link
Copy Markdown
Contributor Author

@XairRrR thanks for the review and for the NVIDIA run.

  • Type 21: added to the decode test in c65b4ef (test only); agc_driver, agc_driver_graphics and agc_driver_mesh pass on it with the validation layer inserted and no VUID- lines.
  • The provoking-vertex and strip interpolation checks still reading state.topology: agreed, they would name the wrong cause for a fast-launch draw. Neither check appears in any of my 17 CONTROL Resonant logs, with or without this PR, so I'd rather keep this PR to the decode and key those checks on the mesh's input primitive in a follow-up, with a test for each, once a title shows one of them.

@XairRrR XairRrR left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Re-checked — approved

The only new commit, c65b4ef, adds VGT_PRIMITIVE_TYPE 21 to the fast-launch decode test, as my previous review suggested. The merge with current main is clean, the focused AGC tests pass with the Khronos validation layer and log no VUID- lines on either side, and the new type 21 case fails on its own against main's State.cpp.

What changed since my last review

  • One commit on top of f296350: c65b4ef, test only. It changes {2u, 3u, 4u, 5u, 6u} to {2u, 3u, 4u, 5u, 6u, 21u} in the decode loop (tests/Graphics.cpp:1187). Production code is the same as in the commit I approved.
  • The author replied to both findings, and the Tested section now mentions c65b4ef.
  • main moved from 899ae3d to 478b5f1.

What I ran

  • PR head: c65b4eff5f04f9587d9d220b8e87a654edff093c
  • main: 478b5f1a93c9bb1cb79e7578f4438a42d7381353
  • Merged tree (main + head, --no-ff): a69d18318712b1c2f42a9f7e5d9fa83b283874a4, no conflicts
  • Machine: Arch Linux 7.2.11-zen, GCC 16.2.1, Release, Intel Core i9-14900KF, NVIDIA GeForce RTX 4070 Ti SUPER (driver 615.78.08), in a clean worktree
git fetch origin main pull/8395/head:refs/review/8395
git log --oneline f29635063c..refs/review/8395 && git diff f29635063c refs/review/8395
git checkout --detach origin/main && git merge --no-ff --no-edit refs/review/8395
git diff --check origin/main...refs/review/8395
python3 tools/check_conventions.py --base origin/main
nice -n 10 cmake --build build -j10 --target libs agc_driver_tests agc_driver_graphics_tests agc_driver_mesh_tests
VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation ANYPS5_NO_SHADER_CACHE=1 ANYPS5_REQUIRE_VULKAN=1 VK_LOADER_DEBUG=error,warn,layer \
  nice -n 10 ctest --test-dir build -R '^(agc_driver|agc_driver_graphics|agc_driver_mesh)$' -V --output-on-failure -j4
# the same build and ctest command on origin/main (478b5f1a93) in the same worktree
# negative control 1: merged tree, git checkout origin/main -- core/libs/prx/libSceAgcDriver/Graphics/src/State.cpp, rebuild, the same ctest command
# negative control 2: as 1, with the decode loop narrowed to {21u}, then rebuild agc_driver_graphics_tests and run ctest -R '^agc_driver_graphics$'
Check Result
Merge with main Clean
git diff --check Clean
tools/check_conventions.py --base origin/main All conventions checks passed.
Build (libs and the three test targets), merged tree and main OK
agc_driver, agc_driver_graphics, agc_driver_mesh, merged tree, with validation 3 of 3 pass (4.8 s, 6.3 s, 1.4 s)
The same on main 3 of 3 pass (4.8 s, 6.0 s, 1.6 s)
Insert instance layer "VK_LAYER_KHRONOS_validation" 3 on main, 3 on the merged tree
was not found but was requested by env var VK_INSTANCE_LAYERS 0 on both
VUID- lines 0 on both
Negative control 1 (main's State.cpp) agc_driver and agc_driver_graphics fail, agc_driver_mesh passes
Negative control 2 (type 21 only, main's State.cpp) agc_driver_graphics fails
Merged tree
960: Mesh tests passed
1/3 Test #960: agc_driver_mesh ..................   Passed    1.42 sec
935: AGC driver submit tests passed
2/3 Test #935: agc_driver .......................   Passed    4.81 sec
958: Graphics validation tests passed
3/3 Test #958: agc_driver_graphics ..............   Passed    6.34 sec
100% tests passed out of 3
main
1/3 Test #960: agc_driver_mesh ..................   Passed    1.58 sec
2/3 Test #935: agc_driver .......................   Passed    4.79 sec
3/3 Test #958: agc_driver_graphics ..............   Passed    6.04 sec
100% tests passed out of 3
Negative controls
# 1: main's State.cpp, PR tests
958: AGC graphics: unexpected failure: AGC graphics: VGT_SHADER_STAGES_EN=0x482030: fast launch other than one point per subgroup is unsupported
1/3 Test #958: agc_driver_graphics ..............***Failed    0.18 sec
935: a registered fast-launch program resolved with a triangle strip was not prepared as for a point list
2/3 Test #935: agc_driver .......................***Failed    0.89 sec
3/3 Test #960: agc_driver_mesh ..................   Passed    1.42 sec
33% tests passed, 2 tests failed out of 3

# 2: main's State.cpp, decode loop over {21u} only
1/1 Test #958: agc_driver_graphics ..............***Failed    0.26 sec
AGC graphics: unexpected failure: AGC graphics: VGT_SHADER_STAGES_EN=0x482030: fast launch other than one point per subgroup is unsupported

The full-loop control fails on type 2 before it reaches 21. So I also ran the loop with type 21 alone, which confirms that the new case covers behaviour of its own and does not just pass because the earlier types pass.

Previous findings

  1. state.topology still follows VGT_PRIMITIVE_TYPE for fast launch, so the provoking-vertex and strip-interpolation checks can give the wrong cause. Still open, non-blocking. c65b4ef does not touch it (Pipeline.cpp:236 on current main still checks state.topology). The author agrees and plans a follow-up with a test for each check. They also say that neither message appears in their 17 CONTROL Resonant logs (author-reported). Both checks throw rather than draw anything wrong, so a follow-up is reasonable, and I am not holding this PR for it.
  2. Type 21 accepted but untested. Resolved by c65b4ef (tests/Graphics.cpp:1187). It passes on the merged tree and fails alone against main's State.cpp (negative control 2).

New findings

Blocking

None.

Non-blocking

None.

Not verified

  • Whether the console starts one subgroup per vertex for a line or triangle VGT_PRIMITIVE_TYPE under fast launch. This is unchanged from my last review and is recorded in the debt entry as an assumption.
  • The CONTROL Resonant (PPSA34547) runs and the author's RADV run of c65b4ef. Both are author-reported; I launched no title.
  • AMD and Windows runs. I ran on NVIDIA under Linux only.

@TechLevelZero

Copy link
Copy Markdown
Contributor

✅ NVIDIA GPU test: passed

PR head c65b4ef merged onto main bb04a4f · tested 2026-10-29 21:48 UTC · 25 min

GPU NVIDIA RTX 2000 Ada Generation, driver 595.99.02, Vulkan 1.4.329
Host Ubuntu 26.04.1 LTS, kernel 7.0.0-38-generic, container ubuntu:24.04
Logs build and test logs for this run
Build ✅ passed (Release, -DANYPS5_ENABLE_SPIRV_TOOLS=ON)
Tests ✅ 2,232 passed · 6 failed (0 new, 5 also fail on main, 1 unstable on main) · 40 skipped (ANYPS5_REQUIRE_VULKAN=1)
Test setup CPU-only tests without a GPU; GPU tests (and any CPU-only test that failed or skipped without one) once on the GPU with VK_LAYER_KHRONOS_validation and ANYPS5_NO_SHADER_CACHE=1; main ran the same way
Test selection 2,278 of 2,918 tests run: the ones this change can reach, chosen by tools/select_tests.py from main's build graph
Vulkan validation ✅ no new validation IDs vs main (856 tests run on the GPU)
Slow tests (>30 s, GPU tests timed with validation layers) ⚠️ agc_driver_bda_device 41.4 s, ⚠️ agc_driver_lazy_resolved_abi_switch_set 30.8 s
Unstable on main (1, these also failed in recent main runs on this machine; not counted against this PR)
agc_driver_submit_progress: failed in 4 of the last 6 main runs
Failing on main too (5, not counted against this PR)
agc_compute_pipeline_inspection
agc_submit_progress
agc_submit_progress_no_timeline
guest_mmap_executable
guest_socket_options_multicast
Passed on retry (1, failed in the parallel run, passed when re-run with a 360 s timeout; not counted against this PR)
agc_driver_job_manager_compute_capacity: Failed in the parallel run; also passed only on retry in 54 other runs in the last 7 days
Validation IDs already present on main (4 IDs in 397 tests)
VUID-VkDeviceCreateInfo-pNext-pNext (397 tests): agc_compute_pipeline_replay, agc_driver, agc_driver_address_passes_draw_transitions, agc_driver_address_passes_targets_split, agc_driver_alias_copy_label, agc_driver_array_layer_target, agc_driver_array_layer_target_cpu, agc_driver_bda_anchor_reads, and 389 more
VUID-vkCmdCopyImage-srcImage-01548 (11 tests): agc_driver_depth_clear_hle, agc_driver_depth_plane_buffer_memory, agc_driver_depth_plane_cpu_write_after_memo, agc_driver_depth_plane_cpu_write_after_page_unwatch, agc_driver_depth_plane_cpu_write_after_partial_unwatch, agc_driver_depth_plane_partial_store, agc_driver_depth_plane_partial_store_unimported, agc_driver_depth_storage_dispatch, and 3 more
VUID-vkCmdCopyImage-srcImage-01551 (11 tests): agc_driver_depth_clear_hle, agc_driver_depth_plane_buffer_memory, agc_driver_depth_plane_cpu_write_after_memo, agc_driver_depth_plane_cpu_write_after_page_unwatch, agc_driver_depth_plane_cpu_write_after_partial_unwatch, agc_driver_depth_plane_partial_store, agc_driver_depth_plane_partial_store_unimported, agc_driver_depth_storage_dispatch, and 3 more
VUID-VkPipelineColorBlendStateCreateInfo-pAttachments-00605 (2 tests): agc_driver_prepared_exports, agc_driver_srgb8_color_target
Skipped (40)
agc_driver_bda_reads_shadowed_results: skipped, the device reports watched host memory written when it imports or reads it
agc_driver_bda_reads_shadowed_results_per_build: skipped, the device reports watched host memory written when it imports or reads it
agc_driver_msaa_dcc_compared_import_2: skipped, the device reports host imports that keep write protection, so the write-watch probe compares none of them
agc_driver_msaa_dcc_compared_import_4: skipped, the device reports host imports that keep write protection, so the write-watch probe compares none of them
agc_driver_msaa_dcc_compared_import_8: skipped, the device reports host imports that keep write protection, so the write-watch probe compares none of them
agc_driver_sample_order_grid_reference: skipped, the device does not keep depth drawn at custom sample locations at those locations, even after a transition that names them: the composite of uniform renders holds the guest's depth in 0 of 3005 sloped samples, so no path can be compared with it bit for bit
agc_driver_sparse_dma_buf_import: skipped, host imports are unavailable: /dev/udmabuf is not accessible
agc_driver_stencil_ref_export: skipped, the device lacks VK_EXT_shader_stencil_export
agc_host_import_sparse: skipped, host imports are unavailable: /dev/udmabuf is not accessible
agc_import_settle_initial_dcc: skipped, the device has no deferred settle of host imports: imports under 1 MiB wait for one only on Windows
agc_unit_shadow_completion_store: skipped, the device reports watched host memory written when it imports or reads it
guest_http_uri_locale: 
guest_net_ctl: skipped, the host has no IPv4 address
guest_video_out_color_space: skipped, no display or Vulkan device: SDL_InitSubSystem(VIDEO | GAMECONTROLLER) failed: wayland,x11 not available
guest_video_out_hdr: skipped, no display or Vulkan device: SDL_InitSubSystem(VIDEO | GAMECONTROLLER) failed: wayland,x11 not available
guest_video_out_high_frame_rate: skipped, no display or Vulkan device: SDL_InitSubSystem(VIDEO | GAMECONTROLLER) failed: wayland,x11 not available
guest_video_out_output_mode: skipped, no display or Vulkan device: SDL_InitSubSystem(VIDEO | GAMECONTROLLER) failed: wayland,x11 not available
guest_video_out_resolution_status: skipped, no display or Vulkan device: SDL_InitSubSystem(VIDEO | GAMECONTROLLER) failed: wayland,x11 not available
guest_video_out_wqhd_detection: skipped, no display or Vulkan device: SDL_InitSubSystem(VIDEO | GAMECONTROLLER) failed: wayland,x11 not available
video_out_flip_controls: skipped, no display or Vulkan device: DisplayWindow: Vulkan support is either not configured in SDL or not available in current SDL video driver (offscreen) or platform
video_out_flip_cpuflip: skipped, no display or Vulkan device: DisplayWindow: Vulkan support is either not configured in SDL or not available in current SDL video driver (offscreen) or platform
video_out_flip_cpuflip_in_order: skipped, no display or Vulkan device: DisplayWindow: Vulkan support is either not configured in SDL or not available in current SDL video driver (offscreen) or platform
video_out_flip_eop: skipped, no display or Vulkan device: DisplayWindow: Vulkan support is either not configured in SDL or not available in current SDL video driver (offscreen) or platform
video_out_flip_eop_aftergpu: skipped, no display or Vulkan device: DisplayWindow: Vulkan support is either not configured in SDL or not available in current SDL video driver (offscreen) or platform
video_out_flip_eop_main: skipped, no display or Vulkan device: DisplayWindow: Vulkan support is either not configured in SDL or not available in current SDL video driver (offscreen) or platform
video_out_flip_fresh: skipped, no display or Vulkan device: DisplayWindow: Vulkan support is either not configured in SDL or not available in current SDL video driver (offscreen) or platform
video_out_flip_labels: skipped, no display or Vulkan device: DisplayWindow: Vulkan support is either not configured in SDL or not
Reproduce
git fetch origin c65b4eff5f04f9587d9d220b8e87a654edff093c bb04a4f1ea0175e9e4f149f0359a764d62ff3296
git checkout bb04a4f1ea0175e9e4f149f0359a764d62ff3296 && git merge --no-ff c65b4eff5f04f9587d9d220b8e87a654edff093c
git submodule update --init --recursive
cmake -S . -B build -G Ninja -DCMAKE_BUILD_TYPE=Release -DBUILD_TESTING=ON -DANYPS5_ENABLE_SPIRV_TOOLS=ON
cmake --build build && cmake --build build --target libs
VK_DRIVER_FILES=/nonexistent/icd.json ctest --test-dir build -E '^(agc|shader|recompiler|videoout|video_out|guest_video_out|vulkan)|gpu' --timeout 120 --parallel 32 --output-on-failure
ANYPS5_REQUIRE_VULKAN=1 ANYPS5_NO_SHADER_CACHE=1 VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation \
  ctest --test-dir build -R '^(agc|shader|recompiler|videoout|video_out|guest_video_out|vulkan)|gpu' --timeout 120 --parallel 4 --output-on-failure
# failures are then re-run alone: --timeout 360 --parallel 2; new validation IDs: the test alone, twice, --parallel 1

Automated build and test on a contributor's NVIDIA machine; it does not replace upstream CI. A new comment is posted for each new push. Full logs.

@github-actions github-actions Bot added the review queue Next in the maintainer review queue: checks pass, no open change request, no conflict label Nov 1, 2026
slopradish added a commit to slopradish/AnyPS5 that referenced this pull request Nov 2, 2026
@oneandonlydean oneandonlydean self-assigned this Nov 2, 2026
@oneandonlydean
oneandonlydean merged commit 9f33492 into boykopovar:main Nov 2, 2026
11 of 12 checks passed
@github-actions github-actions Bot removed the review queue Next in the maintainer review queue: checks pass, no open change request, no conflict label Nov 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agc libSceAgc* docs unblocks title Names a title ID on the Unblocks line

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants