Skip to content

fix(agc): write back BDA stores into writable heap mirrors - #12840

Open
EagleBearerYS wants to merge 36 commits into
boykopovar:mainfrom
EagleBearerYS:fix/agc-bda-store-writable-mirror
Open

EagleBearerYS wants to merge 36 commits into
boykopovar:mainfrom
EagleBearerYS:fix/agc-bda-store-writable-mirror

Conversation

@EagleBearerYS

@EagleBearerYS EagleBearerYS commented Oct 29, 2026 •

Copy link
Copy Markdown
Contributor

What

A shader that stores through a FLAT/GLOBAL address, or through a V# it computed itself, into a writable heap mirror is refused today. sktharunbalaji13-cmd's Ghost of Tsushima Director's Cut (PPSA02225) run stops a compute store this way (I#5166):

[gpu] deferred write-back failed: BDA access failed: address=0x1579d4e49e instruction=0x1284 bytes=1 stage=4 reason=2; the store hit 0x150c000000+0x8c600000, read-only in the BDA table: stores through GPU-selected descriptors and FLAT/GLOBAL addresses reach only writable ranges imported in place, not ones served by a mirror or a copy

On main b11c7bf the title still hits this refusal, 7 times per run, each with the store hit 0x1549750000+0x4eeb0000 (instruction 0x1b4, 4 bytes, compute), right after its intro H.264 decoder is created. On this PR's head it runs with none (run; see Tested). On main 133feb3, from a pinned save on Linux, @milescoviello's pair logs no such refusal in either arm, so that pair can't show the fix (see Tested). A probe on main 7c444b7 still refuses such a store, and the same probe on this PR's head stores it (see Tested).

The refusal is deliberate. Granting Write to writable mirrors in GuestBufferMemory::addressRange alone would lose the stores silently:

  • WriteBack stores only the build's declared write ranges, so a store elsewhere in the mirror never reaches guest memory.
  • The next refresh of the mirror then replaces it with guest bytes.

The change. When a build's shaders can store through addresses (!bdaReadOnly), its writable heap mirror spans are marked writable in the BDA table, and the stores reach guest memory without binding, copying or reading back the span:

  • Resident (sparse) mirrors:
    • A store into an unbound block is redirected to a 4 KiB store page from a small per-build pool. APS5_BDA_STORE_PAGES sets its size: the default is 1,024 pages, about 4.6 MiB. Pages are found by a 16-probe hash keyed by the page, and a read in the same dispatch finds the store there.
    • A full pool is a stop. A dispatch whose stores need more distinct pages than the pool can place faults with "none of the N store pages free", and none of its stores reach guest memory. With 16 probes, the default pool starts refusing consecutive pages at about 988. There is no fallback in this PR.
    • After the use, each stored page goes to guest memory by its per-byte store mask, so a stored zero lands too. The block stays unbound until a later refresh binds it from guest memory.
    • Bound pages that the recompiler's written-page record lists are gathered on the GPU (StorePageGather.comp) and compared with the resident shadow, which equals the device bytes at upload.
  • Copy-backed mirrors: each store ORs one bit per byte it writes into a mask beside its page slot, and the write-back copies only the masked bytes.
  • CPU bytes: either way, a CPU byte written during the dispatch survives, even in the same page or the same dword.
  • APS5_HEAP_MIRROR_MIB is never charged for a store.
  • The pending-write note still covers the span. Host reads, copies and the next address-based refresh of that heap must wait for the storing use, and the span is the only set known before the dispatch. It's a range, not bytes.
  • NoteWrittenBack notes only the runs that were actually stored, so a completion label inside the span that no thread stores over isn't counted as overwritten.
  • Compile cost: compute pipelines get the store-page code only through a dispatch-time specialization constant (PipelineSpecialization::StorePages, ID 8239). The driver binds that variant only when the build's BDA table carries a store page pool, so every other compute shader compiles as before.
  • Still refused, unchanged:
    • copies, read-only heap mirrors and image mirrors;
    • bytes past the served end;
    • stores into uncommitted holes of a sparse heap, whose spans are clipped to the committed runs.
  • Recorded in the debt file: an atomic whose result leaves a byte unchanged still writes that byte back.

The commits:

  1. bf54c5e942: note only the stored runs of address-store spans as written back. This answers question 1 of the review.
  2. 99f1f37aed, 91e4d82e7c: compare only the pages BDA stores hit, and take the reference on the GPU. The next commits supersede these for address stores.
  3. fbb103c45f: the shader side, which redirects stores into unbound heap mirror blocks to store pages.
  4. bbeb08e9f6: resident mirrors without binding, copying or reading back the span.
  5. 7e7c81a2aa: copy-backed mirrors by per-byte store masks.
  6. 425cd9d8b0: store page pools reused across address-based builds.
  7. 6c6997ec33: unbound blocks written back by their store masks, so a stored zero isn't lost. This answers point 1 of the second review.
  8. 92409250c8, 822a2b879e: tests that pin store page exhaustion, at a small pool's size and at 1,025 pages against the default pool (point 2).
  9. 1aa803e9d3: a merge of main.

Cost

Each figure is the extra work of a storing dispatch over a load-only dispatch on the same heap, per dispatch. It's measured on lavapipe (4-vCPU Xeon, Release) as the mean of two runs, at 0, 1 and 16 stored blocks.

