Skip to content

perf(agc): reuse read-only address-based draw builds over their cached address space - #13858

Merged
oneandonlydean merged 25 commits into
boykopovar:mainfrom
EagleBearerYS:perf/agc-reuse-address-draws-in-space
Nov 4, 2026
Merged

oneandonlydean merged 25 commits into
boykopovar:mainfrom
EagleBearerYS:perf/agc-reuse-address-draws-in-space

Conversation

@EagleBearerYS

@EagleBearerYS EagleBearerYS commented Oct 31, 2026 •

Copy link
Copy Markdown
Contributor

What

Builds on @Raghav314's space reuse from #9508. With his agreement (comment), the first commit takes spaceReuse, RetakeSpace, SnapshotsServedInPlace and their hit path out of his 1be4230. It keeps his authorship, with my co-authorship line as in his commit. Stacked on #8963.

A recorded draw whose stages only read through the BDA table, and whose bindings all lie in its cached address space, now reuses its build instead of building its resources again for every draw. Today every address-based draw builds anew. In Resident Evil Village (PPSA01556)'s menu that's about 4,300 draws per 10 s on the draw committer.

  • What the reuse proves: the cached build's snapshots must be served in place from the same space (feat(agc): GPU descriptor heap on VK_EXT_descriptor_heap (APS5_GPU_HEAP) #9508's containment proof), and the space is retaken for the use.
    • A moved read-only buffer inside the space is rebound per draw (feat(agc): GPU descriptor heap on VK_EXT_descriptor_heap (APS5_GPU_HEAP) #9508's usesBda lift).
    • Any other change refuses the reuse and builds as today: a snapshot outside the space, a partial overlap, a snapshot changed, a moved buffer under a pending write, a patched data word, a space or epoch change, a build in use, or a failed revalidation.
    • A build that stores through an address is never reused.
  • On by default. APS5_NO_ADDRESS_DRAW_REUSE=1 builds every draw anew. Its row in ENVIRONMENT.md replaces the APS5_GPU_HEAP gate the pieces had in feat(agc): GPU descriptor heap on VK_EXT_descriptor_heap (APS5_GPU_HEAP) #9508.
  • The commits:
    1. ee52ec9 (@Raghav314): the reuse over the cached space, behind his APS5_GPU_HEAP gate.
    2. b4947ff: on by default, plus the hit-path fixes the default needs. A hit that retook the space gives it back on every path, so the cached build never pins the space's allocations and a free never waits out APS5_PIN_WAIT_MS:
      • a hit that throws before it is served releases the space, through a guard;
      • a draw that ends without being recorded releases it;
      • the transition path's fresh build releases it;
      • a second ReleaseSpace no longer resets the released space;
      • no draw recipe is made from a space-reuse build, since a recipe's proof neither retakes the space nor checks the snapshots.
    3. 79ba14f: each use of a reused build gets its own BDA fault record. This is perf(agc): reuse address-based dispatch builds with a fault record per use #8971's mechanism adapted to draws. The first use in flight takes the build's own perf(agc): share BDA fault buffers in a per-device arena, with 32-byte slots for report-only programs #8963 slot. A concurrent use takes its own slot and sets, and each completion checks and clears its record, so a fault is reported once, at its own use.
    4. ac1980a: counters. With APS5_PROFILE_DRAW, [rescache] address-based draws (10 s): reused N, built M; refused: … counts every address-based draw under exactly one outcome.
    5. 93dfd64: recorded writes first. A hit completes recorded GPU writes over its snapshot ranges before the containment proof. It also adds the technical-debt entry.
    6. 69a10da: a merge of main (0835ec8). The only conflict was ENVIRONMENT.md, where both rows are kept.
    7. 7122193: a merge of perf(agc): share BDA fault buffers in a per-device arena, with 32-byte slots for report-only programs #8963's own merge of main (d958699, main 6a691f6).
    8. 48347d9: the debt entry moves under ### Functional, since the reuse is on by default. It now describes the one title the reuse was measured in, Resident Evil Village (PPSA01556)'s menu, as that run was made.
    9. d214fad: the GPU lock, asserted. RetakeSpace, ReleaseSpace and SpaceHeld read and write the space of a build that SharedResourceCache() shares between draws.
      • Where they're called: only inside Graphics::Draw (resolveDrawResources, keepRecordedDraw, the transition path's rebuild, and the HeldSpace cleanup).
      • The lock: GuestMemory::GpuMutex(). The driver reaches Graphics::Draw only through VulkanDevice::Draw, and every caller of that holds the mutex: Driver::finishDraw through lockForDraw(), before the indirect and direct inline draws, and Driver::commitDraw through its lock_guard, for pipelined draws. The HeldSpace cleanup runs inside Draw, so it's under the lock too.
      • Paths that never reach them: the recipe path, since no recipe is made from a space-reuse build, and dispatches, since spaceReuse is set for draw builds only.
      • The asserts: all three now call GuestMemory::AssertGpuLockHeld, so a caller without the mutex aborts under APS5_ASSERT_GPU_LOCK=1.
    10. 86b29f0: APS5_VERIFY_ADDRESS_DRAW_REUSE. Every served hit's resources are built anew, and the draw throws on the first difference.
      • What it compares: whether the fresh build is itself a space-reuse build, the BDA table bytes, every snapshot lying in readable table ranges, every snapshot's bytes against guest memory, and the textures, storage images and set layouts.
      • What it doesn't compare: buffer descriptors, since a moved read-only buffer is rebound at record time, and push constants. Textures are compared by identity, not contents.
      • It costs a full build per hit, so it's a diagnosis switch.
    11. 8a85451: the HeldSpace cleanup no longer allocates or throws.
      • A recorded draw reserves the keep for its retaken space through the checked Recorder::Keep, once it holds the command buffer it records into. The release then moves into that holder.
      • Every other way out of Draw() makes the same checked reservation in a catch-and-rethrow.
      • The cleanup only does noexcept moves. If no holder could be reserved, the build keeps the space until the recorder's serial that was open at the failure has completed.
    12. a142526: a hit rechecks its BDA table against new multisample targets. A build now keeps the multisample-target guard generation its table was filtered at.
      • When that has moved: the hit reruns ExcludeMultisampleTargetRanges, the function a fresh build calls, over the build's space ranges. It keeps the hit if the result matches the table, and refuses it as a space or epoch change if not.
      • What it closes: a resident multisample target that appears inside the space no longer leaves a hit binding a table that still covers it.
    13. 8139afd: a held space is retained until its batch completes, for @oneandonlydean's correction (comment).
      • The gap: the HeldSpace cleanup's fallback (item 11) left the space's one owner in the cache entry. The entry can leave the shared resource cache while the space is held: Remove, RemoveImage, eviction, or a fresh build of the same key replacing it. The space then went with it.
      • The retention: every place that attaches a space (RetakeSpace, the cached hit and a fresh build) first allocates the build's retention node. ~GuestBufferMemory moves a held space into that node and pushes it onto a lock-free list, without allocating.
      • The hold records the recorder's id with its serial, since a serial means nothing on another recorder.
      • The release: a retained space goes once that recorder has completed the serial, or no longer exists. That's checked at the next cached lookup, in the pin waiter after its sync, and at device teardown. The pin waiter's check keeps a free inside a retained space from waiting out APS5_PIN_WAIT_MS.
      • The lock: two threads never touch one cache entry's space at once. Every read and write of it (RetakeSpace, ReleaseSpace, SpaceHeld, HoldSpaceThrough, ReleaseCompletedSpace and the retention's release) runs under the GPU lock, GuestMemory::GpuMutex(), and asserts it (item 9). The one exception is ~GuestBufferMemory. It runs when the entry's last reference goes, so no other thread can reach its space, and the release thread may run it without the lock, which is why its hand-over is a lock-free push.
    14. 5479721: tests for a failed keep. Two test hooks make the keep reservation fail (SetSpaceKeepFailuresForTest) and stop a draw after its resources resolve (SetDrawStopAfterResolveForTest). agc_driver_address_draw_space_reuse_held runs two cases, each for an unrecorded early return, an exception during preparation and a recorded draw, with the keep failing.
      • held-space-retaken: the bad_alloc reaches the caller. Once the held serial completes, the same build retakes its space and is served without a build.
      • held-space-in-use: before the held serial completes, the next draw is refused as in use and builds. When that fresh build replaces the holding build in the cache, the space stays retained until the batch completes, and is released after it.
      • APS5_RELEASE_ON_UNLOCK=1 is set on the registration, for the test's determinism only; it masks no fix. Without it, the replaced build is still retained the same way, but it is released later on the release thread, so the test's retention count would race with it.

Overlap:

Tested

  • Tests: agc_driver_address_draw_space_reuse (tests/execution/AddressDrawSpaceReuse.cpp), with _off (APS5_NO_ADDRESS_DRAW_REUSE=1) and _transitions (APS5_DRAW_TRANSITIONS=1) registrations. The scene is a full-screen draw whose pixel shader loads its constant through a user-data pointer, with its shader code in a registered allocation.

    case commit checks red
    unchanged 2 twice unchanged, served without a build on 1: "built its resources again (1 builds)"
    cpu-write 2 a CPU write is seen, and served reuse off: 1 build
    idle-free 2 a free inside the space while idle returns at once without the release, the free waits the full 4,000 ms pin wait
    no-recipe 2 no recipe is made from a space-reuse build the recipe rule removed: a recipe is made
    moved-vertices 2 renders after a vertex move, and a free returns at once
    fault-per-use 3 each fault in a pair of concurrent uses is reported once, at its own address on 2: the faulting use's fault is reported twice
    counters 4 each refusal under its reason; the outcomes add up to the draws
    pending-snapshot-write 5 a fill over a captured pointer, then the draw in the same batch: snapshot changed, rebuilt on 4: "counted reused 1 and 0 builds"
    ring-same-constants, ring-own-constants 5 an 8-slot constant ring with the slot as the snapshot: 15 of 15 reused, each draw with its own value reuse off: 15 builds
    ring-old-slot-write 5 a CPU write to the previous slot after its draw is recorded leaves that draw's result alone; 7 of 7 reused reuse off
    ring-refusals 5 a moved snapshot outside the space: "snapshot outside"; a moved V# inside: reused; a moved V# under a pending fill: refused reuse off
    held-space-retaken (_held) 14 a failed keep in an early return, a throw and a recorded draw: the bad_alloc reaches the caller, and the held space is retaken and served after its serial completes none: the old code passes these checks too, since nothing in them uses the space on the GPU
    held-space-in-use (_held) 14 the same three: refused as in use before the serial completes; a fresh build replacing the holder leaves the space retained until then, and released after the retention count needs commit 13's code
    • Linux (Ubuntu 24.04, GCC 13.3, Release, lavapipe, as an unprivileged user): the three registrations passed 20 of 20 at 93dfd64. ^agc: 1130 passed, 74 skipped, 0 failed.
  • GitHub ×10 on the head 7122193 (^agc_driver_address_draw_space_reuse, ^agc_driver_bda, ^agc_bda, which takes perf(agc): share BDA fault buffers in a per-device arena, with 32-byte slots for report-only programs #8963's tests too) (run):

  • A full ^agc sweep on the head 7122193, once each on GitHub's runners (run):

  • Validation comparison (VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation, ANYPS5_NO_SHADER_CACHE=1, ANYPS5_REQUIRE_VULKAN=1, ctest -V; main against this change, GitHub's Linux runner, llvmpipe), on 69a10da, the head before perf(agc): share BDA fault buffers in a per-device arena, with 32-byte slots for report-only programs #8963's main merge (run):

    • the layer loaded in both logs, and was not found appears 0 times in each;
    • the only VUID is VUID-VkDeviceCreateInfo-pNext-pNext, in both, so the change adds none;
    • the GPU was llvmpipe (LLVM 20.1.2), Mesa 25.2.8, on Ubuntu 24.04.5;
    • 50 tests passed with the change. On Windows, where the layer isn't run, 49 passed and 11 skipped.
  • Windows on an AMD GPU, by @JJenkx (comment): the head 7122193 merged locally onto main c3c45d7 (clean). Windows 11 Enterprise 10.0.22621, Ryzen 9 5950X, Radeon RX 6700 XT with AMD's driver 26.10.1 (Vulkan 1.4.315), WinLibs GCC 15.2.0, Release, with the Khronos validation layer 1.4.363 requested for every test.

    • The 44 tests of agc_driver_address_draw_space_reuse_tests, agc_driver_bda_device_tests and agc_driver_graphics_tests, the binaries this PR's test files build into, pass 3 of 3 runs each, with none skipped.
    • The layer was inserted 15 times across the runs and reported no VUIDs.
  • Resident Evil Village (PPSA01556), Windows, on our Village measurement tree, not main. That tree is cd88cee, a local measurement tree: an older main (merge base 949c9cf) with perf(agc): prove cached image tables from a write index behind APS5_TABLE_INDEX #12745, perf(agc): bypass the draw cache while its hit rate is under 5% #12478, perf(agc): keep an untracked fast proof across collect epochs on Windows while its write-watch hint has not moved #12921, fix(shader): load and store 16-bit data of converted packed images #11580, fix(agc): keep buffer owners when a staged address space dissolves #10304, perf(agc): cache CPU-path indirect draws behind APS5_DRAW_CACHE_INDIRECT #9243, perf(agc): forward an indirect record's patched user word as push data #9248 and perf(agc): queue all records of a CPU-path indirect draw behind APS5_PIPELINE_INDIRECT #1896 merged, plus perf(agc): share BDA fault buffers in a per-device arena, with 32-byte slots for report-only programs #8963 and this PR's five commits (6977068).

    • Machine: NVIDIA GeForce RTX 3070 Laptop GPU, driver 617.42, Windows 11 (10.0.26300). GPU clocks were not held.

    • Profiled boot (APS5_PROFILE_DRAW=1, menu +5 to +15 min, medians per 10 s): reused 3,336 (2,183 to 4,387), built 8, refused "not space-only" 152 and "space or epoch change" 768, and 0 snapshot refusals, of about 4,264 address-based draws. It renders like the same tree without this change.

    • Unprofiled pair, A B B A, the same libraries in both arms:

      run A1 (off) B1 (on) B2 (on) A2 (off)
      fps, menu +5 to +15 min 0.858 0.970 0.933 0.833
      p50 / p90 frame 1.13 / 1.45 s 0.99 / 1.18 s 1.04 / 1.27 s 1.17 / 1.48 s
      non-game CPU 42.2 % 37.0 % 42.1 % 40.0 %
      • The gain: B's mean is 12.5 % above A's, and both B runs are above both A runs. The two A runs are 2.9 % apart.
      • The load caveat: non-game CPU spans 5.2 points, and B1 ran lighter. At matched load, B2 (42.1 %) is 10.3 % above A's mean.
      • Per frame, B against A: Driver.Packet.draw −13.8 %, Graphics.Draw −15.2 %. Renders match by a static-region pixel diff at menu +5 and +10 min.
    • Traces, captured as the Performance report form describes. One boot per arm with only APS5_TRACE_SECONDS=960:30 added: a 30 s window, 16 min into the menu hold.

      • The results: A's frame p50 and p90 are 1,021 and 1,317 ms, and B's are 900 and 1,131 ms, so B is 11.9 % lower at p50 and 14.1 % lower at p90.
      • The caveat: it's one window per arm, so not pair-grade. B also ran under 5.6 points less non-game CPU (30.8 % against 36.4 %).
      • Both summary lines have the same commit, because the arms differ only in the switch:
      {"commit":"697706893b77","dirty":false,"env":{"APS5_DRAW_CACHE_INDIRECT":"1","APS5_DRAW_CACHE_PUSH_WORD":"1","APS5_HOST_IMPORT_MIB":"6400","APS5_LAZY_SHADER_PREPARE":"1","APS5_NO_ADDRESS_DRAW_REUSE":"1","APS5_NO_GPL":"1","APS5_PAD_INPUT_FILE":"<path>","APS5_PIPELINE_INDIRECT":"1","APS5_TABLE_INDEX":"1","APS5_TRACE_SECONDS":"960:30"},"gpu":"NVIDIA GeForce RTX 3070 Laptop GPU","driver":"NVIDIA 617.42","os":"Windows 10.0.26300","cpu":"AMD Ryzen 9 5900HS with Radeon Graphics","cpu_threads":16,"memory_mib":15776,"title_id":"PPSA01556","title":"Resident Evil Village","content_version":"01.210.000","resolution":"3840x2160","window":{"spec":"seconds 960:30","first_present":3010,"ms":30030.909},"presents":28,"frame_ms":{"p50":1021.251,"p90":1317.312,"p99":1486.142,"max":1486.142},"gpu_busy_ms_per_present":246.597,"worker_busy_pct":{"queue worker 0x0":99.385,"queue worker 0x38":0.073,"queue worker 0x20":86.352,"queue worker 0x28":92.349},"top_phases_ms_per_frame":{"Driver.Packet":2977.678,"Driver.Packet.memory_wait":1668.358,"Graphics.Draw":731.397,"Graphics.Draw.draw_and_resource_release":713.428,"Driver.Packet.draw":639.264,"Driver.Draw":638.291,"Driver.Packet.dispatch":621.523,"Driver.Dispatch":482.170},"trace_dropped":false,"trace":"aps5-trace-697706893b77-10224.json.gz"}
      {"commit":"697706893b77","dirty":false,"env":{"APS5_DRAW_CACHE_INDIRECT":"1","APS5_DRAW_CACHE_PUSH_WORD":"1","APS5_HOST_IMPORT_MIB":"6400","APS5_LAZY_SHADER_PREPARE":"1","APS5_NO_GPL":"1","APS5_PAD_INPUT_FILE":"<path>","APS5_PIPELINE_INDIRECT":"1","APS5_TABLE_INDEX":"1","APS5_TRACE_SECONDS":"960:30"},"gpu":"NVIDIA GeForce RTX 3070 Laptop GPU","driver":"NVIDIA 617.42","os":"Windows 10.0.26300","cpu":"AMD Ryzen 9 5900HS with Radeon Graphics","cpu_threads":16,"memory_mib":15776,"title_id":"PPSA01556","title":"Resident Evil Village","content_version":"01.210.000","resolution":"3840x2160","window":{"spec":"seconds 960:30","first_present":2105,"ms":30558.779},"presents":32,"frame_ms":{"p50":899.783,"p90":1131.300,"p99":1614.083,"max":1614.083},"gpu_busy_ms_per_present":254.399,"worker_busy_pct":{"queue worker 0x0":99.326,"queue worker 0x38":0.072,"queue worker 0x20":84.794,"queue worker 0x28":91.311},"top_phases_ms_per_frame":{"Driver.Packet":2625.941,"Driver.Packet.memory_wait":1436.447,"Graphics.Draw":615.152,"Driver.Packet.dispatch":603.060,"Graphics.Draw.draw_and_resource_release":596.195,"Driver.Packet.draw":540.361,"Driver.Draw":539.426,"Driver.Dispatch":467.563},"trace_dropped":false,"trace":"aps5-trace-697706893b77-28528.json.gz"}
      
  • a142526, the five review commits above, on GitHub's runners:

    • ×10 of ^agc_driver_address_draw_space_reuse, ^agc_driver_bda and ^agc_bda (run), agc_driver_address_draw_space_reuse_verify included:
      • Linux: 51 run, 51 pass, 0 skip, 0 fail.
      • Windows: 50 run, 38 pass, 12 skip (no Vulkan device), 0 fail.
    • Validation, main against this head, the same tests, on GitHub's Linux runner (layer 1.3.275) (run):
      • they pass on both arms;
      • the loader inserted the layer 8 times on main and 12 with this head, and neither log has was not found;
      • both report only VUID-VkDeviceCreateInfo-pNext-pNext, so the change adds none.
    • ^agc once (run):
      • Linux: 1,151 run, 1,075 pass, 75 skip, 1 fail. agc_driver_pipeline_journal timed out at 120 s, the cold-compile timeout this PR's earlier sweep also hit. Alone ×5 (run) it passes 5 of 5: 62.13 s for the first run, and about 5.1 s for each after.
      • Windows: 1,186 run, 357 pass, 829 skip (no Vulkan device), 0 fail.
  • The review commits on a cloud Linux machine (lavapipe, LLVM 20.1.2, Mesa 25.2.8), this PR's set ×10 after each commit:

    • d214fad (the lock):
      • The reuse tests pass 10 of 10 with APS5_ASSERT_GPU_LOCK=1.
      • Over ^agc with that switch, 447 of 1,150 tests abort at asserts that were already there, in harnesses that drive the device without the GPU lock: Recorder::Commands 255, TextureDetiler::BeginBatch 174, Recorder::Submit 6, CommandBatch 6, the heap mirror transfer 1 and KeepThroughHold 1. None abort at the three new asserts.
      • An earlier abort in such a harness could hide a later lock-less call, so the caller chain in item 9 is what shows the lock is held on the driver paths.
    • 86b29f0 (the verify switch):
      • agc_driver_address_draw_space_reuse_verify runs the default cases with the switch on and requires every served hit to be verified. At a142526 it verifies 76 of 76.
      • The red is a local change, not committed: with the snapshot byte compare removed, the switch stops with "a served address-based draw hit disagrees with a fresh build or guest memory in its snapshot bytes", while without it the stale hits are served.
    • 8a85451 (the cleanup): a standalone probe with a Recorder::Keep that throws std::bad_alloc covers three cases: an unrecorded early return, an exception during preparation, and a failed recording.
      • With the old cleanup, all three end in terminate called after throwing an instance of 'std::bad_alloc' (exit 134).
      • With the new code, the bad_alloc reaches the caller in all three.
    • a142526 (the multisample recheck): multisample-target-inside places a resident 4x target in the draw's registered allocation, 32 KiB from the word the draw reads, between two draws.
      • Without the fix it fails with "a draw after a resident multisample target appeared inside its address space counted reused 1 and 0 builds, expected one refusal for a space change and a build".
      • With it, the hit is refused as a space change, and the draw builds anew.
      • multisample-target-outside keeps the hit with and without the fix.
      • What the test checks: the refusal and the rebuild, not a fault on the target's address. Placed over the read word, the fresh build's SGPR-base global_load_dword crashes llvmpipe instead of reporting a fault. That crash also happens with the reuse off and with no multisample target, so it's outside this change.
    • At a142526: ctest -R '^(agc|shader)' 1,163 passed, 75 skipped, 0 failed.
  • Grand Theft Auto V (PPSA04263) and Diablo II: Resurrected, by @mrfelek (comment), on main 02c8efd with fix(shader): load and store 16-bit data of converted packed images #11580 and this PR's 7122193. Linux, Ryzen 9 5950X, RTX 3080 Ti (NVIDIA 615.71.09), Release; GPU clocks not reported.

    • GTA V, at North Yankton's bank, 3840x2160, warm caches:
      • [rescache] address-based draws (10 s): reused 58, built 0, with every refusal at 0. That's about 2 address-based draws per frame of about 865, every one reused.
      • Off (APS5_NO_ADDRESS_DRAW_REUSE=1) and on, alternating, gave 60, 61, 61 and 61 presents per 20 s. That's level, as expected with this few draws on the path.
    • Diablo II: Resurrected, main menu: no address-based draws line, so none of its draws take this path.
    • No failures or rendering problems in any run.
  • ba0b958, a merge of main 0836dfd (run). build(agc): register each AGC test executable in its own CMake fragment #12862 moved libSceAgcDriver's test registrations into tests/cmake/; the conflict in CMakeLists.txt is resolved with tools/agc_test_split.py resolve, which moves this PR's _off, _transitions and _verify registrations into a new tests/cmake/agc_driver_address_draw_space_reuse_tests.cmake (+20). Nothing else conflicted. feat(agc): look up table images at run time through a device image table on the GPU heap (APS5_GPU_PATH) #7642 creates a fragment of the same name for its own variants, so whichever of the two lands second keeps both sets there. Apart from the move, this PR's diff is unchanged. With -DBUILD_TESTING=ON, ctest -N gives 3079 tests: main's 3075 plus its 4 tests, each listed once. The 12 tests matching ^agc_driver_address_draw_space_reuse|^agc_driver_bda|^agc_bda pass 10 runs in a row. Linux: 12 run, 12 pass, 0 skip, 0 fail. Windows: 12 run, 1 pass, 11 skip (no Vulkan device), 0 fail. Suites: libc and libkernel pass on Linux (199 and 308) and on Windows (226 and 330). The suites ran with APS5_SKIP_TIMING_TESTS=1, which relaxes precise_wait's median bounds on GitHub's hosted runners.

  • 023b4a2, a merge of main 5f0857e, which brings tibzejoker's perf(agc): keep a resource set's import proof across registry changes that leave the imports in place #7261 (×10, validation).

    • The one conflict was the first lines of ShaderResources::noteReusable, where perf(agc): keep a resource set's import proof across registry changes that leave the imports in place #7261 resets importsReconcilable and this PR resets spaceReuse on the same line. The merge keeps both resets, main's first. The two flags are independent: importsReconcilable is set again on the direct-regions path, and spaceReuse on the space-reuse return. Nothing else conflicted, and this PR's diff is unchanged.
    • ×10: the tests above with perf(agc): keep a resource set's import proof across registry changes that leave the imports in place #7261's agc_driver_host_import_proofs. Linux: 13 run, 13 pass, 0 skip, 0 fail. Windows: 13 run, 1 pass, 12 skip (no Vulkan device), 0 fail. Suites: libc and libkernel pass on Linux (206 and 308) and on Windows (233 and 330). The suites ran with APS5_SKIP_TIMING_TESTS=1, which relaxes precise_wait's median bounds on GitHub's hosted runners.
    • Validation (VK_LAYER_KHRONOS_validation on GitHub's Linux runner), main 5f0857e against this merge, for the same tests. The layer was inserted in both arms, 9 times on main and 13 with this merge. The only VUID in either arm is VUID-VkDeviceCreateInfo-pNext-pNext, so the merge adds none.
  • NVIDIA RTX 2000 Ada Generation at 023b4a2, from TechLevelZero's NVIDIA bot (report): this head merged onto main e6f5730, driver 595.99.02, Ubuntu 26.04.1, 2,536 of 3,148 tests selected.

    • 2,484 passed, 7 failed and 45 skipped. None of the failures is new: 3 also fail on main, and 4 are unstable on main.
    • With VK_LAYER_KHRONOS_validation, no new validation IDs over 935 GPU tests. This PR's agc_driver_address_draw_space_reuse passed on the GPU; it isn't in main's baseline, so its validation wasn't compared. agc_driver_draw_cache_reuse and agc_driver_draw_cache_relocation passed too.
  • 7aeb568, a merge of main 88e804b (run). Two conflicts, each a pair of additions at the same place, and the merge keeps both: this PR's BdaResources.hpp include in Recorder.cpp beside main's ReferenceStorage.hpp include, and this PR's "Reused address-based draw builds" entry in docs/dev/debt/libSceAgcDriver.md beside main's new pixel-interlock entry. This PR's diff over main is unchanged. The address-draw reuse, BDA and host-import proof tests (^agc_driver_address_draw_space_reuse, ^agc_driver_bda, ^agc_bda and ^agc_driver_host_import_proofs) pass 10 runs in a row. Linux: 14 run, 14 pass, 0 skip, 0 fail. Windows: 14 run, 2 pass, 12 skip (the Vulkan tests; no Vulkan device), 0 fail. Suites: libc and libkernel pass on Linux (210 and 310) and on Windows (237 and 331). The suites ran with APS5_SKIP_TIMING_TESTS=1, which relaxes precise_wait's median bounds on GitHub's hosted runners. TechLevelZero's NVIDIA bot ran this head merged onto main 88e804b on an RTX 2000 Ada (report): 2,554 passed, 4 failed, none new (3 also fail on main, 1 unstable on main), 45 skipped, with no new validation IDs (974 tests on the GPU).

  • 831bf99, a merge of perf(agc): share BDA fault buffers in a per-device arena, with 32-byte slots for report-only programs #8963's 972242f, oneandonlydean's merge of main a4eca2a into perf(agc): share BDA fault buffers in a per-device arena, with 32-byte slots for report-only programs #8963. It merged without conflicts: perf(agc): share BDA fault buffers in a per-device arena, with 32-byte slots for report-only programs #8963's merge already holds both docs/dev/ENVIRONMENT.md rows, perf(agc): share BDA fault buffers in a per-device arena, with 32-byte slots for report-only programs #8963's APS5_NO_SHARED_FAULT_SLOTS and Gonic0's APS5_NO_SHARED_GDS from perf(agc): back the GDS with anonymous shared memory on integrated GPUs and keep its DMA_DATA on the GPU #13159, which were added at the same place. This PR's diff over perf(agc): share BDA fault buffers in a per-device arena, with 32-byte slots for report-only programs #8963 is unchanged. On GitHub's runners (run, on dbbaaad, our direct merge of main a4eca2a into 7aeb568, which has the same tree), the address-draw reuse, BDA and host-import proof tests (^agc_driver_address_draw_space_reuse, ^agc_driver_bda, ^agc_bda and ^agc_driver_host_import_proofs) pass 10 runs in a row. Linux: 14 run, 14 pass, 0 skip, 0 fail. Windows: 14 run, 2 pass, 12 skip (the Vulkan tests; no Vulkan device), 0 fail. Suites: libc and libkernel pass on Linux (235 and 319) and on Windows (262 and 340). The suites ran with APS5_SKIP_TIMING_TESTS=1, which relaxes precise_wait's median bounds on GitHub's hosted runners.

  • 8d2bb98 names the reuse measurement's title by its ID only in the debt entry (PPSA01556's menu), as the debt files do, at @oneandonlydean's ask.

  • 0b82601, a merge of main 5cb015c (run). The one conflict was in docs/dev/debt/libSceAgcDriver.md, where main's perf(recompiler): back compute scratch with a device buffer slot pool #12764 adds three compute scratch pool entries at the place this PR's reuse entry sits. The merge keeps both, main's first. This PR's diff over main is unchanged. The address-draw reuse, BDA and host-import proof tests (^agc_driver_address_draw_space_reuse, ^agc_driver_bda, ^agc_bda and ^agc_driver_host_import_proofs) pass 10 runs in a row. Linux: 14 run, 14 pass, 0 skip, 0 fail. Windows: 14 run, 2 pass, 12 skip (the Vulkan tests; no Vulkan device), 0 fail. Suites: libc and libkernel pass on Linux (279 and 321) and on Windows (306 and 342). The suites ran with APS5_SKIP_TIMING_TESTS=1, which relaxes precise_wait's median bounds on GitHub's hosted runners.

  • 8139afd and 5479721, the retention and its tests, on the merge 0b82601. The address-draw reuse tests with the new _held registration, and the BDA, host-import and write-tracking tests (^agc_driver_address_draw_space_reuse, ^agc_driver_bda, ^agc_bda, ^agc_host_import, ^agc_write_tracking, ^agc_driver_host_import_proofs), pass 10 runs in a row on GitHub's runners (run). Linux: 20 run, 19 pass, 1 skip (agc_host_import_sparse, no /dev/udmabuf), 0 fail. Windows: 25 run, 7 pass, 18 skip (no Vulkan device), 0 fail. Suites: libc and libkernel pass on Linux (279 and 321) and on Windows (306 and 342). The suites ran with APS5_SKIP_TIMING_TESTS=1, which relaxes precise_wait's median bounds on GitHub's hosted runners. ^agc once (run): Windows 1,295 run, 397 pass, 898 skip (no Vulkan device), 0 fail. Linux 1,258 run, 1,176 pass, 80 skip, 2 fail, both also on main: agc_driver_image_sample_lod_clamp_shader_lane (main's fix(agc): bind a T# minimum LOD through an S# that holds the LOD at 0 #12980 test, which fails the same with main's code) and agc_driver_pipeline_journal, which timed out at 120 s on its cold compile, as in this PR's earlier sweeps.

  • 8942229 and cfec53d, merges of main 086c068 and 04a9eb4, on oneandonlydean's merge of main 4f41f4c (a80d36f).

    • The conflicts, both in Graphics/src/Draw.cpp:
    • This PR's diff over main is otherwise unchanged.
    • ×10 (run), at cfec53d: the address-draw reuse, BDA, host-import, write-tracking, packed UNORM and agc_driver_graphics tests, with feat(agc): publish a written native multisample D32S8 surface to its guest planes on a guest read #13021's agc_driver_native_depth_publication. Linux: 27 run, 26 pass, 1 skip (agc_host_import_sparse), 0 fail. Windows: 32 run, 9 pass, 23 skip (no Vulkan device), 0 fail. The libc and libkernel suites run 300 and 324 tests on Linux and 330 and 342 on Windows, with 0 failed. The suites ran with APS5_SKIP_TIMING_TESTS=1, which relaxes precise_wait's median bounds on GitHub's hosted runners. The set without feat(agc): publish a written native multisample D32S8 surface to its guest planes on a guest read #13021's test, which isn't in main 086c068, passed 10 runs on 8942229 alone (run).
    • NVIDIA RTX 2000 Ada Generation at a80d36f, from TechLevelZero's NVIDIA bot (report): 2,770 passed, 6 failed (none new: 3 also fail on main, 3 unstable on main), 48 skipped. The bot's selection that run didn't include this PR's agc_driver_address_draw_space_reuse_* tests, so they haven't run on that GPU at this head.
    • NVIDIA RTX 2000 Ada Generation at cfec53d, from TechLevelZero's NVIDIA bot (report): this head merged onto main 1c8c0ef, driver 595.99.02. 2,788 passed, 7 failed (none new: 3 also fail on main, 4 unstable on main), 50 skipped. No new validation IDs over 956 GPU tests. Of this PR's tests, agc_driver_address_draw_space_reuse ran and passed. The _held, _off, _transitions and _verify registrations weren't in the bot's selection.
    • AMD Radeon RX 6300 (RADV NAVI24) at cfec53d, from TechLevelZero's AMD bot (report): the same merge, Mesa 25.2.8. 2,775 passed, 9 failed (none new: 7 also fail on main, 2 unstable on main), 61 skipped. No new validation IDs over 956 GPU tests. agc_driver_address_draw_space_reuse passed (2.95 s), and again the other four weren't selected.
  • c6daa9a and 342b06e, by oneandonlydean: a merge of main c2eafe4, without conflicts, and test(libSceAgcDriver): give each held-batch completion fill a new pattern. meh7an's perf(agc): elide a repeated fill of a range that still holds its pattern #10668 makes FillBuffer skip a fill whose range already holds the same pattern, so the held-batch test's repeated zero fill recorded nothing and never submitted the batch holding the space. Each completion fill now has a new pattern.

    • ×10 at 342b06e (run), the same tests as on cfec53d. Linux: 27 run, 26 pass, 1 skip (agc_host_import_sparse), 0 fail. Windows: 32 run, 9 pass, 23 skip (no Vulkan device), 0 fail. The libc and libkernel suites run 301 and 325 tests on Linux and 331 and 343 on Windows, with 0 failed. The suites ran with APS5_SKIP_TIMING_TESTS=1, which relaxes precise_wait's median bounds on GitHub's hosted runners.

Checklist

  • Based on current main; no other open PR implements the same functions (see Overlap: feat(agc): GPU descriptor heap on VK_EXT_descriptor_heap (APS5_GPU_HEAP) #9508's pieces are taken with its author's agreement)
  • 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: n/a, none added. The reuse's unmeasured cases are in its debt entry
  • 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: n/a, none
  • Generic behaviour, not specific to one title
  • Depends on: perf(agc): share BDA fault buffers in a per-device arena, with 32-byte slots for report-only programs #8963
  • Fixes: none
  • Unblocks: none claimed (speed only; see the Resident Evil Village (PPSA01556) runs above)
  • GPUs tested: llvmpipe (lavapipe) on a Linux machine and on GitHub's Linux runner; NVIDIA GeForce RTX 3070 Laptop GPU, driver 617.42, Windows 11 (10.0.26300) (the Resident Evil Village runs); AMD Radeon RX 6700 XT, AMD driver 26.10.1 (Vulkan 1.4.315), Windows 11 (JJenkx's run); NVIDIA GeForce RTX 3080 Ti, driver 615.71.09, Linux (mrfelek's runs); NVIDIA RTX 2000 Ada Generation, driver 595.99.02, Ubuntu 26.04.1 (TechLevelZero's NVIDIA bot); AMD Radeon RX 6300 (RADV NAVI24), Mesa 25.2.8, Ubuntu 26.04.1 (TechLevelZero's AMD bot); Windows build and tests on GitHub's runner
  • AI-assisted: yes

Raghav314 and others added 7 commits October 30, 2026 23:11
…d space

Extracted from 1be4230 ("perf(agc): GPU descriptor heap on
VK_EXT_descriptor_heap (APS5_GPU_HEAP)", boykopovar#9508): only its space reuse,
as boykopovar#9508's head 82f76ff has it, without the descriptor heap.

A read-only address-based draw build whose bindings all lie in its
cached address space (no lease of its own, no regions outside the
space, no sparse mirrors or copied ranges) is reusable. A hit retakes
the space while it is still the current one for the device, registry
generation and import epoch, refreshes its writable mirrors, and is
served when every snapshot of the draw lies inside a live region of
the space and still equals guest memory. The moved-buffer proof and the
draw bindings take such a build too. After recording, the build hands
the space to the recorder, so between draws it holds only a weak
reference and pins no guest allocation.

The gate stays as in boykopovar#9508: the reuse runs only with APS5_GPU_HEAP set.

Adapted to this base, which has no descriptor heap:
- NeverReusable asks ShaderStoresThroughAddresses(spirv), after the
  gate, where boykopovar#9508 reads the program's bdaStores;
- GpuHeapEnabled() is copied from boykopovar#9508's BindlessHeap.cpp into
  ShaderResources.cpp;
- GuestBufferMemory.cpp includes Draw.hpp for DrawPipelineEnabled();
- docs/dev/ENVIRONMENT.md lists APS5_GPU_HEAP for ShaderResources.cpp.
The heap's own parts of the hit path (HeapCostScope, RefreshHeapStage,
outcome.addressBased) are left out.

Co-authored-by: Yunus Shaikh <75296019+EagleBearerYS@users.noreply.github.com>
The space reuse of the previous commit ran only with APS5_GPU_HEAP set,
so on the default path every address-based draw built its resources,
its page table included, again. At Village's menu that is 4,276 draws
per 10 s at 1,126 us each on the draw committer (BF-105).

SpaceReuseDisabled() no longer depends on the descriptor heap: the
reuse is on unless APS5_NO_ADDRESS_DRAW_REUSE=1 is set, documented in
docs/dev/ENVIRONMENT.md in place of the APS5_GPU_HEAP row, which
nothing reads any more. NeverReusable asks whether a stage stores
through addresses only for a stage that binds the BDA table, so other
draws do not pay the lookup.

On by default, a hit that retook the cached space must give it back on
every path, or the cached build pins the space's allocations and a
guest free waits APS5_PIN_WAIT_MS for it:
- ReleaseSpace returns nothing and keeps the released reference when no
  space is held, so a second release does not forget the space;
- a hit that throws before it is served (CheckBufferAliases) releases
  the space it retook;
- Draw releases a space still held when the draw ends without
  keepRecordedDraw (prepareDraw returning false, or a throw), into the
  active recorder;
- the transition path, which builds afresh for a hit with moved
  buffers, releases the template's space first.
A recorded draw also makes no recipe from a space-reuse build:
DrawWithRecipe proves a template with Revalidate alone, which neither
retakes the space nor checks the draw's snapshots in it.

agc_driver_address_draw_space_reuse covers the default path:
- a read-only BDA draw over an imported allocation, drawn twice with
  unchanged inputs, is served by the first draw's build;
- a CPU write into the constant it reads between the draws is seen by
  the reused build;
- a guest free inside the address space while the reused build is idle
  returns at once (BF-033's 60 s pin wait), and the next draw builds
  anew;
- no recipe is made from the reused build;
- a draw whose read-only vertex buffer moved inside the space renders,
  and a free after it returns at once.
The first four are red on the previous commit, where such a build is
never cached; with the reuse on but no recipe rule, the fourth fails on
the recipe it gets, and dropping keepRecordedDraw's release makes the
third wait the full pin wait. --case <name> runs one case.
agc_driver_address_draw_space_reuse_off runs the scene with
APS5_NO_ADDRESS_DRAW_REUSE=1 and requires a build per draw;
agc_driver_address_draw_space_reuse_transitions runs it with
APS5_DRAW_TRANSITIONS=1, the non-lean path.
… fault record

A reused address-based draw build has one fault record, its boykopovar#8963 slot,
and every use of it checked that record when its batch completed. Two
uses in one batch shared it: the first fault was reported by both
completions (the record is never cleared after a report), a second
use's own fault was lost behind it, and each later use reported the old
fault again.

A recorded draw of a space-reuse build now begins a use
(BeginDrawUse), as boykopovar#8971's a581de8 does for dispatches. The first use
in flight takes the build's own record and descriptor sets; a use that
starts while it is taken takes a record of its own, a slot from the
boykopovar#8963 arena (a BdaResources without a table), and sets that repeat the
build's writes with that slot in the fault binding (AllocateRewritten,
through the same writer as the moved-buffer and snapshot sets, which now
take the use's slot too). The use's completion checks its own record
with the build's tables (BdaResources::CheckUse) and clears it, so a
fault is reported once, by the use that made it, and the next use of the
record starts clean. The record returns to the arena, and the build's own
record is released, when the use ends.

Builds whose stages store through addresses are still never reusable
(NeverReusable), so their single use keeps the build's record.

agc_driver_address_draw_space_reuse's fault-per-use case runs pairs of
uses of one build in a batch, each through its own pointer: a faulting
use before a clean one and after one, two faulting uses, and two clean
uses after them. Each fault is reported once at its own address and the
clean pair reports none. On the previous commit the first pair reports
its fault twice; with every use on the build's own record the second
fault of the faulting pair is never reported.
A tester of address-based draw reuse cannot tell how often a draw was
served by its cached build, or why it was not: a refused reuse pays for
its proof and then for the build.

Every address-based draw that could take part in the resource cache
(recordable, its stages compiled, the reuse on) now counts exactly one
outcome:
- reused: a hit served by the cached build;
- built: a new build that the cache keeps for later draws;
- not read-only: a stage stores through addresses (NeverReusable);
- not space-only: the build cannot be kept, as some of its bindings lie
  outside the cached address space (or noteReusable keeps it out for
  another reason: copied writes, multisample sources, the loop guard);
- snapshot outside the space (copied): a snapshot of the draw lies
  outside the space, or in a region that is not read live;
- partial overlap: a snapshot straddles the end of a region;
- snapshot changed: a snapshot no longer equals guest memory, or lies
  under a unit shadow;
- moved GuestBuffers element and patched data word: the moved-buffer
  proof refused the hit, for a data word under a misalignment patch or
  for anything else;
- space or epoch change: the space could not be retaken (replaced, or
  its device, registry generation or import epoch moved);
- in use: the cached build still holds its space for another draw, which
  the hit no longer shares (nor removes from the cache);
- revalidation: Revalidate refused the hit.
SnapshotsServedInPlace returns which of its checks refused, and
MovedReadOnlyBuffers says when a patched data word did.

APS5_PROFILE_DRAW prints them every 10 s after the [rescache] draws line,
as boykopovar#6636's 89ab0ea did for its reuse: "[rescache] address-based draws
(10 s): reused N, built N; refused: not read-only N, ...". The counters
are cumulative (AddressDrawReuseCounters) and the line shows a window.

agc_driver_address_draw_space_reuse's counters case draws through each
refusal it can reach and requires each to count under its own reason
(two reuses, a space change after an allocation is mapped, a snapshot
outside the space and the uncached builds after it, a snapshot across
the end of an allocation, a snapshot that differs from memory, a storing
pixel shader), and the outcomes of all its draws to add up to the number
of draws.
…reuse proof

The reuse proof of a space-reuse draw build compares the draw's
snapshots with guest memory inside the cached space. A write that
earlier work in the batch recorded over a snapshot's range (a fill, a
copy, a dispatch storing through a descriptor) may still be pending when
the proof runs: memory then still holds the bytes the capture saw, the
proof passes, and the draw runs after the write on a build proven
against the old bytes.

As boykopovar#6636's 6e5b5bd did for its proof, the hit now syncs the recorder
through every snapshot range a recorded write overlaps before
SnapshotsServedInPlace compares them, so the comparison sees the memory
the earlier work leaves and a capture made before the write is refused
as a changed snapshot. A range with no pending write costs one overlap
test.

agc_driver_address_draw_space_reuse gains the case and the moved-ring
cases:
- pending-snapshot-write: a draw whose snapshots include the pointer
  its pixel shader loads, reused once, then a FillBuffer recorded over
  that pointer and the same draw with the old capture in the batch. It is
  refused for a changed snapshot and builds again; on the previous commit
  it was reused ("reused 1 and 0 builds").
- ring-same-constants: each draw writes the same constants into the next
  slot of an eight-slot ring in an imported allocation, passes the slot's
  address in user data and its bytes as a snapshot; all fifteen draws
  after the first are reused.
- ring-own-constants: as above with other constants per draw; each draw
  renders its own and all are reused.
- ring-old-slot-write: a CPU write to the previous slot after each draw
  is recorded leaves the reused draw's result alone.
- ring-refusals: a moved snapshot outside the space is refused under its
  reason; a moved read-only vertex buffer inside the space is bound anew
  and reused (boykopovar#9508's moved-buffer path), and one that a pending fill
  overlaps is refused as a moved GuestBuffers element.
The ring cases pass from the default-path commit on (with
APS5_NO_ADDRESS_DRAW_REUSE=1 they fail, 15 builds for 15 draws). No case
reaches the patched-data-word refusal: the stage this test builds has no
data word under a misalignment patch. docs/dev/debt/libSceAgcDriver.md
records the reuse and what is not measured.
@github-actions github-actions Bot added perf Performance change perf numbers missing perf pull request without a before and after summary line labels Oct 31, 2026
@github-actions

Copy link
Copy Markdown

This pull request is labeled perf, so it needs the summary line of a capture on main and one with the change, from the same title, scene and machine, as the Performance report form asks. Please paste both aps5-summary.jsonl lines, attach the two traces and add the output of tools/trace_digest.py.

@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 — changes requested

The performance report compares the feature toggle on and off at the same commit, so it does not provide the required main versus PR-change captures.

What I ran

Reviewed head 7122193668bb31c5282e80152b240d8e1990720e against the PR's recorded base c3c45d73abd34dca81da6bad87cb6d36ea437a66. I also checked against current main at 45f4f82449a72e31aa9fd3120bd82820211dea41; both the PR and its declared dependency #8963 have clean merge previews there. Environment: Linux, Python 3.11.2; no C/C++ compiler or build was run.

python3 tools/pr_precheck.py --repo boykopovar/AnyPS5 --pr 13858
python3 tools/pr_stack_check.py 13858 --repo boykopovar/AnyPS5 --output-dir /tmp/anyps5-pr-precheck/boykopovar-AnyPS5-pr-13858-7122193668bb/stack
git diff --check 45f4f82449a72e31aa9fd3120bd82820211dea41...7122193668bb31c5282e80152b240d8e1990720e
python3 tools/check_conventions.py --base 45f4f82449a72e31aa9fd3120bd82820211dea41 --head 7122193668bb31c5282e80152b240d8e1990720e --title 'perf(agc): reuse read-only address-based draw builds over their cached address space' --body /tmp/anyps5-pr-precheck/boykopovar-AnyPS5-pr-13858-7122193668bb/pr-body.md
python3 tools/performance_compare.py /tmp/anyps5-13858-perf/A-reuse-off-aps5-summary.jsonl /tmp/anyps5-13858-perf/B-reuse-on-aps5-summary.jsonl --require-matching-context
python3 tools/trace_digest.py /tmp/anyps5-13858-perf/A/aps5-trace-697706893b77-10224.json.gz --summary /tmp/anyps5-13858-perf/A/aps5-summary.jsonl
python3 tools/trace_digest.py /tmp/anyps5-13858-perf/B/aps5-trace-697706893b77-28528.json.gz --summary /tmp/anyps5-13858-perf/B/aps5-summary.jsonl

Results

Check Result
Head/base freshness Precheck confirmed both unchanged at completion.
Diff and conventions Passed.
PR merge previews Against current main 45f4f82449a72e31aa9fd3120bd82820211dea41, both #13858 and dependency #8963 are clean; #13858 includes #8963's current head.
Precheck ABI/test-quality helpers Could not run: those helper scripts are absent from the isolated PR checkout. This is a tooling limitation, not a PR-source failure.
Performance context comparison Failed with exit 2: the summaries differ in APS5_NO_ADDRESS_DRAW_REUSE and window.first_present. Both summaries also name the same commit.
Trace digests Regenerated digest outputs for A and B each match the corresponding attached digest output line-for-line.
Hosted CI Eligibility, conventions, library-portability, intake, labels and report passed. Windows passed at the final refresh; Linux and specialized jobs were skipped.
Relevant raw output
All conventions checks passed.
performance_compare.py: recorded configuration differs: env.APS5_NO_ADDRESS_DRAW_REUSE, window.first_present
exit=2
A: regenerated digest equals posted digest: True
B: regenerated digest equals posted digest: True
# PR stack check — fresh

Target: https://github.com/boykopovar/AnyPS5/pull/13858
Target branch tip: `45f4f82449a72e31aa9fd3120bd82820211dea41`
All heads unchanged: **True**
Dependency order: #8963 → #13858

## Individual merge previews

- PR #8963: **clean** against current base; head `d958699e8b7cb503f83ab6f3031340e349c0a4e1`; changed paths: none reported
- PR #13858: **clean** against current base; head `7122193668bb31c5282e80152b240d8e1990720e`; changed paths: none reported
/usr/bin/python3: can't open file '/tmp/anyps5-pr-precheck/boykopovar-AnyPS5-pr-13858-7122193668bb/head-7122193668bb-d4fa1180/tools/pr_abi_audit.py': [Errno 2] No such file or directory
/usr/bin/python3: can't open file '/tmp/anyps5-pr-precheck/boykopovar-AnyPS5-pr-13858-7122193668bb/head-7122193668bb-d4fa1180/tools/pr_test_quality.py': [Errno 2] No such file or directory

Findings

Blocking

The perf PR's two summary records are an on/off toggle comparison from the same source commit (697706893b77); the PR description also says the measurement tree includes this change. The repository requires a main capture and a change capture from the same machine and scene, and the records must name different commits. The perf numbers missing label remains present. Please add the main and PR-head summary lines, their traces, and trace_digest.py outputs using the same machine, title, scene, resolution, and capture settings. The existing toggle pair can remain as supplemental evidence.

Non-blocking

No additional blocking source issue was established in the inspected diff. Local build/CTest and platform-specific runtime behavior were not independently checked.

Sources

Not verified

No local build, CTest, Linux product job, or console run was performed. The Windows hosted job was still in progress at the final refresh; the skipped Linux and specialized jobs provide no result. Author-reported test runs were not independently repeated.

To get this to a good state

Add the compliant main/PR-head performance evidence described above. I will rerun the relevant report, trace, and freshness checks on the updated head.

@JJenkx

JJenkx commented Oct 31, 2026

Copy link
Copy Markdown
Contributor

Windows GPU run of head 7122193668, merged onto main c3c45d73ab (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.363 requested for every test (VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation).

  • All 44 CTest entries of agc_driver_address_draw_space_reuse_tests, agc_driver_bda_device_tests, agc_driver_graphics_tests, which builds 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 15 times across the runs and reported no VUIDs.

AI-assisted: yes (Claude Code).

@github-actions

github-actions Bot commented Oct 31, 2026 •

Copy link
Copy Markdown

Other open pull requests touch the same code. Merging one will break the other, or both implement the same thing. If this one builds on them, list them in Depends on.

Pull request Conflicting files (lines on main) Same exports Same new files
PR 7642 core/libs/prx/libSceAgcDriver/tests/cmake/agc_driver_address_draw_space_reuse_tests.cmake
core/libs/prx/libSceAgcDriver/tests/execution/AddressDrawSpaceReuse.cpp
PR 9508 core/libs/prx/libSceAgcDriver/Graphics/include/BdaResources.hpp L5-6, L17-19, L61-62
core/libs/prx/libSceAgcDriver/Graphics/include/GuestBufferMemory.hpp L398, L545
core/libs/prx/libSceAgcDriver/Graphics/include/ShaderResources.hpp L57-58, L245-247, L590, L625
core/libs/prx/libSceAgcDriver/Graphics/src/BdaResources.cpp L6-7, L133, L144, L229
core/libs/prx/libSceAgcDriver/Graphics/src/Draw.cpp L1885, L1889, L1894, L2178, L2575-2576, L3230, L3376, L3514-3516, L3777-3778
core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp L6, L142, L5222
core/libs/prx/libSceAgcDriver/Graphics/src/ShaderAddressResources.cpp L6-8, L13-120
core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp L2739-2740, L2742, L2744, L2780, L2783, L5748, L5870, L5979-5982, L6031-6033
core/libs/prx/libSceAgcDriver/tests/BdaContracts.cpp L16-118, L144-158
core/libs/prx/libSceAgcDriver/tests/cmake/agc_driver_address_draw_space_reuse_tests.cmake
core/libs/prx/libSceAgcDriver/tests/execution/AddressDrawSpaceReuse.cpp
core/libs/prx/libSceAgcDriver/tests/cmake/agc_driver_address_draw_space_reuse_tests.cmake
core/libs/prx/libSceAgcDriver/tests/execution/AddressDrawSpaceReuse.cpp
PR 10193 core/libs/prx/libSceAgcDriver/tests/cmake/agc_driver_address_draw_space_reuse_tests.cmake
core/libs/prx/libSceAgcDriver/tests/execution/AddressDrawSpaceReuse.cpp
PR 10678 core/libs/prx/libSceAgcDriver/Graphics/src/Draw.cpp L1870-1871, L3777-3778
PR 11557 core/libs/prx/libSceAgcDriver/Graphics/src/Draw.cpp L2495, L2635-2636
PR 11995 core/libs/prx/libSceAgcDriver/Graphics/include/ShaderResources.hpp L246-247
core/libs/prx/libSceAgcDriver/Graphics/src/Draw.cpp L2193-2194
PR 12764 docs/dev/debt/libSceAgcDriver.md L354
PR 13159 docs/dev/ENVIRONMENT.md L352
PR 13928 core/libs/prx/libSceAgcDriver/tests/cmake/agc_driver_address_draw_space_reuse_tests.cmake
core/libs/prx/libSceAgcDriver/tests/execution/AddressDrawSpaceReuse.cpp
PR 13929 core/libs/prx/libSceAgcDriver/tests/cmake/agc_driver_address_draw_space_reuse_tests.cmake
core/libs/prx/libSceAgcDriver/tests/execution/AddressDrawSpaceReuse.cpp
PR 14051 core/libs/prx/libSceAgcDriver/Graphics/src/Draw.cpp L1870-1871, L1885

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 1368 core/libs/prx/libSceAgcDriver/Graphics/src/Draw.cpp
PR 1395 core/libs/prx/libSceAgcDriver/Graphics/src/Draw.cpp
PR 1896 docs/dev/ENVIRONMENT.md
PR 2434 core/libs/prx/libSceAgcDriver/Graphics/include/GuestBufferMemory.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
docs/dev/debt/libSceAgcDriver.md
PR 4472 docs/dev/ENVIRONMENT.md
PR 5021 core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
core/libs/prx/libSceAgcDriver/tests/BdaDevice.cpp
core/libs/prx/libSceAgcDriver/tests/BdaResources.cpp
PR 5609 core/libs/prx/libSceAgcDriver/Graphics/src/Draw.cpp
core/libs/prx/libSceAgcDriver/Graphics/src/Recorder.cpp
PR 5925 core/libs/prx/libSceAgcDriver/Graphics/include/Draw.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/Draw.cpp
docs/dev/debt/libSceAgcDriver.md
PR 6186 core/libs/prx/libSceAgcDriver/Graphics/include/GuestBufferMemory.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
core/libs/prx/libSceAgcDriver/Graphics/src/Recorder.cpp
docs/dev/ENVIRONMENT.md
docs/dev/debt/libSceAgcDriver.md
PR 6188 core/libs/prx/libSceAgcDriver/Graphics/include/Draw.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/Draw.cpp
PR 6192 core/libs/prx/libSceAgcDriver/Graphics/include/ShaderResources.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp
PR 6194 core/libs/prx/libSceAgcDriver/Graphics/include/ShaderResources.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp
docs/dev/debt/libSceAgcDriver.md
PR 6197 core/libs/prx/libSceAgcDriver/Graphics/include/GuestBufferMemory.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
core/libs/prx/libSceAgcDriver/tests/BdaResources.cpp
PR 6223 core/libs/prx/libSceAgcDriver/Graphics/include/ShaderResources.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp
docs/dev/debt/libSceAgcDriver.md
PR 6273 docs/dev/debt/libSceAgcDriver.md
PR 6280 docs/dev/debt/libSceAgcDriver.md
PR 6412 core/libs/prx/libSceAgcDriver/Graphics/include/ShaderResources.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/ShaderAddressResources.cpp
core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp
core/libs/prx/libSceAgcDriver/tests/BdaResources.cpp
docs/dev/debt/libSceAgcDriver.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
docs/dev/debt/libSceAgcDriver.md
PR 6548 core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
docs/dev/debt/libSceAgcDriver.md
PR 6804 core/libs/prx/libSceAgcDriver/Graphics/include/ShaderResources.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp
docs/dev/debt/libSceAgcDriver.md
PR 6808 docs/dev/debt/libSceAgcDriver.md
PR 6918 core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
core/libs/prx/libSceAgcDriver/tests/BdaResources.cpp
PR 6924 docs/dev/ENVIRONMENT.md
PR 6970 core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp
PR 6987 docs/dev/debt/libSceAgcDriver.md
PR 6989 docs/dev/debt/libSceAgcDriver.md
PR 6995 docs/dev/debt/libSceAgcDriver.md
PR 7002 core/libs/prx/libSceAgcDriver/Graphics/include/ShaderResources.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp
docs/dev/debt/libSceAgcDriver.md
PR 7085 core/libs/prx/libSceAgcDriver/Graphics/src/Draw.cpp
docs/dev/debt/libSceAgcDriver.md
PR 7256 core/libs/prx/libSceAgcDriver/Graphics/src/Draw.cpp
docs/dev/debt/libSceAgcDriver.md
PR 7275 core/libs/prx/libSceAgcDriver/Graphics/src/Draw.cpp
PR 7449 docs/dev/ENVIRONMENT.md
docs/dev/debt/libSceAgcDriver.md
PR 7457 core/libs/prx/libSceAgcDriver/Graphics/include/GuestBufferMemory.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
docs/dev/ENVIRONMENT.md
PR 7464 core/libs/prx/libSceAgcDriver/Graphics/src/Recorder.cpp
PR 7514 core/libs/prx/libSceAgcDriver/Graphics/include/GuestBufferMemory.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
docs/dev/ENVIRONMENT.md
PR 7604 docs/dev/ENVIRONMENT.md
docs/dev/debt/libSceAgcDriver.md
PR 7668 core/libs/prx/libSceAgcDriver/Graphics/src/Draw.cpp
docs/dev/debt/libSceAgcDriver.md
PR 7689 core/libs/prx/libSceAgcDriver/Graphics/include/ShaderResources.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/ShaderAddressResources.cpp
core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp
PR 8004 docs/dev/ENVIRONMENT.md
PR 8246 core/libs/prx/libSceAgcDriver/Graphics/src/Draw.cpp
docs/dev/ENVIRONMENT.md
PR 8484 docs/dev/ENVIRONMENT.md
PR 8592 docs/dev/debt/libSceAgcDriver.md
PR 8707 docs/dev/debt/libSceAgcDriver.md
PR 9012 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
docs/dev/ENVIRONMENT.md
PR 9020 core/libs/prx/libSceAgcDriver/Graphics/src/Draw.cpp
docs/dev/debt/libSceAgcDriver.md
PR 9318 core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp
docs/dev/debt/libSceAgcDriver.md
PR 9335 core/libs/prx/libSceAgcDriver/Graphics/src/Draw.cpp
docs/dev/debt/libSceAgcDriver.md
PR 9345 docs/dev/ENVIRONMENT.md
PR 9356 core/libs/prx/libSceAgcDriver/Graphics/include/Draw.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/Draw.cpp
core/libs/prx/libSceAgcDriver/Graphics/src/Recorder.cpp
docs/dev/ENVIRONMENT.md
docs/dev/debt/libSceAgcDriver.md
PR 9387 core/libs/prx/libSceAgcDriver/Graphics/include/Draw.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/Draw.cpp
core/libs/prx/libSceAgcDriver/Graphics/src/Recorder.cpp
docs/dev/ENVIRONMENT.md
docs/dev/debt/libSceAgcDriver.md
PR 9592 core/libs/prx/libSceAgcDriver/Graphics/include/ShaderResources.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp
docs/dev/debt/libSceAgcDriver.md
PR 9672 docs/dev/debt/libSceAgcDriver.md
PR 9673 docs/dev/debt/libSceAgcDriver.md
PR 9675 docs/dev/debt/libSceAgcDriver.md
PR 9700 docs/dev/debt/libSceAgcDriver.md
PR 9712 core/libs/prx/libSceAgcDriver/Graphics/src/Draw.cpp
core/libs/prx/libSceAgcDriver/Graphics/src/Recorder.cpp
core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp
docs/dev/ENVIRONMENT.md
PR 9748 core/libs/prx/libSceAgcDriver/Graphics/src/Draw.cpp
docs/dev/debt/libSceAgcDriver.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/Draw.cpp
core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp
docs/dev/ENVIRONMENT.md
PR 9884 core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp
PR 9895 docs/dev/debt/libSceAgcDriver.md
PR 9897 core/libs/prx/libSceAgcDriver/Graphics/include/Draw.hpp
core/libs/prx/libSceAgcDriver/Graphics/include/ShaderResources.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/Draw.cpp
core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp
PR 9898 core/libs/prx/libSceAgcDriver/Graphics/include/GuestBufferMemory.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
core/libs/prx/libSceAgcDriver/Graphics/src/Recorder.cpp
docs/dev/ENVIRONMENT.md
docs/dev/debt/libSceAgcDriver.md
PR 9915 core/libs/prx/libSceAgcDriver/Graphics/src/Draw.cpp
docs/dev/debt/libSceAgcDriver.md
PR 9950 docs/dev/debt/libSceAgcDriver.md
PR 10025 core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
PR 10049 core/libs/prx/libSceAgcDriver/Graphics/include/ShaderResources.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp
docs/dev/debt/libSceAgcDriver.md
PR 10193 core/libs/prx/libSceAgcDriver/Graphics/include/BdaResources.hpp
core/libs/prx/libSceAgcDriver/Graphics/include/GuestBufferMemory.hpp
core/libs/prx/libSceAgcDriver/Graphics/include/ShaderResources.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/BdaResources.cpp
core/libs/prx/libSceAgcDriver/Graphics/src/Draw.cpp
core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
core/libs/prx/libSceAgcDriver/Graphics/src/Recorder.cpp
core/libs/prx/libSceAgcDriver/Graphics/src/ShaderAddressResources.cpp
core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp
core/libs/prx/libSceAgcDriver/tests/BdaContracts.cpp
core/libs/prx/libSceAgcDriver/tests/BdaResources.cpp
core/libs/prx/libSceAgcDriver/tests/cmake/agc_driver_address_draw_space_reuse_tests.cmake
core/libs/prx/libSceAgcDriver/tests/execution/AddressDrawSpaceReuse.cpp
docs/dev/ENVIRONMENT.md
docs/dev/debt/libSceAgcDriver.md
PR 10233 docs/dev/debt/libSceAgcDriver.md
PR 10249 core/libs/prx/libSceAgcDriver/Graphics/src/Recorder.cpp
PR 10256 core/libs/prx/libSceAgcDriver/Graphics/include/ShaderResources.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp
docs/dev/debt/libSceAgcDriver.md
PR 10359 docs/dev/debt/libSceAgcDriver.md
PR 10442 core/libs/prx/libSceAgcDriver/Graphics/include/ShaderResources.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/Draw.cpp
core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
core/libs/prx/libSceAgcDriver/Graphics/src/Recorder.cpp
core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp
core/libs/prx/libSceAgcDriver/tests/BdaResources.cpp
docs/dev/ENVIRONMENT.md
PR 10743 core/libs/prx/libSceAgcDriver/Graphics/include/ShaderResources.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp
docs/dev/debt/libSceAgcDriver.md
PR 10757 docs/dev/ENVIRONMENT.md
PR 10894 core/libs/prx/libSceAgcDriver/Graphics/include/ShaderResources.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp
docs/dev/ENVIRONMENT.md
PR 10920 core/libs/prx/libSceAgcDriver/tests/BdaDevice.cpp
PR 11351 docs/dev/ENVIRONMENT.md
PR 11435 docs/dev/ENVIRONMENT.md
PR 11436 docs/dev/ENVIRONMENT.md
PR 11444 core/libs/prx/libSceAgcDriver/Graphics/include/ShaderResources.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/Recorder.cpp
core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp
PR 11452 core/libs/prx/libSceAgcDriver/Graphics/include/Draw.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/Draw.cpp
PR 11825 core/libs/prx/libSceAgcDriver/Graphics/src/Draw.cpp
docs/dev/debt/libSceAgcDriver.md
PR 11901 core/libs/prx/libSceAgcDriver/Graphics/include/ShaderResources.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp
PR 11998 docs/dev/debt/libSceAgcDriver.md
PR 12120 docs/dev/ENVIRONMENT.md
docs/dev/debt/libSceAgcDriver.md
PR 12125 core/libs/prx/libSceAgcDriver/Graphics/src/Draw.cpp
PR 12157 core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
PR 12323 docs/dev/ENVIRONMENT.md
PR 12324 docs/dev/ENVIRONMENT.md
PR 12544 docs/dev/ENVIRONMENT.md
PR 12565 docs/dev/debt/libSceAgcDriver.md
PR 12567 core/libs/prx/libSceAgcDriver/Graphics/src/Recorder.cpp
docs/dev/ENVIRONMENT.md
docs/dev/debt/libSceAgcDriver.md
PR 12575 core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp
PR 12746 docs/dev/ENVIRONMENT.md
PR 12863 docs/dev/ENVIRONMENT.md
PR 12930 docs/dev/ENVIRONMENT.md
PR 12944 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 12970 docs/dev/ENVIRONMENT.md
PR 13148 core/libs/prx/libSceAgcDriver/Graphics/src/Draw.cpp
core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
PR 13599 docs/dev/debt/libSceAgcDriver.md
PR 13646 docs/dev/ENVIRONMENT.md
PR 13707 docs/dev/ENVIRONMENT.md
docs/dev/debt/libSceAgcDriver.md
PR 13796 core/libs/prx/libSceAgcDriver/Graphics/include/ShaderResources.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp
PR 13863 core/libs/prx/libSceAgcDriver/Graphics/include/ShaderResources.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/Draw.cpp
core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
core/libs/prx/libSceAgcDriver/Graphics/src/Recorder.cpp
docs/dev/ENVIRONMENT.md
docs/dev/debt/libSceAgcDriver.md
PR 13920 core/libs/prx/libSceAgcDriver/Graphics/include/ShaderResources.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/Draw.cpp
core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
core/libs/prx/libSceAgcDriver/Graphics/src/Recorder.cpp
docs/dev/ENVIRONMENT.md
docs/dev/debt/libSceAgcDriver.md
PR 13928 core/libs/prx/libSceAgcDriver/Graphics/include/BdaResources.hpp
core/libs/prx/libSceAgcDriver/Graphics/include/GuestBufferMemory.hpp
core/libs/prx/libSceAgcDriver/Graphics/include/ShaderResources.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/BdaResources.cpp
core/libs/prx/libSceAgcDriver/Graphics/src/Draw.cpp
core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
core/libs/prx/libSceAgcDriver/Graphics/src/Recorder.cpp
core/libs/prx/libSceAgcDriver/Graphics/src/ShaderAddressResources.cpp
core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp
core/libs/prx/libSceAgcDriver/tests/BdaContracts.cpp
core/libs/prx/libSceAgcDriver/tests/BdaResources.cpp
core/libs/prx/libSceAgcDriver/tests/cmake/agc_driver_address_draw_space_reuse_tests.cmake
core/libs/prx/libSceAgcDriver/tests/execution/AddressDrawSpaceReuse.cpp
docs/dev/ENVIRONMENT.md
docs/dev/debt/libSceAgcDriver.md
PR 13929 core/libs/prx/libSceAgcDriver/Graphics/include/BdaResources.hpp
core/libs/prx/libSceAgcDriver/Graphics/include/GuestBufferMemory.hpp
core/libs/prx/libSceAgcDriver/Graphics/include/ShaderResources.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/BdaResources.cpp
core/libs/prx/libSceAgcDriver/Graphics/src/Draw.cpp
core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
core/libs/prx/libSceAgcDriver/Graphics/src/Recorder.cpp
core/libs/prx/libSceAgcDriver/Graphics/src/ShaderAddressResources.cpp
core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp
core/libs/prx/libSceAgcDriver/tests/BdaContracts.cpp
core/libs/prx/libSceAgcDriver/tests/BdaResources.cpp
core/libs/prx/libSceAgcDriver/tests/cmake/agc_driver_address_draw_space_reuse_tests.cmake
core/libs/prx/libSceAgcDriver/tests/execution/AddressDrawSpaceReuse.cpp
docs/dev/ENVIRONMENT.md
docs/dev/debt/libSceAgcDriver.md
PR 13963 core/libs/prx/libSceAgcDriver/Graphics/include/ShaderResources.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp
docs/dev/debt/libSceAgcDriver.md
PR 13994 docs/dev/debt/libSceAgcDriver.md
PR 14005 docs/dev/debt/libSceAgcDriver.md
PR 14032 core/libs/prx/libSceAgcDriver/Graphics/include/Draw.hpp
core/libs/prx/libSceAgcDriver/Graphics/include/ShaderResources.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/Draw.cpp
core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp
PR 14212 docs/dev/debt/libSceAgcDriver.md
PR 14262 core/libs/prx/libSceAgcDriver/Graphics/include/ShaderResources.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp
docs/dev/ENVIRONMENT.md
PR 14264 docs/dev/ENVIRONMENT.md
PR 14299 docs/dev/ENVIRONMENT.md
PR 14302 docs/dev/debt/libSceAgcDriver.md
PR 14311 docs/dev/debt/libSceAgcDriver.md
PR 14344 docs/dev/ENVIRONMENT.md
docs/dev/debt/libSceAgcDriver.md
PR 14561 docs/dev/debt/libSceAgcDriver.md
PR 14621 core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp
docs/dev/debt/libSceAgcDriver.md
PR 14943 core/libs/prx/libSceAgcDriver/Graphics/include/GuestBufferMemory.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/Draw.cpp
core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
core/libs/prx/libSceAgcDriver/Graphics/src/Recorder.cpp
docs/dev/ENVIRONMENT.md
docs/dev/debt/libSceAgcDriver.md
PR 14944 core/libs/prx/libSceAgcDriver/Graphics/include/ShaderResources.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/Draw.cpp
core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp
docs/dev/debt/libSceAgcDriver.md
PR 14976 core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
docs/dev/debt/libSceAgcDriver.md
PR 15059 core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp
docs/dev/ENVIRONMENT.md

@TechLevelZero

Copy link
Copy Markdown
Contributor

✅ NVIDIA GPU test: passed

PR head 7122193 merged onto main 828ac0b · tested 2026-10-31 10:24 UTC · 32 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,419 passed · 3 failed (0 new, 2 also fail on main, 1 unstable on main) · 42 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,464 of 3,048 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 (914 tests run on the GPU)
Slow tests (>30 s, GPU tests timed with validation layers) ⚠️ agc_driver_bda_device 72.3 s, ⚠️ agc_driver_graphics_maps_fallback 36.9 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 6 of the last 10 main runs
Failing on main too (2, not counted against this PR)
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 166 other runs in the last 7 days
Validated but not compared (3, not in the main baseline's validation pass)
agc_driver_address_draw_space_reuse
agc_driver_address_draw_space_reuse_off
agc_driver_address_draw_space_reuse_transitions
Validation IDs already present on main (4 IDs in 423 tests)
VUID-VkDeviceCreateInfo-pNext-pNext (423 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 415 more
VUID-vkCmdCopyImage-srcImage-01548 (13 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 5 more
VUID-vkCmdCopyImage-srcImage-01551 (13 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 5 more
VUID-VkPipelineColorBlendStateCreateInfo-pAttachments-00605 (1 test): agc_driver_srgb8_color_target
Skipped (42)
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_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_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 plat
Reproduce
git fetch origin 7122193668bb31c5282e80152b240d8e1990720e 828ac0b2ae74aac181ba128fb59b08a1534f2041
git checkout 828ac0b2ae74aac181ba128fb59b08a1534f2041 && git merge --no-ff 7122193668bb31c5282e80152b240d8e1990720e
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.

@oneandonlydean

Copy link
Copy Markdown
Collaborator

@EagleBearerYS Reviewed at 7122193668, the part of this branch after #8963. Four points.

  1. The new debt entry ("Reused address-based draw builds") sits under ### Opt-in draw paths, but the reuse is on by default since b4947ff and only APS5_NO_ADDRESS_DRAW_REUSE=1 turns it off. Please move it to a heading that fits a default path (the entry already names the opt-out). The entry also says the reuse was "measured only in a synthetic draw on lavapipe", while the description reports a Village menu measurement on an RTX 3070 laptop. Please make the two agree, and say in the entry what that run is: one title's menu at about 1 fps on a local merge tree, compared by a static-region pixel diff and not by a frame-hash comparison.

  2. RetakeSpace, ReleaseSpace and SpaceHeld read and write space and releasedSpace, plain members of a cache entry that SharedResourceCache() hands to every draw, and resolveDrawResources does SpaceHeld() and then RetakeSpace(). Please state, in the description or next to the code, which lock keeps two threads from doing that on the same entry (the draw's GpuMutex hold, if that is it), and assert it the way ArmOwnedDrawInput asserts the GPU lock.

  3. The reuse is proven by containment, a snapshot compare and counters, but nothing checks a served hit against a fresh build. As the reuse is on by default, please add a verification switch in the style of the other APS5_VERIFY_* checks: on a hit, build the resources anew, or compare the snapshot and table bytes the hit relies on, and stop on a difference. It would let a game run show that no stale build was served.

  4. Please make the HeldSpace cleanup in Graphics/src/Draw.cpp:3823–3832 nonthrowing without allocating. Its destructor calls Recorder::Keep, which calls ensureOpen() and open->kept.push_back(...) (Recorder.cpp:2761–2764). An allocation failure there escapes an implicitly noexcept destructor and terminates the process, including when cleanup follows an early return or another exception.

A small fault-injection probe using the exact destructor and a throwing Keep ends with SIGABRT, rather than propagating the allocation failure to its caller. Please arrange retention of any already recorded GPU work through an ordinary checked path, with a nonallocating cleanup fallback that preserves backing-memory lifetime. A failure-injection test for these paths (an unrecorded early return, an exception during preparation, successful recording) would be welcome but is optional; the fix itself is the ask.

The reuse of read-only address-based draw builds has been on by default
since b4947ff; only APS5_NO_ADDRESS_DRAW_REUSE=1 turns it off. Its
debt entry sat under "Opt-in draw paths", so it moves to "Functional",
where the other default paths with known gaps are. The entry keeps the
sentence that names the opt-out.

The entry said the reuse was measured only in a synthetic draw on
lavapipe, while the pull request reports a Resident Evil Village
(PPSA01556) menu measurement. It now says what that run is: one title's
menu at about 1 fps, on a local merge tree rather than main, with an
NVIDIA GeForce RTX 3070 Laptop GPU, and renders compared by a
static-region pixel diff rather than by frame hashes. The rest of the
entry is unchanged.
…nd-off

RetakeSpace, ReleaseSpace and SpaceHeld read and write the space and
releasedSpace members of a ShaderResources that SharedResourceCache()
hands to every draw, and resolveDrawResources asks SpaceHeld before it
calls RetakeSpace. Nothing but GuestMemory::GpuMutex keeps two threads
from doing that on one cache entry: every caller is Graphics::Draw, and
the driver reaches VulkanDevice::Draw only with the mutex held, from
Driver::finishDraw after lockForDraw() or from Driver::commitDraw's own
lock_guard. The draw recipe path never reaches the hand-off, since no
recipe is made from a space-reuse build.

The three functions now assert the lock with
GuestMemory::AssertGpuLockHeld, as Recorder::KeepThroughHold does, so a
caller without it aborts under APS5_ASSERT_GPU_LOCK=1. SpaceHeld moves
out of line for that.
…DDRESS_DRAW_REUSE

The reuse of a read-only address-based draw build is on by default and is
proven by containment, a snapshot compare and counters, but nothing
checked a served hit against what a fresh build would bind. With
APS5_VERIFY_ADDRESS_DRAW_REUSE=1, every hit that is about to be served
builds the draw's resources anew from its stages, target and snapshots,
as a miss would, and checks:

- the fresh build is a space reuse build too (space-only and read-only,
  so it copies no snapshot);
- its BDA page table bytes (header and ranges) equal the hit's;
- every snapshot lies in readable ranges of the hit's table, and its
  bytes equal guest memory, compared here rather than through the
  hit's own SnapshotsServedInPlace;
- the sampled textures, storage images and set layout keys are the same
  objects and keys.

A difference throws "APS5_VERIFY_ADDRESS_DRAW_REUSE: a served
address-based draw hit disagrees with a fresh build or guest memory in
its ...", as APS5_VERIFY_DRAW_DATA_HITS stops. The fresh build is never
recorded and releases its space when it goes. Buffer descriptors and
push constants are not compared: a moved read-only buffer is bound anew
at record time, and push constants always come from the draw's stages.

AddressDrawReuseVerifications() counts the verified hits, so the reuse
tests subtract the fresh builds' tables from their build counts. The new
agc_driver_address_draw_space_reuse_verify registration runs the default
cases with the switch on and requires every served hit to be verified.
The switch is listed in ENVIRONMENT.md and in the debt entry.
@mrfelek

mrfelek commented Oct 31, 2026

Copy link
Copy Markdown
Contributor

Two more titles on this head: correct, but not a target in either

main 02c8efdbcb + #11580 + this PR 7122193668, Linux, Ryzen 9 5950X, RTX 3080 Ti, NVIDIA 615.71.09, Release

GTA V (PPSA04263 01.010.002, North Yankton bank, 3840x2160, warm caches; #11580 is needed on main to reach Story):

  • [rescache] address-based draws (10 s): reused 58, built 0; refused: all 0. That's ~2 address-based draws per frame out of ~865, every one served by the reuse.

  • Off (APS5_NO_ADDRESS_DRAW_REUSE=1) vs on, alternating, APS5_TRACE_SECONDS=300:20:

    Run Presents per 20 s Frame p50 GPU busy per present
    off 60 334.6 ms 255 ms
    on 61 330.3 ms 251 ms
    off 61 329.3 ms 245 ms
    on 61 330.2 ms 253 ms

    Level, as expected with this few draws on the path. Queue worker 0 is 99.5 % busy in all four. Traces: perf-13858-traces.

Diablo II: Resurrected (main menu, APS5_PROFILE_DRAW=1, one run): about 161,000 draws per 10 s and no address-based draws line at all, so none of its draws take this path.

No failures or rendering problems in any run.

AI-assisted; the runs are from my machine(s).

…'s cleanup

The HeldSpace cleanup in Graphics::Draw released a space the draw still
held and handed it to Recorder::Keep, which may open a batch (a
make_unique, vkAllocateCommandBuffers) and grow its kept list. An
allocation failure there escaped the implicitly noexcept destructor and
terminated the process, also when the cleanup ran after an early
return or during another exception's unwinding.

The open batch can change between the retake and the recording:
completeSnapshotWrites syncs through pending writes over the snapshots,
the retake's mirror refresh may sync, and preparation syncs for the
indirect arguments. So the keep is reserved where the batch is known:

- A recorded draw reserves it, through the ordinary checked
  Recorder::Keep, once it has the command buffer it records into: after
  StartDrawPass on the lean path and after Recorder::Commands on the
  other recorded path. The reservation is a holder that batch keeps, and
  keepRecordedDraw moves the released space into it.
- Every other way out of Draw (an early return, an exception during
  preparation or recording) reserves it in ordinary code too: Draw
  catches, reserves in the batch open then, and rethrows, so an
  allocation failure there propagates normally. That batch holds any
  command preparation recorded, and completes after every earlier one.

The cleanup only moves the space into the holder, with noexcept moves.
When no holder could be reserved, it leaves the space with the build and
records the recorder's open serial, a plain integer, without
allocating. A later hit gives such a space back once the recorder has
completed that serial, and until then refuses the entry as in use. The
backing memory so stays alive as long as any batch the draw recorded
into, in every case.
…le targets

A cached build keeps the BDA page table it was built with, and the
multisample-target exclusion in that table is the one of the guard
generation at build time. A new resident multisample target bumps only
that generation: it touches neither the imports epoch, the allocation
generation nor the cached address space. So a space-reuse hit kept
binding a table that still mapped the target's guest memory, and a BDA
read into it got the guest bytes, whose samples live on the host, where
a fresh build's table excludes the range and the read faults.

BdaResources now keeps the generation its table was filtered at, as
ExcludeMultisampleTargetRanges wrote it back. A space-reuse hit whose
generation moved runs ExcludeMultisampleTargetRanges again over the
build's space ranges, the same call a fresh build makes, and compares
the result with its table: equal keeps the hit and stores the new
generation, a difference refuses it as a space or epoch change. The
generation moves on every target create, recreate and retire, so a
blanket refusal would drop every space hit of a title that retires and
recreates a target each frame, even with the target outside the space.

The tests place a 4x resident target inside the draw's address space,
in its constant allocation but away from the word the draw reads (the
hit is refused as a space change, a build follows and still reads the
constant), and outside the space (the hit is kept), skipping without
write tracking or 4x color targets as CachedImageMultisampleGuard does.

The --verify mode also prints how many served hits it verified.
@EagleBearerYS

Copy link
Copy Markdown
Contributor Author

@oneandonlydean thank you for the review. Five commits on top of 7122193 answer it. The head is a142526; the runs are in the description's Tested section.

  1. The debt entry (48347d94ed) now sits under ### Functional, with the default paths that have known gaps, and still names APS5_NO_ADDRESS_DRAW_REUSE=1.

    • It says the reuse was measured in one title only: Resident Evil Village (PPSA01556)'s menu at about 1 fps, on a local merge tree rather than main, on an RTX 3070 Laptop GPU.
    • It also says the renders were checked by a static-region pixel diff, not by frame hashes.
  2. The lock (d214fad61a) is GuestMemory::GpuMutex(). RetakeSpace, ReleaseSpace and SpaceHeld are called only inside Graphics::Draw, and the driver reaches that only through VulkanDevice::Draw.

    • Every caller holds the mutex:
      • Driver::finishDraw through lockForDraw(), which locks it before the indirect and direct inline draws;
      • Driver::commitDraw, through its lock_guard, for the pipelined draws;
      • the HeldSpace cleanup, since it runs inside Draw.
    • Paths that never reach it: the recipe path (no recipe is made from a space-reuse build) and dispatches (spaceReuse is set for draw builds only).
    • The asserts: the three functions call GuestMemory::AssertGpuLockHeld, as Recorder::KeepThroughHold does. ArmOwnedDrawInput isn't in this tree.
    • The reuse tests take the lock and pass 10 runs of 10 with APS5_ASSERT_GPU_LOCK=1.
    • Over ^agc with that switch: 447 of 1,150 tests abort at asserts that were already there, in harnesses that drive the device without the GPU lock: Recorder::Commands 255, TextureDetiler::BeginBatch 174, Recorder::Submit 6, CommandBatch 6, the heap mirror transfer 1 and KeepThroughHold 1. None abort at the three new asserts.
      • An earlier abort in such a harness could hide a later lock-less call, so the driver paths above are what shows the lock is held there. No lock was added.
  3. APS5_VERIFY_ADDRESS_DRAW_REUSE (86b29f0d72) builds every served hit's resources anew and throws on the first difference in:

    • whether the fresh build is itself a space-reuse build;
    • the BDA table bytes;
    • every snapshot lying in readable table ranges;
    • every snapshot's bytes against guest memory, compared directly;
    • the textures, storage images and set layouts.
    • What it doesn't compare: buffer descriptors (a moved read-only buffer is rebound at record time) and push constants (they come from the draw). Textures are compared by identity, not contents.
    • agc_driver_address_draw_space_reuse_verify runs the default cases with it on, and requires every served hit to be verified.
    • No committed red: no test seam serves a stale hit without a production knob. Locally, with the snapshot byte compare removed, the switch stops with "...in its snapshot bytes", while without it the stale hits are served.
  4. HeldSpace's cleanup (8a85451640) no longer allocates or throws.

    • Why the batch matters: the open batch can change between the retake and the recording. completeSnapshotWrites and the indirect arguments' sync can submit it, so the keep can't be reserved when the hit is taken.
    • A recorded draw reserves it through the checked Recorder::Keep once it holds its command buffer, and the release moves into that holder.
    • Every other exit goes through a catch-and-rethrow in Draw() that makes the same checked reservation in ordinary code, so an allocation failure there propagates normally.
    • The cleanup only does noexcept moves. If no holder could be reserved, it leaves the space with the build until the recorder's serial that was open at the failure has completed.
    • The probes: with a throwing Keep, a standalone copy of the old cleanup ends in terminate ... bad_alloc (exit 134) for an unrecorded early return, an exception during preparation and a failed recording. The new code returns the bad_alloc to the caller in all three.
    • I didn't commit a fault-injection test, since a throwing Keep would need a production hook.
  5. A gap found while writing the verifier (a142526a55): a space-reuse hit didn't recheck the multisample-target guard generation.

    • A cached build kept the BDA table it was filtered with. After a resident multisample target appeared inside the space, a hit still bound that table, while a fresh build excludes the target's ranges.
    • The fix: the build now keeps the generation its table was filtered at. When that has moved, the hit reruns ExcludeMultisampleTargetRanges, the function a fresh build calls, over the build's space ranges. It keeps the hit if the result matches the table, and refuses it as "space or epoch change" if not.
    • Why not a blanket refusal: the generation moves on every target create, recreate and retire, so a title that recreates a multisample target each frame would lose every hit, even with the target outside the space.
    • Red/green: multisample-target-inside fails without the fix ("counted reused 1 and 0 builds"), and with it refuses the hit and builds anew. multisample-target-outside keeps the hit on both. With the verify switch on, all 76 served hits verify, the outside case's rechecked hit included.
    • What the test checks: the refusal and the rebuild, not a fault on the target's address. It places the target 32 KiB from the word the draw reads, still inside the space.
      • Placed over the read word, the fresh build's SGPR-base global_load_dword crashes llvmpipe instead of reporting a fault.
      • That crash also happens with the reuse off and with no multisample target, so it's outside this commit.

Could you take another look?

Raghav314 added a commit to Raghav314/AnyPS5 that referenced this pull request Oct 31, 2026
…le targets

A cached build keeps the BDA page table it was built with, filtered by the multisample-target guard generation of that moment. A new resident multisample target bumps only that generation, so a space-reuse hit kept binding a table that still mapped the target's guest memory. The build now keeps the generation its table was filtered at; a hit whose generation moved reruns ExcludeMultisampleTargetRanges over the build's space ranges and keeps the hit only when the result matches its table.

Ported from boykopovar#13858 (a142526).

Co-authored-by: Yunus Shaikh <75296019+EagleBearerYS@users.noreply.github.com>
A draw whose space keep could not be reserved holds its address space in
the cached build through the recorder's open serial. When that build left
the resource cache before the batch completed, the space went with it.

The hold now records the recorder's id with the serial, and a build
destroyed while holding moves its space into a node it allocated when
the space was attached, on a list released once that recorder completes
the serial (or no longer exists), by the next cached lookup, the pin
waiter, or device teardown.
Test hooks fail the next space keep reservations and stop a draw after
its resources resolve. The address-draw reuse test's --held cases cover
an unrecorded early return, a throw during preparation and a recorded
draw, each with the keep failing: the held space is refused while its
batch is open and retaken after it completes, and a fresh build that
replaces the holding build leaves the space retained until that batch
completes.

They run as agc_driver_address_draw_space_reuse_held, with
APS5_RELEASE_ON_UNLOCK=1: kept objects of a finished batch then die on
the thread that finished it, so the replaced build is destroyed when
the cache drops it instead of later on the release thread.
@github-actions github-actions Bot added the needs rebase Conflicts with main, rebase needed label Nov 2, 2026
@EagleBearerYS

Copy link
Copy Markdown
Contributor Author

@oneandonlydean thanks for the second look. Both points are fixed on the branch.

1. The fallback's lifetime. The entry can leave the cache in that window: SharedResourceCache().Remove, RemoveImage, eviction, or a fresh build of the same key replacing it. So ~GuestBufferMemory now hands a held space to a retention (8139afd):

  • every place that attaches a space (RetakeSpace, the cached hit and a fresh build) first allocates the build's retention node, so the destructor only moves the space into it and pushes it onto a lock-free list;
  • HoldSpaceThrough records the recorder's id with the serial, since a serial means nothing on another recorder;
  • a retained space is released once that recorder has completed the serial, or no longer exists. That's checked at the next cached lookup, in the pin waiter after its sync (so a free inside the space doesn't wait out APS5_PIN_WAIT_MS), and at device teardown.

2. Tests (5479721). Two hooks make the keep reservation fail (SetSpaceKeepFailuresForTest) and stop a draw after its resources resolve (SetDrawStopAfterResolveForTest). A new registration, agc_driver_address_draw_space_reuse_held, runs held-space-retaken and held-space-in-use. Each runs an unrecorded early return, an exception during preparation and a recorded draw, with the keep failing:

  • the bad_alloc reaches the caller;
  • after the held serial completes, the same build retakes its space and is served without a build;
  • before it completes, the next draw is refused as in use and builds;
  • when that fresh build replaces the holding build in the cache, the space stays retained until the batch completes, and is released after it.

The registration sets APS5_RELEASE_ON_UNLOCK=1, for the test's determinism only; it masks no fix. Without it, the replaced build is still retained the same way, but it is released later on the release thread, so the test's retention count would race with it. With the switch, kept objects die on the thread that finished the batch.

There's no red for these cases on the old code. Nothing in them uses the space on the GPU, so the old code passes the outcome checks too, and the retention count needs the new code. They pin down the behaviour you asked to see.

The lock is the GPU lock, GuestMemory::GpuMutex(), and the description now says so. The one place that touches a space without it is ~GuestBufferMemory, which runs only when no other reference to the entry is left.

On GitHub's runners, these tests with the BDA, host-import and write-tracking tests pass 10 runs in a row (run):

  • Linux: 20 run, 19 pass, 1 skip (agc_host_import_sparse), 0 fail;
  • Windows: 25 run, 7 pass, 18 skip (no Vulkan device), 0 fail.

^agc once (run) adds no failure: the two Linux failures, agc_driver_image_sample_lod_clamp_shader_lane and agc_driver_pipeline_journal's cold-compile timeout, also happen on main.

@github-actions github-actions Bot added needs rebase Conflicts with main, rebase needed and removed needs rebase Conflicts with main, rebase needed labels Nov 3, 2026
@TechLevelZero

Copy link
Copy Markdown
Contributor

✅ NVIDIA GPU test: passed

PR head 5479721 merged onto main f6232fc · tested 2026-11-03 08:46 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,745 passed · 5 failed (0 new, 3 also fail on main, 2 unstable on main) · 49 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,799 of 3,743 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 (939 tests run on the GPU)
Slow tests (>30 s, GPU tests timed with validation layers) ⚠️ agc_driver_pipeline_journal 120.1 s
Unstable on main (2, these also failed in recent main runs on this machine; not counted against this PR)
agc_driver_pipeline_journal: failed in 4 of the last 10 main runs
agc_submit_progress: failed in 6 of the last 10 main runs
Failing on main too (3, not counted against this PR)
agc_driver_image_table
guest_mmap_executable
guest_socket_options_multicast
Validated but not compared (1, not in the main baseline's validation pass)
agc_driver_address_draw_space_reuse
Validation IDs already present on main (4 IDs in 529 tests)
VUID-VkDeviceCreateInfo-pNext-pNext (529 tests): agc_driver, agc_driver_address_passes, agc_driver_alias_copy_label, agc_driver_alpha_to_coverage, agc_driver_array_layer_target, agc_driver_bc_block_copy, agc_driver_bda_anchor_reads, agc_driver_bda_span_reads, and 521 more
VUID-vkCmdCopyImage-srcImage-01548 (8 tests): agc_driver_depth_clear_hle, agc_driver_depth_plane_buffer_memory, agc_driver_depth_plane_partial_store, agc_driver_depth_plane_sampling, agc_driver_depth_storage_dispatch, agc_driver_depth_surface_from_storage, agc_driver_dispatch_move_depth, agc_driver_stencil_null_feedback
VUID-vkCmdCopyImage-srcImage-01551 (8 tests): agc_driver_depth_clear_hle, agc_driver_depth_plane_buffer_memory, agc_driver_depth_plane_partial_store, agc_driver_depth_plane_sampling, agc_driver_depth_storage_dispatch, agc_driver_depth_surface_from_storage, agc_driver_dispatch_move_depth, agc_driver_stencil_null_feedback
VUID-VkPipelineColorBlendStateCreateInfo-pAttachments-00605 (2 tests): agc_driver_prepared_exports, agc_driver_srgb8_color_target
Skipped (49)
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_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_scattered_runs: skipped, host imports are unavailable: /dev/udmabuf is not accessible
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_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 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
Reproduce
git fetch origin 5479721abffd5a49e9954be370f46bad81053c87 f6232fcfda70644495273f6b8dd88cf0603463d6
git checkout f6232fcfda70644495273f6b8dd88cf0603463d6 && git merge --no-ff 5479721abffd5a49e9954be370f46bad81053c87
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.

@TechLevelZero

Copy link
Copy Markdown
Contributor

✅ AMD GPU test: passed

PR head 5479721 merged onto main 7feb37e · tested 2026-11-03 09:27 UTC · 38 min

GPU AMD Radeon RX 6300 (RADV NAVI24), driver Mesa 25.2.8-0ubuntu0.24.04.4, Vulkan 1.4.318
Host Ubuntu 26.04.1 LTS, kernel 7.0.0-42-generic, container ubuntu:24.04
Logs build and test logs for this run
Build ✅ passed (Release, -DANYPS5_ENABLE_SPIRV_TOOLS=ON)
Tests ✅ 2,732 passed · 9 failed (0 new, 8 also fail on main, 1 unstable on main) · 58 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,799 of 3,743 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 (939 tests run on the GPU)
Slow tests (>30 s, GPU tests timed with validation layers) ⚠️ agc_driver_pipeline_journal 120.1 s, ⚠️ public_headers 88.6 s, ⚠️ agc_driver_image_sample_unnormalized 41.2 s, ⚠️ agc_driver_lazy_resolved_abi 31.3 s, ⚠️ agc_shader_memory 30.9 s
Unstable on main (1, these also failed in recent main runs on this machine; not counted against this PR)
agc_driver_pipeline_journal: failed in 6 of the last 8 main runs
Failing on main too (8, not counted against this PR)
agc_driver_image_table
agc_driver_native_depth_bda_clear
agc_driver_native_multisample_depth
agc_idle_publish_wait
agc_submit_progress
agc_submit_progress_no_timeline
guest_mmap_executable
guest_socket_options_multicast
Validated but not compared (1, not in the main baseline's validation pass)
agc_driver_address_draw_space_reuse
Validation IDs already present on main (4 IDs in 529 tests)
VUID-VkDeviceCreateInfo-pNext-pNext (529 tests): agc_driver, agc_driver_address_passes, agc_driver_alias_copy_label, agc_driver_alpha_to_coverage, agc_driver_array_layer_target, agc_driver_bc_block_copy, agc_driver_bda_anchor_reads, agc_driver_bda_span_reads, and 521 more
VUID-vkCmdCopyImage-srcImage-01548 (7 tests): agc_driver_depth_clear_hle, agc_driver_depth_plane_buffer_memory, agc_driver_depth_plane_partial_store, agc_driver_depth_storage_dispatch, agc_driver_depth_surface_from_storage, agc_driver_dispatch_move_depth, agc_driver_stencil_null_feedback
VUID-vkCmdCopyImage-srcImage-01551 (7 tests): agc_driver_depth_clear_hle, agc_driver_depth_plane_buffer_memory, agc_driver_depth_plane_partial_store, agc_driver_depth_storage_dispatch, agc_driver_depth_surface_from_storage, agc_driver_dispatch_move_depth, agc_driver_stencil_null_feedback
VUID-VkPipelineColorBlendStateCreateInfo-pAttachments-00605 (2 tests): agc_driver_prepared_exports, agc_driver_srgb8_color_target
Skipped (58)
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_copied_writer_label_order: skipped, the device reports a minStorageBufferOffsetAlignment of 4, so the dispatch binds its record at +0x1004 in place and nothing is written back; the test needs an alignment above 4
agc_driver_float16_unused_nan_payloads: skipped, the device has no native f16 conversions with RTE rounding and kept f16 denormals
agc_driver_image_table_vouched_lookups: skipped, the device reports 4 of 4 host-imported pages written after a GPU read, so a watched imported table cannot be vouched for
agc_driver_linear_target_direct_write_completion: skipped, the device does not keep host imports write-watched, so no completion stamp over the target is tracked
agc_driver_ngg_vertex_wave_reduction: skipped, s3 describes a 32-lane wave only on 32-lane subgroups, and the device has 64 lanes
agc_driver_scattered_runs: skipped, host imports are unavailable: /dev/udmabuf is not accessible
agc_driver_sparse_dma_buf_import: skipped, host imports are unavailable: /dev/udmabuf is not accessible
agc_driver_unit_shadow: skipped, the device does not import watched host memory for unit shadows
agc_driver_unit_shadow_budget: skipped, the device does not import watched host memory for unit shadows
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_shadowed_key_stores: skipped, the device imports no watched host memory under a unit shadow
agc_small_tiled_shadow_label: skipped, host imports are unavailable: the test block is not imported and watched
agc_storage_clear_hand_over: skipped, the device imports no watched host memory for the clear-key hand-over
agc_unit_shadow: skipped, the device does not import watched host memory for unit shadows
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 co
Reproduce
git fetch origin 5479721abffd5a49e9954be370f46bad81053c87 7feb37ee3e30e10139b483fb4df689d5b5b69ab8
git checkout 7feb37ee3e30e10139b483fb4df689d5b5b69ab8 && git merge --no-ff 5479721abffd5a49e9954be370f46bad81053c87
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 12 --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 16 --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 AMD machine; it does not replace upstream CI. A new comment is posted for each new push. Full logs.

@github-actions github-actions Bot added needs rebase Conflicts with main, rebase needed and removed needs rebase Conflicts with main, rebase needed labels Nov 3, 2026
@TechLevelZero

Copy link
Copy Markdown
Contributor

✅ NVIDIA GPU test: passed

PR head a80d36f merged onto main 1e65852 · tested 2026-11-03 21:11 UTC · 33 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,770 passed · 6 failed (0 new, 3 also fail on main, 3 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,824 of 3,818 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 (940 tests run on the GPU)
Slow tests (>30 s, GPU tests timed with validation layers) ⚠️ agc_driver_pipeline_journal 120.1 s
Unstable on main (3, these also failed in recent main runs on this machine; not counted against this PR)
agc_driver_pipeline_journal: failed in 4 of the last 10 main runs
agc_driver_submit_progress: failed in 5 of the last 10 main runs
agc_submit_progress: failed in 6 of the last 10 main runs
Failing on main too (3, not counted against this PR)
agc_driver_image_table
guest_mmap_executable
guest_socket_options_multicast
Validated but not compared (1, not in the main baseline's validation pass)
agc_driver_address_draw_space_reuse
Validation IDs already present on main (4 IDs in 520 tests)
VUID-VkDeviceCreateInfo-pNext-pNext (520 tests): agc_driver, agc_driver_address_passes, agc_driver_alias_copy_label, agc_driver_alpha_to_coverage, agc_driver_array_layer_target, agc_driver_bc_block_copy, agc_driver_bda_anchor_reads, agc_driver_bda_span_reads, and 512 more
VUID-vkCmdCopyImage-srcImage-01548 (7 tests): agc_driver_depth_clear_hle, agc_driver_depth_plane_buffer_memory, agc_driver_depth_plane_partial_store, agc_driver_depth_plane_sampling, agc_driver_depth_storage_dispatch, agc_driver_depth_surface_from_storage, agc_driver_dispatch_move_depth
VUID-vkCmdCopyImage-srcImage-01551 (7 tests): agc_driver_depth_clear_hle, agc_driver_depth_plane_buffer_memory, agc_driver_depth_plane_partial_store, agc_driver_depth_plane_sampling, agc_driver_depth_storage_dispatch, agc_driver_depth_surface_from_storage, agc_driver_dispatch_move_depth
VUID-VkPipelineColorBlendStateCreateInfo-pAttachments-00605 (2 tests): agc_driver_prepared_exports, agc_driver_srgb8_color_target
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_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_scattered_runs: skipped, host imports are unavailable: /dev/udmabuf is not accessible
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_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 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 co
Reproduce
git fetch origin a80d36f86c27897cc915038fdb9adf43039719c8 1e658521a0a599872612bb91949311e2956b5283
git checkout 1e658521a0a599872612bb91949311e2956b5283 && git merge --no-ff a80d36f86c27897cc915038fdb9adf43039719c8
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.

Draw.cpp conflicts where boykopovar#13021 notes a depth surface write after the draw's
resources are resolved. Both are kept, with the injected stop after resolve
first, so an injected failure notes no depth write.
@github-actions github-actions Bot removed the needs rebase Conflicts with main, rebase needed label Nov 4, 2026
@TechLevelZero

Copy link
Copy Markdown
Contributor

✅ NVIDIA GPU test: passed

PR head cfec53d merged onto main 1c8c0ef · tested 2026-11-04 03:16 UTC · 23 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,788 passed · 7 failed (0 new, 3 also fail on main, 4 unstable on main) · 50 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,845 of 3,842 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 (956 tests run on the GPU)
Slow tests (>30 s, GPU tests timed with validation layers) ⚠️ agc_driver_pipeline_journal 120.1 s, ⚠️ agc_driver_lazy_resolved_abi 32.7 s, ⚠️ agc_driver_image_sample_unnormalized 30.0 s
Unstable on main (4, these also failed in recent main runs on this machine; not counted against this PR)
agc_driver_pipeline_journal: failed in 4 of the last 10 main runs
agc_driver_submit_progress: failed in 4 of the last 10 main runs
agc_submit_progress: failed in 5 of the last 10 main runs
agc_submit_progress_no_timeline: failed in 4 of the last 10 main runs
Failing on main too (3, not counted against this PR)
agc_driver_image_table
guest_mmap_executable
guest_socket_options_multicast
Validated but not compared (1, not in the main baseline's validation pass)
agc_driver_address_draw_space_reuse
Validation IDs already present on main (8 IDs in 531 tests)
VUID-VkDeviceCreateInfo-pNext-pNext (531 tests): agc_driver, agc_driver_address_passes, agc_driver_alias_copy_label, agc_driver_alpha_to_coverage, agc_driver_array_layer_target, agc_driver_bc_block_copy, agc_driver_bda_anchor_reads, agc_driver_bda_span_reads, and 523 more
VUID-vkCmdCopyImage-srcImage-01548 (7 tests): agc_driver_depth_clear_hle, agc_driver_depth_plane_buffer_memory, agc_driver_depth_plane_partial_store, agc_driver_depth_plane_sampling, agc_driver_depth_storage_dispatch, agc_driver_depth_surface_from_storage, agc_driver_dispatch_move_depth
VUID-vkCmdCopyImage-srcImage-01551 (7 tests): agc_driver_depth_clear_hle, agc_driver_depth_plane_buffer_memory, agc_driver_depth_plane_partial_store, agc_driver_depth_plane_sampling, agc_driver_depth_storage_dispatch, agc_driver_depth_surface_from_storage, agc_driver_dispatch_move_depth
VUID-VkPipelineColorBlendStateCreateInfo-pAttachments-00605 (2 tests): agc_driver_prepared_exports, agc_driver_srgb8_color_target
VUID-VkSamplerCreateInfo-addressModeU-01079 (1 test): agc_driver_image_gather_volume
VUID-VkSamplerCreateInfo-addressModeU-parameter (1 test): agc_driver_image_gather_volume
VUID-VkSamplerCreateInfo-addressModeV-parameter (1 test): agc_driver_image_gather_volume
VUID-VkSamplerCreateInfo-addressModeW-parameter (1 test): agc_driver_image_gather_volume
Skipped (50)
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_gcn_display_present: skipped, no display: Vulkan support is either not configured in SDL or not available in current SDL video driver (offscreen) or platform
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_scattered_runs: skipped, host imports are unavailable: /dev/udmabuf is not accessible
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_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 platform
vide
Reproduce
git fetch origin cfec53d781ce5b7c175bb128d2c949d72148d06c 1c8c0efc8c41314402e6966da5bef6ea3d639d10
git checkout 1c8c0efc8c41314402e6966da5bef6ea3d639d10 && git merge --no-ff cfec53d781ce5b7c175bb128d2c949d72148d06c
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.

@TechLevelZero

Copy link
Copy Markdown
Contributor

✅ AMD GPU test: passed

PR head cfec53d merged onto main 1c8c0ef · tested 2026-11-04 04:03 UTC · 37 min

GPU AMD Radeon RX 6300 (RADV NAVI24), driver Mesa 25.2.8-0ubuntu0.24.04.4, Vulkan 1.4.318
Host Ubuntu 26.04.1 LTS, kernel 7.0.0-42-generic, container ubuntu:24.04
Logs build and test logs for this run
Build ✅ passed (Release, -DANYPS5_ENABLE_SPIRV_TOOLS=ON)
Tests ✅ 2,775 passed · 9 failed (0 new, 7 also fail on main, 2 unstable on main) · 61 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,845 of 3,842 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 (956 tests run on the GPU)
Slow tests (>30 s, GPU tests timed with validation layers) ⚠️ agc_driver_pipeline_journal 120.0 s, ⚠️ public_headers 78.4 s, ⚠️ agc_driver_image_sample_unnormalized 37.0 s, ⚠️ agc_shader_sampler_limits 35.2 s
Unstable on main (2, these also failed in recent main runs on this machine; not counted against this PR)
agc_driver_pipeline_journal: failed in 8 of the last 10 main runs
agc_driver_submit_progress: failed in 8 of the last 10 main runs
Failing on main too (7, not counted against this PR)
agc_driver_image_table
agc_driver_native_depth_bda_clear
agc_driver_native_multisample_depth
agc_submit_progress
agc_submit_progress_no_timeline
guest_mmap_executable
guest_socket_options_multicast
Validated but not compared (1, not in the main baseline's validation pass)
agc_driver_address_draw_space_reuse
Validation IDs already present on main (8 IDs in 531 tests)
VUID-VkDeviceCreateInfo-pNext-pNext (531 tests): agc_driver, agc_driver_address_passes, agc_driver_alias_copy_label, agc_driver_alpha_to_coverage, agc_driver_array_layer_target, agc_driver_bc_block_copy, agc_driver_bda_anchor_reads, agc_driver_bda_span_reads, and 523 more
VUID-vkCmdCopyImage-srcImage-01548 (4 tests): agc_driver_depth_clear_hle, agc_driver_depth_storage_dispatch, agc_driver_depth_surface_from_storage, agc_driver_dispatch_move_depth
VUID-vkCmdCopyImage-srcImage-01551 (4 tests): agc_driver_depth_clear_hle, agc_driver_depth_storage_dispatch, agc_driver_depth_surface_from_storage, agc_driver_dispatch_move_depth
VUID-VkPipelineColorBlendStateCreateInfo-pAttachments-00605 (2 tests): agc_driver_prepared_exports, agc_driver_srgb8_color_target
VUID-VkSamplerCreateInfo-addressModeU-01079 (1 test): agc_driver_image_gather_volume
VUID-VkSamplerCreateInfo-addressModeU-parameter (1 test): agc_driver_image_gather_volume
VUID-VkSamplerCreateInfo-addressModeV-parameter (1 test): agc_driver_image_gather_volume
VUID-VkSamplerCreateInfo-addressModeW-parameter (1 test): agc_driver_image_gather_volume
Skipped (61)
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_copied_writer_label_order: skipped, the device reports a minStorageBufferOffsetAlignment of 4, so the dispatch binds its record at +0x1004 in place and nothing is written back; the test needs an alignment above 4
agc_driver_float16_unused_nan_payloads: skipped, the device has no native f16 conversions with RTE rounding and kept f16 denormals
agc_driver_gcn_display_present: skipped, no display: Vulkan support is either not configured in SDL or not available in current SDL video driver (offscreen) or platform
agc_driver_image_table_vouched_lookups: skipped, the device reports 4 of 4 host-imported pages written after a GPU read, so a watched imported table cannot be vouched for
agc_driver_linear_target_direct_write_completion: skipped, the device does not keep host imports write-watched, so no completion stamp over the target is tracked
agc_driver_ngg_vertex_wave_reduction: skipped, s3 describes a 32-lane wave only on 32-lane subgroups, and the device has 64 lanes
agc_driver_scattered_runs: skipped, host imports are unavailable: /dev/udmabuf is not accessible
agc_driver_sparse_dma_buf_import: skipped, host imports are unavailable: /dev/udmabuf is not accessible
agc_driver_unit_shadow: skipped, the device does not import watched host memory for unit shadows
agc_driver_unit_shadow_budget: skipped, the device does not import watched host memory for unit shadows
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_idle_publish_wait: skipped, the device reports 4 of 4 host-imported pages written after a GPU read, so a forced watch of the import reads its submissions as CPU stores
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_shadowed_key_stores: skipped, the device imports no watched host memory under a unit shadow
agc_small_tiled_shadow_label: skipped, host imports are unavailable: the test block is not imported and watched
agc_storage_clear_hand_over: skipped, the device imports no watched host memory for the clear-key hand-over
agc_storage_pending_key_refresh: skipped, refreshes over a pending key store are not testable here
agc_unit_shadow: skipped, the device does not import watched host memory for unit shadows
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 d
Reproduce
git fetch origin cfec53d781ce5b7c175bb128d2c949d72148d06c 1c8c0efc8c41314402e6966da5bef6ea3d639d10
git checkout 1c8c0efc8c41314402e6966da5bef6ea3d639d10 && git merge --no-ff cfec53d781ce5b7c175bb128d2c949d72148d06c
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 12 --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 16 --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 AMD machine; it does not replace upstream CI. A new comment is posted for each new push. Full logs.

…tern

FillBuffer now skips a fill whose range already holds the same pattern
(boykopovar#10668), so a repeated zero fill recorded nothing and never submitted
the batch holding the space. A new pattern per call keeps every
completing fill recorded.
@oneandonlydean
oneandonlydean merged commit 0097b73 into boykopovar:main Nov 4, 2026
14 checks passed
@TechLevelZero

Copy link
Copy Markdown
Contributor

✅ NVIDIA GPU test: passed

PR head 342b06e merged onto main 5b1d381 · tested 2026-11-04 08:53 UTC · 30 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,835 passed · 7 failed (0 new, 3 also fail on main, 4 unstable on main) · 50 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,892 of 3,883 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 (979 tests run on the GPU)
Slow tests (>30 s, GPU tests timed with validation layers) ⚠️ agc_driver_pipeline_journal 120.1 s
Unstable on main (4, these also failed in recent main runs on this machine; not counted against this PR)
agc_driver_pipeline_journal: failed in 3 of the last 10 main runs
agc_driver_submit_progress: failed in 3 of the last 10 main runs
agc_submit_progress: failed in 4 of the last 10 main runs
agc_submit_progress_no_timeline: failed in 3 of the last 10 main runs
Failing on main too (3, not counted against this PR)
agc_driver_image_table
guest_mmap_executable
guest_socket_options_multicast
Validated but not compared (1, not in the main baseline's validation pass)
agc_driver_address_draw_space_reuse
Validation IDs already present on main (13 IDs in 548 tests)
VUID-VkDeviceCreateInfo-pNext-pNext (548 tests): agc_driver, agc_driver_address_passes, agc_driver_alias_copy_label, agc_driver_alpha_to_coverage, agc_driver_array_layer_target, agc_driver_bc_block_copy, agc_driver_bda_anchor_reads, agc_driver_bda_span_reads, and 540 more
VUID-VkShaderModuleCreateInfo-pCode-08737 (8 tests): agc_driver_dpp16_operands, agc_driver_dpp8_pk_fmac, agc_driver_dx10_clamp, agc_driver_float16_fma_rounding, agc_driver_float16_unused_nan_payloads, agc_driver_packed_alu, agc_driver_packed_f16_denormal_modes, agc_driver_packed_float16_native
VUID-VkShaderModuleCreateInfo-pCode-08739 (8 tests): agc_driver_dpp16_operands, agc_driver_dpp8_pk_fmac, agc_driver_dx10_clamp, agc_driver_float16_fma_rounding, agc_driver_float16_unused_nan_payloads, agc_driver_packed_alu, agc_driver_packed_f16_denormal_modes, agc_driver_packed_float16_native
VUID-VkShaderModuleCreateInfo-pCode-08741 (8 tests): agc_driver_dpp16_operands, agc_driver_dpp8_pk_fmac, agc_driver_dx10_clamp, agc_driver_float16_fma_rounding, agc_driver_float16_unused_nan_payloads, agc_driver_packed_alu, agc_driver_packed_f16_denormal_modes, agc_driver_packed_float16_native
VUID-vkCmdCopyImage-srcImage-01548 (7 tests): agc_driver_depth_clear_hle, agc_driver_depth_plane_buffer_memory, agc_driver_depth_plane_partial_store, agc_driver_depth_plane_sampling, agc_driver_depth_storage_dispatch, agc_driver_depth_surface_from_storage, agc_driver_dispatch_move_depth
VUID-vkCmdCopyImage-srcImage-01551 (7 tests): agc_driver_depth_clear_hle, agc_driver_depth_plane_buffer_memory, agc_driver_depth_plane_partial_store, agc_driver_depth_plane_sampling, agc_driver_depth_storage_dispatch, agc_driver_depth_surface_from_storage, agc_driver_dispatch_move_depth
VUID-VkPipelineColorBlendStateCreateInfo-pAttachments-00605 (1 test): agc_driver_srgb8_color_target
VUID-VkPipelineShaderStageCreateInfo-module-parameter (1 test): agc_driver_float16_unused_nan_payloads
VUID-VkPipelineShaderStageCreateInfo-pSpecializationInfo-06849 (1 test): agc_driver_float16_unused_nan_payloads
VUID-VkSamplerCreateInfo-addressModeU-01079 (1 test): agc_driver_image_gather_volume
VUID-VkSamplerCreateInfo-addressModeU-parameter (1 test): agc_driver_image_gather_volume
VUID-VkSamplerCreateInfo-addressModeV-parameter (1 test): agc_driver_image_gather_volume
VUID-VkSamplerCreateInfo-addressModeW-parameter (1 test): agc_driver_image_gather_volume
Skipped (50)
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_gcn_display_present: skipped, no display: Vulkan support is either not configured in SDL or not available in current SDL video driver (offscreen) or platform
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_scattered_runs: skipped, host imports are unavailable: /dev/udmabuf is not accessible
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_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 platform
vide
Reproduce
git fetch origin 342b06eb3a223853c06243865960e9700404fb51 5b1d381d5ad5d9f923326b18479c3bd889cdd588
git checkout 5b1d381d5ad5d9f923326b18479c3bd889cdd588 && git merge --no-ff 342b06eb3a223853c06243865960e9700404fb51
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.

oneandonlydean pushed a commit that referenced this pull request Nov 9, 2026
ShaderResources.cpp conflicts at the end of PrepareDrawBindings, where
#13858 moves the descriptor-set writes into writeDrawSets and this branch
keeps the bindings when no snapshot is selected but a texture was rebound.
The merge takes #13858's split and keeps this branch's condition on the
early return.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agc libSceAgc* build docs perf numbers missing perf pull request without a before and after summary line perf Performance change

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants