Skip to content

fix(shader): serve ds_ordered_count in wave launch order - #12944

Open
ZSWolt wants to merge 23 commits into
boykopovar:mainfrom
ZSWolt:fix/recompiler-ordered-append
Open

ZSWolt wants to merge 23 commits into
boykopovar:mainfrom
ZSWolt:fix/recompiler-ordered-append

Conversation

@ZSWolt

@ZSWolt ZSWolt commented Oct 29, 2026 •

Copy link
Copy Markdown
Contributor

What

Background. On AMD GCN/RDNA GPUs, GDS (global data share) is a small on-chip memory shared by all waves of a dispatch. ds_ordered_count is a GDS instruction that adds to, or swaps, a counter in GDS and returns the old value. Unlike an ordinary atomic, the hardware serves the waves in wavefront launch order: the first-launched wave gets the first value, the next wave the next, and so on. Shaders use it to give each wave a contiguous, ordered slice of an output buffer (stream compaction, particle lists, culling output). Because the order is guaranteed, the result is deterministic and the slices never overlap.

The bug. ds_ordered_count (ordered append on GDS) ran as a plain device atomic, so the waves of a dispatch added in whatever order the host ran them. The hardware hands the counter out in wavefront launch order. radeonsi's si_compute_prim_discard.c (mesa-20.3.0) describes it as "an atomic counter that is incremented in the wavefront launch order", with ORDER_MODE 0 launching in order. A title that turns the returned values into output offsets therefore got overlapping or shifted ranges, intermittently.

In compute shaders the ordered add and swap now run in launch order:

  • Launch index: each wave computes its launch index: the flattened workgroup ID times the waves per workgroup, plus the wave index in the workgroup.
  • Waiting for its turn: one lane per guest wave waits until a turn dword kept one dword past the 64 KiB GDS equals that index. The GDS binding grows by two dwords (RuntimeAbi::GdsMetadataDwords), the turn and a timeout count (Pm4::GdsBindingBytes). Ordinary GDS accesses stay bounded at 64 KiB; only the ordering code reaches the two dwords. The wait, the add and the release run inside one loop, so guest waves that share a host subgroup (wave32 code in a 64-lane subgroup) do not wait on each other.
  • Passing the turn on: it performs the add or swap, then, when offset1 bit 1 (wave done) is set, compare-exchanges the turn from its own index to the next (0 after the dispatch's last wave). Only the wave that holds the turn moves it.
  • Reset per dispatch: the compiled program records whether it orders (orderedAppend, disk cache format 70). For those programs only, the driver zeroes the turn in the buffer the dispatch binds, before the dispatch and before each chunk of a split one. It uses a COMPUTE_SHADER → TRANSFER barrier, a 4-byte vkCmdFillBuffer, then TRANSFER → COMPUTE_SHADER. A GDS copy the CPU made is created fillable, so it is reset the same way. Each chunk counts its own waves.
  • Bounded wait: a wave goes ahead after 2^20 reads of the turn (about 130 ms on an RX 9060 XT). It adds unordered (as on main), marks the turn abandoned so the rest of the dispatch runs unordered at once, and adds 1 to the timeout count, which the test checks. With one wave that never takes its turn, a 65536-group dispatch takes about 350 ms; without the mark it lost the device after 2 s.
  • Graphics stages keep the unordered add.

The wait relies on waves being launched in workgroup order and on earlier waves running while later ones spin. AMD hardware does this, but Vulkan does not guarantee it. This is recorded in docs/dev/debt/shader.md, which now describes the new behaviour in place of "not modeled".

Tested

Ubuntu 26.04.1 (Linux 7.0.0-38), GCC 15.2.0, Release, RX 9060 XT (RADV GFX1200, Mesa 26.0.8-1ubuntu0.3). Based on main 6d56eb8 (merged into the branch on Oct 30).

  • New cases in agc_driver_gds_append_consume, each checking every lane's value, the counter and a timeout count of 0:
    • 64 single-wave workgroups each add 1, and group g must get start + g. Runs 8 dispatches back to back.
    • The same with group 0 delayed by a scalar loop, so later waves reach the instruction first.
    • 16 groups of 4 waves, group 0 delayed.
    • 4 groups where group 1 skips ds_ordered_count: group 0 gets the start value, groups 2–3 time out and get the remaining values, and exactly 2 timeouts are counted.
    • A normal dispatch right after that one, with the turn left at 1: it is ordered only because of the per-dispatch reset.
    • On main bb04a4f (with only this test file added) it fails: "64 single-wave groups, dispatch 1, ds_ordered_count: group 0 lane 0 returned 1025, expected 1000 (the counter in launch order)".
    • With this change it passes.
    • The existing single-workgroup ordered add and swap cases still pass.
  • Split-dispatch case (1 x 65537 single-wave groups, row 1 skips ds_ordered_count), in agc_driver_gds_append_consume and _copied. The RX 9060 XT on RADV reports maxComputeWorkGroupCount[1] = 65535, so the case takes the split path here: 2 chunks, row 0 gets the start value, 65533 waves of the first chunk run unordered, and the second chunk and the dispatch after it are ordered. It passes 3 of 3 in both registrations, with 0 VUID- messages.
    • On AMD's Windows driver (RX 9070 XT, reported by BunnyFl) row 0 got a value about 65,300 places late, which means it started after most of the dispatch. Vulkan does not guarantee that workgroups start in WorkgroupId order. For a row 0 served that late, the case skips only the row 0 value and the unordered count, and names the skip in its success line; the skipped row, the second chunk's order after its reset and the final counter are still checked. A row 0 served early but not first still fails. The debt entry names the assumption.
  • ctest -R '^agc_|^shader_|recompiler' -j4 on this branch: 1130 of 1132 pass. The 2 failures, agc_idle_publish_wait and agc_driver_native_multisample_depth, also fail on main on this machine (the second because a host import gets vkAllocateMemory -13 here).
  • Validation-layer compare: ANYPS5_REQUIRE_VULKAN=1 ANYPS5_NO_SHADER_CACHE=1 VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation ctest -V -R gds_append on the same machine and GPU, on main bb04a4f and on this branch.
    • Neither log has the "was not found but was requested" line, and both have 0 VUID- messages.
    • On main the test fails only on the new case, as intended.
  • God of War Ragnarök (PPSA08329), title-screen fireplace scene. Plain main stops at startup in this title (sceHttp2SetResolveRetry not implemented), so this ran on my local integration build (main plus local branches) with and without this PR.
    • Before the change, a particle compute shader that uses ordered append (0x1038fb8200) intermittently produced overlapping particle records, drawn as long streaks. That was 1–9 corrupted frames per 8-minute run; with the change, 0 in 3 runs (Oct 23, first version of this PR).
    • A/B on the current head, tools/trace_digest.py, APS5_TRACE_SECONDS=200:60, order without, with, with, without:
      • presents 203 / 217 / 214 / 198;
      • frame p50 287.0 / 275.9 / 277.9 / 292.2 ms;
      • gpu_busy_ms_per_present 148.5 / 128.9 / 128.6 / 151.9. This metric spans each batch from its first to its last command, idle gaps included, so it is not shader time. I have not attributed the change to a phase.
    • Earlier versions of this description gave presents "851–857 against about 790" on main. That was wrong: those were runs of the integration build against a baseline from another day.
  • python3 tools/check_conventions.py --base origin/main: all conventions checks passed.
  • tools/pr_overlap.py --branch fix/recompiler-ordered-append: no open PR changes ds_ordered_count. The overlaps are on shared files only: Graphics/src/ShaderResources.cpp, SpirvMemoryInstructions.cpp, SpirvEmitterHelpers.cpp, Execution/src/Pm4.cpp and docs/dev/debt/shader.md (e.g. feat(agc): serve lane-keyed, pointer and runtime image-table columns #10193, feat(agc): test the depth bounds in the pixel program when the device lacks the depthBounds feature #11551, fix(agc): span table-reading wave64 programs by default on Intel drivers that share handles across fused threads #10846).

Progress

PPSA08329 on this machine (RX 9060 XT, RADV), on main with this change and other local, unrelated fixes; this PR depends on none of them. Bring-up thread: #12128.

  • Streaks: the particle streaks from earlier runs are gone. Particle draws read records that compute shader 0x1038fb8200 writes through ds_ordered_count slots, and serving those slots in launch order removed every streak.
  • Gameplay reached: from a new game, the opening cutscene and the sled chase run through the first Freya fight, with the forest, rocks, snow ground and characters drawn. A 10-minute run from that save on Oct 29 showed the fight lit, with the forest and snow present.
  • Frame time, title-screen fireplace scene (Oct 29), A/B on the local build with and without this PR:
    • presents in 60 s: 203 / 198 without, 217 / 214 with;
    • gpu_busy_ms_per_present: 148.5 / 151.9 without, 128.9 / 128.6 with.
  • Still open, not addressed here: the CPU-bound packet thread (about 2 FPS in the chase).

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: PPSA08329 God of War Ragnarök (PPSA08329) #12128 (God of War Ragnarök particle streaks)
  • GPUs tested: AMD Radeon RX 9060 XT, RADV GFX1200, Mesa 26.0.8, Ubuntu 26.04.1
  • AI-assisted: yes

🤖 Generated with Claude Code

The hardware hands out an ordered-append counter in wavefront launch
order. Compute waves now wait for a turn dword kept past the 64 KiB GDS
to reach their launch index (flattened workgroup ID times waves per
workgroup plus the wave index), perform the add or swap, and pass the
turn on when the wave-done bit is set; the last wave of a dispatch
resets it. The wait is bounded so a wave that never issues a done
operation cannot hang the device.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@github-actions github-actions Bot added the unblocks title Names a title ID on the Unblocks line label Oct 29, 2026
@oneandonlydean

Copy link
Copy Markdown
Collaborator

@ZSWolt thanks, this is a good approach (the radeonsi-style turn past the GDS range, per-chunk reset for split dispatches, graphics left unordered, and a bounded wait so nothing can hang). One problem in the timeout path needs fixing before it can land:

A wave that gives up waiting still moves the turn. The wait loop leaves on ready || exhausted (SpirvMemoryInstructions.cpp around l.1333), and the wave-done release then stores launch + 1 (or 0 after the last wave) unconditionally with OpAtomicStore. So a wave that timed out also writes the turn. With two waves and the turn at 0: if wave 1 runs first and exhausts its wait, it adds, and as the last wave stores 0; wave 0 then adds and stores 1. The results come out reversed, and the dispatch ends with the turn at 1, so every wave of the next dispatch waits the full 2^20 reads and then runs unordered as well. One timeout turns into a slowdown and wrong order for everything after it, which is worse than main's plain unordered behaviour.

Please:

  1. Only the wave that holds the turn passes it on. Release with a compare-exchange from launch to launch + 1 (or 0), so a wave that timed out leaves the turn alone. Running that one wave unordered after a timeout is acceptable (it matches main), as long as it can't affect the waves after it.
  2. Make the reset belong to the dispatch, so the next dispatch starts at 0 even if the last wave finished early, timed out, or never reached the instruction (for example, reset it in the PM4 path before each dispatch that uses ordered count, rather than relying on the last wave's store).
  3. Make timeouts visible: count them (a debug counter or log line is enough), so a passing test can't hide that the fallback ran.
  4. Tests: add a case where a later wave reaches the instruction first (delay the first wave), multi-wave work-groups, and a second dispatch after one with a timeout, checking per-wave results and that the second dispatch is ordered. The current test (64 single-wave groups, 8 runs) only covers the in-order path.

The debt entry already says that in-order launch and progress are assumed and that Vulkan doesn't guarantee them, which is right; please add what happens on a timeout after the fix.

We'll run it on an RTX 4090 when it's updated (the agc_driver_gds_append_consume test plus a frame-time check on titles we have).

@github-actions

github-actions Bot commented Oct 29, 2026 •

Copy link
Copy Markdown

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/Execution/src/VulkanDevice.cpp
PR 4040 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
PR 4448 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
core/libs/prx/libSceAgcDriver/Graphics/include/GuestBufferMemory.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
PR 4472 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
PR 4847 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
PR 5371 core/shader/recompiler/RuntimeAbi.hpp
docs/dev/debt/shader.md
PR 5372 core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
PR 5609 core/shader/recompiler/Recompiler.cpp
core/shader/recompiler/Recompiler.hpp
core/shader/recompiler/ShaderDiskCache.cpp
PR 5925 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
core/shader/recompiler/Recompiler.hpp
core/shader/recompiler/ShaderDiskCache.cpp
core/shader/recompiler/ShaderDiskCache.hpp
PR 6186 core/libs/prx/libSceAgcDriver/Graphics/include/GuestBufferMemory.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
core/libs/prx/libSceAgcDriver/tests/Pm4.cpp
PR 6188 core/libs/prx/libSceAgcDriver/Execution/include/Pm4.hpp
core/libs/prx/libSceAgcDriver/Execution/src/Pm4.cpp
core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
core/shader/recompiler/Recompiler.hpp
PR 6192 core/libs/prx/libSceAgcDriver/Graphics/include/ShaderResources.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp
PR 6197 core/libs/prx/libSceAgcDriver/Graphics/include/GuestBufferMemory.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
PR 6235 core/shader/recompiler/Recompiler.hpp
core/shader/recompiler/SpirvBackend/src/SpirvMemory/SpirvEmitterHelpers.cpp
core/shader/recompiler/SpirvBackend/src/SpirvModuleEmitter.cpp
docs/dev/debt/shader.md
PR 6280 core/shader/recompiler/RuntimeAbi.hpp
core/shader/recompiler/ShaderDiskCache.cpp
core/shader/recompiler/ShaderDiskCache.hpp
docs/dev/debt/shader.md
PR 6340 core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp
PR 6412 core/libs/prx/libSceAgcDriver/Graphics/include/ShaderResources.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp
core/shader/recompiler/Recompiler.cpp
core/shader/recompiler/Recompiler.hpp
core/shader/recompiler/ShaderDiskCache.cpp
core/shader/recompiler/ShaderDiskCache.hpp
docs/dev/debt/shader.md
PR 6481 core/libs/prx/libSceAgcDriver/Graphics/include/GuestBufferMemory.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp
PR 6488 core/shader/recompiler/Recompiler.cpp
core/shader/recompiler/ShaderDiskCache.cpp
core/shader/recompiler/ShaderDiskCache.hpp
core/shader/recompiler/SpirvBackend/src/SpirvEmitter.cpp
docs/dev/debt/shader.md
PR 6924 core/shader/recompiler/Recompiler.cpp
core/shader/recompiler/ShaderDiskCache.cpp
core/shader/recompiler/ShaderDiskCache.hpp
docs/dev/debt/shader.md
PR 7002 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
core/libs/prx/libSceAgcDriver/Graphics/include/ShaderResources.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp
PR 7085 core/libs/prx/libSceAgcDriver/tests/cmake/agc_driver_graphics_tests.cmake
core/shader/recompiler/RuntimeAbi.hpp
core/shader/recompiler/ShaderDiskCache.cpp
core/shader/recompiler/ShaderDiskCache.hpp
PR 7392 core/shader/recompiler/SpirvBackend/include/SpirvBackend/SpirvEmitterState.hpp
core/shader/recompiler/SpirvBackend/src/SpirvEmitter.cpp
docs/dev/debt/shader.md
PR 7642 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
core/libs/prx/libSceAgcDriver/Graphics/include/GuestBufferMemory.hpp
core/libs/prx/libSceAgcDriver/Graphics/include/ShaderResources.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp
core/libs/prx/libSceAgcDriver/tests/cmake/agc_driver_graphics_tests.cmake
core/shader/recompiler/Recompiler.cpp
core/shader/recompiler/Recompiler.hpp
core/shader/recompiler/RuntimeAbi.hpp
core/shader/recompiler/ShaderDiskCache.cpp
core/shader/recompiler/ShaderDiskCache.hpp
core/shader/recompiler/SpirvBackend/include/SpirvBackend/SpirvEmitter.hpp
core/shader/recompiler/SpirvBackend/include/SpirvBackend/SpirvEmitterState.hpp
core/shader/recompiler/SpirvBackend/src/SpirvEmitter.cpp
core/shader/recompiler/SpirvBackend/src/SpirvMemory/SpirvBufferAccess.cpp
core/shader/recompiler/SpirvBackend/src/SpirvMemory/SpirvEmitterHelpers.cpp
core/shader/recompiler/SpirvBackend/src/SpirvMemory/SpirvMemoryInstructions.cpp
core/shader/recompiler/SpirvBackend/src/SpirvModuleEmitter.cpp
PR 7643 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
PR 7684 core/shader/recompiler/ShaderDiskCache.cpp
core/shader/recompiler/ShaderDiskCache.hpp
docs/dev/debt/shader.md
PR 7689 core/libs/prx/libSceAgcDriver/Graphics/include/ShaderResources.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp
core/shader/recompiler/Recompiler.hpp
core/shader/recompiler/ShaderDiskCache.cpp
core/shader/recompiler/ShaderDiskCache.hpp
PR 8939 core/shader/recompiler/ShaderDiskCache.hpp
docs/dev/debt/shader.md
PR 9289 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
PR 9318 core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp
PR 9335 docs/dev/debt/shader.md
PR 9356 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
core/shader/recompiler/Recompiler.cpp
core/shader/recompiler/Recompiler.hpp
core/shader/recompiler/ShaderDiskCache.cpp
core/shader/recompiler/ShaderDiskCache.hpp
core/shader/recompiler/SpirvBackend/include/SpirvBackend/SpirvEmitter.hpp
core/shader/recompiler/SpirvBackend/include/SpirvBackend/SpirvEmitterState.hpp
core/shader/recompiler/SpirvBackend/src/SpirvEmitter.cpp
core/shader/recompiler/SpirvBackend/src/SpirvMemory/SpirvEmitterHelpers.cpp
core/shader/recompiler/SpirvBackend/src/SpirvModuleEmitter.cpp
PR 9387 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
core/shader/recompiler/Recompiler.cpp
core/shader/recompiler/Recompiler.hpp
core/shader/recompiler/ShaderDiskCache.cpp
core/shader/recompiler/ShaderDiskCache.hpp
core/shader/recompiler/SpirvBackend/include/SpirvBackend/SpirvEmitter.hpp
core/shader/recompiler/SpirvBackend/include/SpirvBackend/SpirvEmitterState.hpp
core/shader/recompiler/SpirvBackend/src/SpirvEmitter.cpp
core/shader/recompiler/SpirvBackend/src/SpirvMemory/SpirvEmitterHelpers.cpp
core/shader/recompiler/SpirvBackend/src/SpirvModuleEmitter.cpp
docs/dev/debt/shader.md
PR 9457 core/shader/recompiler/ShaderDiskCache.hpp
docs/dev/debt/shader.md
PR 9508 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
core/libs/prx/libSceAgcDriver/Graphics/include/GuestBufferMemory.hpp
core/libs/prx/libSceAgcDriver/Graphics/include/ShaderResources.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp
core/libs/prx/libSceAgcDriver/tests/cmake/agc_driver_graphics_tests.cmake
core/shader/recompiler/Recompiler.cpp
core/shader/recompiler/Recompiler.hpp
core/shader/recompiler/RuntimeAbi.hpp
core/shader/recompiler/ShaderDiskCache.cpp
core/shader/recompiler/ShaderDiskCache.hpp
core/shader/recompiler/SpirvBackend/include/SpirvBackend/SpirvEmitter.hpp
core/shader/recompiler/SpirvBackend/include/SpirvBackend/SpirvEmitterState.hpp
core/shader/recompiler/SpirvBackend/src/SpirvEmitter.cpp
core/shader/recompiler/SpirvBackend/src/SpirvMemory/SpirvBufferAccess.cpp
core/shader/recompiler/SpirvBackend/src/SpirvMemory/SpirvEmitterHelpers.cpp
core/shader/recompiler/SpirvBackend/src/SpirvMemory/SpirvMemoryInstructions.cpp
core/shader/recompiler/SpirvBackend/src/SpirvModuleEmitter.cpp
PR 9592 core/libs/prx/libSceAgcDriver/Graphics/include/ShaderResources.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp
PR 9633 core/shader/recompiler/ShaderDiskCache.cpp
core/shader/recompiler/ShaderDiskCache.hpp
docs/dev/debt/shader.md
PR 9712 core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp
PR 9748 core/shader/recompiler/SpirvBackend/src/SpirvModuleEmitter.cpp
PR 9749 core/shader/recompiler/ShaderDiskCache.cpp
core/shader/recompiler/ShaderDiskCache.hpp
docs/dev/debt/shader.md
PR 9790 core/shader/recompiler/ShaderDiskCache.hpp
core/shader/recompiler/SpirvBackend/include/SpirvBackend/SpirvEmitterState.hpp
core/shader/recompiler/SpirvBackend/src/SpirvMemory/SpirvMemoryInstructions.cpp
docs/dev/debt/shader.md
PR 9852 core/libs/prx/libSceAgcDriver/Graphics/include/GuestBufferMemory.hpp
core/libs/prx/libSceAgcDriver/Graphics/include/ShaderResources.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp
core/shader/recompiler/Recompiler.cpp
core/shader/recompiler/Recompiler.hpp
core/shader/recompiler/ShaderDiskCache.cpp
core/shader/recompiler/ShaderDiskCache.hpp
PR 9897 core/libs/prx/libSceAgcDriver/Graphics/include/ShaderResources.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp
core/libs/prx/libSceAgcDriver/tests/cmake/agc_driver_graphics_tests.cmake
core/shader/recompiler/Recompiler.cpp
core/shader/recompiler/Recompiler.hpp
core/shader/recompiler/ShaderDiskCache.cpp
PR 9969 core/shader/recompiler/ShaderDiskCache.cpp
core/shader/recompiler/ShaderDiskCache.hpp
core/shader/recompiler/SpirvBackend/include/SpirvBackend/SpirvEmitterState.hpp
core/shader/recompiler/SpirvBackend/src/SpirvMemory/SpirvMemoryInstructions.cpp
docs/dev/debt/shader.md
PR 10193 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
core/libs/prx/libSceAgcDriver/Graphics/include/GuestBufferMemory.hpp
core/libs/prx/libSceAgcDriver/Graphics/include/ShaderResources.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp
core/libs/prx/libSceAgcDriver/tests/cmake/agc_driver_graphics_tests.cmake
core/shader/recompiler/Recompiler.cpp
core/shader/recompiler/Recompiler.hpp
core/shader/recompiler/RuntimeAbi.hpp
core/shader/recompiler/ShaderDiskCache.cpp
core/shader/recompiler/ShaderDiskCache.hpp
core/shader/recompiler/SpirvBackend/include/SpirvBackend/SpirvEmitter.hpp
core/shader/recompiler/SpirvBackend/include/SpirvBackend/SpirvEmitterState.hpp
core/shader/recompiler/SpirvBackend/src/SpirvEmitter.cpp
core/shader/recompiler/SpirvBackend/src/SpirvMemory/SpirvBufferAccess.cpp
core/shader/recompiler/SpirvBackend/src/SpirvMemory/SpirvEmitterHelpers.cpp
core/shader/recompiler/SpirvBackend/src/SpirvMemory/SpirvMemoryInstructions.cpp
core/shader/recompiler/SpirvBackend/src/SpirvModuleEmitter.cpp
PR 10351 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
core/shader/recompiler/Recompiler.cpp
core/shader/recompiler/Recompiler.hpp
core/shader/recompiler/ShaderDiskCache.cpp
core/shader/recompiler/ShaderDiskCache.hpp
core/shader/recompiler/SpirvBackend/include/SpirvBackend/SpirvEmitterState.hpp
core/shader/recompiler/SpirvBackend/src/SpirvMemory/SpirvEmitterHelpers.cpp
core/shader/recompiler/SpirvBackend/src/SpirvModuleEmitter.cpp
PR 10359 core/shader/recompiler/Recompiler.cpp
core/shader/recompiler/Recompiler.hpp
PR 10442 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
core/libs/prx/libSceAgcDriver/Graphics/include/ShaderResources.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp
PR 10492 core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp
PR 10497 core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp
PR 10652 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
core/shader/recompiler/Recompiler.cpp
core/shader/recompiler/Recompiler.hpp
core/shader/recompiler/SpirvBackend/include/SpirvBackend/SpirvEmitter.hpp
core/shader/recompiler/SpirvBackend/include/SpirvBackend/SpirvEmitterState.hpp
core/shader/recompiler/SpirvBackend/src/SpirvEmitter.cpp
docs/dev/debt/shader.md
PR 10743 core/libs/prx/libSceAgcDriver/Graphics/include/ShaderResources.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp
PR 10867 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
core/shader/recompiler/SpirvBackend/src/SpirvAnalysis.cpp
core/shader/recompiler/SpirvBackend/src/SpirvEmitter.cpp
core/shader/recompiler/SpirvBackend/src/SpirvMemory/SpirvEmitterHelpers.cpp
PR 10894 core/libs/prx/libSceAgcDriver/Graphics/include/ShaderResources.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp
PR 11435 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
PR 11436 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
PR 11444 core/libs/prx/libSceAgcDriver/Graphics/include/ShaderResources.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp
PR 11483 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
core/shader/recompiler/Recompiler.cpp
core/shader/recompiler/Recompiler.hpp
core/shader/recompiler/SpirvBackend/include/SpirvBackend/SpirvEmitter.hpp
core/shader/recompiler/SpirvBackend/include/SpirvBackend/SpirvEmitterState.hpp
core/shader/recompiler/SpirvBackend/src/SpirvEmitter.cpp
core/shader/recompiler/SpirvBackend/src/SpirvModuleEmitter.cpp
docs/dev/debt/shader.md
PR 11551 core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp
core/shader/recompiler/Recompiler.cpp
core/shader/recompiler/Recompiler.hpp
core/shader/recompiler/ShaderDiskCache.cpp
core/shader/recompiler/ShaderDiskCache.hpp
core/shader/recompiler/SpirvBackend/src/SpirvMemory/SpirvEmitterHelpers.cpp
core/shader/recompiler/SpirvBackend/src/SpirvModuleEmitter.cpp
PR 12157 core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
PR 12316 docs/dev/debt/shader.md
PR 12324 core/shader/recompiler/Recompiler.cpp
PR 12568 core/libs/prx/libSceAgcDriver/Execution/src/Pm4.cpp
PR 12575 core/libs/prx/libSceAgcDriver/Graphics/include/ShaderResources.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp
PR 12619 core/shader/recompiler/SpirvBackend/src/SpirvMemory/SpirvEmitterHelpers.cpp
PR 12827 core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
PR 12828 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
core/shader/recompiler/Recompiler.cpp
core/shader/recompiler/Recompiler.hpp
PR 12840 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
core/libs/prx/libSceAgcDriver/Graphics/include/GuestBufferMemory.hpp
core/libs/prx/libSceAgcDriver/Graphics/include/ShaderResources.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp
core/shader/recompiler/Recompiler.cpp
core/shader/recompiler/SpirvBackend/include/SpirvBackend/SpirvEmitterState.hpp
PR 13148 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
PR 13796 core/libs/prx/libSceAgcDriver/Graphics/include/ShaderResources.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp
PR 13809 core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp
PR 13863 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
core/libs/prx/libSceAgcDriver/Graphics/include/ShaderResources.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
PR 13920 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
core/libs/prx/libSceAgcDriver/Graphics/include/ShaderResources.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
PR 13928 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
core/libs/prx/libSceAgcDriver/Graphics/include/GuestBufferMemory.hpp
core/libs/prx/libSceAgcDriver/Graphics/include/ShaderResources.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp
core/libs/prx/libSceAgcDriver/tests/cmake/agc_driver_graphics_tests.cmake
core/shader/recompiler/Recompiler.cpp
core/shader/recompiler/Recompiler.hpp
core/shader/recompiler/RuntimeAbi.hpp
core/shader/recompiler/ShaderDiskCache.cpp
core/shader/recompiler/ShaderDiskCache.hpp
core/shader/recompiler/SpirvBackend/include/SpirvBackend/SpirvEmitter.hpp
core/shader/recompiler/SpirvBackend/include/SpirvBackend/SpirvEmitterState.hpp
core/shader/recompiler/SpirvBackend/src/SpirvEmitter.cpp
core/shader/recompiler/SpirvBackend/src/SpirvMemory/SpirvBufferAccess.cpp
core/shader/recompiler/SpirvBackend/src/SpirvMemory/SpirvEmitterHelpers.cpp
core/shader/recompiler/SpirvBackend/src/SpirvMemory/SpirvMemoryInstructions.cpp
core/shader/recompiler/SpirvBackend/src/SpirvModuleEmitter.cpp
PR 13929 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
core/libs/prx/libSceAgcDriver/Graphics/include/GuestBufferMemory.hpp
core/libs/prx/libSceAgcDriver/Graphics/include/ShaderResources.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp
core/libs/prx/libSceAgcDriver/tests/cmake/agc_driver_graphics_tests.cmake
core/shader/recompiler/Recompiler.cpp
core/shader/recompiler/Recompiler.hpp
core/shader/recompiler/RuntimeAbi.hpp
core/shader/recompiler/ShaderDiskCache.cpp
core/shader/recompiler/ShaderDiskCache.hpp
core/shader/recompiler/SpirvBackend/include/SpirvBackend/SpirvEmitter.hpp
core/shader/recompiler/SpirvBackend/include/SpirvBackend/SpirvEmitterState.hpp
core/shader/recompiler/SpirvBackend/src/SpirvEmitter.cpp
core/shader/recompiler/SpirvBackend/src/SpirvMemory/SpirvBufferAccess.cpp
core/shader/recompiler/SpirvBackend/src/SpirvMemory/SpirvEmitterHelpers.cpp
core/shader/recompiler/SpirvBackend/src/SpirvMemory/SpirvMemoryInstructions.cpp
core/shader/recompiler/SpirvBackend/src/SpirvModuleEmitter.cpp
PR 14032 core/libs/prx/libSceAgcDriver/Graphics/include/ShaderResources.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp
core/libs/prx/libSceAgcDriver/tests/cmake/agc_driver_graphics_tests.cmake
core/shader/recompiler/Recompiler.cpp
core/shader/recompiler/Recompiler.hpp
core/shader/recompiler/ShaderDiskCache.cpp
core/shader/recompiler/ShaderDiskCache.hpp
PR 14217 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
core/libs/prx/libSceAgcDriver/tests/GuardedMemoryLoads.cpp
core/shader/recompiler/IntermediateRepresentation/src/IrOpcode.cpp
core/shader/recompiler/Recompiler.cpp
core/shader/recompiler/Recompiler.hpp
core/shader/recompiler/SpirvBackend/include/SpirvBackend/SpirvEmitter.hpp
core/shader/recompiler/SpirvBackend/include/SpirvBackend/SpirvEmitterState.hpp
core/shader/recompiler/SpirvBackend/src/SpirvEmitter.cpp
core/shader/recompiler/SpirvBackend/src/SpirvMemory/SpirvMemoryInstructions.cpp
docs/dev/debt/shader.md
PR 14218 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
core/shader/recompiler/Recompiler.cpp
core/shader/recompiler/Recompiler.hpp
core/shader/recompiler/SpirvBackend/include/SpirvBackend/SpirvEmitter.hpp
core/shader/recompiler/SpirvBackend/include/SpirvBackend/SpirvEmitterState.hpp
core/shader/recompiler/SpirvBackend/src/SpirvEmitter.cpp
core/shader/recompiler/SpirvBackend/src/SpirvMemory/SpirvMemoryInstructions.cpp
docs/dev/debt/shader.md
PR 14260 core/shader/recompiler/SpirvBackend/include/SpirvBackend/SpirvEmitterState.hpp
PR 14262 core/libs/prx/libSceAgcDriver/Graphics/include/ShaderResources.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp
PR 14853 core/shader/recompiler/Recompiler.cpp
core/shader/recompiler/ShaderDiskCache.cpp
core/shader/recompiler/ShaderDiskCache.hpp
docs/dev/debt/shader.md
PR 14871 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp
core/shader/recompiler/Recompiler.cpp
core/shader/recompiler/Recompiler.hpp
core/shader/recompiler/ShaderDiskCache.cpp
core/shader/recompiler/ShaderDiskCache.hpp
core/shader/recompiler/SpirvBackend/src/SpirvMemory/SpirvEmitterHelpers.cpp
docs/dev/debt/shader.md
PR 14944 core/libs/prx/libSceAgcDriver/Graphics/include/ShaderResources.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp
core/libs/prx/libSceAgcDriver/tests/cmake/agc_driver_graphics_tests.cmake
core/shader/recompiler/Recompiler.cpp
core/shader/recompiler/Recompiler.hpp
core/shader/recompiler/ShaderDiskCache.cpp
core/shader/recompiler/ShaderDiskCache.hpp
PR 15136 core/libs/prx/libSceAgcDriver/Execution/src/Pm4.cpp
PR 15295 core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
PR 15296 core/libs/prx/libSceAgcDriver/Graphics/include/GuestBufferMemory.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
PR 15297 core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
PR 15343 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
core/shader/recompiler/Recompiler.cpp
core/shader/recompiler/Recompiler.hpp
core/shader/recompiler/SpirvBackend/include/SpirvBackend/SpirvEmitter.hpp
core/shader/recompiler/SpirvBackend/include/SpirvBackend/SpirvEmitterState.hpp
core/shader/recompiler/SpirvBackend/src/SpirvEmitter.cpp
PR 15488 docs/dev/debt/shader.md
PR 15505 core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
PR 15529 core/libs/prx/libSceAgcDriver/Graphics/include/ShaderResources.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp
PR 15548 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
core/shader/recompiler/Recompiler.cpp
core/shader/recompiler/Recompiler.hpp
core/shader/recompiler/ShaderDiskCache.cpp
core/shader/recompiler/ShaderDiskCache.hpp
core/shader/recompiler/SpirvBackend/include/SpirvBackend/SpirvEmitter.hpp
core/shader/recompiler/SpirvBackend/include/SpirvBackend/SpirvEmitterState.hpp
core/shader/recompiler/SpirvBackend/src/SpirvEmitter.cpp
core/shader/recompiler/SpirvBackend/src/SpirvMemory/SpirvEmitterHelpers.cpp
core/shader/recompiler/SpirvBackend/src/SpirvModuleEmitter.cpp
docs/dev/debt/shader.md
PR 15555 core/shader/recompiler/ShaderDiskCache.cpp
core/shader/recompiler/ShaderDiskCache.hpp
core/shader/recompiler/SpirvBackend/include/SpirvBackend/SpirvEmitterState.hpp
core/shader/recompiler/SpirvBackend/src/SpirvMemory/SpirvMemoryInstructions.cpp
docs/dev/debt/shader.md
PR 15570 core/libs/prx/libSceAgcDriver/Graphics/include/ShaderResources.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp
PR 15573 docs/dev/debt/shader.md
PR 15621 core/libs/prx/libSceAgcDriver/Graphics/include/GuestBufferMemory.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
PR 15936 core/libs/prx/libSceAgcDriver/Graphics/include/ShaderResources.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp
PR 15948 docs/dev/debt/shader.md
PR 16054 core/libs/prx/libSceAgcDriver/Execution/src/Pm4.cpp
core/libs/prx/libSceAgcDriver/tests/Pm4.cpp
PR 16260 core/shader/recompiler/ShaderDiskCache.cpp
core/shader/recompiler/ShaderDiskCache.hpp
PR 16321 docs/dev/debt/shader.md
PR 16391 core/shader/recompiler/Recompiler.cpp
core/shader/recompiler/Recompiler.hpp
core/shader/recompiler/ShaderDiskCache.cpp
PR 16415 core/libs/prx/libSceAgcDriver/tests/GuardedMemoryLoads.cpp
docs/dev/debt/shader.md
PR 16472 core/shader/recompiler/ShaderDiskCache.cpp
core/shader/recompiler/ShaderDiskCache.hpp
docs/dev/debt/shader.md
PR 16571 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
core/shader/recompiler/SpirvBackend/src/SpirvMemory/SpirvEmitterHelpers.cpp
docs/dev/debt/shader.md
PR 16631 core/shader/recompiler/ShaderDiskCache.cpp
core/shader/recompiler/ShaderDiskCache.hpp
docs/dev/debt/shader.md
PR 16796 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
PR 16812 core/shader/recompiler/ShaderDiskCache.cpp
core/shader/recompiler/ShaderDiskCache.hpp
core/shader/recompiler/SpirvBackend/include/SpirvBackend/SpirvEmitterState.hpp
core/shader/recompiler/SpirvBackend/src/SpirvMemory/SpirvMemoryInstructions.cpp
docs/dev/debt/shader.md
PR 16814 core/shader/recompiler/ShaderDiskCache.cpp
core/shader/recompiler/ShaderDiskCache.hpp
core/shader/recompiler/SpirvBackend/include/SpirvBackend/SpirvEmitterState.hpp
core/shader/recompiler/SpirvBackend/src/SpirvMemory/SpirvMemoryInstructions.cpp
docs/dev/debt/shader.md
PR 16831 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
core/libs/prx/libSceAgcDriver/Graphics/include/GuestBufferMemory.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp
PR 16879 core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp
PR 16935 core/libs/prx/libSceAgcDriver/Graphics/include/ShaderResources.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp
core/shader/recompiler/Recompiler.cpp
core/shader/recompiler/Recompiler.hpp
core/shader/recompiler/ShaderDiskCache.cpp
PR 16953 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
core/libs/prx/libSceAgcDriver/Graphics/include/ShaderResources.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp
PR 17022 core/shader/recompiler/Recompiler.hpp
PR 17056 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
core/shader/recompiler/Recompiler.cpp
core/shader/recompiler/Recompiler.hpp
core/shader/recompiler/ShaderDiskCache.cpp
core/shader/recompiler/ShaderDiskCache.hpp
core/shader/recompiler/SpirvBackend/include/SpirvBackend/SpirvEmitterState.hpp
core/shader/recompiler/SpirvBackend/src/SpirvMemory/SpirvEmitterHelpers.cpp
PR 17606 docs/dev/debt/shader.md
PR 17611 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
core/shader/recompiler/Recompiler.cpp
core/shader/recompiler/Recompiler.hpp
core/shader/recompiler/ShaderDiskCache.cpp
core/shader/recompiler/ShaderDiskCache.hpp
core/shader/recompiler/SpirvBackend/include/SpirvBackend/SpirvEmitter.hpp
core/shader/recompiler/SpirvBackend/include/SpirvBackend/SpirvEmitterState.hpp
core/shader/recompiler/SpirvBackend/src/SpirvEmitter.cpp
core/shader/recompiler/SpirvBackend/src/SpirvMemory/SpirvEmitterHelpers.cpp
core/shader/recompiler/SpirvBackend/src/SpirvModuleEmitter.cpp
PR 17943 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
PR 18029 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
PR 18082 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
PR 18106 core/shader/recompiler/ShaderDiskCache.cpp
core/shader/recompiler/ShaderDiskCache.hpp
core/shader/recompiler/SpirvBackend/include/SpirvBackend/SpirvEmitterState.hpp
core/shader/recompiler/SpirvBackend/src/SpirvMemory/SpirvMemoryInstructions.cpp
docs/dev/debt/shader.md
PR 18107 core/shader/recompiler/ShaderDiskCache.cpp
core/shader/recompiler/ShaderDiskCache.hpp
core/shader/recompiler/SpirvBackend/include/SpirvBackend/SpirvEmitterState.hpp
core/shader/recompiler/SpirvBackend/src/SpirvMemory/SpirvMemoryInstructions.cpp
docs/dev/debt/shader.md
PR 18173 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
PR 18185 core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp
PR 18241 docs/dev/debt/shader.md
PR 18244 docs/dev/debt/shader.md
PR 18245 docs/dev/debt/shader.md
PR 18390 core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp
PR 18829 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
PR 18914 core/libs/prx/libSceAgcDriver/Execution/src/Pm4.cpp
core/libs/prx/libSceAgcDriver/tests/Pm4.cpp
PR 18956 core/libs/prx/libSceAgcDriver/Execution/include/Pm4.hpp
core/libs/prx/libSceAgcDriver/Execution/src/Pm4.cpp
core/libs/prx/libSceAgcDriver/tests/Pm4.cpp
PR 19096 core/shader/recompiler/SpirvBackend/include/SpirvBackend/SpirvEmitterState.hpp
docs/dev/debt/shader.md
PR 19191 core/libs/prx/libSceAgcDriver/Execution/src/Pm4.cpp
core/libs/prx/libSceAgcDriver/tests/Pm4.cpp
PR 19351 core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
PR 19452 core/shader/recompiler/Translation/src/MemoryInstructions/SharedMemoryInstructions.cpp
PR 19505 docs/dev/debt/shader.md
PR 19557 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
PR 19564 docs/dev/debt/shader.md
PR 19697 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
PR 19710 core/shader/recompiler/Recompiler.hpp
docs/dev/debt/shader.md
PR 19722 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
core/libs/prx/libSceAgcDriver/Graphics/include/ShaderResources.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp
PR 19821 core/shader/recompiler/Recompiler.hpp
core/shader/recompiler/SpirvBackend/src/SpirvMemory/SpirvEmitterHelpers.cpp
core/shader/recompiler/SpirvBackend/src/SpirvModuleEmitter.cpp
PR 19852 core/libs/prx/libSceAgcDriver/Graphics/include/ShaderResources.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp
core/libs/prx/libSceAgcDriver/tests/cmake/agc_driver_graphics_tests.cmake
core/shader/recompiler/Recompiler.cpp
core/shader/recompiler/Recompiler.hpp
core/shader/recompiler/ShaderDiskCache.cpp
core/shader/recompiler/ShaderDiskCache.hpp
PR 19967 core/shader/recompiler/Recompiler.cpp
core/shader/recompiler/ShaderDiskCache.cpp
PR 20010 core/shader/recompiler/Recompiler.cpp
core/shader/recompiler/Recompiler.hpp
core/shader/recompiler/SpirvBackend/src/SpirvModuleEmitter.cpp
PR 20030 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
core/shader/recompiler/Recompiler.cpp
core/shader/recompiler/Recompiler.hpp
PR 20041 core/libs/prx/libSceAgcDriver/Graphics/include/ShaderResources.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp
PR 20070 core/shader/recompiler/Recompiler.hpp
docs/dev/debt/shader.md
PR 20085 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
PR 20099 docs/dev/debt/shader.md
PR 20111 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
core/shader/recompiler/Recompiler.cpp
core/shader/recompiler/Recompiler.hpp
PR 20114 docs/dev/debt/shader.md
PR 20130 core/shader/recompiler/Recompiler.cpp
core/shader/recompiler/Recompiler.hpp
core/shader/recompiler/ShaderDiskCache.cpp
PR 20131 docs/dev/debt/shader.md
PR 20153 core/shader/recompiler/Recompiler.hpp
PR 20172 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
PR 20186 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
PR 20248 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp
core/shader/recompiler/Recompiler.cpp
core/shader/recompiler/Recompiler.hpp
core/shader/recompiler/RuntimeAbi.hpp
core/shader/recompiler/ShaderDiskCache.cpp
core/shader/recompiler/SpirvBackend/src/SpirvMemory/SpirvEmitterHelpers.cpp
PR 20315 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
core/libs/prx/libSceAgcDriver/Graphics/include/GuestBufferMemory.hpp
core/libs/prx/libSceAgcDriver/Graphics/include/ShaderResources.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp
PR 20324 core/libs/prx/libSceAgcDriver/tests/cmake/agc_driver_graphics_tests.cmake
PR 20518 core/shader/recompiler/IntermediateRepresentation/src/IrOpcode.cpp
core/shader/recompiler/Recompiler.hpp
core/shader/recompiler/SpirvBackend/src/SpirvModuleEmitter.cpp
PR 20519 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
core/libs/prx/libSceAgcDriver/Graphics/include/ShaderResources.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp
core/shader/recompiler/Recompiler.cpp
core/shader/recompiler/Recompiler.hpp
core/shader/recompiler/ShaderDiskCache.cpp
core/shader/recompiler/ShaderDiskCache.hpp
core/shader/recompiler/SpirvBackend/include/SpirvBackend/SpirvEmitter.hpp
core/shader/recompiler/SpirvBackend/include/SpirvBackend/SpirvEmitterState.hpp
core/shader/recompiler/SpirvBackend/src/SpirvEmitter.cpp
core/shader/recompiler/SpirvBackend/src/SpirvMemory/SpirvEmitterHelpers.cpp
core/shader/recompiler/SpirvBackend/src/SpirvModuleEmitter.cpp
PR 20548 core/libs/prx/libSceAgcDriver/Execution/src/Pm4.cpp
core/libs/prx/libSceAgcDriver/tests/Pm4.cpp
PR 20580 core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
PR 20635 docs/dev/debt/shader.md
PR 20686 docs/dev/debt/shader.md
PR 20728 core/libs/prx/libSceAgcDriver/Graphics/include/ShaderResources.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp
PR 21018 core/shader/recompiler/Recompiler.hpp
PR 21059 core/libs/prx/libSceAgcDriver/Execution/include/Pm4.hpp
core/libs/prx/libSceAgcDriver/Execution/src/Pm4.cpp
core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
PR 21180 core/shader/recompiler/Recompiler.cpp
PR 21199 core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp
core/libs/prx/libSceAgcDriver/tests/GuardedMemoryLoads.cpp
core/shader/recompiler/IntermediateRepresentation/src/IrOpcode.cpp
PR 21211 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
PR 21238 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
core/libs/prx/libSceAgcDriver/Graphics/include/ShaderResources.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp
PR 21303 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
PR 21499 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
PR 21649 core/libs/prx/libSceAgcDriver/Graphics/include/GuestBufferMemory.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
PR 21683 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
PR 21773 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
PR 21776 core/shader/recompiler/Recompiler.cpp
core/shader/recompiler/ShaderDiskCache.cpp
core/shader/recompiler/ShaderDiskCache.hpp
core/shader/recompiler/SpirvBackend/src/SpirvEmitter.cpp
PR 21780 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
core/libs/prx/libSceAgcDriver/Graphics/include/ShaderResources.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp
PR 21923 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
PR 21960 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
PR 21970 core/shader/recompiler/ShaderDiskCache.hpp
PR 21971 core/shader/recompiler/ShaderDiskCache.hpp
PR 22001 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
PR 22025 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
PR 22029 core/libs/prx/libSceAgcDriver/Execution/include/Pm4.hpp
core/libs/prx/libSceAgcDriver/tests/Pm4.cpp
core/libs/prx/libSceAgcDriver/tests/cmake/agc_driver_graphics_tests.cmake
PR 22034 core/shader/recompiler/IntermediateRepresentation/src/IrOpcode.cpp
core/shader/recompiler/SpirvBackend/include/SpirvBackend/SpirvAnalysis.hpp
core/shader/recompiler/SpirvBackend/include/SpirvBackend/SpirvEmitterState.hpp
core/shader/recompiler/SpirvBackend/src/SpirvAnalysis.cpp
PR 22063 core/shader/recompiler/Recompiler.cpp
PR 22071 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
core/shader/recompiler/Recompiler.cpp
core/shader/recompiler/Recompiler.hpp
core/shader/recompiler/SpirvBackend/include/SpirvBackend/SpirvEmitter.hpp
core/shader/recompiler/SpirvBackend/include/SpirvBackend/SpirvEmitterState.hpp
core/shader/recompiler/SpirvBackend/src/SpirvEmitter.cpp
PR 22075 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
PR 22156 core/libs/prx/libSceAgcDriver/tests/Pm4.cpp
core/libs/prx/libSceAgcDriver/tests/cmake/agc_driver_graphics_tests.cmake
PR 22190 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
PR 22251 core/shader/recompiler/Recompiler.cpp
core/shader/recompiler/Recompiler.hpp
PR 22328 core/shader/recompiler/Recompiler.cpp
core/shader/recompiler/Recompiler.hpp
PR 22424 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
core/libs/prx/libSceAgcDriver/Graphics/include/ShaderResources.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp
core/shader/recompiler/Recompiler.cpp
core/shader/recompiler/Recompiler.hpp
core/shader/recompiler/ShaderDiskCache.cpp
core/shader/recompiler/ShaderDiskCache.hpp
core/shader/recompiler/SpirvBackend/include/SpirvBackend/SpirvEmitter.hpp
core/shader/recompiler/SpirvBackend/include/SpirvBackend/SpirvEmitterState.hpp
core/shader/recompiler/SpirvBackend/src/SpirvEmitter.cpp
core/shader/recompiler/SpirvBackend/src/SpirvMemory/SpirvEmitterHelpers.cpp
core/shader/recompiler/SpirvBackend/src/SpirvModuleEmitter.cpp
PR 22434 core/libs/prx/libSceAgcDriver/tests/Pm4.cpp
core/libs/prx/libSceAgcDriver/tests/cmake/agc_driver_graphics_tests.cmake
PR 22439 core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp
core/shader/recompiler/IntermediateRepresentation/src/IrOpcode.cpp
core/shader/recompiler/Recompiler.cpp
core/shader/recompiler/Recompiler.hpp
core/shader/recompiler/SpirvBackend/include/SpirvBackend/SpirvEmitterState.hpp
core/shader/recompiler/SpirvBackend/src/SpirvEmitter.cpp
core/shader/recompiler/SpirvBackend/src/SpirvMemory/SpirvEmitterHelpers.cpp
core/shader/recompiler/SpirvBackend/src/SpirvModuleEmitter.cpp
PR 22441 core/libs/prx/libSceAgcDriver/tests/Pm4.cpp
core/libs/prx/libSceAgcDriver/tests/cmake/agc_driver_graphics_tests.cmake
PR 22446 core/shader/recompiler/IntermediateRepresentation/src/IrOpcode.cpp
core/shader/recompiler/SpirvBackend/include/SpirvBackend/SpirvAnalysis.hpp
core/shader/recompiler/SpirvBackend/include/SpirvBackend/SpirvEmitterState.hpp
core/shader/recompiler/SpirvBackend/src/SpirvAnalysis.cpp
PR 22493 core/shader/recompiler/Recompiler.cpp
core/shader/recompiler/Recompiler.hpp
core/shader/recompiler/ShaderDiskCache.cpp
PR 22531 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
PR 22535 core/libs/prx/libSceAgcDriver/tests/Pm4.cpp
PR 22546 core/libs/prx/libSceAgcDriver/tests/Pm4.cpp
PR 22550 core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
PR 22583 core/shader/recompiler/ShaderDiskCache.cpp
core/shader/recompiler/ShaderDiskCache.hpp
PR 22602 core/shader/recompiler/ShaderDiskCache.cpp
core/shader/recompiler/ShaderDiskCache.hpp
PR 22628 core/shader/recompiler/IntermediateRepresentation/src/IrOpcode.cpp
core/shader/recompiler/Recompiler.cpp
core/shader/recompiler/Recompiler.hpp
core/shader/recompiler/ShaderDiskCache.cpp
core/shader/recompiler/ShaderDiskCache.hpp
core/shader/recompiler/SpirvBackend/src/SpirvMemory/SpirvMemoryInstructions.cpp
PR 22647 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
core/libs/prx/libSceAgcDriver/Graphics/include/GuestBufferMemory.hpp
core/libs/prx/libSceAgcDriver/Graphics/include/ShaderResources.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp
core/libs/prx/libSceAgcDriver/tests/Pm4.cpp
core/libs/prx/libSceAgcDriver/tests/cmake/agc_driver_graphics_tests.cmake
core/shader/recompiler/Recompiler.cpp
core/shader/recompiler/Recompiler.hpp
PR 22690 core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp
core/shader/recompiler/Recompiler.cpp
core/shader/recompiler/Recompiler.hpp
core/shader/recompiler/ShaderDiskCache.cpp
core/shader/recompiler/ShaderDiskCache.hpp
PR 22692 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
core/shader/recompiler/Recompiler.cpp
core/shader/recompiler/Recompiler.hpp
core/shader/recompiler/ShaderDiskCache.cpp
core/shader/recompiler/ShaderDiskCache.hpp
PR 22697 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
PR 22703 core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp
core/shader/recompiler/Recompiler.cpp
core/shader/recompiler/Recompiler.hpp
core/shader/recompiler/ShaderDiskCache.cpp
core/shader/recompiler/ShaderDiskCache.hpp
PR 22712 core/libs/prx/libSceAgcDriver/Execution/src/Pm4.cpp
core/libs/prx/libSceAgcDriver/tests/Pm4.cpp
PR 22717 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
PR 22731 core/libs/prx/libSceAgcDriver/Execution/src/Pm4.cpp
core/libs/prx/libSceAgcDriver/tests/Pm4.cpp
PR 22944 core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
core/shader/recompiler/SpirvBackend/include/SpirvBackend/SpirvEmitterState.hpp
PR 22995 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
PR 23058 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
PR 23188 core/libs/prx/libSceAgcDriver/Execution/src/Pm4.cpp
core/libs/prx/libSceAgcDriver/tests/Pm4.cpp
PR 23206 core/shader/recompiler/SpirvBackend/src/SpirvModuleEmitter.cpp
PR 23234 core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
PR 23242 core/libs/prx/libSceAgcDriver/Graphics/include/ShaderResources.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp
core/shader/recompiler/Recompiler.cpp
core/shader/recompiler/Recompiler.hpp
core/shader/recompiler/ShaderDiskCache.cpp
core/shader/recompiler/ShaderDiskCache.hpp
PR 23243 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
core/shader/recompiler/Recompiler.cpp
core/shader/recompiler/Recompiler.hpp
core/shader/recompiler/ShaderDiskCache.cpp
core/shader/recompiler/ShaderDiskCache.hpp
core/shader/recompiler/SpirvBackend/include/SpirvBackend/SpirvEmitter.hpp
core/shader/recompiler/SpirvBackend/include/SpirvBackend/SpirvEmitterState.hpp
core/shader/recompiler/SpirvBackend/src/SpirvEmitter.cpp
core/shader/recompiler/SpirvBackend/src/SpirvModuleEmitter.cpp
PR 23244 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
core/shader/recompiler/Recompiler.cpp
core/shader/recompiler/Recompiler.hpp
core/shader/recompiler/ShaderDiskCache.cpp
core/shader/recompiler/ShaderDiskCache.hpp
core/shader/recompiler/SpirvBackend/include/SpirvBackend/SpirvEmitter.hpp
core/shader/recompiler/SpirvBackend/include/SpirvBackend/SpirvEmitterState.hpp
core/shader/recompiler/SpirvBackend/src/SpirvEmitter.cpp
core/shader/recompiler/SpirvBackend/src/SpirvMemory/SpirvEmitterHelpers.cpp
core/shader/recompiler/SpirvBackend/src/SpirvModuleEmitter.cpp
PR 23258 core/shader/recompiler/Recompiler.hpp
core/shader/recompiler/SpirvBackend/src/SpirvModuleEmitter.cpp
PR 23281 core/shader/recompiler/Recompiler.hpp
core/shader/recompiler/SpirvBackend/src/SpirvModuleEmitter.cpp
PR 23343 core/shader/recompiler/Recompiler.cpp
PR 23344 core/shader/recompiler/Recompiler.cpp
core/shader/recompiler/Recompiler.hpp
core/shader/recompiler/ShaderDiskCache.cpp
core/shader/recompiler/ShaderDiskCache.hpp
PR 23409 core/shader/recompiler/ShaderDiskCache.hpp
docs/dev/debt/shader.md
PR 23484 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
Report truncated: 90 more lines omitted.

@oneandonlydean oneandonlydean self-assigned this Oct 29, 2026
A wave now passes the turn on with a compare-exchange from its launch
index, so a wave that gave up waiting adds unordered and leaves the turn
alone. The driver zeroes the turn in the buffer each dispatch binds,
before the dispatch and each chunk of a split one, instead of relying on
the last wave. Waves that give up are counted in a dword after the turn.

The wait, the add and the release now run inside the loop, one lane per
guest wave, so guest waves sharing a host subgroup no longer wait on each
other until the timeout.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@ZSWolt

ZSWolt commented Oct 29, 2026

Copy link
Copy Markdown
Contributor Author

@oneandonlydean thanks, all five points are addressed in the new commit on top (no force-push).

  1. Only the wave that holds the turn passes it on. The wave-done release is now OpAtomicCompareExchange from launch to launch + 1 (or 0 after the last wave). A wave that timed out adds unordered, as on main, and leaves the turn alone.
  2. The reset belongs to the dispatch. recordDispatch zeroes the turn in the buffer the dispatch binds, before every dispatch that binds the GDS and before each chunk of a split one. It uses vkCmdFillBuffer between barriers, or a CPU store when that buffer is a CPU-made copy. The last-wave reset is gone; the release from the last wave only wraps to 0.
  3. Timeouts are counted. A wave that gives up adds 1 to a dword after the turn (Pm4::GdsOrderedTimeoutsOffset, binding now GdsBytes + 8). The test checks the count is 0 in every ordered case.
  4. Tests (GdsAppendConsume.cpp), each checking per-wave results, the counter and the timeout count:
    • 64 single-wave groups with group 0 delayed by a scalar loop, so later waves reach the instruction first.
    • 16 groups of 4 waves, group 0 delayed.
    • 4 groups where group 1 skips ds_ordered_count. Group 0 gets the start value, groups 2–3 each time out and get one of the rest, and exactly 2 timeouts are counted. Before the fix, a timed-out wave's store let the next one through.
    • A normal 64-group dispatch right after that one. The turn was left at 1, so it is ordered only because of the per-dispatch reset; without it, group 0 got the last value.
  5. Debt entry updated with the reset, the compare-exchange, and what a timeout does.

A second bug the multi-wave test found. When the host subgroup is wider than the guest wave (wave32 code in a 64-lane subgroup on RADV), two guest waves shared one wait loop. The first could not leave the loop to release until the second stopped waiting, so the second always timed out (29 timeouts in that test). The wait, the add and the release now run inside the loop, done by one lane per guest wave, so guest waves in one host subgroup no longer wait on each other.

Checks (RX 9060 XT, RADV):

  • agc_driver_gds_append_consume passes.
  • ctest -R '^agc_|^shader_|recompiler': only the two tests that also fail on main fail.
  • Validation layer: 0 VUIDs.
  • check_conventions passes.

A run on the RTX 4090 would be welcome. The delayed and multi-wave cases are the ones that depend on the host's subgroup layout.

🤖 Addressed by Claude Code

@CnRJay CnRJay 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.

The ordering fix is sound, and oneandonlydean's timeout points are addressed. One cost in recordDispatch is not covered yet and applies to every dispatch that binds the GDS, not just ordered ones.

The reset is gated on bindsGds, not on orderedAppend. bindsGds is true for any shader with a DescriptorRole::Gds binding, which includes plain append/consume and any other GDS user. Those shaders never read the turn dword, but they now get:

  1. vkCmdPipelineBarrier ALL_COMMANDS → TRANSFER
  2. vkCmdFillBuffer of 4 bytes
  3. vkCmdPipelineBarrier TRANSFER → COMPUTE_SHADER

ALL_COMMANDS as the source stage drains everything recorded before it: preceding draws, other dispatches and copies. Each such dispatch also becomes a hard sync point, so it can't overlap the work before it. The same is added before each chunk of a split dispatch. A title that issues many small GDS dispatches per frame (particle and culling passes are the typical case) pays a GPU drain for each one.

Carry the orderedAppend requirement into the compiled program, or the binding info, and reset only for programs that contain DataOrderedCount or DataOrderedSwap in a compute stage. Shaders that don't order then get exactly what main gives them.

The first barrier is wider than it needs to be. The only prior writer of the turn dword is an earlier ordered dispatch. A COMPUTE_SHADER → TRANSFER barrier with SHADER_WRITE|SHADER_READ → TRANSFER_WRITE covers that. ALL_COMMANDS / TRANSFER_WRITE also orders graphics work against the fill, which nothing needs.

Alternative that avoids the fill and both barriers. Have the shader own the reset. The wave holding the last launch index already compare-exchanges the turn to 0. With a launch-epoch dword that the host bumps once per dispatch through push constants, the compare-exchange targets epoch * stride + launch and no dispatch ever needs a zeroed turn. A timed-out dispatch then can't poison the next one either, and the fill and barriers go away.

CPU-copy path (zeroGuestBytes returning nullopt). The memset runs at record time, while the GPU may still be executing a previously submitted dispatch that uses the same CPU-made GDS copy. Two dispatches recorded back to back into one command buffer also both zero the turn before either runs. Please confirm that case can't happen, or say what guarantees it can't.

Wait loop. Each waiting wave does up to 2^20 device-scope acquire loads with no backoff. If one wave never issues the done operation (a divergent path where a whole guest wave skips it), every later wave in that dispatch spends the full budget. The test counts the timeouts (2 here), but nothing records how long a timeout costs on hardware that doesn't schedule groups strictly in order. On a 4090, include the time of the skipped-group case in the numbers; it matters for Windows TDR.

Measurement. The title numbers are the corrupted-frame counts and the present counts (851–857 against about 790). Please add tools/trace_digest.py summaries of main and of this change from the same machine and scene, with the frame time and the gpu_busy_ms_per_present of the GoW fireplace scene. Presents going up while a drain is added before every GDS dispatch is surprising, and the digest will show which phase moved.

The compiled program now records whether it orders GDS appends, and the
driver resets the turn only for those, behind a compute-to-transfer
barrier instead of draining all prior work. A GDS copy the CPU made is no
longer zeroed at record time. The first wave that gives up waiting marks
the turn abandoned, so the rest of the dispatch runs unordered at once
instead of each later wave waiting a full budget.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@TechLevelZero

Copy link
Copy Markdown
Contributor

✅ NVIDIA GPU test: passed

PR head af3c0c1 merged onto main bb04a4f · tested 2026-10-29 19:22 UTC · 26 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,234 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,280 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 (857 tests run on the GPU)
Slow tests (>30 s, GPU tests timed with validation layers) ⚠️ agc_driver_bda_device 65.2 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
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 af3c0c1e51c4bf63eaa69c5ce4437a9fedca0fd3 bb04a4f1ea0175e9e4f149f0359a764d62ff3296
git checkout bb04a4f1ea0175e9e4f149f0359a764d62ff3296 && git merge --no-ff af3c0c1e51c4bf63eaa69c5ce4437a9fedca0fd3
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.

@ZSWolt

ZSWolt commented Oct 29, 2026

Copy link
Copy Markdown
Contributor Author

@CnRJay thanks. All points are addressed in a new commit on top (no force-push).

Reset only for ordering programs. The compiled program now carries orderedAppend: it goes from the SPIR-V emitter's requirements into CompiledShaderArtifact, the disk cache (format 50) and RecompileResult. recordDispatch resets the turn only when it is set. Plain append/consume and every other GDS user get exactly what main records.

Narrower barrier. The reset is now:

  • COMPUTE_SHADER → TRANSFER (SHADER_READ|SHADER_WRITE → TRANSFER_WRITE);
  • the 4-byte fill;
  • TRANSFER → COMPUTE_SHADER.

Epoch alternative. I kept the reset. An epoch needs a push word in every ordering program, bumped per dispatch, including dispatches replayed from recipes. A 32-bit turn of epoch * stride + launch would also wrap for large dispatches. With the gate, the cost is two narrow barriers and a 4-byte fill, and only for ordering dispatches. I can switch if you prefer the epoch.

CPU-copy path. You're right, the record-time store was not safe to rely on, and it is removed. The reset is recorded only when the turn lives in an import or a GPU copy (GuestBufferMemory::FillTarget). A GDS copy the CPU made is not reset: its dispatch starts from the turn the previous one left, which is 0 after a dispatch whose waves all took their turns. The debt entry says so. In the test the reset takes effect, so here the GDS is bound as an import or a GPU copy.

Wait loop cost. On an RX 9060 XT, 2^20 reads take about 130 ms. Your concern was right. I timed a dispatch where group 1 never takes its turn (a local timing build):

Groups Before this commit With this commit
4 ~130 ms ~140 ms
4096 1357 ms ~350 ms
65536 device lost after ~2 s (VK_ERROR_DEVICE_LOST) ~350 ms

Before this commit, waves that launched after earlier ones had given up each waited a full budget again. Now the first wave that gives up marks the turn abandoned (0xffffffff). Every later wave of that dispatch sees the mark and runs unordered at once, as on main, and is counted. The next ordering dispatch's reset clears the mark. The holder's compare-exchange cannot overwrite the mark, because it compares against its own launch index.

Measurement. A correction first: the earlier numbers in the description (851–857 presents against about 790, "on main 0cd07dc") were wrong. They came from Oct 23, on my local integration build, against a baseline from another run; they were not a same-build A/B on main. I've corrected the description.

Plain main cannot reach this scene: GoW Ragnarök stops at startup on sceHttp2SetResolveRetry not implemented. So the A/B below runs on my local integration build (main plus local branches, d3b93c0ed8), with and without this PR:

  • built in one worktree, one variant after the other;
  • each run uses its own libs/ through --rpath;
  • the build is confirmed per run by the shader cache format (49 without, 50 with);
  • title-screen fireplace scene, warm caches, 3840x2160, otherwise default settings;
  • APS5_TRACE_SECONDS=200:60, order without, with, with, without.

tools/trace_digest.py summary lines:

presents frame p50 / p90 / p99 ms gpu_busy_ms_per_present
without, run 1 203 287.0 / 343.4 / 416.7 148.5
with, run 1 217 275.9 / 295.0 / 338.0 128.9
with, run 2 214 277.9 / 300.1 / 374.6 128.6
without, run 2 198 292.2 / 360.3 / 493.2 151.9

Where the time moved, per frame (top_phases_ms_per_frame):

  • Driver.Packet.draw is 173–179 ms without and 158–161 ms with.
  • Driver.Packet.memory_wait is 204–209 ms without and 184–186 ms with.
  • Driver.Packet.dispatch is 166–169 ms in all runs, so the reset adds nothing visible.

GPU busy per present drops by about 20 ms. My guess, not verified, is that the drop comes from the corrupted particle records: without the fix they are drawn as long streaks across the screen, which is far more raster work than correct particles. The traces dropped events after about 10 s on the busiest worker (trace_dropped: true); the summary values above come from the per-present totals.

Checks on this commit:

  • agc_driver_gds_append_consume passes.
  • ctest -R '^agc_|^shader_|recompiler': only the two tests that also fail on main fail.
  • Validation layer: 0 VUIDs.
  • check_conventions passes.

TechLevelZero's NVIDIA run (RTX 2000 Ada) passed on the previous head, af3c0c1.

🤖 Addressed by Claude Code

@TechLevelZero

TechLevelZero commented Oct 29, 2026 •

Copy link
Copy Markdown
Contributor

✅ NVIDIA GPU test: passed

PR head 3cea7d4 merged onto main bb04a4f · tested 2026-10-30 01:10 UTC · 29 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,242 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,288 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 (861 tests run on the GPU)
Slow tests (>30 s, GPU tests timed with validation layers) ⚠️ agc_driver_bda_device 68.7 s
Unstable on main (1, these also failed in recent main runs on this machine; not counted against this PR)
agc_driver_depth_clear_hle: failed in 1 of the last 7 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
Validation IDs already present on main (5 IDs in 400 tests)
VUID-VkDeviceCreateInfo-pNext-pNext (400 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 392 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
VUID-vkCmdCopyBuffer-commonparent (1 test): agc_driver_depth_clear_hle
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 3cea7d40118adb552c0df9666555fb738b88ce04 bb04a4f1ea0175e9e4f149f0359a764d62ff3296
git checkout bb04a4f1ea0175e9e4f149f0359a764d62ff3296 && git merge --no-ff 3cea7d40118adb552c0df9666555fb738b88ce04
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 needs rebase Conflicts with main, rebase needed label Oct 30, 2026
…d-append

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@github-actions github-actions Bot added shader core/shader docs agc libSceAgc* and removed needs rebase Conflicts with main, rebase needed labels Oct 30, 2026
@bunbeans2-arch

Copy link
Copy Markdown
Contributor

Windows data point to go with the RADV RX 9060 XT run: AMD Radeon RX 9070 XT (RDNA 4) on AMD's Windows driver 32.0.32015.7029, Windows 11 Pro 22631, MSYS2 UCRT64 GCC 16.1, Release, BUILD_TESTING=ON, with the Khronos validation layer loaded.

Tree: main 409fe64199 with this PR merged on top (it merges cleanly). Every test executable was rebuilt for the tree before running.

main with this PR
agc_driver_gds_append_consume passes 3 of 3 passes 3 of 3 (the PR's version of the test)
agc_driver_graphics, agc_driver_gcn_detile pass 3 of 3 pass 3 of 3
VUID- lines 0 0

I could not run the PR's test against main's driver code: it uses Pm4::GdsOrderedTimeoutsOffset, which only this PR adds. So this shows the PR's test passes on AMD's Windows driver (it did not skip), not that it catches the old behaviour on this card.

AI-assisted: yes (Claude Code)

@TechLevelZero

TechLevelZero commented Oct 30, 2026 •

Copy link
Copy Markdown
Contributor

✅ NVIDIA GPU test: passed

PR head 7bdeb14 merged onto main 73f4f7e · tested 2026-10-31 18:27 UTC · 20 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,347 passed · 5 failed (0 new, 4 also fail on main, 1 unstable on main) · 48 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,400 of 3,072 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 (884 tests run on the GPU)
Slow tests (>30 s, GPU tests timed with validation layers) ⚠️ agc_driver_bda_device 39.8 s, ⚠️ agc_driver_graphics_maps_fallback 34.7 s, ⚠️ agc_driver_graphics 31.0 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 7 of the last 10 main runs
Failing on main too (4, not counted against this PR)
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 192 other runs in the last 7 days
Validation IDs already present on main (3 IDs in 390 tests)
VUID-VkDeviceCreateInfo-pNext-pNext (390 tests): agc_compute_pipeline_replay, agc_driver, agc_driver_address_passes, agc_driver_address_passes_draw_transitions, agc_driver_address_passes_targets_split, agc_driver_alias_copy_label, agc_driver_alpha_to_coverage, agc_driver_array_layer_target, and 382 more
VUID-vkCmdCopyImage-srcImage-01548 (12 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_plane_sampling, and 4 more
VUID-vkCmdCopyImage-srcImage-01551 (12 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_plane_sampling, and 4 more
Skipped (48)
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_vertex_elected_atomic_max: skipped, the device runs vertex programs in subgroups, so they keep their cross-lane reductions
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_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_backtoback: 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_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_dcc: 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_deferred: 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 plat
Reproduce
git fetch origin 7bdeb149a8ca09d481971915c14b06633bb27956 73f4f7e06e4f210a8c6570e335fd654dc0a86134
git checkout 73f4f7e06e4f210a8c6570e335fd654dc0a86134 && git merge --no-ff 7bdeb149a8ca09d481971915c14b06633bb27956
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.

@JJenkx

JJenkx commented Oct 30, 2026

Copy link
Copy Markdown
Contributor

Windows GPU run of head 7bdeb149a8, merged onto main 1c6b316cf7 (clean merge, local only).

Windows 11 Enterprise 10.0.22621, Ryzen 9 5950X, Radeon RX 6700 XT with AMD proprietary driver 26.10.1 (Vulkan 1.4.315), WinLibs GCC 15.2.0 UCRT r7, Ninja, Release, BUILD_TESTING=ON. Khronos validation layer 1.4.309 requested for every test (VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation).

  • agc_driver_gds_append_consume, built from the test files this PR changes: pass, 3 of 3 runs each (--repeat until-fail:3), no failures, no skips.
  • They create Vulkan instances on the RX 6700 XT: the validation layer was inserted 3 times across the runs and reported no VUIDs.
  • No negative control: this PR's test files do not build against main's sources, because they use what the PR adds.

AI-assisted: yes (Claude Code).

@jacknieland

Copy link
Copy Markdown
Contributor

NVIDIA on Windows, for head 7bdeb149a8 merged into main 73f4f7e06e (clean merge). The NVIDIA runs so far are RTX 2000 Ada on Linux, and the Windows runs are AMD.

GPU: NVIDIA GeForce GTX 1650 (Turing, 0x1f91), driver 566.41, Vulkan 1.3.289, subgroup size 32. The driver logs Selected GPU name=NVIDIA GeForce GTX 1650. Host: Windows 11 Pro 26200, i7-9750H, WinLibs GCC 15.2.0 (x86_64-ucrt-posix-seh, r7), Release, BUILD_TESTING=ON. Vulkan SDK 1.4.363.0 validation layer.

ctest -R agc_driver_gds_append_consume -V, on main and on the merge, with ANYPS5_GPU=NVIDIA, ANYPS5_REQUIRE_VULKAN=1, ANYPS5_NO_SHADER_CACHE=1 and VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation:

  • main: passes, with 0 VUID- lines.
  • This PR: passes, and passes 3/3 with --repeat until-fail:3, with 0 VUID- lines. That includes the in-order group case, which requires that no wave gave up waiting for its turn, and the timeout case.
  • Neither log contains was not found but was requested by env var VK_INSTANCE_LAYERS.
  • No red/green: this PR's GdsAppendConsume.cpp uses Pm4::GdsOrderedTimeoutsOffset, so it does not build against main's driver.

Only this test target was built, not the full suite, and no title was run. AI-assisted.

@CnRJay CnRJay 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.

Thanks for the gate, the narrower barrier, the timing table and the correction of the present counts. One consequence of the CPU-copy change is not covered in your reply.

An abandoned mark is never cleared when the GDS binding is a CPU-made copy. The first wave that gives up stores 0xffffffff in the turn, and "the next ordering dispatch's reset clears the mark". For a CPU-made copy you no longer record a reset (FillTarget returns nothing), and you rely on the previous dispatch leaving 0. After a timeout it leaves 0xffffffff. The holder's compare-exchange cannot replace the mark, so every later ordering dispatch on that copy sees the mark at its first wait and runs unordered, with every wave counted as a timeout. That is main's behaviour, but it is permanent, and nothing in the log distinguishes it from a first timeout.

Please say which binding the GDS gets by default on the three platforms (import, GPU copy or CPU copy), since that decides how often this path is the one titles take. Then either:

  • clear the mark from the CPU side when a CPU copy is bound and the timeout count has moved, before the next dispatch is recorded and with the previous submission retired; or
  • refuse ordering programs on a CPU-made copy with a throw, so the gap is visible rather than a silent fallback.

A test that times out once and then runs a normal dispatch on a CPU-made binding would pin it. The existing "dispatch after a timeout" case runs on an import or GPU copy, where the reset covers it.

The frame-time table is what I asked for; gpu_busy_ms_per_present going from about 150 to about 129 ms with the change is a large move for a GDS-only fix, so it is worth a line saying which phase it comes from.

… 64 KiB units

The ordered-append metadata made the GDS binding 0x10008 bytes, and the
shared memory file and its host import used that size. The import's last
page then ran past the end of the file, which loses the device on Mesa ANV
and fails the shared-memory alias check on Windows. The allocation and the
import now cover GdsBindingBytes rounded up to 64 KiB; shaders still bind
GdsBindingBytes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@ZSWolt

ZSWolt commented Nov 13, 2026

Copy link
Copy Markdown
Contributor Author

@Lucke0051 @gabichuuuuu thanks for finding this and narrowing it down. @oneandonlydean you were right about where it is. Fixed in fff351f764.

Cause. The shared, host-imported GDS is requested only on integrated GPUs (RequestImportableGds in the VulkanDevice constructor). That's why RADV on my discrete card, NVIDIA and the RX 9070 XT never took this path. The ordered-append metadata grew the binding to GdsBindingBytes = 0x10008, and GdsAddress() used that size for ftruncate, mmap and the host import. The import rounds to whole pages, so its last page ran past the end of the shared memory file:

  • on ANV that loses the device at the first submit;
  • on Windows the alias check refuses it ("a page extends past the end of its file", gabichuuuuu's log).

Restoring only the constructor's import size didn't help, Lucke, because the file itself was still 0x10008 bytes.

Fix. Pm4::GdsAllocationBytes is GdsBindingBytes rounded up to 64 KiB, so 0x20000. The shared file, both mappings, the zeroing and the host import use it. Shaders still bind GdsBindingBytes, and nothing else changes on discrete GPUs.

Test. The new agc_driver_pm4_shared_gds_pages requests the shared GDS as an integrated GPU would. It then checks that the whole 64 KiB unit holding the binding is mapped and writable, so it runs without an Intel GPU. It fails with the allocation change reverted ("the shared GDS mapping does not cover the whole 64 KiB unit that holds its binding…") and passes with it.

Local results, RADV RX 9060 XT: build OK, 1564 of 1564 agc, shader, recompiler and GDS tests, check_conventions passes.

I can't test ANV or Intel's Windows driver here. Lucke, if your rerun offer still stands, your six tests and the full ^(agc|video_out|shader) set on the UHD 630 at fff351f764 would settle it. gabichuuuuu, the same goes for agc_driver_gds_append_consume and _copied on your Intel iGPU, if you have time. An NVIDIA or AMD run on this head would complete what oneandonlydean asked for.

@milescoviello thanks for the Linux and Windows NVIDIA runs on b9710b2be7. @BunnyFl thanks for re-checking at 3f6d916dd5.

🤖 Addressed by Claude Code

@github-actions github-actions Bot added review queue Next in the maintainer review queue: checks pass, no open change request, no conflict and removed review queue Next in the maintainer review queue: checks pass, no open change request, no conflict labels Nov 13, 2026
@adam25136

Copy link
Copy Markdown
Contributor

Windows and NVIDIA Blackwell run of head fff351f764 (the GDS allocation fix), merged into main 6e5972c033 (git merge --no-ff, clean merge), for the NVIDIA run asked for above.

GPU NVIDIA GeForce RTX 5080 (10de:2c02), driver 621.14 (32.0.16.2114), Vulkan 1.4.357
Host Windows 10 Pro 22H2 (19045), i9-12900KF, WinLibs GCC 15.2.0 r7, Release, BUILD_TESTING=ON
Selection 2,887 tests, chosen by tools/select_tests.py select for the 29 changed files
Run select_tests.py ctest build --parallel 4 --timeout 120 with ANYPS5_REQUIRE_VULKAN=1 ANYPS5_NO_SHADER_CACHE=1; main 6e5972c033 ran its full suite (5,388 tests) the same way on this machine
Result 2,870 passed, 16 skipped, 1 failed, 0 new
Validation The 1,728 AGC, shader, VideoOut and Vulkan tests of the selection that ran, again with VK_LAYER_KHRONOS_validation 1.4.367 (the Khronos nightly built from 3baa2b8), ctest -V --parallel 4, implicit layers disabled; main ran its 1,731 the same way. This change logs the same 61 messages in the same 14 tests as main (all Undefined-Value-* warnings, none a VUID-), and no ID that main doesn't have for the same test. The new agc_driver_pm4_shared_gds_pages and agc_driver_gds_append_consume_copied log none

The new agc_driver_pm4_shared_gds_pages, which requests the shared GDS as an integrated GPU would, passes, and so do agc_driver_gds_append_consume, agc_driver_gds_append_consume_copied, agc_driver_ds_append_consume and the agc_driver_gds_* atomics tests. The other tests don't take the shared GDS path on this discrete GPU (VulkanDevice.cpp:1921 at fff351f764 requests it only for VK_PHYSICAL_DEVICE_TYPE_INTEGRATED_GPU), so for them this run checks that nothing broke off that path; the ANV rerun is what covers the fix on the device that lost it.

The 1 failure, agc_driver_quad_pixel_mask (#14237), fails on main 6e5972c033 here too. The 16 skips also skip on main here.

No title was run.

AI-assisted: yes. Claude Code ran the builds and tests and drafted this comment; the numbers are from the runs on this machine.

@github-actions github-actions Bot added needs rebase Conflicts with main, rebase needed and removed review queue Next in the maintainer review queue: checks pass, no open change request, no conflict labels Nov 14, 2026
main reached shader disk cache format 69, the number this branch had, so the
ordered-append field moves to 70.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@github-actions github-actions Bot removed the needs rebase Conflicts with main, rebase needed label Nov 14, 2026
@github-actions github-actions Bot added the needs rebase Conflicts with main, rebase needed label Nov 16, 2026

@MarcZX10 MarcZX10 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 — comments

The inspected code includes launch-order assumptions that the PR documents, but this review did not cover every changed file or run checks, so a formal approval is not justified.

What I ran

Head: 9d2d569f180e22993baeb08004d046c3e2dc1fe8. No commands or tests were run. I read the review description, commit list, manifest and diff, then inspected targeted source ranges.

Results

Check Result Note
Source inspection not run Targeted review only
Tests and prechecks not run No execution environment available

Findings

Blocking

None in the inspected code.

Non-blocking

None.

Not verified

I read Execution/include/Pm4.hpp, Execution/src/Pm4.cpp, targeted ranges of Execution/src/VulkanDevice.cpp, Graphics/include/GuestBufferMemory.hpp, Graphics/include/ShaderResources.hpp, targeted ranges of Graphics/src/GuestBufferMemory.cpp and Graphics/src/ShaderResources.cpp, tests/Pm4.cpp, tests/cmake/agc_driver_graphics_tests.cmake, tests/execution/GdsAppendConsume.cpp, shader/recompiler/SpirvBackend/src/SpirvMemory/SpirvMemoryInstructions.cpp, shader/recompiler/SpirvBackend/src/SpirvMemory/SpirvEmitterHelpers.cpp, and the review documents. Other changed files listed in the manifest were not read, including the remaining recompiler changes, GuardedMemoryLoads.cpp, the new CMake test registration, and docs/dev/debt/shader.md. Runtime behavior, test results, validation output, and performance claims were not independently verified.

To get this to a good state

Nothing is required. Optional: complete review of the unread changed files and run the relevant checks before a formal approval.

Resolve conflicts: keep both SpirvEmitter fields (orderedAppend,
anySubgroupSize), keep main's atomicLockTable setup with the PR's
GdsAllocationBytes host import, and move the shader cache
FormatVersion to 92 above main's 90.
@github-actions github-actions Bot added review queue Next in the maintainer review queue: checks pass, no open change request, no conflict and removed needs rebase Conflicts with main, rebase needed labels Nov 19, 2026
@domx4q

domx4q commented Nov 19, 2026

Copy link
Copy Markdown
Contributor

NVIDIA Linux run with the Khronos validation layer of the current head 294347f4dc; Tested has only RADV.

Setup: Arch Linux (kernel 7.3.4), GCC 16.2.1, Release, NVIDIA GeForce RTX 4090 (vendor 0x10de, device 0x2684, Ada), proprietary driver 620.70.06, Vulkan 1.4.357, Khronos validation layer 1.4.363.1. Head 294347f4dc merged onto main 40206fe50d with --no-ff (clean, as c8e061f5ff). Main baseline is a Release build of 40206fe50d on the same machine.

ANYPS5_REQUIRE_VULKAN=1 ANYPS5_NO_SHADER_CACHE=1 VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation VK_LOADER_DEBUG=layer \
ctest --test-dir build -R '^agc_driver_gds_append_consume|^agc_driver_pm4$|^agc_driver_pm4_shared_gds_pages$|^agc_driver_pm4_failure$|^agc_driver_graphics$|^agc_driver_native_multisample_depth$|^agc_idle_publish_wait$' -V
main 40206fe50d this PR
Result 6 of 6 passed 8 of 8 passed
Insert instance layer "VK_LAYER_KHRONOS_validation" 7 8
was not found but was requested by env var VK_INSTANCE_LAYERS 0 0
VUID- none none

The selection is the GDS and PM4 tests the PR adds or changes, agc_driver_graphics, and the two tests Tested reports failing on main on the RX 9060 XT (agc_idle_publish_wait, agc_driver_native_multisample_depth); both pass on both sides here. agc_driver_gds_append_consume_copied and agc_driver_pm4_shared_gds_pages are added by this PR and do not exist on main. All device tests selected the RTX 4090.

Negative control: the PR build with core/shader/recompiler/SpirvBackend/src/SpirvMemory/SpirvMemoryInstructions.cpp taken from main fails agc_driver_gds_append_consume with the layer on:

AGC graphics: 64 single-wave groups, dispatch 1, ds_ordered_count: group 0 lane 0 returned 1018, expected 1000 (the counter in launch order)

so the new cases detect unordered service on this GPU too. The speed numbers from God of War Ragnarök were not measured here.

No new VUID- errors; all eight focused tests pass on Ada, six of six on main.

AI-assisted: yes (Claude Code)

@MarcZX10 MarcZX10 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 — looks good

Nothing blocks this change; the ordering path, metadata bounds, per-chunk reset, and added coverage are supported by the code inspected.

What I ran

Reviewed head 294347f4dc5e12f6ce0be825679b32e5180a02aa using the prepared diff and repo_read.py at the pinned head. No build or tests were run. Read the changed code and its relevant callers for the ordered SPIR-V emission, input declarations, GDS resource preparation and fill target, dispatch reset, and disk cache format; also read the added append/consume test code and GDS range helpers. The entire files at the head were not read.

Results

Check Result Note
Diff and manifest review passed Changed paths and hunks inspected
Targeted code review passed Relevant paths and callers read
Build and tests not run Author-reported results not independently verified

Findings

Blocking

None.

Non-blocking

None.

Not verified

Did not run a build, tests, validation layers, or console/game checks. Author-reported test and hardware results were not independently verified. Files listed as excluded in files.json were not read in full; relevant changed hunks in VulkanDevice.cpp, GuestBufferMemory.cpp, and ShaderResources.cpp were read through the pinned reader.

To get this to a good state

Nothing is required.

@github-actions github-actions Bot added needs rebase Conflicts with main, rebase needed and removed review queue Next in the maintainer review queue: checks pass, no open change request, no conflict labels Nov 19, 2026
@mihiii1337

Copy link
Copy Markdown
Contributor

I ran the two requested Windows Intel tests on a physical Intel UHD Graphics 8086:a78b (i7-14650HX, driver 31.0.101.5081, subgroup size 32). With the GDS allocation fix present, both variants reached the split-dispatch readback and returned the same wrong value.

Build CTest Result
main at 40206fe50d agc_driver_gds_append_consume Passed once with the original coverage
PR 294347f4dc merged onto that same base agc_driver_gds_append_consume Failed at the same assertion in 2/2 runs
Same PR build agc_driver_gds_append_consume_copied Failed at the same assertion in 2/2 runs

In all four PR runs, row 65537 in the second chunk returned 0, expected 66536 (65538 single-wave groups, split 65536 + 2). I reversed the order for the second pair. Each run started a fresh process, required Vulkan, disabled the shader cache and logged the selected Intel adapter and insertion of the Khronos 1.4.369 validation layer. There were no VUIDs, device losses or timeouts.

The standard test reached this assertion without the earlier Windows mapping diagnostic. The forced-copy result matches the earlier Windows Intel observation on a different driver. The baseline predates both the split case and the copied test, so its pass covers only the original workload. I used the same clean integration base as the RTX 4090 comparison.

AI-assisted testing.

@oneandonlydean

Copy link
Copy Markdown
Collaborator

@ZSWolt the merge of main on this head is clean, but the Intel Windows result from @mihiii1337 on 294347f is still open: agc_driver_gds_append_consume and agc_driver_gds_append_consume_copied both fail 2/2 on an Intel UHD 8086:a78b with the GDS allocation fix already in, and pass on main. In the second chunk of the split dispatch (65536 + 2 groups) row 65537 returns 0 where 66536 is expected, with no VUID and no device loss, so it is not the short page.
Please find why the second chunk loses its count on Intel (the order or reset between split chunks looks likely) and fix it so both tests pass there.
main has also moved on (FormatVersion is now 96 and this PR conflicts again), so the next push needs one more merge of main and a renumber above 96. Please do that in the same push as the fix.

@mihiii1337 mihiii1337 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.

I re-audited the still-open Intel A78B split-dispatch result on exact head 294347f4dc5e12f6ce0be825679b32e5180a02aa before repeating it on the updated driver. The fixture itself runs and reads one row beyond ChunkOutput when the device reports a Y workgroup limit of 65,536, so my earlier row 65537 returned 0 report cannot establish a reset/order defect. Details are inline.

I did not run a new build or hardware test after finding this; the fixture needs to be made in-bounds first.

AI-assisted: yes.


std::string CheckChunkedRecovery(AgcDriver::VulkanDevice& device, AgcDriver::QueueState& queue) {
const auto limit = device.graphicsContext().limits.maxComputeWorkGroupCount[1];
if (limit >= ChunkOutput.size() / OrderedGroupLanes) {

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.

[P2] Cover limit + 2 rows before interpreting the Intel split result

ChunkOutput has (65535 + 2) rows, i.e. 65,537. On the A78B, maxComputeWorkGroupCount[1] is 65,536, so this guard is false and rows becomes 65,538. The descriptor at line 333 still exposes only 65,537 rows: the shader's row-65,537 store is out of bounds, and the check at line 354 then reads ChunkOutput[65537 * 32] one-past the array. The previously reported 0 instead of 66536 is exactly this first out-of-bounds row, in both the normal and copied registrations, so it cannot diagnose the reset between chunks. Please size bounded storage for all rows (or explicitly skip when rows exceeds capacity) and rerun the Intel case before treating that result as a driver/product failure.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agc libSceAgc* build docs needs rebase Conflicts with main, rebase needed shader core/shader unblocks title Names a title ID on the Unblocks line

Projects

None yet

Development

Successfully merging this pull request may close these issues.