heap before (91e4d82): wait, ms now: wait, ms now: CPU, ms bound after a store into a zero heap
8 MiB in 4 runs 4.2-6.3 0.1-1.0 0.0-0.3 1 MiB (was 7.8)
36 MiB in 16 runs (the report's shape) 23.5-27.6 0.1-1.4 0.0-0.5 1 MiB (was 35)
36 MiB in 1 run 14.6-15.7 0.1-1.3 0.0-0.6 1 MiB (was 36)
72 MiB in 16 runs 45.8-51.8 0.1-1.4 0.0-0.5 1 MiB (was 71)
  • The first version of this PR (781dc45) added 7.3-80.6 ms of CPU per dispatch for these heaps.
  • The 1 MiB bound after a store is the next refresh binding the block that now holds data; nothing is bound to take the store.
  • A 2 GiB heap with one block stored runs inside APS5_HEAP_MIRROR_MIB=64, with 1 MiB bound and 0.4-1.4 ms of wait.
  • Compile time, cold, on lavapipe: agc_driver_flat_store takes 73.4 s, against 75.7 s with no store-page code. The runtime_formatted_store tests take 25.6-27.3 s, against 27.3-29.9 s. Inlining the store-page code into every compute shader, the first try, made them 23-46 % slower, which is why it's specialized.
  • Resident Evil Village (PPSA01556), a title that works today: it never takes the changed path, so its cost is the specialization/ABI change only.
    • A counter build of this PR logged no address-storing build (no [bda-store-spans] line) to the static menu +15 min.
    • On this pair's tree family, its mirror census reads 1 ranges (0.6 MiB, 0 writable, 0 heap 0.0 MiB), 294164 address-based builds served. 6c6997ec33 changes no shader code, so a pair on 425cd9d measures this head too.
    • The setup:
    • The cut: the 10 s intervals in each boot's aps5-summary.jsonl that start from menu +5 to +15 min (files, the warm-up boot included). b1's and a1's menu times are logged. a2's and b2's weren't, so their cuts use offsets that reproduce the frame rate logged at the time; it moves by at most 0.004 fps within ±20 s of them.
    • Frame rate: B 0.653 and 0.641 fps, A 0.692 and 0.637. B's mean is 2.6 % under A's. The A boots' spread is 8.2 % of the A mean. a1 was first posted as 0.691; its file at the logged menu time gives 0.692.
    • The phases, B against A, as the median of the 10 s intervals and as the presents-weighted mean: Driver.Packet.draw 1,161 against 1,156 ms per frame (+0.4 %) and 1,185 against 1,161 (+2.1 %); Graphics.Draw +0.1 % and +2.7 %; Graphics.Draw.draw_and_resource_release +0.05 % and +2.6 %. They replace the figures first posted here (Driver.Packet.draw +0.5 %, Graphics.Draw +1.1 %, draw_and_resource_release +1.0 %), which didn't say median or mean and don't all reproduce from the files.
    • Boot to boot: the weighted Driver.Packet.draw is 1,185 and 1,184 ms in the B boots, and 1,103 and 1,223 in the A boots. The A boots differ by 10.8 %, more than the gap between the arms.
    • Non-game CPU, the harness's reading for each boot: b1 36.0 %, a1 29.8 %, a2 35.7 %, b2 35.1 %. a1, the fastest boot and the one with the lowest phases, is 5.3-6.2 points under the other three, more than the 5 points we allow between boots.
    • The same in every boot: 0 shader cache misses after the warm-up, 0 failed imports, matching renders, and private memory within about 120 MB.
    • The cache key changes with the recompiler's source hash, as for any recompiler change, so expect one cold-cache boot per key.

Tested

  • agc_driver_bda_store_heap_mirror, also run as _no_space_cache (APS5_NO_ADDRESS_SPACE_CACHE=1) and as _budget (--budget, APS5_HEAP_MIRROR_MIB=64). Each case was run against a tree with its own mutation (red) and on this branch (green):

    • Budget: a 2 GiB committed heap, copy-backed and resident, with one block stored, once bound and once unbound. The bytes reach guest memory, the use stays inside 64 MiB, and the counters show bound, reference and readback bytes far below the span.
      • Red, the span bound as on 781dc45: "a store into one bound block of a 2 GiB heap: the store of thread 0 reached guest memory as 0x0, expected 0x5a000000".
      • The test's refusal check also matches (APS5_HEAP_MIRROR_MIB), so a refusal can't pass quietly.
    • An unbound block stored, read in the same dispatch, and after write-back.
      • Red, spill write-back removed: "a store into an unbound block: the store of thread 0 reached guest memory as 0x0".
      • Red, same-dispatch read not redirected: "a read in the same dispatch of thread 0's store into an unbound block returned 0x0".
    • A CPU byte in the same page and the same dword as a GPU byte store, during the dispatch (bound and unbound, resident and copy-backed). Red with each of:
      • the shadow comparison skipped;
      • every byte of the page written back;
      • guest memory used as the reference;
      • masks ignored.
    • Two storing dispatches with no wait, and a CPU store between their write-backs. Red with guest memory as the reference, and red with masks ignored.
    • Chained dispatches (a dispatch reads what the one before stored into an unbound block). Red, pending-write note removed: "the first of two storing dispatches lost the store of thread 0".
    • Labels (LabelTests):
      • a label the dispatch doesn't touch keeps the CPU's bytes, and the [recorder] write-back-over-label counter stays 0;
      • a label a thread stores over is still noted.
      • Red on 781dc45.
    • A zero store into an unbound block (ZeroStoreTests, resident and copy-backed): the guest block holds non-zero bytes, and 64 threads store zero, as a dword and as a byte. Red: 425cd9d's code with only this test fails agc_driver_bda_store_heap_mirror and _no_space_cache on Linux (run 41047122594).
    • Store page exhaustion:
      • agc_driver_bda_store_heap_mirror_store_pages: a small pool takes every slot. A dispatch that needs one more page leaves guest memory untouched.
      • _store_pages_default: 1,025 distinct pages against the default pool, resident and copy-backed. It asserts that none of that dispatch's stores landed. It doesn't assert that 1,024 fit.
    • The earlier cases (sparse runs, the mixed GLOBAL and V# store, the read-only control) still pass.
  • agc_driver_bda_device, shader level: six mutations of the store-page code, each red, e.g. "a read after a store into an unbound heap mirror block in the same dispatch returned 0x77777777" and "a store finding no free store page did not fault". Two more cases check that the store-page pipeline is selected and cached.

  • Linux (lavapipe, Ubuntu 24.04, GCC 13.3, Release, CI's flags), at 425cd9d:

    • each of the six commits builds and passes its focused tests;
    • the BDA tests passed 10 of 10;
    • ctest -R '^(agc|shader)' --parallel 4: 1,132 tests, 1,059 passed, 73 skipped, 0 failed.
  • GitHub's runners at this head, run 41102347191, ×10: every ^agc_driver_bda_ test, including the five heap mirror tests, plus agc_driver_recorder and agc_recorder_command_buffer_release.

    • Linux: 126 tests. 118 passed 10 of 10, 8 skipped, 0 failed.
    • Windows: 141 tests. 42 passed 10 of 10, and 99 skipped, since the runner has no Vulkan device; the BDA store tests are among the skipped. 0 failed. The branch builds there.
    • The libc and libkernel suites, run with APS5_SKIP_TIMING_TESTS=1, pass: 198 and 307 tests on Linux, 225 and 327 on Windows.
  • Vulkan validation (Khronos layer, ANYPS5_NO_SHADER_CACHE=1), on 9240925 (run 41039517488): the heap mirror tests show only VUID-VkDeviceCreateInfo-pNext-pNext, from device creation. TechLevelZero's NVIDIA run lists the same ID among main's own, in 427 tests. The store-page variant pipelines add none.

  • NVIDIA RTX 2000 Ada Generation, TechLevelZero's NVIDIA GPU test at this head (comment): merged onto main 9f748f4, driver 595.99.02, the Khronos layer. 2,400 passed, 0 new failures, and no new validation IDs in 916 GPU tests.

  • AMD Radeon RX 9070 XT (RDNA 4), by @bunbeans2-arch, at 425cd9d (comment): Windows 11 Pro 10.0.22631, driver 32.0.32015.7029 (amdvlk64), MSYS2 UCRT64 g++ 16.1.0, Release, ANYPS5_REQUIRE_VULKAN=1, ANYPS5_NO_SHADER_CACHE=1 and the Khronos validation layer (the loader inserts it in every run). The head merged onto main f7f03da, 3 runs per side:

    • agc_driver_bda_store_heap_mirror, _budget and _no_space_cache pass 3 of 3.
    • agc_driver_bda_device, agc_driver_bda_reads_shadowed_results, _per_build, agc_driver_host_import_failure_handles, agc_driver_recorder and the agc_recorder_* tests pass 3 of 3, as on main.
    • No VUID- line on either side.
  • Checks:

    • check_conventions.py and check_test_registration.py pass.
    • MinGW-w64 -fsyntax-only is clean on the eight changed files that toolchain can parse. GuestBufferMemory.cpp and Recorder.cpp stop at the same CpuTopology.hpp header gap as main's copies.
  • A probe on main and on this head, run on fork verify branches only (BdaMirrorStoreProbe.cpp, which isn't part of this PR): 64 threads make a GLOBAL store into a 2 MiB writable guest heap, outside any declared write. The host-import budget is held so that the heap is served by a heap mirror, and the probe checks that it is.

    • main 7c444b7 (run): the store is refused as "read-only in the BDA table", and none of the 64 values reaches guest memory, in 3 of 3 runs.
    • This head, bcc617f (run): the same probe stores all 64 values with no refusal, in 3 of 3 runs.
    • Both ran on GitHub's Linux runner (llvmpipe). The Windows runner has no Vulkan device, so the probe skips there.
  • Ghost of Tsushima Director's Cut (PPSA02225), by @milescoviello, at bcc617f on main 133feb3 (comment): Ubuntu 26.04.1 (kernel 7.0), NVIDIA GeForce RTX 4070 Ti (driver 615.71.09), i7-13700K, Release libraries, 4K output, main's defaults with only the 10 s summary, a 22 GiB cap. One 600 s run per arm, from the same pinned save with scripted presses, both with a cold shader cache.

    • No refusal in either arm: neither logs deferred write-back failed: BDA access failed, the store hit or read-only in the BDA table. On this route the store isn't refused on main, so the pair can't show the fix.
    • Both arms create the intro H.264 decoder and run to the 600 s timeout without a device loss: 1,103 presents on main, 1,112 with this PR.
    • The last stretch differs: with this PR, after 416 s, 1 or 2 presents per 15 to 40 s window, and 555 shaders prepared at use against 393. The tester reads this as that arm being further into a heavier scene with a cold cache, which one run per arm can't separate from scene variance.
    • The b11c7bf84f runs below were on Windows, with a display that stayed black after the "Sony Interactive Entertainment presents" card, and their stores were refused right after the intro decoder was created. This pair's arms create that decoder too, so the difference lies in the main commit, the OS and GPU, or the save, and one pair can't say which.
  • Ghost of Tsushima Director's Cut (PPSA02225), by @sktharunbalaji13-cmd, at 3fa9852 (comment): retail v02.024.000, NVIDIA GeForce RTX 4060 Laptop GPU (8 GB, driver 617.42), 16 GB of RAM, Windows 11, MinGW g++ 15.2, Release. Both arms run the same executable and environment (only APS5_SKIP_REFUSED_DRAWS=1 and APS5_PROFILE_DRAW=1), with only the driver libraries swapped.

    driver runs read-only in the BDA table faults
    main b11c7bf 3, of 150-300 s each 7 per run, every one the store hit 0x1549750000+0x4eeb0000 (instruction 0x1b4, 4 bytes, compute)
    this PR at 3fa9852 2, of 240 s and 450 s 0
    • Past the fault: on main the faults come right after the intro H.264 decoder is created. The 450 s run on this PR goes past that point, with 363 address-based builds and 703 presented frames, and logs no deferred write-back failed, no store-page refusal and no not implemented stop. The title was still running at the end of the window.
    • Not changed: the display stays black after the "Sony Interactive Entertainment presents" card, as on main.
    • Device memory, in later 150 s runs of the same tree (#15296, I#5166): 2 of the last 3 aborted, at about 120 s and at 135 s, on vkAllocateMemory of a heap mirror slab with device heap 0 past its 7,188 MiB budget. The tester traces it to the 16 MiB slabs of the two big heaps' mirrors. With fix(agc): keep heap mirror slabs within device memory #15295 added, a run didn't abort in 150 s, and the heap mirror budget was lowered 9 times instead. Whether main alone reaches this in the same conditions wasn't measured.
    • One local change to boot, outside this PR: relinked with main b11c7bf's relinker, the title aborts at about 1 s on Windows, because prospero/steamnetworkingsockets.prx starts deferred. Their relinker starts it at process start instead (I#5166), and both arms use that executable.
  • Ghost of Tsushima Director's Cut (PPSA02225), by @sktharunbalaji13-cmd, at 425cd9d (comment): retail v02.024.000, NVIDIA GeForce RTX 4060 Laptop GPU (8 GB, a 7,188 MiB budget), 16 GB of RAM.

    • The budget stop is gone. The run of 781dc45 stopped on heap mirror of 0x127c000000+0xa9800000: past the budget (4014 MiB, limit 2816 MiB). On this head that stop doesn't occur, and nothing about store-page exhaustion is logged with the default pool of 1,024 pages.
    • Frames: the title presents 129 frames. The last, at a guest time of 107.0 s, is the disclaimer screen, not black.
    • The next stop: at 114.7 s, in compute shader 0x20001ef700, AGC graphics: native multisample stencil or depth format import is not implemented. That's the multisampled depth import fix(agc): import native multisample D32S8 targets with a separate stencil plane and a depth-only HTILE #9533 adds, outside this PR.
  • Ghost of Tsushima Director's Cut (PPSA02225), by @milescoviello, at 425cd9d with fix(agc): accept a colour alias over a native multisample depth plane when HTILE proves its clear #9742 (comment): main 98ddd9c + fix(agc): write back BDA stores into writable heap mirrors #12840 425cd9d + fix(agc): accept a colour alias over a native multisample depth plane when HTILE proves its clear #9742 1c904e2 (fix(agc): import native multisample D32S8 targets with a separate stencil plane and a depth-only HTILE #9533's 6eb141c inside), merged cleanly; Linux, RTX 4070 Ti (NVIDIA 615.71.09), release libraries, 21 GiB cap, booting from a settings save. The run stops 33 s in on a check outside this PR, native multisample depth sampled identity or format mismatch in compute shader 0x20001ef700, which feat(agc): sample the stencil plane of a native multisampled D32S8 target #9717 takes.

  • e6c85d3, a merge of main d30e04f, and 582e856, the journal race test (test-only).

    • Why: merged with current main, this branch failed agc_driver_pipeline_journal 3 of 3, at the replay-race assertion from chitters2004's 307f220: "a dispatch and the replay both built a compute pipeline: 32 built for 24 replayed". The merge has no textual conflict, so GitHub didn't flag it.

    • The cause: the race records its 32 compute pipelines into the journal that the test binary's earlier cases already use, capped at APS5_PIPELINE_JOURNAL_MAX_MIB=1.

      • With the store-page lookups, every shader that stores through an address carries more SPIR-V: the race's fixture grows from 6,582 to 7,819 words, and each journal module record from 26,924 to 31,880 bytes.
      • So the 32 records and the earlier ones no longer fit, and the journal evicted the oldest 8, as its cap says it should.
      • The identities match on both devices, no StorePages=1 variant is built, and nothing is rejected. The 8 were evicted, not lost.
    • The fix: the test sets the journal aside, records its 32 pipelines into an empty journal (1,022,496 of 1,048,576 bytes), requires all 32 to be journaled before racing, and puts the earlier journal back afterwards. When they don't fit, it now says so instead of reporting a double build. The race check is unchanged. Red: 20 of 20 failures on the merge without the fix; green: 20 of 20 with it (cloud Linux, lavapipe).

    • The cost: address-writing compute modules are 18.8 % larger in SPIR-V words and 18.4 % larger in journal bytes. On llvmpipe this binary's first run, before Mesa's shader cache holds its pipelines, now takes about two minutes, so its registration sets TIMEOUT 240, as agc_shader_disk_cache_large_file does. On GitHub's Linux runner, --repeat ×3, with the first run cold:

      Tree First run Later runs Run
      main d30e04f 67.8 s 5.1, 5.1 s 41175053022
      main + this PR + the fix 118.9 s 7.9, 7.8 s 41169371014

      That's +75 % for the cold run and about +53 % warm. It isn't measured on a GPU: TechLevelZero's NVIDIA run of this head (report) passed, but its test selection didn't include agc_driver_pipeline_journal. The compile growth comes from the store-page branch in each address lookup; it can be narrowed in a follow-up if reviewers want it.

    • ×10 on 582e856 (run): this PR's store-heap-mirror, BDA and recorder tests, the ^agc_driver_bda_ and ^agc_bda tests, and agc_driver_pipeline_journal.

      • Linux: 127 run, 119 pass, 8 skip, 0 fail. This PR's five agc_driver_bda_store_heap_mirror* tests passed every run. The 8 skips are other tests in the set (host-import and unit-shadow cases this runner can't run). agc_driver_pipeline_journal took 108.3 s on its first run and 8.3 to 8.7 s after.
      • Windows: 142 run, 42 pass, 100 skip (no Vulkan device), 0 fail.
      • The libc and libkernel suites run 199 and 308 tests on Linux and 226 and 330 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.
  • 6bec085, the journal watermark test (test-only, tests/execution/PipelineJournal.cpp), for @jotitadev's review.

    • Why: with the default ANYPS5_ENABLE_SPIRV_TOOLS=OFF, agc_driver_pipeline_journal failed every run at EvictionWatermarkTests: "three consecutive records after a rewrite triggered another rewrite", 92 bytes over the 1 MiB cap. GitHub's Linux runner builds with ON, where the modules are smaller, so it passed there.
    • The cause: a rewrite leaves the journal at most at its target, three quarters of the cap, so it guarantees 262,144 bytes free.
      • The case's three records carried a fixed 16 Ki-word payload, 279,288 bytes on main.
      • They fit there only because the rewritten journal sat 36,880 bytes under the target.
      • The store-page lookups make each module about 4,956 bytes larger.
    • The fix: each record is sized from the rewrite target.
      • The case encodes the fixture's module as the journal does, and adds user words until the module and compute records take 65,536 bytes, a quarter of the room above the target. The three take 196,608 bytes, whatever the fixture's SPIR-V.
      • It keeps the journal EvictionTests just rewrote, because an empty journal couldn't trigger a rewrite whatever the target.
      • The four checks are unchanged. Raising the production rewrite target to 7/8 or 15/16 of the cap turns the case red (cloud Linux, lavapipe).
    • Red: 582e856 with OFF fails 3 of 3 with that message on GitHub's Linux runner (run).
    • ×10 with OFF (run) and ×10 with ON (run), on Windows too: agc_driver_pipeline_journal, the graphics binary's agc_pipeline_journal and agc_pipeline_journal_long_paths, and every ^agc_driver_bda test.
      • Linux, both builds: 127 run, 119 pass, 8 skip, 0 fail.
      • Windows, both builds: 142 run, 42 pass, 100 skip (no Vulkan device), 0 fail.
      • The libc and libkernel suites run 199 and 308 tests on Linux and 226 and 330 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.
    • Validation (VERIFY_VALIDATION=1 on GitHub's Linux runner, main against this head, the same tests): both pass. The loader inserted VK_LAYER_KHRONOS_validation 98 times on main and 103 with this head, and neither log has was not found. Both report only VUID-VkDeviceCreateInfo-pNext-pNext, so the change adds none.
    • ^agc once with OFF (run):
      • Linux: 1,140 run, 1,065 pass, 75 skip, 0 fail.
      • Windows: 1,185 run, 356 pass, 828 skip, 1 fail. agc_driver_graphics stops at this PR's own check "a writable heap mirror a program stores to through addresses is not writable in the BDA table" (tests/BdaResources.cpp, from 781dc45).
      • That runner has no Vulkan device. In this run, the test's own context logs host imports failing at vkAllocateMemory (−2 and −1000072003) and falling back to copies. The repository's Windows CI job fails the same check at this head (run): it now runs the AGC tests, which its run at 582e856 didn't.
      • 6bec085 doesn't touch it. d22d9c1, below, brings the case up to date.
  • NVIDIA (TechLevelZero's GPU runner, 6546250585): 6bec085 merged onto main 73f4f7e, RTX 2000 Ada, driver 595.99.02, Linux. Passed: 2,436 passed, 0 new failures (4 fail on main too), and no new validation IDs against main over 929 GPU tests. Its GPU pass ran agc_driver_graphics and the four agc_driver_bda_store_heap_mirror tests it selected (_budget, _no_space_cache, _store_pages, _store_pages_default), all passed. Its selection didn't include agc_driver_pipeline_journal, and agc_driver_graphics' heap-mirror case skips on Linux (no guest arena), so neither of those is measured there.

  • d22d9c1, the Windows heap mirror case (test-only, tests/BdaResources.cpp +77 −41).

    • Why it failed: heapMirrorTests runs only where the guest arena exists, which is Windows. It runs on the mock context, which has no sparse residency, so every heap mirror in it is copy-backed. Since 7e7c81a, a copy-backed writable mirror is Read|Write|Masked in the BDA table, and its write-back stores only the pages the GPU reports. The case still expected Read|Write and reported no stores, so it failed on Windows every time, whatever the GPU. The production code is right; the case was out of date.
    • The fix: the writable part runs twice, first on a mirror forced copy-backed (SetResidentAddressSpaceLimit(1), as BdaStoreHeapMirror.cpp does), then on the mirror the context gives. Each pass requires one mirror of the expected kind and expects exactly Read|Write|Masked for a copy-backed mirror, or Read|Write for a resident one with every block bound. It reports its three stores as the BDA does (NoteAddressStores, NoteStorePages) before WriteBack. The other checks are unchanged.
    • Red and green on GitHub's Windows runner: at 6bec085, agc_driver_graphics fails (run). At d22d9c1 it passes 10 runs in a row, with this PR's journal and BDA tests, with OFF (run) and with ON (run). Linux: 128 run, 120 pass, 8 skip, 0 fail. Windows: 143 run, 43 pass, 100 skip (no Vulkan device), 0 fail.
    • A mutation that drops Write from copy-backed mirrors' ranges turns agc_driver_graphics red on Windows and four of the agc_driver_bda_store_heap_mirror tests red on Linux (run).
    • ^agc once at d22d9c1 (run): Linux 1,150 run, 1,075 pass, 75 skip, 0 fail. Windows 1,185 run, 357 pass, 828 skip, 0 fail.
    • The libc and libkernel suites run 199 and 308 tests on Linux and 226 and 330 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.
  • 9d2c13f, a merge of main 0836dfd (run with ON, run with OFF).

    • The conflicts:
      • CMakeLists.txt, from build(agc): register each AGC test executable in its own CMake fragment #12862's split, resolved with tools/agc_test_split.py resolve. This PR's registrations move into a new tests/cmake/agc_driver_bda_store_heap_mirror_tests.cmake (+26) and into agc_driver_pipeline_journal_tests.cmake (+4, its TIMEOUT 240). Its StorePageGather.comp build rule stays in CMakeLists.txt.
      • Graphics/include/GuestBufferMemory.hpp, where ashwin280802's fix(agc): evict unreferenced heap mirrors under memory pressure #13581 (heap mirror eviction) adds HoldsMirror, EvictMirror, WasEvicted and RecordEvicted at the spot where this PR adds AllowAddressStores, NoteAddressStores and the store span and page types. Both sides are kept, each unchanged.
    • This PR's own diff is unchanged apart from the registration move.
    • fix(agc): evict unreferenced heap mirrors under memory pressure #13581's eviction can't drop a mirror that holds this PR's pending stores (read at the merge). sweepMirrors takes a writable heap mirror only when the mirror cache holds its one reference. The memory that records store spans for a mirror (writable heap mirrors only, at upload) holds it through its region's shared_ptr until WriteBack has consumed the stores. EvictMirror and RecordEvicted act only on a memory still being built, which has no spans or pages yet.
    • The count: with -DBUILD_TESTING=ON, ctest -N gives 3080 tests: main's 3075 plus this PR's 5, each listed once, and agc_driver_pipeline_journal with this PR's TIMEOUT 240.
    • ×10 on GitHub's runners, with ON and with OFF: this PR's journal, BDA and store-heap-mirror tests, agc_driver_graphics and fix(agc): evict unreferenced heap mirrors under memory pressure #13581's agc_driver_resident_heap_mirror. Linux: 17 run, 17 pass, 0 skip, 0 fail. Windows: 18 run, 5 pass, 13 skip (no Vulkan device), 0 fail; agc_driver_graphics passes. The libc and libkernel suites run 199 and 308 tests on Linux and 226 and 330 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.
    • On a cloud Linux machine (lavapipe, CI's flags; result): with ON, this PR's set ×10 (160 runs) and agc_driver_resident_heap_mirror ×10 pass, and ^agc gives 1,158 run, 1,083 pass, 75 skip, 0 fail. With OFF, the set and fix(agc): evict unreferenced heap mirrors under memory pressure #13581's test pass ×3.
  • a896536 and d28c760, from oneandonlydean's review (run with ON, run with OFF).

    • a896536:
      • The two store-page tests no longer require the "found none of the N store pages free" text.
      • The case at exactly the pool size is unchanged.
      • The over-limit dispatch must leave guest memory untouched. _store_pages_default already checked that, and _store_pages now checks that none of its threads' values reach any of its pages.
    • d28c760: a new debt entry, "Store page pool", says what a title gets past the pool. The use's fault check throws that message, none of its stores into heap mirrors reach guest memory, and raising APS5_BDA_STORE_PAGES gives a use more pages.
    • ×10, with ON and with OFF: the same set as above. Linux: 17 run, 17 pass, 0 skip, 0 fail. Windows: 18 run, 5 pass, 13 skip (no Vulkan device), 0 fail. The libc and libkernel suites run 199 and 308 tests on Linux and 226 and 330 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.
    • Not run: a title-level cost comparison against a baseline on real hardware.
  • NVIDIA RTX 2000 Ada Generation, TechLevelZero's NVIDIA GPU test at d28c760 (comment): merged onto main d5ec8e6, driver 595.99.02, Linux, the Khronos layer. Passed: 2,494 passed, 0 new failures (3 fail on main too and 1 is unstable there), 45 skipped, and no new validation IDs against main over 939 GPU tests.

    • Its GPU pass ran agc_driver_bda_store_heap_mirror (passed, 7.96 s) and, this time, agc_driver_pipeline_journal (passed, 134.0 s with the layer and ANYPS5_NO_SHADER_CACHE=1). The report gives no main time for the journal test, so this isn't a cost comparison. Its selection didn't include this PR's other four store-heap-mirror tests or agc_driver_graphics.
    • agc_driver_bda_store_heap_mirror is this PR's own test, so main's baseline doesn't have it and its validation wasn't compared.
  • b6f54ac, a merge of main 5bae1a4 (run with ON, run with OFF, validation).

  • TechLevelZero's GPU tests at 6f7d8f1, merged onto main f2d874c, before the revert:

    • AMD Radeon RX 6300 (RADV NAVI24, Mesa 25.2.8, Linux; report): 2,494 passed, 12 failed and 54 skipped. None of the failures is new: 9 also fail on main and 3 are unstable on main. No new validation IDs against main over 944 GPU tests.
    • NVIDIA RTX 2000 Ada Generation (driver 595.99.02, Linux; report): 2,510 passed, 4 failed and 46 skipped. All 4 failures also fail on main. No new validation IDs against main over 944 GPU tests.
    • With the layer, agc_driver_pipeline_journal took 183.3 s on the AMD card and 132.6 s on the NVIDIA one. Neither report gives a main time for it.
  • 7af65f5, a merge of main 88e804b. main now has JJenkx's perf(agc): reuse heap mirror reference buffers between builds #8874 (heap mirror reference buffers), Celegans12's perf(agc): keep staged buffer copies inside a dispatch run #9287 (staged copies inside a dispatch run) and JJenkx's fix(agc): render layered mesh targets within device limits #6959 (layered mesh targets).

    • perf(agc): reuse heap mirror reference buffers between builds #8874: GuestBufferMemory::takeHeapReferences and releaseHeapReferences keep both sides. Each reference is taken from perf(agc): reuse heap mirror reference buffers between builds #8874's ReferenceStorage pool and returned to it, and this PR's copied path (pendingReferenceCopies) still applies inside a recorded run. Where the mirror is cleared, the references are released before this PR's store-page resets.
    • perf(agc): keep staged buffer copies inside a dispatch run #9287: in ShaderResources.cpp, this PR's RecordStorePageGather runs after perf(agc): keep staged buffer copies inside a dispatch run #9287's in-run copy-back block.
    • fix(agc): render layered mesh targets within device limits #6959 takes specialization IDs 8237 and 8238 for MeshLayerBase and MeshLayerCount, so StorePages moves to 8239.
    • A code change inside the merge commit: fix(agc): render layered mesh targets within device limits #6959 also adds a loop to buildSpecializedModule in Recompiler.cpp that lists a module's specialization constants. It leaves out only the workgroup offsets and looks every other ID up among the prepared values. StorePages is supplied at dispatch, not prepared, so that lookup threw map::at: before the change, nine tests failed on Linux and three on Windows. The merge commit changes that one line from IsWorkgroupOffset(id) to IsDispatchSupplied(id), the check specializeWords already uses for the same IDs. It's folded into the merge so that no commit fails its tests.
    • This PR's diff over main is otherwise unchanged.
    • ×10 (run): the BDA, heap-mirror, pipeline-journal and graphics tests, with fix(agc): render layered mesh targets within device limits #6959's new tests and the tests that failed before the change. Linux: 29 run, 28 pass, 1 skip (agc_driver_layered_volume_mesh), 0 fail. Windows: 30 run, 12 pass, 18 skip (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.
    • Every agc test, once (run): Linux: 1,223 run, 1,146 pass, 77 skip, 0 fail. Windows: 1,259 run, 379 pass, 880 skip (no Vulkan device), 0 fail.
    • NVIDIA: TechLevelZero's NVIDIA bot ran this head merged onto main 88e804b on an RTX 2000 Ada (report): 2,560 passed, 5 failed, none new (3 also fail on main, 2 unstable on main), 45 skipped, with no new validation IDs (978 tests on the GPU).
  • 9fd023a, a merge of main 5cb015c, which brings Pipodi's perf(recompiler): back compute scratch with a device buffer slot pool #12764 (compute scratch backed by a device buffer slot pool).

    • The conflicts: VulkanDevice.hpp and VulkanDevice.cpp, each time one PR's addition next to the other's. The merge keeps both: in the header, perf(recompiler): back compute scratch with a device buffer slot pool #12764's scratchPoolHeader declaration and this PR's specializedComputePipeline; in the source, this PR's StorePages scan and perf(recompiler): back compute scratch with a device buffer slot pool #12764's three-element setLayouts for the scratch pool.
    • This PR's diff over main is otherwise unchanged.
    • ×10 (run): the BDA, heap-mirror, pipeline-journal and graphics tests, with the dispatch-overlap, layered-mesh and layer-specialization tests. Linux: 29 run, 28 pass, 1 skip (agc_driver_layered_volume_mesh), 0 fail. Windows: 30 run, 12 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.
    • Every agc test, once (run): Linux: 1,258 run, 1,176 pass, 80 skip, 2 fail. Windows: 1,295 run, 397 pass, 898 skip (no Vulkan device), 0 fail. The two Linux failures:
      • agc_driver_image_sample_lod_clamp_shader_lane fails on main too. fix(agc): bind a T# minimum LOD through an S# that holds the LOD at 0 #12980 added its bilinear row, and adriadam10's 5821b86 on main widens that check after main's push builds failed it on lavapipe.
      • agc_driver_pipeline_journal reached its 240-second timeout while the sweep ran four of its 1,258 tests at a time. In the ×10 above, among 29 tests, it passes 10 of 10, in 57 to 185 s.
    • The journal test's time, run alone three times on GitHub's Linux runner:
      • on main 7feb37e, without this PR (run), its first run reaches the 120-second default timeout;
      • with this PR at 9fd023a (run), all 3 pass, in 181.4, 65.1 and 64.2 s, under its TIMEOUT 240.
      • TechLevelZero's AMD machine also lists it as unstable on main: it failed in 4 of the last 6 main runs there (report).
      • So on a cold run on that runner, main's own test already takes longer than 120 s, and this PR adds to that, as the cost note above says.
    • GPUs: TechLevelZero's bots ran this head. NVIDIA RTX 2000 Ada (driver 595.99.02), merged onto main f6232fc (report): 2,753 passed, 5 failed, none new (3 also fail on main, 2 unstable on main), 49 skipped, with no new validation IDs (943 tests on the GPU). AMD Radeon RX 6300 (RADV NAVI24, Mesa 25.2.8), merged onto main 7feb37e (report): 2,740 passed, 9 failed, none new (8 also fail on main, 1 unstable on main), 58 skipped, with no new validation IDs (943 tests on the GPU).
  • a162a98, a merge of main 4f41f4c, which brings perf(agc): share BDA fault buffers in a per-device arena, with 32-byte slots for report-only programs #8963 (shared BDA fault buffers, merged first as planned) and ee6aba54's fix(agc): copy only the dwords a shader changed back from a GPU-copied buffer #6185 (WriteBack keeping the CPU's bytes only in host-copied write-backs).

    • The conflicts: CMakeLists.txt, Execution/src/GuestMemory.cpp, Graphics/include/BdaResources.hpp, Graphics/src/BdaResources.cpp, Graphics/src/GuestBufferMemory.cpp and tests/BdaShader.cpp.
    • perf(agc): share BDA fault buffers in a per-device arena, with 32-byte slots for report-only programs #8963's fault arena replaces per-build fault buffers with shared 512 KiB chunks, 32-byte slots for report-only builds, and reclaim of idle builds' slots under pressure. This PR keeps its store-page words (pool address, base, slots, overflow) after SrtGuardWord in a full-size fault buffer, so the merge keeps the arena and changes one thing in it:
      • A build that stores through addresses gets a private fault slot: its own one-slot buffer with device-address usage. The arena never shares it with another build and never reclaims it from a live idle build, because its address is part of that build's store-page setup. It is freed when the build is destroyed or evicted, and the arena's slot and chunk counts drop by one, as every slot does with APS5_NO_SHARED_FAULT_SLOTS=1.
      • Fault-only builds keep perf(agc): share BDA fault buffers in a per-device arena, with 32-byte slots for report-only programs #8963's shared and report-only slots unchanged.
      • The store-page code reads and writes the slot through the arena (faultBytes() and the slot's device address), where it used to use its own buffer.
    • fix(agc): copy only the dwords a shader changed back from a GPU-copied buffer #6185's ChangedStore composes with this PR's recorded store runs. In GuestBufferMemory.cpp, storeChanged takes fix(agc): copy only the dwords a shader changed back from a GPU-copied buffer #6185's store function and this PR's Pieces* stored: a heap-mirror write-back passes stored and writes through GuestMemory::WriteChanged, recording each run, and every other caller stores with fix(agc): copy only the dwords a shader changed back from a GPU-copied buffer #6185's function. In GuestMemory.cpp, one writeChanged takes fix(agc): copy only the dwords a shader changed back from a GPU-copied buffer #6185's keepGuest and this PR's stored, behind three wrappers.
    • CMakeLists.txt and BdaShader.cpp keep both sides.
    • This PR's diff over main goes from +1,956 −70 to +1,964 −77, in 31 files. The change is in BdaResources.hpp, BdaResources.cpp, GuestBufferMemory.cpp and GuestMemory.cpp.
    • ×10 (run): agc_changed_copy, agc_driver_graphics, agc_driver_pipeline_journal, agc_driver_resident_heap_mirror and every test matching ^agc_driver_bda, ^agc_bda, ^agc_driver_heap_mirror or ^agc_shader_bda. Linux: 18 run, 18 pass, 0 skip, 0 fail. Windows: 18 run, 3 pass, 15 skip (no Vulkan device), 0 fail. The libc and libkernel suites run 300 and 322 tests on Linux and 327 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.
    • Every agc and guest_memory test, once (run): Linux: 1,281 run, 1,197 pass, 83 skip, 1 fail. Windows: 1,317 run, 402 pass, 915 skip (no Vulkan device), 0 fail. The one failure: 992/1281 Test #1389: agc_driver_pipeline_journal ...***Timeout 240.07 sec. It passes 10 of 10 in the ×10 above, and it timed out the same way, at 240.06 s, in this PR's sweep before the merge. TechLevelZero's AMD machine lists it as unstable on main, failed in 6 of the last 8 main runs there (report).
    • GPUs: TechLevelZero's bots ran this head merged onto main 4f41f4c. NVIDIA RTX 2000 Ada (driver 595.99.02; report): 2,772 passed, 6 failed, none new (3 also fail on main, 3 unstable on main), 48 skipped, with no new validation IDs (939 tests on the GPU). AMD Radeon RX 6300 (RADV NAVI24, Mesa 25.2.8; report): 2,758 passed, 10 failed, none new (8 also fail on main, 2 unstable on main), 58 skipped, with no new validation IDs (939 tests on the GPU). Under the validation layer, agc_driver_pipeline_journal took 130.4 s on the NVIDIA card and 240.1 s on the AMD one, whose bot lists it as failed in 7 of the last 9 main runs there.
  • c68d814, a test of the private fault slot (test-only, tests/BdaResources.cpp). The heap-mirror tests now create a build that stores through addresses over each writable heap mirror, copy-backed and resident:

    • while it lives, the arena counts one more slot, one more chunk and one more holder, and destroying it takes all three back out;
    • under fault slot pressure that reclaims idle builds' slots, the idle storing build keeps its private slot.
    • These builds use a context without the buffer pool, so the memory they free can't serve the heap-mirror budget checks that follow.
    • Red: 75cbd46 drops || privateSlot from the check in BdaResources' destructor that gives a slot's counts back. On GitHub's Windows runner agc_driver_graphics then fails with "a destroyed build that stored through addresses into a copy-backed writable heap mirror left its fault chunk counted in the arena" (run). On GitHub's Linux runner it passes either way: the heap-mirror tests don't run there ("guest arena unavailable or not write-watched: heap mirrors not tested").
    • ×10 (run): agc_changed_copy, agc_driver_graphics, agc_driver_pipeline_journal, agc_driver_resident_heap_mirror and every test matching ^agc_driver_bda or ^agc_bda. Linux: 18 run, 18 pass, 0 skip, 0 fail. Windows: 18 run, 3 pass, 15 skip (no Vulkan device), 0 fail; agc_driver_graphics, which holds the new case, passes 10 of 10. The libc and libkernel suites run 300 and 322 tests on Linux and 327 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.
  • c4d6d41, a merge of main 04a9eb4 (run). The one conflict was in Execution/include/GuestMemory.hpp, where JAB-dev's feat(agc): publish a written native multisample D32S8 surface to its guest planes on a guest read #13021 declares WriteChangedIfHeld at the place this PR declares its WriteChanged overload that returns the stored ranges. Both stay, and this PR's diff over main is unchanged.

    • ×10: agc_changed_copy, agc_driver_graphics, agc_driver_pipeline_journal, agc_driver_resident_heap_mirror and every test matching ^agc_driver_bda or ^agc_bda, 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: 19 run, 19 pass, 0 skip, 0 fail. Windows: 19 run, 3 pass, 16 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.
    • TechLevelZero's GPU bots at c4d6d41, this head merged onto main 1c8c0ef, 2,853 of 3,842 tests selected. Of this PR's tests, agc_driver_bda_store_heap_mirror and agc_driver_resident_heap_mirror ran and passed on both. The four added registrations (agc_driver_bda_store_heap_mirror_budget, _no_space_cache, _store_pages and _store_pages_default) weren't in either selection.
  • 3fa9852, a merge of main b11c7bf, which brings perf(agc): reuse read-only address-based draw builds over their cached address space #13858 (×10, every agc test).

  • 125faf5, a merge of main 090f571 (×10, #15423's test ×10).

    • The conflict: tests/cmake/agc_driver_pipeline_journal_tests.cmake, where main now has fix(agc): check a journal module's frame size before allocating it #15423's if(BUILD_TESTING) block with agc_driver_pipeline_journal_undecodable_module. This PR's TIMEOUT 240 line for agc_driver_pipeline_journal goes into that block as its first line, so the file keeps one block. This PR's other lines are unchanged; Recorder.cpp and docs/dev/debt/libSceAgcDriver.md differ only in context.
    • ×10: the same tests as on 3fa9852. Linux: 29 run, 28 pass, 1 skip (agc_host_import_sparse, no /dev/udmabuf), 0 fail; agc_driver_pipeline_journal passed 10 of 10, the slowest in 102.8 s. Windows: 34 run, 9 pass, 25 skip (no Vulkan device), 0 fail. The libc and libkernel suites run 327 and 344 tests on Linux and 358 and 371 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.
    • fix(agc): check a journal module's frame size before allocating it #15423's test: that set names agc_driver_pipeline_journal exactly, so a second ×10 ran agc_driver_pipeline_journal_undecodable_module with this PR's five agc_driver_bda_store_heap_mirror* tests. Linux: 6 run, 6 pass, 0 fail, the new test 10 of 10. Windows: 6 run, 6 skip (no Vulkan device).
  • a62b1d7, a merge of main dd7c8de (×10).

    • The conflicts:
      • GuestMemory.cpp: this PR's writeChanged definition, with its stored parameter, takes the [[maybe_unused]] on byteStoreLimit that oberonlift's refactor: route the libraries' fenv, TSC, cpuid and pause instructions through helpers #15797 added to main's.
      • tests/execution/PipelineJournal.cpp's ReplayRacesDispatchTests: dantdmdarealguy's test(agc): share the pipeline journal test's replayed compute programs #15730 builds the race's programs with the shared ReplayedCodes(), 16 programs from salt 8 in place of 32 from salt 16, and drops the function's Pipelines = 32. The merge takes const auto codes = ReplayedCodes(); and keeps this PR's lines: the journal set aside, the raced pipelines recorded into an empty journal and required to be journaled, and the journal put back. Since Pipelines is gone, the count check now reads held == ReplayedPrograms, main's constant.
    • This PR's other changed lines are the same, and GuestBufferMemory.hpp differs in context only.
    • ×10: every test matching ^agc_driver_bda, ^agc_bda, ^agc_driver_address_draw_space_reuse, ^agc_host_import, ^agc_write_tracking, ^agc_driver_host_import_proofs, ^agc_driver_pipeline_journal or ^agc_pipeline_journal, with agc_driver_graphics and agc_driver_resident_heap_mirror. Linux: 34 run, 33 pass, 1 skip (agc_host_import_sparse), 0 fail; agc_driver_pipeline_journal, agc_driver_pipeline_journal_undecodable_module, agc_pipeline_journal and agc_pipeline_journal_long_paths pass 10 of 10. Windows: 40 run, 13 pass, 27 skip, 0 fail. The Windows runner has no Vulkan device, so agc_driver_pipeline_journal and agc_driver_pipeline_journal_undecodable_module skip there with the other Vulkan tests; the graphics binary's agc_pipeline_journal, agc_pipeline_journal_long_paths and agc_pipeline_journal_extended_paths pass 10 of 10. The libc and libkernel suites run 344 and 346 tests on Linux and 375 and 373 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.
  • a3e3e77, a merge of main 7259cce (×10, every agc test).

  • 7cf8f10, a merge of main 47adcad (×10, every agc test).

    • The conflict: oneandonlydean's revert(agc): revert #15169 pipeline binary store reland #17982 reverts fix(agc): reapply pipeline cache persistence with guarded key queries #15169 on main, since main crashed at boot in PipelineBinaryStore::queryKey. That takes out the binaryLayoutKey member that the merge of 7259cce kept beside this PR's storePages in ComputePipelineObjects. The merge drops binaryLayoutKey and keeps storePages. Nothing in the tree uses fix(agc): reapply pipeline cache persistence with guarded key queries #15169's store any more, and this PR's changed lines are the same in all 31 files.
    • ×10: the same tests as on a62b1d7, without fix(agc): reapply pipeline cache persistence with guarded key queries #15169's 14 tests, which the revert removes. Linux: 34 run, 33 pass, 1 skip (agc_host_import_sparse), 0 fail. This PR's five agc_driver_bda_store_heap_mirror* tests, agc_driver_graphics, agc_driver_resident_heap_mirror and agc_driver_pipeline_journal pass 10 of 10, the journal's slowest in 68.3 s. Windows: 42 run, 15 pass, 27 skip (no Vulkan device), 0 fail.
    • Every agc test, once: Linux: 1,518 run, 1,425 pass, 93 skip, 0 fail. Windows: 1,561 run, 466 pass, 1,095 skip (no Vulkan device), 0 fail.
    • Suites: libc and libkernel run 350 and 348 tests on Linux with 0 failed, and 380 and 375 on Windows, where only the verify harness's guest_kernel_resident_fmem_export and guest_kernel_resident_fmem_export_patched fail, as on a3e3e77. The suites ran with APS5_SKIP_TIMING_TESTS=1, which relaxes precise_wait's median bounds on GitHub's hosted runners.
  • af6430b, a merge of main 884694c (×10, every agc test).

    • The conflict: chitters2004's perf(agc): suppress redundant graphics pipeline and dynamic state commands #16752 tracks the Vulkan command state. A raw vkCmdBindPipeline through Resolved or function() no longer compiles, and a compute pipeline binds through context.BindComputePipeline, which skips a bind the command buffer already has. Three of this PR's binds move to it:
      • in VulkanDevice.cpp, the dispatch's bind, of specializedComputePipeline's StorePages variant or the record's pipeline;
      • in VulkanDevice.cpp, the bind for each split chunk;
      • in Recorder.cpp, the store-page gather's bind of storePageGatherPipeline, as perf(agc): suppress redundant graphics pipeline and dynamic state commands #16752 does for the recorder's other compute pipelines.
        It's main's API, with this PR's pipelines unchanged. This PR's changed lines are the same in the other 29 of its 31 files.
    • ×10: the same tests as on 7cf8f10, with perf(agc): suppress redundant graphics pipeline and dynamic state commands #16752's agc_command_state, agc_graphics_state_recorder and agc_graphics_state_recorder_unsuppressed. Linux: 38 run, 37 pass, 1 skip (agc_host_import_sparse), 0 fail. This PR's five agc_driver_bda_store_heap_mirror* tests, agc_driver_graphics, agc_driver_resident_heap_mirror, agc_driver_pipeline_journal and perf(agc): suppress redundant graphics pipeline and dynamic state commands #16752's three tests pass 10 of 10, the journal's slowest in 67.0 s. Windows: 47 run, 18 pass, 29 skip (no Vulkan device), 0 fail.
    • Every agc test, once: Linux: 1,651 run, 1,543 pass, 106 skip, 2 fail. Windows: 1,689 run, 495 pass, 1,194 skip (no Vulkan device), 0 fail. The two Linux failures are main's:
    • Suites: libc and libkernel run 380 and 374 tests on Linux with 0 failed in both runs, and 410 and 402 on Windows.
      • The ×10 run's first Windows attempt (attempt 1): libkernel's guest_timed_wait_cpu failed on its overshoot limits. sceKernelUsleep(500 us) reached a P99 overshoot of 4,303 µs, against a limit of 2,500 µs, and ksem_timedwait(500 us) 3,248 and 3,012 µs. This PR doesn't change libkernel. In the agc run on the same head, the Windows libkernel suite ran 402 tests with 0 failed, guest_timed_wait_cpu among them.
      • The rerun of that job (attempt 2): Windows: 47 run, 18 pass, 29 skip (no Vulkan device), 0 fail, 10 of 10 runs. The libc and libkernel suites ran 410 and 402 tests with 0 failed, guest_timed_wait_cpu among them.
      • The suites ran with APS5_SKIP_TIMING_TESTS=1, which relaxes only precise_wait's median bounds on GitHub's hosted runners.
    • agc_shader_memory in upstream's Windows job (job): upstream CI merged this head onto main b671752, and agc_shader_memory exited with 0xc0000374 after "read of 0xffffffff00000008". That main sits between perf(shader): resolve image tables with fewer allocations #18827 (04:46Z on 14 Nov) and fix(shader): keep the per-thread empty image tables in HostThreadLocal #19893 (08:20Z), and main alone crashes in the same test binary there:
  • 3704189, a merge of main 11992f9 (×10, ×10 with the Windows test fix, every agc test), which brings adam25136's fix(agc): wait for address-based writers before reading indirect draw records #17850 (CPU reads of indirect draw records wait for address-based writers).

  • bcc617f, a merge of main 0173f20 (×10, every agc test), which brings Ketz7's perf(shader): record a BDA fault with one atomic claim and branch-free stores #20870 (a BDA fault recorded with one atomic claim).

  • NVIDIA GeForce RTX 4090, by @domx4q, with the Khronos validation layer (comment): Arch Linux (kernel 7.3.4), GCC 16.2.1 Release, driver 620.70.06, Vulkan 1.4.357, validation layer 1.4.363.1, with ANYPS5_REQUIRE_VULKAN=1 and ANYPS5_NO_SHADER_CACHE=1. This head bcc617f merged onto main e4caa07 (a clean merge), against main e4caa07 alone, ctest -R '^agc_(driver_bda|bda|driver_resident_heap_mirror|driver_pipeline_journal|pipeline_journal|host_import_sparse|shader_memory)'. main: 19 of 19 run pass, 3 skip. This PR: 24 of 24 run pass, 3 skip, including the five agc_driver_bda_store_heap_mirror* tests main doesn't have. The same three skip on both sides: agc_driver_bda_reads_shadowed_results and _per_build (the device reports watched host memory written when it imports or reads it) and agc_host_import_sparse (udmabuf's size_limit_mb is above 1024). No VUID- line on either side, and every device test selected the RTX 4090.

  • a96efaa, a merge of main 8bb7635 (×10, every agc test), which brings atinseau's feat(shader): emulate 64-bit image and buffer atomics on devices without them #18842 (64-bit image and buffer atomics emulated on devices without them).

  • Marvel's Wolverine (PPSA03671 v01.001.005), by @nydal91, at a96efaa (comment): Linux (PikaOS 4, kernel 7.3.3), AMD Radeon RX 6950 XT (RADV, Mesa 26.3.0). An A/B on main f15df32 with the prerequisites they carry, 300 s runs at APS5_HOST_IMPORT_MIB=5000:

    • Without this PR: 266 deferred write-back failed: BDA access failed ... read-only in the BDA table refusals, 4-byte compute stores into a 1.1 GiB unaligned descriptor view of a 2.5 GiB registered heap, then VK_ERROR_DEVICE_LOST at vkQueueSubmit.
    • With this PR (a96efaa merged with f15df32): 0 refusals, 0 deferred write-back failures and 0 store-page exhaustion faults; 656 frames presented and a clean exit, with the intro rendering through the subway and street scenes.
    • The store-page pool: the intro's wide stores (that 1.1 GiB view, and a 248 MiB descriptor region written back about 110 times) didn't exhaust the default pool.
  • 2687eec, a merge of main 2b31f86 (×10, every agc test), which brings ashwin280802's perf(agc): publish storage-image results into resident heap mirrors #17796 (storage-image results published into resident heap mirrors), merged first, as planned.

Overlaps

Checklist

A shader that stores through FLAT or GLOBAL addresses into a writable
sparse heap mirror was refused as read-only in the BDA table. Granting
Write in the table alone loses the stores: the span is not in the
write-back set, so the bytes never reach guest memory and the next
refresh of the mirror reverts them.

Builds whose shaders store through addresses now add the served spans
of writable heap mirrors to the write-back set before the heap
references are taken, so the table marks them Write and WriteBack diffs
them against the reference, keeping CPU stores made during the
dispatch. Sparse mirrors add only their committed runs. Copies,
read-only mirrors and ranges past the served end keep the refusal.

Co-authored-by: Tharun Balaji K <239791575+sktharunbalaji13-cmd@users.noreply.github.com>
@oneandonlydean

Copy link
Copy Markdown
Collaborator

@EagleBearerYS The mechanism reads correctly for the case in your report: the spans of the writable heap mirrors are added to the write set before takeHeapReferences, WriteBack stores only the bytes that differ from the reference, so a CPU store made during the dispatch survives, sparse heaps are clipped to their committed runs, and copies, read-only heap mirrors, image mirrors and bytes past the served end are still refused. Two questions need an answer before this lands, and one request for the numbers.

  1. WriteBack calls Recorder::NoteWrittenBack(begin, end - begin) for every merged write range of a mirror (GuestBufferMemory.cpp near l.6285), before the diff. The ranges used to be the small declared ones; now each address-storing dispatch notes the whole served span of every writable heap mirror (36 MiB in your measurement) as written back, although only the changed bytes are stored. The recorder uses those notes to decide that a completion label dword was overwritten by a CPU write-back: it counts the label as pending and forces its completion store, and Recorder.hpp warns that an unconditional completion store can land a stale label over memory the game has since reused; the [recorder] write-back-over-label counter is meant to stay at 0. If completion labels can sit inside a heap mirror that a storing build holds, they would now be flagged on every such dispatch. Could you say whether that can happen (and add a test with a label dword inside the span), or note only the runs that actually changed?
  2. The references are taken at upload and the diff runs at write-back. With two storing builds in flight over the same heap region, the second build's reference may lack the first build's stores, so its diff contains them as well and writes them again after the first build's write-back, possibly over a CPU store made in between. Declared writes have the same shape, but the spans here are whole heaps. Is the order of the builds' write-backs and references fixed in a way that rules this out? If so, a one-line note in the code or the description is enough.
  3. The cost applies to every address-storing build whose lease holds writable heap mirrors, including builds whose stores never go near a mirror and which work today: your table gives 32 to 80 ms per dispatch for 36 to 72 MiB. That is more than a frame at 30 fps for each such dispatch, so the number that matters is the one on a real title: how many storing dispatches per frame does the report's title run, and what is the frame time with and without this change (and on a title that works today and holds writable heap mirrors)? You list the title run and the runner results as pending; please attach them. If the follow-up that marks the stored 64 KiB blocks is what makes this affordable, say whether it should land first or together.

@github-actions

github-actions Bot commented Oct 29, 2026 •

Copy link
Copy Markdown

Some comparisons could not be completed because a pull request conflicts with the base branch. Review these shared files manually before concluding that there is no overlap.

Pull request Shared files not compared
PR 862 core/libs/prx/libSceAgcDriver/tests/Recorder.cpp
PR 1368 core/libs/prx/libSceAgcDriver/CMakeLists.txt
core/libs/prx/libSceAgcDriver/tests/Recorder.cpp
PR 1395 core/libs/prx/libSceAgcDriver/CMakeLists.txt
core/libs/prx/libSceAgcDriver/Execution/include/VulkanDevice.hpp
core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
core/libs/prx/libSceAgcDriver/tests/Recorder.cpp
PR 1896 docs/dev/ENVIRONMENT.md
PR 4040 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
PR 4448 core/libs/prx/libSceAgcDriver/Execution/src/GuestMemory.cpp
core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
core/libs/prx/libSceAgcDriver/Graphics/include/GuestBufferMemory.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
core/libs/prx/libSceAgcDriver/tests/BdaResources.cpp
core/libs/prx/libSceAgcDriver/tests/Recorder.cpp
docs/dev/debt/libSceAgcDriver.md
PR 4472 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
docs/dev/ENVIRONMENT.md
PR 4847 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
PR 5371 core/libs/prx/libSceAgcDriver/CMakeLists.txt
core/shader/recompiler/PipelineSpecialization.hpp
PR 5372 core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
core/libs/prx/libSceAgcDriver/tests/BdaResources.cpp
docs/dev/debt/libSceAgcDriver.md
PR 5609 core/libs/prx/libSceAgcDriver/Graphics/include/Recorder.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/Recorder.cpp
core/shader/recompiler/Recompiler.cpp
PR 5925 core/libs/prx/libSceAgcDriver/CMakeLists.txt
core/libs/prx/libSceAgcDriver/Execution/include/VulkanDevice.hpp
core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
core/libs/prx/libSceAgcDriver/tests/Recorder.cpp
core/libs/prx/libSceAgcDriver/tests/execution/PipelineJournal.cpp
docs/dev/debt/libSceAgcDriver.md
PR 6186 core/libs/prx/libSceAgcDriver/CMakeLists.txt
core/libs/prx/libSceAgcDriver/Execution/include/GuestMemory.hpp
core/libs/prx/libSceAgcDriver/Execution/src/GuestMemory.cpp
core/libs/prx/libSceAgcDriver/Graphics/include/GuestBufferMemory.hpp
core/libs/prx/libSceAgcDriver/Graphics/include/Recorder.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
core/libs/prx/libSceAgcDriver/Graphics/src/Recorder.cpp
core/libs/prx/libSceAgcDriver/tests/Recorder.cpp
docs/dev/ENVIRONMENT.md
docs/dev/debt/libSceAgcDriver.md
PR 6188 core/libs/prx/libSceAgcDriver/CMakeLists.txt
core/libs/prx/libSceAgcDriver/Execution/include/GuestMemory.hpp
core/libs/prx/libSceAgcDriver/Execution/include/VulkanDevice.hpp
core/libs/prx/libSceAgcDriver/Execution/src/GuestMemory.cpp
core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
core/libs/prx/libSceAgcDriver/tests/Recorder.cpp
PR 6192 core/libs/prx/libSceAgcDriver/CMakeLists.txt
core/libs/prx/libSceAgcDriver/Execution/include/GuestMemory.hpp
core/libs/prx/libSceAgcDriver/Execution/src/GuestMemory.cpp
core/libs/prx/libSceAgcDriver/Graphics/include/ShaderResources.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp
core/libs/prx/libSceAgcDriver/tests/Recorder.cpp
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 6209 core/libs/prx/libSceAgcDriver/CMakeLists.txt
core/libs/prx/libSceAgcDriver/Execution/include/GuestMemory.hpp
core/libs/prx/libSceAgcDriver/Execution/src/GuestMemory.cpp
core/libs/prx/libSceAgcDriver/tests/Recorder.cpp
PR 6280 core/libs/prx/libSceAgcDriver/CMakeLists.txt
core/shader/recompiler/PipelineSpecialization.hpp
docs/dev/debt/libSceAgcDriver.md
PR 6340 core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp
PR 6412 core/libs/prx/libSceAgcDriver/CMakeLists.txt
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
core/shader/recompiler/Recompiler.cpp
docs/dev/debt/libSceAgcDriver.md
PR 6481 core/libs/prx/libSceAgcDriver/CMakeLists.txt
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 6488 core/shader/recompiler/Recompiler.cpp
PR 6808 core/libs/prx/libSceAgcDriver/CMakeLists.txt
docs/dev/debt/libSceAgcDriver.md
PR 6924 core/shader/recompiler/Recompiler.cpp
docs/dev/ENVIRONMENT.md
PR 7002 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
core/libs/prx/libSceAgcDriver/Graphics/include/ShaderResources.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp
PR 7085 core/libs/prx/libSceAgcDriver/CMakeLists.txt
core/libs/prx/libSceAgcDriver/tests/Recorder.cpp
core/shader/recompiler/PipelineSpecialization.hpp
PR 7256 docs/dev/debt/libSceAgcDriver.md
PR 7275 core/libs/prx/libSceAgcDriver/CMakeLists.txt
docs/dev/ENVIRONMENT.md
PR 7392 core/shader/recompiler/SpirvBackend/include/SpirvBackend/SpirvEmitterState.hpp
PR 7668 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 8246 core/libs/prx/libSceAgcDriver/CMakeLists.txt
docs/dev/ENVIRONMENT.md
PR 8592 core/libs/prx/libSceAgcDriver/CMakeLists.txt
docs/dev/debt/libSceAgcDriver.md
PR 9289 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
core/libs/prx/libSceAgcDriver/Graphics/include/Recorder.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
core/libs/prx/libSceAgcDriver/Graphics/src/Recorder.cpp
core/libs/prx/libSceAgcDriver/tests/Recorder.cpp
docs/dev/ENVIRONMENT.md
docs/dev/debt/libSceAgcDriver.md
PR 9318 core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp
PR 9335 docs/dev/debt/libSceAgcDriver.md
PR 9345 docs/dev/ENVIRONMENT.md
PR 9356 core/libs/prx/libSceAgcDriver/Execution/include/VulkanDevice.hpp
core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
core/libs/prx/libSceAgcDriver/Graphics/src/Recorder.cpp
core/shader/recompiler/Recompiler.cpp
core/shader/recompiler/SpirvBackend/include/SpirvBackend/SpirvEmitterState.hpp
docs/dev/ENVIRONMENT.md
docs/dev/debt/libSceAgcDriver.md
PR 9387 core/libs/prx/libSceAgcDriver/Execution/include/VulkanDevice.hpp
core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
core/libs/prx/libSceAgcDriver/Graphics/src/Recorder.cpp
core/shader/recompiler/Recompiler.cpp
core/shader/recompiler/SpirvBackend/include/SpirvBackend/SpirvEmitterState.hpp
docs/dev/ENVIRONMENT.md
docs/dev/debt/libSceAgcDriver.md
PR 9508 core/libs/prx/libSceAgcDriver/CMakeLists.txt
core/libs/prx/libSceAgcDriver/Execution/include/GuestMemory.hpp
core/libs/prx/libSceAgcDriver/Execution/include/VulkanDevice.hpp
core/libs/prx/libSceAgcDriver/Execution/src/GuestMemory.cpp
core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
core/libs/prx/libSceAgcDriver/Graphics/include/BdaResources.hpp
core/libs/prx/libSceAgcDriver/Graphics/include/GuestBufferMemory.hpp
core/libs/prx/libSceAgcDriver/Graphics/include/Recorder.hpp
core/libs/prx/libSceAgcDriver/Graphics/include/ShaderResources.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/BdaResources.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/BdaResources.cpp
core/libs/prx/libSceAgcDriver/tests/Recorder.cpp
core/libs/prx/libSceAgcDriver/tests/cmake/agc_driver_pipeline_journal_tests.cmake
core/libs/prx/libSceAgcDriver/tests/execution/PipelineJournal.cpp
core/shader/recompiler/PipelineSpecialization.hpp
core/shader/recompiler/Recompiler.cpp
core/shader/recompiler/SpirvBackend/include/SpirvBackend/SpirvEmitterState.hpp
core/shader/recompiler/SpirvBackend/src/SpirvBdaLookup.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 9712 core/libs/prx/libSceAgcDriver/Graphics/include/Recorder.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/Recorder.cpp
core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp
core/libs/prx/libSceAgcDriver/tests/Recorder.cpp
docs/dev/ENVIRONMENT.md
PR 9748 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/GuestBufferMemory.cpp
core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp
core/libs/prx/libSceAgcDriver/tests/Recorder.cpp
core/shader/recompiler/Recompiler.cpp
docs/dev/ENVIRONMENT.md
PR 9895 docs/dev/debt/libSceAgcDriver.md
PR 9897 core/libs/prx/libSceAgcDriver/Graphics/include/ShaderResources.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp
core/shader/recompiler/Recompiler.cpp
PR 9915 docs/dev/debt/libSceAgcDriver.md
PR 9950 docs/dev/debt/libSceAgcDriver.md
PR 10193 core/libs/prx/libSceAgcDriver/CMakeLists.txt
core/libs/prx/libSceAgcDriver/Execution/include/GuestMemory.hpp
core/libs/prx/libSceAgcDriver/Execution/include/VulkanDevice.hpp
core/libs/prx/libSceAgcDriver/Execution/src/GuestMemory.cpp
core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
core/libs/prx/libSceAgcDriver/Graphics/include/BdaResources.hpp
core/libs/prx/libSceAgcDriver/Graphics/include/GuestBufferMemory.hpp
core/libs/prx/libSceAgcDriver/Graphics/include/Recorder.hpp
core/libs/prx/libSceAgcDriver/Graphics/include/ShaderResources.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/BdaResources.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/BdaResources.cpp
core/libs/prx/libSceAgcDriver/tests/Recorder.cpp
core/libs/prx/libSceAgcDriver/tests/cmake/agc_driver_pipeline_journal_tests.cmake
core/libs/prx/libSceAgcDriver/tests/execution/PipelineJournal.cpp
core/shader/recompiler/PipelineSpecialization.hpp
core/shader/recompiler/Recompiler.cpp
core/shader/recompiler/SpirvBackend/include/SpirvBackend/SpirvEmitterState.hpp
core/shader/recompiler/SpirvBackend/src/SpirvBdaLookup.cpp
docs/dev/ENVIRONMENT.md
docs/dev/debt/libSceAgcDriver.md
PR 10351 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
core/shader/recompiler/Recompiler.cpp
core/shader/recompiler/SpirvBackend/include/SpirvBackend/SpirvEmitterState.hpp
PR 10359 core/libs/prx/libSceAgcDriver/CMakeLists.txt
core/shader/recompiler/Recompiler.cpp
docs/dev/debt/libSceAgcDriver.md
PR 10442 core/libs/prx/libSceAgcDriver/Execution/include/VulkanDevice.hpp
core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
core/libs/prx/libSceAgcDriver/Graphics/include/Recorder.hpp
core/libs/prx/libSceAgcDriver/Graphics/include/ShaderResources.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/Recorder.cpp
core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp
core/libs/prx/libSceAgcDriver/tests/Recorder.cpp
docs/dev/ENVIRONMENT.md
PR 10492 core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp
PR 10497 core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp
PR 10652 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
core/shader/recompiler/Recompiler.cpp
core/shader/recompiler/SpirvBackend/include/SpirvBackend/SpirvEmitterState.hpp
PR 10743 core/libs/prx/libSceAgcDriver/Graphics/include/ShaderResources.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp
docs/dev/debt/libSceAgcDriver.md
PR 10867 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
PR 10894 core/libs/prx/libSceAgcDriver/Graphics/include/ShaderResources.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp
docs/dev/ENVIRONMENT.md
PR 11435 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
docs/dev/ENVIRONMENT.md
PR 11436 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
docs/dev/ENVIRONMENT.md
PR 11444 core/libs/prx/libSceAgcDriver/Graphics/include/Recorder.hpp
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 11483 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
core/shader/recompiler/Recompiler.cpp
core/shader/recompiler/SpirvBackend/include/SpirvBackend/SpirvEmitterState.hpp
PR 11551 core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp
core/shader/recompiler/PipelineSpecialization.hpp
core/shader/recompiler/Recompiler.cpp
docs/dev/debt/libSceAgcDriver.md
PR 11587 core/libs/prx/libSceAgcDriver/Graphics/src/Recorder.cpp
docs/dev/debt/libSceAgcDriver.md
PR 11825 docs/dev/debt/libSceAgcDriver.md
PR 12157 core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
PR 12324 core/libs/prx/libSceAgcDriver/CMakeLists.txt
core/shader/recompiler/Recompiler.cpp
docs/dev/ENVIRONMENT.md
PR 12544 docs/dev/ENVIRONMENT.md
PR 12568 docs/dev/debt/libSceAgcDriver.md
PR 12575 core/libs/prx/libSceAgcDriver/Graphics/include/ShaderResources.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp
PR 12746 core/libs/prx/libSceAgcDriver/CMakeLists.txt
docs/dev/ENVIRONMENT.md
PR 12828 core/libs/prx/libSceAgcDriver/CMakeLists.txt
core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
core/shader/recompiler/Recompiler.cpp
PR 12849 docs/dev/ENVIRONMENT.md
PR 12863 docs/dev/ENVIRONMENT.md
PR 12904 docs/dev/debt/libSceAgcDriver.md
PR 12944 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
core/libs/prx/libSceAgcDriver/Graphics/include/GuestBufferMemory.hpp
core/libs/prx/libSceAgcDriver/Graphics/include/ShaderResources.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp
core/shader/recompiler/Recompiler.cpp
core/shader/recompiler/SpirvBackend/include/SpirvBackend/SpirvEmitterState.hpp
PR 12994 core/libs/prx/libSceAgcDriver/CMakeLists.txt
PR 13147 docs/dev/debt/libSceAgcDriver.md
PR 13148 core/libs/prx/libSceAgcDriver/CMakeLists.txt
core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
PR 13796 core/libs/prx/libSceAgcDriver/Graphics/include/ShaderResources.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp
PR 13809 core/libs/prx/libSceAgcDriver/Graphics/include/Recorder.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/Recorder.cpp
core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp
core/libs/prx/libSceAgcDriver/tests/Recorder.cpp
docs/dev/ENVIRONMENT.md
docs/dev/debt/libSceAgcDriver.md
PR 13863 core/libs/prx/libSceAgcDriver/Execution/include/VulkanDevice.hpp
core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
core/libs/prx/libSceAgcDriver/Graphics/include/Recorder.hpp
core/libs/prx/libSceAgcDriver/Graphics/include/ShaderResources.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
core/libs/prx/libSceAgcDriver/Graphics/src/Recorder.cpp
core/libs/prx/libSceAgcDriver/tests/Recorder.cpp
docs/dev/ENVIRONMENT.md
docs/dev/debt/libSceAgcDriver.md
PR 13920 core/libs/prx/libSceAgcDriver/Execution/include/VulkanDevice.hpp
core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
core/libs/prx/libSceAgcDriver/Graphics/include/Recorder.hpp
core/libs/prx/libSceAgcDriver/Graphics/include/ShaderResources.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
core/libs/prx/libSceAgcDriver/Graphics/src/Recorder.cpp
core/libs/prx/libSceAgcDriver/tests/Recorder.cpp
docs/dev/ENVIRONMENT.md
docs/dev/debt/libSceAgcDriver.md
PR 13928 core/libs/prx/libSceAgcDriver/CMakeLists.txt
core/libs/prx/libSceAgcDriver/Execution/include/GuestMemory.hpp
core/libs/prx/libSceAgcDriver/Execution/include/VulkanDevice.hpp
core/libs/prx/libSceAgcDriver/Execution/src/GuestMemory.cpp
core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
core/libs/prx/libSceAgcDriver/Graphics/include/BdaResources.hpp
core/libs/prx/libSceAgcDriver/Graphics/include/GuestBufferMemory.hpp
core/libs/prx/libSceAgcDriver/Graphics/include/Recorder.hpp
core/libs/prx/libSceAgcDriver/Graphics/include/ShaderResources.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/BdaResources.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/BdaResources.cpp
core/libs/prx/libSceAgcDriver/tests/Recorder.cpp
core/libs/prx/libSceAgcDriver/tests/cmake/agc_driver_pipeline_journal_tests.cmake
core/libs/prx/libSceAgcDriver/tests/execution/PipelineJournal.cpp
core/shader/recompiler/PipelineSpecialization.hpp
core/shader/recompiler/Recompiler.cpp
core/shader/recompiler/SpirvBackend/include/SpirvBackend/SpirvEmitterState.hpp
core/shader/recompiler/SpirvBackend/src/SpirvBdaLookup.cpp
docs/dev/ENVIRONMENT.md
docs/dev/debt/libSceAgcDriver.md
PR 13929 core/libs/prx/libSceAgcDriver/CMakeLists.txt
core/libs/prx/libSceAgcDriver/Execution/include/GuestMemory.hpp
core/libs/prx/libSceAgcDriver/Execution/include/VulkanDevice.hpp
core/libs/prx/libSceAgcDriver/Execution/src/GuestMemory.cpp
core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
core/libs/prx/libSceAgcDriver/Graphics/include/BdaResources.hpp
core/libs/prx/libSceAgcDriver/Graphics/include/GuestBufferMemory.hpp
core/libs/prx/libSceAgcDriver/Graphics/include/Recorder.hpp
core/libs/prx/libSceAgcDriver/Graphics/include/ShaderResources.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/BdaResources.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/BdaResources.cpp
core/libs/prx/libSceAgcDriver/tests/Recorder.cpp
core/libs/prx/libSceAgcDriver/tests/cmake/agc_driver_pipeline_journal_tests.cmake
core/libs/prx/libSceAgcDriver/tests/execution/PipelineJournal.cpp
core/shader/recompiler/PipelineSpecialization.hpp
core/shader/recompiler/Recompiler.cpp
core/shader/recompiler/SpirvBackend/include/SpirvBackend/SpirvEmitterState.hpp
core/shader/recompiler/SpirvBackend/src/SpirvBdaLookup.cpp
docs/dev/ENVIRONMENT.md
docs/dev/debt/libSceAgcDriver.md
PR 14032 core/libs/prx/libSceAgcDriver/Graphics/include/ShaderResources.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp
core/shader/recompiler/Recompiler.cpp
PR 14217 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
core/shader/recompiler/Recompiler.cpp
core/shader/recompiler/SpirvBackend/include/SpirvBackend/SpirvEmitterState.hpp
PR 14218 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
core/shader/recompiler/Recompiler.cpp
core/shader/recompiler/SpirvBackend/include/SpirvBackend/SpirvEmitterState.hpp
PR 14260 core/shader/recompiler/SpirvBackend/include/SpirvBackend/SpirvEmitterState.hpp
docs/dev/ENVIRONMENT.md
PR 14262 core/libs/prx/libSceAgcDriver/Graphics/include/ShaderResources.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp
core/libs/prx/libSceAgcDriver/tests/Recorder.cpp
docs/dev/ENVIRONMENT.md
PR 14473 core/libs/prx/libSceAgcDriver/Execution/src/GuestMemory.cpp
PR 14853 core/shader/recompiler/Recompiler.cpp
PR 14871 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp
core/shader/recompiler/Recompiler.cpp
PR 14944 core/libs/prx/libSceAgcDriver/Graphics/include/ShaderResources.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp
core/shader/recompiler/Recompiler.cpp
docs/dev/debt/libSceAgcDriver.md
PR 14964 core/shader/recompiler/PipelineSpecialization.hpp
docs/dev/debt/libSceAgcDriver.md
PR 15058 core/libs/prx/libSceAgcDriver/Execution/include/GuestMemory.hpp
core/libs/prx/libSceAgcDriver/Execution/src/GuestMemory.cpp
PR 15136 core/libs/prx/libSceAgcDriver/Execution/include/GuestMemory.hpp
core/libs/prx/libSceAgcDriver/Execution/src/GuestMemory.cpp
core/libs/prx/libSceAgcDriver/Graphics/src/Recorder.cpp
core/libs/prx/libSceAgcDriver/tests/Recorder.cpp
docs/dev/debt/libSceAgcDriver.md
PR 15297 core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
PR 15343 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
core/shader/recompiler/Recompiler.cpp
core/shader/recompiler/SpirvBackend/include/SpirvBackend/SpirvEmitterState.hpp
PR 15456 core/libs/prx/libSceAgcDriver/CMakeLists.txt
docs/dev/ENVIRONMENT.md
docs/dev/debt/libSceAgcDriver.md
PR 15505 core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
PR 15529 core/libs/prx/libSceAgcDriver/Graphics/include/ShaderResources.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp
core/libs/prx/libSceAgcDriver/tests/Recorder.cpp
docs/dev/ENVIRONMENT.md
docs/dev/debt/libSceAgcDriver.md
PR 15548 core/libs/prx/libSceAgcDriver/Execution/include/VulkanDevice.hpp
core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
core/libs/prx/libSceAgcDriver/Graphics/include/Recorder.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/Recorder.cpp
core/shader/recompiler/Recompiler.cpp
core/shader/recompiler/SpirvBackend/include/SpirvBackend/SpirvEmitterState.hpp
docs/dev/ENVIRONMENT.md
docs/dev/debt/libSceAgcDriver.md
PR 15555 core/shader/recompiler/SpirvBackend/include/SpirvBackend/SpirvEmitterState.hpp
PR 15570 core/libs/prx/libSceAgcDriver/Graphics/include/Recorder.hpp
core/libs/prx/libSceAgcDriver/Graphics/include/ShaderResources.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/BdaResources.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/Recorder.cpp
docs/dev/ENVIRONMENT.md
PR 15572 core/libs/prx/libSceAgcDriver/Graphics/include/Recorder.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/Recorder.cpp
core/libs/prx/libSceAgcDriver/tests/Recorder.cpp
docs/dev/ENVIRONMENT.md
PR 15621 core/libs/prx/libSceAgcDriver/Graphics/include/GuestBufferMemory.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
docs/dev/debt/libSceAgcDriver.md
PR 15845 docs/dev/debt/libSceAgcDriver.md
PR 15936 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 16217 docs/dev/ENVIRONMENT.md
PR 16260 docs/dev/debt/libSceAgcDriver.md
PR 16354 docs/dev/ENVIRONMENT.md
PR 16371 docs/dev/ENVIRONMENT.md
PR 16372 core/libs/prx/libSceAgcDriver/Execution/src/GuestMemory.cpp
docs/dev/ENVIRONMENT.md
PR 16391 core/shader/recompiler/Recompiler.cpp
PR 16427 core/libs/prx/libSceAgcDriver/Graphics/include/Recorder.hpp
docs/dev/ENVIRONMENT.md
docs/dev/debt/libSceAgcDriver.md
PR 16571 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
core/libs/prx/libSceAgcDriver/tests/BdaShader.cpp
core/libs/prx/libSceAgcDriver/tests/BdaShader.hpp
PR 16793 docs/dev/ENVIRONMENT.md
PR 16796 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
PR 16812 core/shader/recompiler/SpirvBackend/include/SpirvBackend/SpirvEmitterState.hpp
PR 16814 core/shader/recompiler/SpirvBackend/include/SpirvBackend/SpirvEmitterState.hpp
PR 16831 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
core/libs/prx/libSceAgcDriver/Graphics/include/GuestBufferMemory.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp
core/libs/prx/libSceAgcDriver/tests/Recorder.cpp
docs/dev/ENVIRONMENT.md
PR 16879 core/libs/prx/libSceAgcDriver/Execution/src/GuestMemory.cpp
core/libs/prx/libSceAgcDriver/Graphics/include/Recorder.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/Recorder.cpp
core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp
core/libs/prx/libSceAgcDriver/tests/Recorder.cpp
PR 16935 core/libs/prx/libSceAgcDriver/Graphics/include/ShaderResources.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp
core/shader/recompiler/PipelineSpecialization.hpp
core/shader/recompiler/Recompiler.cpp
PR 16953 core/libs/prx/libSceAgcDriver/CMakeLists.txt
core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
core/libs/prx/libSceAgcDriver/Graphics/include/ShaderResources.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp
docs/dev/ENVIRONMENT.md
PR 17056 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
core/shader/recompiler/Recompiler.cpp
core/shader/recompiler/SpirvBackend/include/SpirvBackend/SpirvEmitterState.hpp
PR 17259 docs/dev/ENVIRONMENT.md
PR 17261 docs/dev/ENVIRONMENT.md
PR 17555 docs/dev/ENVIRONMENT.md
PR 17556 docs/dev/ENVIRONMENT.md
PR 17557 docs/dev/ENVIRONMENT.md
PR 17558 docs/dev/ENVIRONMENT.md
PR 17611 core/libs/prx/libSceAgcDriver/Execution/include/VulkanDevice.hpp
core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
core/libs/prx/libSceAgcDriver/Graphics/include/Recorder.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/Recorder.cpp
core/shader/recompiler/Recompiler.cpp
core/shader/recompiler/SpirvBackend/include/SpirvBackend/SpirvEmitterState.hpp
docs/dev/ENVIRONMENT.md
PR 17719 docs/dev/ENVIRONMENT.md
PR 17729 docs/dev/ENVIRONMENT.md
PR 17943 core/libs/prx/libSceAgcDriver/CMakeLists.txt
core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
core/libs/prx/libSceAgcDriver/Graphics/include/Recorder.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/Recorder.cpp
core/libs/prx/libSceAgcDriver/tests/Recorder.cpp
docs/dev/ENVIRONMENT.md
docs/dev/debt/libSceAgcDriver.md
PR 18029 core/libs/prx/libSceAgcDriver/CMakeLists.txt
core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
core/libs/prx/libSceAgcDriver/Graphics/include/Recorder.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/Recorder.cpp
core/libs/prx/libSceAgcDriver/tests/Recorder.cpp
docs/dev/ENVIRONMENT.md
docs/dev/debt/libSceAgcDriver.md
PR 18082 core/libs/prx/libSceAgcDriver/CMakeLists.txt
core/libs/prx/libSceAgcDriver/Execution/include/VulkanDevice.hpp
core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
core/libs/prx/libSceAgcDriver/tests/Recorder.cpp
docs/dev/ENVIRONMENT.md
docs/dev/debt/libSceAgcDriver.md
PR 18106 core/shader/recompiler/SpirvBackend/include/SpirvBackend/SpirvEmitterState.hpp
PR 18107 core/shader/recompiler/SpirvBackend/include/SpirvBackend/SpirvEmitterState.hpp
PR 18139 docs/dev/debt/libSceAgcDriver.md
PR 18173 core/libs/prx/libSceAgcDriver/CMakeLists.txt
core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
core/libs/prx/libSceAgcDriver/Graphics/include/Recorder.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
core/libs/prx/libSceAgcDriver/Graphics/src/Recorder.cpp
core/libs/prx/libSceAgcDriver/tests/Recorder.cpp
docs/dev/ENVIRONMENT.md
PR 18177 docs/dev/debt/libSceAgcDriver.md
PR 18185 core/libs/prx/libSceAgcDriver/CMakeLists.txt
core/libs/prx/libSceAgcDriver/Graphics/include/Recorder.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/Recorder.cpp
core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp
PR 18226 docs/dev/ENVIRONMENT.md
PR 18293 core/libs/prx/libSceAgcDriver/Execution/src/GuestMemory.cpp
docs/dev/ENVIRONMENT.md
PR 18390 core/libs/prx/libSceAgcDriver/Execution/src/GuestMemory.cpp
core/libs/prx/libSceAgcDriver/Graphics/include/Recorder.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/Recorder.cpp
core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp
core/libs/prx/libSceAgcDriver/tests/Recorder.cpp
docs/dev/debt/libSceAgcDriver.md
PR 18693 docs/dev/ENVIRONMENT.md
PR 18829 core/libs/prx/libSceAgcDriver/CMakeLists.txt
core/libs/prx/libSceAgcDriver/Execution/include/VulkanDevice.hpp
core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
docs/dev/ENVIRONMENT.md
PR 19096 core/shader/recompiler/PipelineSpecialization.hpp
core/shader/recompiler/SpirvBackend/include/SpirvBackend/SpirvEmitterState.hpp
PR 19130 docs/dev/ENVIRONMENT.md
PR 19351 core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
PR 19462 docs/dev/debt/libSceAgcDriver.md
PR 19557 core/libs/prx/libSceAgcDriver/CMakeLists.txt
core/libs/prx/libSceAgcDriver/Execution/include/VulkanDevice.hpp
core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
PR 19610 core/libs/prx/libSceAgcDriver/CMakeLists.txt
docs/dev/debt/libSceAgcDriver.md
PR 19686 core/libs/prx/libSceAgcDriver/tests/Recorder.cpp
PR 19697 core/libs/prx/libSceAgcDriver/CMakeLists.txt
core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
core/libs/prx/libSceAgcDriver/Graphics/include/Recorder.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/Recorder.cpp
core/libs/prx/libSceAgcDriver/tests/Recorder.cpp
docs/dev/ENVIRONMENT.md
PR 19722 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
core/libs/prx/libSceAgcDriver/Graphics/include/ShaderResources.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp
PR 19821 docs/dev/debt/libSceAgcDriver.md
PR 19852 core/libs/prx/libSceAgcDriver/Graphics/include/ShaderResources.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp
core/shader/recompiler/Recompiler.cpp
PR 19967 core/shader/recompiler/Recompiler.cpp
docs/dev/ENVIRONMENT.md
PR 19999 docs/dev/debt/libSceAgcDriver.md
PR 20001 docs/dev/debt/libSceAgcDriver.md
PR 20010 core/shader/recompiler/Recompiler.cpp
docs/dev/debt/libSceAgcDriver.md
PR 20030 core/libs/prx/libSceAgcDriver/CMakeLists.txt
core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
core/shader/recompiler/Recompiler.cpp
PR 20041 core/libs/prx/libSceAgcDriver/Execution/include/GuestMemory.hpp
core/libs/prx/libSceAgcDriver/Execution/src/GuestMemory.cpp
core/libs/prx/libSceAgcDriver/Graphics/include/ShaderResources.hpp
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/Recorder.cpp
docs/dev/ENVIRONMENT.md
PR 20072 docs/dev/debt/libSceAgcDriver.md
PR 20084 core/libs/prx/libSceAgcDriver/Execution/src/GuestMemory.cpp
docs/dev/debt/libSceAgcDriver.md
PR 20085 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
PR 20111 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
core/shader/recompiler/Recompiler.cpp
PR 20126 core/libs/prx/libSceAgcDriver/Execution/src/GuestMemory.cpp
PR 20130 core/shader/recompiler/Recompiler.cpp
PR 20153 docs/dev/debt/libSceAgcDriver.md
PR 20172 core/libs/prx/libSceAgcDriver/Execution/include/VulkanDevice.hpp
core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
core/libs/prx/libSceAgcDriver/Graphics/include/Recorder.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/Recorder.cpp
docs/dev/ENVIRONMENT.md
PR 20186 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
core/libs/prx/libSceAgcDriver/Graphics/include/Recorder.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/Recorder.cpp
core/libs/prx/libSceAgcDriver/tests/Recorder.cpp
docs/dev/debt/libSceAgcDriver.md
PR 20248 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp
core/shader/recompiler/Recompiler.cpp
docs/dev/ENVIRONMENT.md
PR 20315 core/libs/prx/libSceAgcDriver/Execution/include/GuestMemory.hpp
core/libs/prx/libSceAgcDriver/Execution/src/GuestMemory.cpp
core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
core/libs/prx/libSceAgcDriver/Graphics/include/GuestBufferMemory.hpp
core/libs/prx/libSceAgcDriver/Graphics/include/Recorder.hpp
core/libs/prx/libSceAgcDriver/Graphics/include/ShaderResources.hpp
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/Recorder.cpp
core/libs/prx/libSceAgcDriver/tests/execution/PipelineJournal.cpp
docs/dev/ENVIRONMENT.md
PR 20344 docs/dev/ENVIRONMENT.md
PR 20518 docs/dev/ENVIRONMENT.md
PR 20519 core/libs/prx/libSceAgcDriver/CMakeLists.txt
core/libs/prx/libSceAgcDriver/Execution/include/VulkanDevice.hpp
core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
core/libs/prx/libSceAgcDriver/Graphics/include/BdaResources.hpp
core/libs/prx/libSceAgcDriver/Graphics/include/Recorder.hpp
core/libs/prx/libSceAgcDriver/Graphics/include/ShaderResources.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/BdaResources.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/cmake/agc_driver_pipeline_journal_tests.cmake
core/libs/prx/libSceAgcDriver/tests/execution/PipelineJournal.cpp
core/shader/recompiler/BdaAbi.hpp
core/shader/recompiler/Recompiler.cpp
core/shader/recompiler/SpirvBackend/include/SpirvBackend/SpirvEmitterState.hpp
docs/dev/ENVIRONMENT.md
PR 20548 docs/dev/debt/libSceAgcDriver.md
PR 20580 core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
PR 20728 core/libs/prx/libSceAgcDriver/Graphics/include/ShaderResources.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp
PR 20831 core/libs/prx/libSceAgcDriver/tests/Recorder.cpp
PR 20899 core/libs/prx/libSceAgcDriver/CMakeLists.txt
PR 21059 core/libs/prx/libSceAgcDriver/Execution/include/VulkanDevice.hpp
core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
PR 21087 core/libs/prx/libSceAgcDriver/CMakeLists.txt
docs/dev/ENVIRONMENT.md
PR 21155 core/libs/prx/libSceAgcDriver/Execution/include/GuestMemory.hpp
core/libs/prx/libSceAgcDriver/Execution/src/GuestMemory.cpp
PR 21180 core/shader/recompiler/Recompiler.cpp
PR 21199 core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp
PR 21211 core/libs/prx/libSceAgcDriver/CMakeLists.txt
core/libs/prx/libSceAgcDriver/Execution/include/VulkanDevice.hpp
core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
docs/dev/ENVIRONMENT.md
PR 21225 docs/dev/ENVIRONMENT.md
PR 21238 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
core/libs/prx/libSceAgcDriver/Graphics/include/ShaderResources.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp
core/libs/prx/libSceAgcDriver/tests/Recorder.cpp
docs/dev/ENVIRONMENT.md
docs/dev/debt/libSceAgcDriver.md
PR 21303 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
docs/dev/ENVIRONMENT.md
PR 21460 docs/dev/ENVIRONMENT.md
PR 21499 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
PR 21528 docs/dev/debt/libSceAgcDriver.md
PR 21649 core/libs/prx/libSceAgcDriver/Graphics/include/GuestBufferMemory.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
docs/dev/ENVIRONMENT.md
docs/dev/debt/libSceAgcDriver.md
PR 21656 core/libs/prx/libSceAgcDriver/tests/Recorder.cpp
PR 21669 core/libs/prx/libSceAgcDriver/Graphics/src/Recorder.cpp
PR 21683 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
PR 21746 docs/dev/ENVIRONMENT.md
PR 21773 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
PR 21776 core/shader/recompiler/Recompiler.cpp
PR 21780 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
core/libs/prx/libSceAgcDriver/Graphics/include/Recorder.hpp
core/libs/prx/libSceAgcDriver/Graphics/include/ShaderResources.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/Recorder.cpp
core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp
core/libs/prx/libSceAgcDriver/tests/Recorder.cpp
PR 21923 core/libs/prx/libSceAgcDriver/Execution/include/VulkanDevice.hpp
core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
core/libs/prx/libSceAgcDriver/Graphics/include/Recorder.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/Recorder.cpp
core/libs/prx/libSceAgcDriver/tests/Recorder.cpp
PR 21960 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
docs/dev/ENVIRONMENT.md
PR 21963 docs/dev/ENVIRONMENT.md
PR 21965 core/libs/prx/libSceAgcDriver/tests/Recorder.cpp
PR 22001 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
PR 22018 core/libs/prx/libSceAgcDriver/tests/Recorder.cpp
PR 22025 core/libs/prx/libSceAgcDriver/Execution/include/VulkanDevice.hpp
core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
docs/dev/ENVIRONMENT.md
PR 22028 core/libs/prx/libSceAgcDriver/Execution/include/GuestMemory.hpp
core/libs/prx/libSceAgcDriver/Execution/src/GuestMemory.cpp
docs/dev/debt/libSceAgcDriver.md
PR 22029 core/libs/prx/libSceAgcDriver/Execution/include/GuestMemory.hpp
core/libs/prx/libSceAgcDriver/Execution/src/GuestMemory.cpp
docs/dev/debt/libSceAgcDriver.md
PR 22034 core/shader/recompiler/SpirvBackend/include/SpirvBackend/SpirvEmitterState.hpp
PR 22062 core/libs/prx/libSceAgcDriver/Execution/include/GuestMemory.hpp
core/libs/prx/libSceAgcDriver/Execution/src/GuestMemory.cpp
docs/dev/debt/libSceAgcDriver.md
PR 22063 core/shader/recompiler/Recompiler.cpp
PR 22065 core/libs/prx/libSceAgcDriver/Graphics/include/Recorder.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/Recorder.cpp
core/libs/prx/libSceAgcDriver/tests/Recorder.cpp
PR 22071 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
core/shader/recompiler/Recompiler.cpp
core/shader/recompiler/SpirvBackend/include/SpirvBackend/SpirvEmitterState.hpp
docs/dev/ENVIRONMENT.md
PR 22075 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
docs/dev/ENVIRONMENT.md
PR 22140 docs/dev/debt/libSceAgcDriver.md
PR 22156 core/libs/prx/libSceAgcDriver/Execution/include/GuestMemory.hpp
core/libs/prx/libSceAgcDriver/Execution/src/GuestMemory.cpp
PR 22190 core/libs/prx/libSceAgcDriver/CMakeLists.txt
core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
core/libs/prx/libSceAgcDriver/Graphics/include/Recorder.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
core/libs/prx/libSceAgcDriver/Graphics/src/Recorder.cpp
core/libs/prx/libSceAgcDriver/tests/Recorder.cpp
docs/dev/ENVIRONMENT.md
PR 22251 core/shader/recompiler/Recompiler.cpp
PR 22306 core/libs/prx/libSceAgcDriver/Execution/include/GuestMemory.hpp
core/libs/prx/libSceAgcDriver/Execution/src/GuestMemory.cpp
core/libs/prx/libSceAgcDriver/tests/Recorder.cpp
PR 22328 core/shader/recompiler/Recompiler.cpp
PR 22411 docs/dev/ENVIRONMENT.md
PR 22424 core/libs/prx/libSceAgcDriver/CMakeLists.txt
core/libs/prx/libSceAgcDriver/Execution/include/VulkanDevice.hpp
core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
core/libs/prx/libSceAgcDriver/Graphics/include/BdaResources.hpp
core/libs/prx/libSceAgcDriver/Graphics/include/Recorder.hpp
core/libs/prx/libSceAgcDriver/Graphics/include/ShaderResources.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/BdaResources.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/shader/recompiler/BdaAbi.hpp
core/shader/recompiler/Recompiler.cpp
core/shader/recompiler/SpirvBackend/include/SpirvBackend/SpirvEmitterState.hpp
docs/dev/ENVIRONMENT.md
PR 22434 core/libs/prx/libSceAgcDriver/CMakeLists.txt
core/libs/prx/libSceAgcDriver/Execution/include/GuestMemory.hpp
core/libs/prx/libSceAgcDriver/Execution/src/GuestMemory.cpp
docs/dev/ENVIRONMENT.md
docs/dev/debt/libSceAgcDriver.md
PR 22439 core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp
core/shader/recompiler/Recompiler.cpp
core/shader/recompiler/SpirvBackend/include/SpirvBackend/SpirvEmitterState.hpp
PR 22446 core/shader/recompiler/SpirvBackend/include/SpirvBackend/SpirvEmitterState.hpp
PR 22493 core/libs/prx/libSceAgcDriver/CMakeLists.txt
core/libs/prx/libSceAgcDriver/tests/Recorder.cpp
core/shader/recompiler/Recompiler.cpp
docs/dev/ENVIRONMENT.md
PR 22531 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
PR 22546 core/libs/prx/libSceAgcDriver/CMakeLists.txt
docs/dev/ENVIRONMENT.md
PR 22550 core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
PR 22628 core/shader/recompiler/PipelineSpecialization.hpp
core/shader/recompiler/Recompiler.cpp
PR 22647 core/libs/prx/libSceAgcDriver/CMakeLists.txt
core/libs/prx/libSceAgcDriver/Execution/include/GuestMemory.hpp
core/libs/prx/libSceAgcDriver/Execution/include/VulkanDevice.hpp
core/libs/prx/libSceAgcDriver/Execution/src/GuestMemory.cpp
core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
core/libs/prx/libSceAgcDriver/Graphics/include/GuestBufferMemory.hpp
core/libs/prx/libSceAgcDriver/Graphics/include/Recorder.hpp
core/libs/prx/libSceAgcDriver/Graphics/include/ShaderResources.hpp
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/shader/recompiler/Recompiler.cpp
docs/dev/ENVIRONMENT.md
docs/dev/debt/libSceAgcDriver.md
PR 22690 core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp
core/shader/recompiler/Recompiler.cpp
PR 22697 core/libs/prx/libSceAgcDriver/CMakeLists.txt
core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
core/libs/prx/libSceAgcDriver/Graphics/include/Recorder.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
core/libs/prx/libSceAgcDriver/Graphics/src/Recorder.cpp
core/libs/prx/libSceAgcDriver/tests/Recorder.cpp
docs/dev/ENVIRONMENT.md
docs/dev/debt/libSceAgcDriver.md
Report truncated: 144 more lines omitted.

… back

WriteBack noted every merged write range of a mirror as written back
before the diff. With the served spans of writable heap mirrors in the
write set, a dispatch that stores through addresses noted the whole heap,
up to 36 MiB, although only the changed bytes were stored. A completion
label anywhere in that heap was then counted pending, its completion
store forced, and the write-back counted as one over a tracked label.

For heap mirror ranges of an address-storing build, declared write ranges
are still noted whole, and the rest is noted only for the runs
WriteChanged stored. The recorder joins those runs across gaps that hold
no tracked label, so a scattered store cannot overflow the write-back
ring.
An address-storing build adds the served spans of its writable heap
mirrors to the write set, and its write-back compared each whole span
against the reference: 36 MiB per dispatch for a 36 MiB heap, whatever
the shader stored.

Every BDA store and atomic already records the 4 KiB guest pages it
wrote in the fault buffer's written-page table, after its Write lookup
succeeded. BdaResources now keeps the ranges it reads from that table,
and WriteBackBuffers hands them to the guest memory before the
write-back. A heap mirror span then compares and stores only those
pages, plus the declared write ranges inside it, which keep their whole
compare. Resident mirrors copy and store only the same runs from their
readback. Without a record, the whole span is compared as before.
A writable heap mirror's write-back reference was a CPU copy of the
whole span at upload: 36 MiB copied on the dispatching thread for a
36 MiB heap, although the write-back now reads only the stored pages of
it.

When a recorder is active, the reference is now a GPU copy recorded
into the batch after the resident flush and before the work: the
resident buffer's readback for a resident mirror, a buffer copy for a
copy-backed one, whose buffer gains TRANSFER_SRC. The write-back reads
the stored pages of that copy once the batch completed. A build with no
active recorder, or one inside a completion, keeps the CPU copy.
@sktharunbalaji13-cmd

Copy link
Copy Markdown
Contributor

Regarding question 3 on real-world title telemetry:

We tested PR #12840 on Ghost of Tsushima Director's Cut (PPSA02225) under Windows 11 on RTX 4060 Laptop hardware (8 GB physical VRAM, 7,188 MiB budget). Full telemetry details are posted in Issue #5166 comment 6498236130.

Key observations:

  1. BDA access resolution: Confirmed that deferred write-back failed: BDA access failed (reason 2) is completely resolved (0 occurrences).
  2. Whole-heap scaling on real titles: In Ghost of Tsushima, space->base contains the game's main title heap 0x127c000000+0xa9800000 (2,712 MiB committed). Adding whole base heap spans to the write set causes growResident to attempt binding 2.7 GiB into physical VRAM and allocating a 2.7 GiB host reference vector for diffing.
    • Under standard bounds (APS5_HEAP_MIRROR_MIB=2816), this immediately halts on past the budget at $t \approx 37.3$s during compute dispatch 0x20001aff00.
    • On 8 GB GPUs (and 16 GB host RAM), capturing multi-gigabyte host reference buffers and diffing them per dispatch is unfeasible.
  3. Implication for landing order: Bounding write-back to only the 64 KiB blocks actually stored to (or scoping to touched descriptor sub-ranges rather than whole unreferenced base spaces) is strictly necessary for real-world titles with multi-gigabyte heaps to run address-storing shaders.

@EagleBearerYS

Copy link
Copy Markdown
Contributor Author

@oneandonlydean thanks, all three were right to ask. The work is on fix/agc-bda-store-writable-mirror-review on our fork, and it comes into this PR once the last part below is done.

1. Labels in a heap span. Yes, a label can sit there. It reaches the GPU through a host import of its own bytes (VulkanDevice.cpp L2509), while an address-based build serves the same heap through a mirror.

  • On 781dc45, WriteBack noted the whole served span, so such a label was counted pending, its completion store was forced, and the [recorder] write-back-over-label counter went up.

  • bf54c5e keeps declared write ranges as they are, and notes the rest of an address-store span only for the runs WriteChanged actually stored. The recorder joins those runs across gaps with no tracked label, so the note stays exact without overflowing the write-back ring.

  • The test, LabelTests in BdaStoreHeapMirror.cpp:

    • a label the dispatch doesn't touch keeps the CPU's bytes, and the counter stays 0;
    • a label a thread stores over is still noted.

    On Linux (lavapipe), it fails on 781dc45 and passes 10 of 10 with the fix (result).

2. Two storing builds over one heap. The order rules it out.

  • A's whole span is a pending write as soon as it's recorded (MarkGpuWrites → NotePendingWrites(Writes())).
  • Before B takes any reference, its AcquireRegistered refreshes every heap run through prepareRange → syncRange, which calls Recorder::Sync() when a pending write overlaps the run. So A's dispatch and write-back finish before B's takeHeapReferences(), and B's reference already holds A's stores.
  • The cost of that is that later address-based builds over the heap wait behind a storing build. The last part below makes that note smaller too.

3. Numbers, and first or together: together. sktharunbalaji13-cmd's run of 781dc45 on Ghost of Tsushima Director's Cut (PPSA02225) (I#5166) settles it:

  • The fix works: the BDA refusals are gone.
  • The design doesn't scale: at t≈37 s it stops on heap mirror of 0x127c000000+0xa9800000: past the budget. The whole-span design adds the title's 2,712 MiB main heap to the write-back, and so binds and copies all of it.

So the block scoping goes into this PR before it's ready.

  • Done (99f1f37, 91e4d82): the write-back compares only the 4 KiB pages the recompiler's existing written-page record marks as stored, and the reference is taken by a GPU copy.
    • On lavapipe, the extra CPU time per address-storing dispatch for a 36 MiB, 16-run heap goes from 35-59 ms to 0.05-0.12 ms with one block stored (result).
    • The copy itself is about 4-7 ms of llvmpipe work for that heap.
  • Still to do: the reference copy, the residency and the pending-write note are still the whole span. That's what stops Ghost. Next is a form with no reference at all, where the stores mark the bytes they wrote and the write-back copies only those, and with no residency beyond the blocks actually stored. The budget test is a multi-GiB heap under a small APS5_HEAP_MIRROR_MIB with one block stored.

When that's in, I'll post the Ghost rerun, with its stop line and frame time. I'll also post a count from Resident Evil Village (PPSA01556) of how many of its address-storing builds hold writable heap mirrors; that run is queued.

@EagleBearerYS

Copy link
Copy Markdown
Contributor Author

@oneandonlydean the last part from my reply is in. The head is now 425cd9d8b0, and the description has the details.

  • No whole-span work for address stores. The reference copy, the residency and the readback are gone.
    • Resident mirrors: a store into an unbound block goes to a store page and is compared with zero afterwards. The stored pages of bound blocks are gathered on the GPU and compared with the resident shadow.
    • Copy-backed mirrors: per-byte store masks, so only the bytes a thread wrote are written back.
    • The budget test (agc_driver_bda_store_heap_mirror_budget): a 2 GiB heap with one block stored runs inside APS5_HEAP_MIRROR_MIB=64.
  • Question 2, two storing builds in flight: the pending-write note still covers the span, so the order I described still holds. It has to be known before the dispatch, and it's a range, not bytes.
  • Question 3, cost: a storing dispatch over a 36-72 MiB heap mirror now waits 0.1-1.4 ms on lavapipe and adds at most 0.6 ms of CPU, against 15-52 ms of wait on the previous head, 91e4d82.
  • The Resident Evil Village (PPSA01556) count: a counter build logged no address-storing build over writable heap mirrors to the static menu +15 min, so this costs nothing there. In-scene wasn't measured.
  • The Ghost of Tsushima Director's Cut (PPSA02225) rerun: I've asked the reporter for it on this head (I#5166) and will post its stop line and frame time.

@github-actions github-actions Bot added shader core/shader docs labels Oct 29, 2026
@sktharunbalaji13-cmd

Copy link
Copy Markdown
Contributor

@EagleBearerYS Here is the full empirical run of Ghost of Tsushima Director's Cut (PPSA02225, retail v02.024.000) on #12840's head 425cd9d8b0 using the exact bounded RTX 4060 Laptop hardware setup (8 GB physical VRAM, 7,188 MiB budget, 16 GB physical RAM).

1. BDA Store Page Pool & Heap Mirror Verification

  • 2.7 GiB Heap Exhaustion Resolved: The stop from earlier runs (heap mirror of 0x127c000000+0xa9800000: past the budget (4014 MiB, limit 2816 MiB)) is completely eliminated. Unbound blocks of resident mirrors redirect cleanly to store pages without triggering whole-span binding.
  • Store Page Pool Capacity: Zero warnings or errors were logged regarding store page exhaustion under the default pool (APS5_BDA_STORE_PAGES=1024); running with 4096 pages was not needed.
  • Memory Footprint: Heap mirror allocations remained strictly bounded, with host import and device memory pools comfortably within budget.

2. Frame Progression & Visual Telemetry

  • Frame Dump Count: Dumped 129 consecutive swapchain frames (frame_000.bmp through frame_128.bmp).
  • Verified Non-Black Presentation:
    • frame_128.bmp presented at guest timestamp $t = 107.0$s.
    • RGB pixel extrema: ((0, 99), (0, 97), (0, 99)).
    • Color census: 725 distinct colors, 6,582 non-black pixels (active disclaimer screen presentation).

3. First Stop Line & Frame Time

  • Frame Time / Guest Timestamp: $t = 114.7$s (queue 0x0, serial 2642, host process elapsed $145.68$s).
  • First Stop Line:
[draw] target 0x0 mask 0x0 ok
[gpu] driver failure: compute shader 0x20001ef700: AGC graphics: native multisample stencil or depth format import is not implemented
[videoout] presentation failed: compute shader 0x20001ef700: AGC graphics: native multisample stencil or depth format import is not implemented
terminate called after throwing an instance of 'std::runtime_error'
  what():  compute shader 0x20001ef700: AGC graphics: native multisample stencil or depth format import is not implemented
FATAL: abort() (SIGABRT) on thread 16912

As you predicted in #5166 (comment 6500086955), once the heap mirror BDA store path passes, the title immediately transitions to its depth readback / sampling pipeline (compute shader 0x20001ef700 accessing a multisampled depth/stencil attachment in DepthSurface.cpp:122).

@EagleBearerYS
EagleBearerYS marked this pull request as ready for review October 30, 2026 08:18
@EagleBearerYS

Copy link
Copy Markdown
Contributor Author

@sktharunbalaji13-cmd thanks, that's the run this PR was waiting for.

I've added your run to the description and marked the PR ready for review.

@oneandonlydean

Copy link
Copy Markdown
Collaborator

@EagleBearerYS thanks for the rework: the answers to the three points of the first review are in the code. bf54c5e942 notes only the stored runs (and LabelTests pins both directions), the per-byte masks and the shadow compare mean a build writes back only bytes it stored (the two-dispatch test with a CPU store between their write-backs covers the in-flight case), and the cost table is now 0.1 to 1.4 ms per dispatch. Reviewed at 425cd9d. Three points on the new mechanism:

  1. A store of zero into an unbound block is lost. In WriteBack, the unbound-block path calls store(first, current, std::vector<std::byte>(current.size())), i.e. it compares the store page with zeros and writes only the bytes that are not zero. A thread that stores 0x00 (or a dword 0) over a non-zero guest byte in an unbound block of a resident heap leaves the old byte in guest memory. Clearing a region to zero is a common compute store. The page entry already carries the per-byte mask that the copy-backed path uses; please use it here too (written byte = masked byte), and add a case to BdaStoreHeapMirror where the guest block holds non-zero bytes and the thread stores zero. The current unbound cases use fill = 0x00 for the guest block (fill = bound ? 0x11 : 0x00), which cannot show this.
  2. Store page exhaustion is a hard fault. With the default 1,024 pages (4 MiB of distinct 4 KiB pages), a dispatch that stores to more pages than that ends in the StorePages fault. Please say in the description what the title sees then (it is a stop, as I read the did not fault mutation), whether a build can fall back (for example bind the block and use the masked path), and what limit you expect real storers to reach. A test that stores to 1,025 distinct unbound pages would pin the behaviour either way.
  3. The title run needs a baseline. The third-party run on this head shows the budget stop is gone and 129 frames are presented, which is good, but main stops at the store in that scene, so it gives no cost comparison. For cost, the numbers that matter are on a title that works today and holds writable heap mirrors: the AddressStoreCounters per run (how many address-storing builds, span and compared bytes) and a frame time with and without the change. If a title issues no address-storing build the counters will say so and the cost is the ABI/specialization change only; please attach that for one such title.

Please keep the focused Linux cases, the honest Windows GPU skips and the budget, copy-backed, resident and overflow/refusal tests on the final composition after the agreed #8874 / #8963 merge order.

@TechLevelZero

Copy link
Copy Markdown
Contributor

✅ NVIDIA GPU test: passed

PR head 425cd9d merged onto main f6fddd6 · tested 2026-10-30 08:51 UTC · 24 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,345 passed · 5 failed (0 new, 2 also fail on main, 3 unstable on main) · 41 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,391 of 2,950 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 (906 tests run on the GPU)
Slow tests (>30 s, GPU tests timed with validation layers) ⚠️ agc_driver_bda_device 57.5 s
Unstable on main (3, these also failed in recent main runs on this machine; not counted against this PR)
agc_driver_submit_progress: failed in 5 of the last 7 main runs
agc_submit_progress: failed in 5 of the last 7 main runs
agc_submit_progress_no_timeline: failed in 6 of the last 7 main runs
Failing on main too (2, not counted against this PR)
guest_mmap_executable
guest_socket_options_multicast
Validated but not compared (2, not in the main baseline's validation pass)
agc_driver_bda_store_heap_mirror_budget
agc_driver_bda_store_heap_mirror_no_space_cache
Validation IDs already present on main (4 IDs in 430 tests)
VUID-VkDeviceCreateInfo-pNext-pNext (430 tests): agc_compute_pipeline_replay, agc_driver, agc_driver_address_passes_draw_transitions, agc_driver_address_passes_targets_split, agc_driver_array_layer_target_cpu, agc_driver_bda_span_reads, agc_driver_bda_span_reads_draw_pipeline, agc_driver_bindless_images, and 422 more
VUID-vkCmdCopyImage-srcImage-01548 (11 tests): agc_driver_depth_clear_hle, agc_driver_depth_plane_buffer_memory, agc_driver_depth_plane_cpu_write_after_memo, agc_driver_depth_plane_cpu_write_after_page_unwatch, agc_driver_depth_plane_cpu_write_after_partial_unwatch, agc_driver_depth_plane_partial_store, agc_driver_depth_plane_partial_store_unimported, agc_driver_depth_storage_dispatch, and 3 more
VUID-vkCmdCopyImage-srcImage-01551 (11 tests): agc_driver_depth_clear_hle, agc_driver_depth_plane_buffer_memory, agc_driver_depth_plane_cpu_write_after_memo, agc_driver_depth_plane_cpu_write_after_page_unwatch, agc_driver_depth_plane_cpu_write_after_partial_unwatch, agc_driver_depth_plane_partial_store, agc_driver_depth_plane_partial_store_unimported, agc_driver_depth_storage_dispatch, and 3 more
VUID-VkPipelineColorBlendStateCreateInfo-pAttachments-00605 (2 tests): agc_driver_prepared_exports, agc_driver_srgb8_color_target
Skipped (41)
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 425cd9d8b064e0e6522be5ef82a77df751f0ab43 f6fddd60d826831f70f7c62e25423610ee742bcc
git checkout f6fddd60d826831f70f7c62e25423610ee742bcc && git merge --no-ff 425cd9d8b064e0e6522be5ef82a77df751f0ab43
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.

…store masks

A store redirected into a store page for an unbound block of a resident
heap mirror was written back by comparing the page with zeros, so only
its non-zero bytes reached guest memory. A thread storing 0 over a byte
the CPU made non-zero during the dispatch left the CPU's byte.

The unbound pieces of a resident mirror's written ranges now carry the
Masked flag as well as Spill, so the shader records which bytes each
store wrote in the page's mask, and the write-back stores exactly those
bytes, as it already did for copy-backed mirrors (one helper serves
both paths). The spilled and compared counters keep their meaning.

The heap mirror test stores a zero dword and a zero byte into a zero
block while the CPU fills it with non-zero bytes: the stored bytes read
0 and the bytes beside them keep the CPU's value, on resident mirrors
and, as a control, on copy-backed ones.
…l size

A dispatch that stores through addresses into more distinct heap mirror
pages than the store page pool holds is refused with the StorePages
fault, and nothing pinned that. agc_driver_bda_store_heap_mirror_store_pages
runs with APS5_BDA_STORE_PAGES=4, which the driver raises to its minimum
of 64 slots. On resident and copy-backed mirrors, a dispatch whose 64
threads store into 64 distinct pages succeeds and its stores reach guest
memory, and the same dispatch with one more page is refused with the
"found none of the 64 store pages free (APS5_BDA_STORE_PAGES)" message.
… page pool

agc_driver_bda_store_heap_mirror_store_pages_default runs with no
APS5_BDA_STORE_PAGES, so the pool has its default 1,024 slots. On
resident and copy-backed mirrors, one 1,024-thread dispatch stores into
1,025 distinct pages of a zero heap: each thread into its own page and
all of them into one more. The use is refused with "found none of the
1024 store pages free (APS5_BDA_STORE_PAGES)" and none of its stores
reaches guest memory. Exactly 1,024 pages are not asserted to fit:
with 16 linear probes the table can refuse earlier.
@github-actions github-actions Bot added the needs rebase Conflicts with main, rebase needed label Oct 30, 2026
@oneandonlydean oneandonlydean self-assigned this Oct 30, 2026
boykopovar#17850 rewrote the "CPU reads behind an address-based build" debt entry next to this branch's two new entries; keeps main's rewritten entry and this branch's two entries after it.
@github-actions github-actions Bot added needs rebase Conflicts with main, rebase needed and removed needs rebase Conflicts with main, rebase needed labels Nov 15, 2026
Keeps both sides in BdaResources.cpp's checkFault with boykopovar#20870: its claim word in the empty-record Require, then this branch's store-page overflow Require.
@github-actions github-actions Bot removed the needs rebase Conflicts with main, rebase needed label Nov 16, 2026
@milescoviello

milescoviello commented Nov 16, 2026 •

Copy link
Copy Markdown
Contributor

Ghost of Tsushima (PPSA02225) A/B on Linux, current main against this head merged onto it. On this route the refusal from the description no longer appears on main, so this pair can't show the fix.

Setup:

  • Ubuntu 26.04.1, kernel 7.0, NVIDIA GeForce RTX 4070 Ti, driver 615.71.09, i7-13700K, Release libraries (SPIRV-Tools off), 4K output.
  • Arms: A = main 133feb30f0; B = the same main with this head bcc617f141 merged (c415f8afad, clean merge).
  • Plain main defaults, no APS5_* switches besides the 10 s summary, so no APS5_PIPELINE_DISPATCH or heap switches either.
  • One run per arm, A then B, 600 s each, the same pinned save, scripted presses from the start, a cold shader cache in both (this head changes the recompiler's cache key, so neither arm reuses one), 22 GiB cap.
A main B main + this PR
status ran to the 600 s timeout ran to the 600 s timeout
deferred write-back failed: BDA access failed 0 0
the store hit / read-only in the BDA table 0 / 0 0 / 0
[videodec2] decoder 1: codec=1 (the intro H.264 decoder the description times the refusal by) created created
presents, whole run 1103 1112
presents in the first ~200 s, 10 s windows 178, 212, 98, 57, 16, 42, 26, 157, 51, 5, 26, 1 178, 195, 102, 70, 16, 43, 165, 60, 6, 24, 1
device lost / Xid none none

Notes:

  • Both arms show the same pattern of fast and slow windows in the first ~200 s (A logs 12 windows there, B 11), with almost the same presents.
  • After that, A logs one 308 s window (213-521 s, 234 presents) and nothing after it.
  • B logs 238 presents to 416 s, then 1-2 presents per 15-40 s window at 1-5 s of GPU per present to the end. It also prepared more shaders at use (555 against 393) and logged more texture-budget changes. That looks like B being further into a heavier scene with a cold cache, not something this PR adds: one cold run per arm doesn't separate that from scene variance.
  • No [bda-store-spans] line in either log. The counter is only in your counter build, so that is expected.

So on 133feb30f0 the store this PR redirects isn't refused on this route: from the pinned save the title goes through its intro and the presses. The description's 7 refusals per run (0x1549750000+0x4eeb0000, instruction 0x1b4) are on main b11c7bf84f. Does the original report's route, a fresh boot without saves, still refuse on current main? If you can say which route that run took, I can run it here.

AI-assisted: yes

@EagleBearerYS

Copy link
Copy Markdown
Contributor Author

@milescoviello thanks for the A/B, and for setting it up so the cold cache hits both arms alike.

The b11c7bf84f runs weren't mine. They're @sktharunbalaji13-cmd's (comment): Windows 11, an RTX 4060 Laptop, only APS5_SKIP_REFUSED_DRAWS=1 and APS5_PROFILE_DRAW=1, and a relinker change so steamnetworkingsockets.prx starts at process start. Their comment doesn't say whether a save existed. Their runs never left the intro, though: the display stayed black after the "Sony Interactive Entertainment presents" card, and the intro decoder stopped being fed after fewer than 30 access units. The 7 refused stores came right after that decoder was created. Your arms create that decoder too, so your runs reach the point where theirs refused. What differs is the main commit (b11c7bf84f against 133feb30f0), Windows against Linux, the GPU, and maybe the save. One pair can't say which of these takes the refusal away, and I don't know whether current main still refuses that store on their boot. If you run it, the point to watch is just after the intro H.264 decoder is created.

@github-actions github-actions Bot added the needs rebase Conflicts with main, rebase needed label Nov 16, 2026
@domx4q

domx4q commented Nov 16, 2026

Copy link
Copy Markdown
Contributor

NVIDIA Linux run with the Khronos validation layer of the BDA store write-back into writable heap mirrors, on the BDA, heap mirror, pipeline journal and shader memory tests the Tested section names.

Setup: Arch Linux, kernel 7.3.4, GCC 16.2.1, Release. NVIDIA GeForce RTX 4090 (vendor 0x10de, device 0x2684, Ada), proprietary driver 620.70.06, Vulkan 1.4.357, Khronos validation layer 1.4.363.1. Head bcc617f141 merged onto main e4caa07950 (clean merge); main is a separate Release build of e4caa07950 on the same machine.

ANYPS5_REQUIRE_VULKAN=1 ANYPS5_NO_SHADER_CACHE=1 VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation VK_LOADER_DEBUG=layer ctest --test-dir build -R '^agc_(driver_bda|bda|driver_resident_heap_mirror|driver_pipeline_journal|pipeline_journal|host_import_sparse|shader_memory)' -V
main e4caa07950 this PR
Result 19/19 passed (3 skipped) 24/24 passed (3 skipped)
Insert instance layer "VK_LAYER_KHRONOS_validation" 35 (in 12 tests) 40 (in 17 tests)
was not found but was requested by env var VK_INSTANCE_LAYERS 0 0
VUID- 0 0

Every device test selected the RTX 4090 (Selected GPU name=NVIDIA GeForce RTX 4090 / loader Using "NVIDIA GeForce RTX 4090"), none fell back to llvmpipe.

The five agc_driver_bda_store_heap_mirror* tests are new in this PR and do not exist on main (hence 19 vs 24); all five pass on the RTX 4090. The same three tests skip on both sides, unrelated to this PR: agc_driver_bda_reads_shadowed_results and _per_build (skipped, the device reports watched host memory written when it imports or reads it) and agc_host_import_sparse (skipped, udmabuf size_limit_mb is above 1024: a range above it is too large to map).

No new VUID- errors; all focused tests pass on Ada, including the five new ones (three skips, same as main).

AI-assisted: yes (Claude Code)

@EagleBearerYS

Copy link
Copy Markdown
Contributor Author

@domx4q thanks for the RTX 4090 pair with the validation layer, and for naming why the three shared tests skip. It's in the description under Tested, and in the GPUs tested line.

@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 — no blocking findings

Nothing blocks this; the points below are optional.

What I ran

  • Head a96efaa504feb785cb81ab375577dcdb1e30620a, base main. Merged-preview check: not run.
  • Read the description (lines 1–218 of 402), the commit list, the manifest and all of diff.patch (2,956 lines, 31 changed files).
  • Read the house rules from the ruling file: "Readable reviews", "Standard PR response format" and "Accuracy and evidence".
  • Repository lookups through the reader, at head:
repo_read.py search "TakeFaultSlot" core/libs/prx/libSceAgcDriver/Graphics/src/BdaResources.cpp
repo_read.py cat core/libs/prx/libSceAgcDriver/Graphics/src/BdaResources.cpp 183 200
repo_read.py cat core/libs/prx/libSceAgcDriver/Graphics/src/BdaResources.cpp 326 362
repo_read.py search "MarkGpuWrites" core/libs/prx/libSceAgcDriver
  • No build and no tests were run by me. The test results in the description are the author's.

Results

Check Result Note
Diff, all hunks passed 31 files read as hunks
Full text of changed files not run none read in full
Memory constructor at head passed same fault-slot setup as the base constructor
MarkGpuWrites call site passed called at VulkanDevice.cpp:6136
Build and unit tests not run author-reported only

Findings

Blocking

None.

Non-blocking

  • core/libs/prx/libSceAgcDriver/Graphics/src/BdaResources.cpp, checkFault, loop-guard branch (diff.patch hunk @@ -492,6 +581,7 @@): attachStorePages() runs after collectStorePages() has already moved pages to the recorder pool. attachStorePages() returns early when pages is null, so the zeroed fault record gets no store-page table. If that record is reused after a loop-guard trip, stores into unbound blocks would take the fault path. I did not confirm whether a tripped record is ever reused.

Not verified

  • Full text of the four files too large for the review folder: Execution/src/VulkanDevice.cpp, Graphics/src/GuestBufferMemory.cpp, Graphics/src/ShaderResources.cpp and tests/Recorder.cpp. Only their diff hunks were read.
  • The description after line 218, including the cost tables, the Village and Ghost of Tsushima evidence, and the linked runs. Those are author-reported.
  • Whether the store-page gather is recorded after the dispatch it reads. MarkGpuWrites is called at VulkanDevice.cpp:6136; I did not read the dispatch path above it in full.
  • Reads that fall outside one 4 KiB page of an unbound block. The lookup in SpirvBdaLookup.cpp faults with the "store pages free" message when the access does not fit; whether a read can reach that path is not confirmed.
  • The GLSL and SPIR-V emitted by StorePageGather.comp and SpirvBdaLookup.cpp: not compiled and not validated here.
  • The set_tests_properties(agc_driver_pipeline_journal ... TIMEOUT 240) registration in CMake: not checked against where that test is defined.

To get this to a good state

Nothing is required.

Optional:

  • Confirm whether a record that trips the loop guard can be reused. If it can, reattach the store-page table or drop the reuse.

@EagleBearerYS

Copy link
Copy Markdown
Contributor Author

Thanks for the review at a96efaa504. On the loop-guard point: a record with store pages isn't used again, guard or not. It's built only for a ShaderResources that uses BDA (ShaderResources.cpp:2879) and stores through addresses: the spans come only after AllowAddressStores() (GuestBufferMemory.cpp:7846), which ShaderAddressResources.cpp:244 calls only when bdaReadOnly is false. noteReusable never makes such an object reusable: space reuse needs bdaReadOnly (ShaderResources.cpp:3080), and otherwise its usesBda check returns before reusable is set (:3087). Its completion is then the one-time WriteBackBuffers (VulkanDevice.cpp:6158, Graphics/src/Draw.cpp:2628), not CheckFaults, and the next use builds a new BdaResources, whose constructor takes a store-page pool and writes the table into its fault record (BdaResources.cpp:337-352). So the attachStorePages() call in the loop-guard branch only rewrites words that aren't read again, whether or not collectStorePages() handed the pool back.

@nydal91

nydal91 commented Nov 19, 2026

Copy link
Copy Markdown

Independent second-title validation: Marvel's Wolverine (PPSA03671 v01.001.005), Linux (PikaOS 4, kernel 7.3.3), AMD RX 6950 XT (RADV Mesa 26.3.0), Intel Core Ultra 7 265KF, 16 GB RAM.

A/B on the same base (main f15df32) with the same two title prerequisites (libc sce-v2 locale exports, relinker required-module-dir start), 300 s runs at APS5_HOST_IMPORT_MIB=5000, 1920x1080 fifo:

  • Without this PR (base + prerequisites only): 266 deferred write-back failed: BDA access failed ... read-only in the BDA table refusals — 4-byte compute feedback stores at 0x11871f7e24+0x53f826c and +0x454081dc, the head of a 1.1 GiB unaligned descriptor view into a 2.5 GiB registered heap — then the run aborts with VK_ERROR_DEVICE_LOST at vkQueueSubmit (the dropped one-shot stores hard-recover the GPU).
  • With this PR (head a96efaa merged with f15df32, same prerequisites): 0 refusals, 0 deferred write-back failures, 0 store-page exhaustion faults; 656 frames presented, clean exit. The intro renders correctly through the subway and street scenes (screenshots at ~120 s and ~200 s). Stall indicators identical to a healthy run: one benign 100 ms reprojection hitch, no spin, no hard recovery.

Wolverine's wide sequential stores (the 1.1 GiB view above, plus a 248 MiB descriptor region written back ~110x) did not exhaust the default store-page pool in this run, so the bounded-pool concern does not materialize for this title's intro.

We had been carrying a local alternative for the same refusal class (fault-window / whole-mirror write grants, opt-in APS5_MIRROR_BDA_WRITES); given this A/B we are dropping it in favour of this PR, and our local Wolverine bring-up stack will depend on this PR. The per-byte store masks also close a write-back coverage gap our alternative left open (BDA-table stores not V#-tracked). Happy to share logs or run further scenes if useful.

@github-actions github-actions Bot added the needs rebase Conflicts with main, rebase needed label Nov 19, 2026
@EagleBearerYS

Copy link
Copy Markdown
Contributor Author

@nydal91 thank you for the Marvel's Wolverine (PPSA03671) A/B. It's in the Tested section now, with the RX 6950 XT under GPUs tested, and it's good to know the default store-page pool held through the intro's wide stores. Since then this PR has merged main 2b31f86 (2687eec), which brings #17796; this PR's own lines are unchanged.

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

@MarcZX10 MarcZX10 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Reviewed — changes requested

Changes are required before merge: add parameters.base when the gather shader reconstructs a page address, so it can match absolute target spans and gather the resident page contents.

What I ran

Reviewed head 2687eec5fd8bd19a74e40ac7a10981c18942d338 using the prepared review bundle and repo_read.py. No tests or builds were run.

Results

Check Result Note
Diff review failed Resident page address omits its base
Tests and build not run No independent execution

Findings

Blocking

  • In StorePageGather.comp, the gathered page address is reconstructed from a relative chunk offset, but target span bounds are absolute guest addresses. The address therefore fails the target-span overlap check, so a written resident page is skipped and later write-back can fail because the page was not gathered. Add parameters.base to the reconstructed address. Evidence: core/libs/prx/libSceAgcDriver/Graphics/shaders/StorePageGather.comp:444.

Non-blocking

None.

Not verified

The full text for core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp was excluded as too large for the review folder; the relevant diff hunk was inspected. No tests, builds, or runtime behavior were independently verified. The description, commits, manifest, diff, and included changed-file texts were read; the manifest also lists excluded files, including VulkanDevice.cpp.

To get this to a good state

Fix the absolute page address reconstruction, then rerun the focused resident heap mirror gather and write-back tests and review the new head.

@EagleBearerYS

Copy link
Copy Markdown
Contributor Author

@MarcZX10 thanks for the review. On the gathered page address (review): at this head StorePageGather.comp has 82 lines, and the address it rebuilds from the written-page record is already an absolute guest address, so adding parameters.base would count the base twice.

  • The written-page key: note_bda_write is called with the store's guest address, not the translated device pointer (SpirvBdaRead.cpp), and keys it as (address >> WrittenChunkShift) + 1 with no base subtracted (SpirvBdaLookup.cpp).
  • The gather: chunk = (key - 1) << ChunkShift undoes exactly that, so chunk and each page address are absolute (StorePageGather.comp). The target spans are absolute too: each is a resident span's begin, end and device address (BdaResources.cpp). The overlap check compares like with like.
  • Where parameters.base is used: only to key the store-page table. claimPage subtracts it (address - parameters.base, L33), and the CPU adds pageBase back when it reads the pages out (BdaResources.cpp).

So I'd leave the reconstruction as it is. If you see a path where the written-page key is taken relative to a base, point me at it and I'll add it as a test.

This branch has not been deployed

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

Labels

agc libSceAgc* build docs needs rebase Conflicts with main, rebase needed shader core/shader

Projects

None yet

Development

Successfully merging this pull request may close these issues.