Skip to content

perf(agc): skip heap mirror blocks whose bytes already match guest memory - #16188

Merged
oneandonlydean merged 2 commits into
boykopovar:mainfrom
sktharunbalaji13-cmd:perf/agc-skip-matching-heap-blocks
Nov 7, 2026
Merged

oneandonlydean merged 2 commits into
boykopovar:mainfrom
sktharunbalaji13-cmd:perf/agc-skip-matching-heap-blocks

Conversation

@sktharunbalaji13-cmd

@sktharunbalaji13-cmd sktharunbalaji13-cmd commented Nov 5, 2026 •

Copy link
Copy Markdown
Contributor

What

An address-based build refreshes every 64 KiB block of a heap mirror whose tracker stamp is newer than the mirror's generation. Blocks that the driver itself stamped after writing GPU results back to guest memory are flagged the same way as blocks the title wrote, so a resident or plain heap mirror copied them again although it already held those bytes, then staged them and transferred them to the GPU. In Ghost of Tsushima about 1340 to 1370 of the roughly 2040 blocks flagged per build were byte-identical re-copies.

compareBlock now compares the guest bytes with the mirror before copying. When they match it advances the block's generation without copying and compareBlocks does not mark the resident block changed, so no staging copy or GPU transfer follows. A block whose bytes differ is copied exactly as before. Sparse fill blocks, unbound resident blocks and mirrors without write watching (generation 0) keep their previous behaviour: an unwatched mirror has no record of which bytes changed, every one of its blocks is flagged on every build, and agc_heap_mirror_unwatch* require all of them to be copied. The first commit compared those blocks too and failed agc_heap_mirror_unwatch and agc_heap_mirror_unwatch_no_space_cache in the Windows check; the second commit restricts the comparison to blocks with a nonzero generation.

New regression tests a block stamped without a byte change in BdaResources.cpp (heapMirrorTests) and in ResidentHeapMirror.cpp (ResidentTests) stamp a block with MarkWritten and require that the next build compares it without copying it.

tools/pr_overlap.py could not compare the 26 open PRs that conflict with main and touch these files, so I read their patches: none skips a copy by comparing first. #15296 (needs rebase) rewrites the resident branch of compareBlock to drop the host copy; it does not change the plain heap path or the stamped-block case.

Tested

Windows 11 26200, AMD Ryzen 7 7840HS, 16 GB RAM, NVIDIA GeForce RTX 4060 Laptop GPU (8 GB), driver 617.42.

Focused tests, ANYPS5_REQUIRE_VULKAN=1 ANYPS5_NO_SHADER_CACHE=1 VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation ctest -R "agc_(heap_mirror|sparse_heap_mirror|address_copy_cap|address_space_unwatched|sparse_buffer|driver_graphics|graphics_profile|driver_address_space_teardown|driver_resident_heap_mirror|driver_address_draw_space_reuse|driver_host_import_windows)" -V:

  • with both commits: 22/22 pass, including agc_heap_mirror_unwatch*, agc_sparse_heap_mirror_* and agc_address_copy_cap*
  • with only the GuestBufferMemory.cpp change reverted (same new tests, run with the nine-test pattern agc_driver_(address_draw_space_reuse|host_import_windows|resident_heap_mirror|graphics|address_space_teardown) before the second commit): agc_driver_resident_heap_mirror and agc_driver_graphics fail, the other seven pass
  • neither log contains a VUID- line or was not found but was requested by env var VK_INSTANCE_LAYERS

Ghost of Tsushima Director's Cut (PPSA02225), same launch and scene, APS5_TRACE_SECONDS=60:25, APS5_PROFILE_DRAW=1, four 145 s runs back to back, alternating without and with this change. The two builds are local scratch builds of one tree that differ only in this change: d842941d04e3 without it, f3222bb7c416 with both commits of this PR. That tree also holds the known-zero scan fix from #15967 that this title needs on 16 GB RAM, the joined-import fix from #16130, trace counters and unmerged depth-surface experiments that are not part of this PR (a read touch before a depth range takes its write generation, APS5_SOFT_DEPTH_CHECKS=1, last-writer-wins publication over colour targets); the scratch commits are local. This branch is rebased on c4469b60da and the change applies there without edits.

run commit presents in window frame p50 / p90 / p99 ms GPU busy ms per present address builds per 10 s flagged blocks per build copied blocks per build mirror prepare ms per build compare ms per build
without this change (C1a) d842941d04e3 89 187.0 / 503.9 / 5466.6 67.0 62 2042 1338 55.6 14.5
without this change (C1b) d842941d04e3 93 184.1 / 386.4 / 5395.1 70.8 75 2037 1371 48.7 12.3
with this change (C3a) f3222bb7c416 101 156.2 / 414.9 / 694.3 51.5 84 2010 135 61.7 12.3
with this change (C3b) f3222bb7c416 105 171.4 / 334.9 / 799.9 56.6 72 2056 132 46.2 11.1

Per build, the change takes the copied blocks from about 1340 to 1370 of the roughly 2040 flagged blocks down to about 130, which is what it is meant to do. The effect on the frame rate of this title is modest and noisy with two runs per build: presents in the 25 s window 89 and 93 without, 101 and 105 with (+13 % on average), frame time p50 187 and 184 ms without, 156 and 171 ms with, GPU busy per present 67.0 and 70.8 ms without, 51.5 and 56.6 ms with. Every run also contains one frame of 5.3 to 6.4 s, with and without the change, and with about 100 frames in a window the p99 column is just the second slowest frame, so it does not separate the builds. Mirror prepare per build (46 to 62 ms) did not change beyond the spread between the two runs of one build; compare per build is 1 to 2 ms shorter. The window still averages only 3.6 to 4.2 fps: this PR removes wasted copies, and the rest of the frame time is the per-build work left under the GPU mutex.

An earlier A B A B pair on the same machine, from one build with the change compiled out for A and in for B (memcmp-2026-11-06), agrees: copied blocks per build 1127 and 1135 become 144 and 125, and presents in the window go from 102 and 85 to 144 and 135.

trace_digest.py summary lines (without this change C1a, C1b, then with it C3a, C3b)
{"commit":"d842941d04e3","dirty":false,"env":{"APS5_PROFILE_DRAW":"1","APS5_SKIP_REFUSED_DRAWS":"1","APS5_SOFT_DEPTH_CHECKS":"1","APS5_TRACE_SECONDS":"60:25"},"gpu":"NVIDIA GeForce RTX 4060 Laptop GPU","driver":"NVIDIA 617.42","os":"Windows 10.0.26200","cpu":"AMD Ryzen 7 7840HS w/ Radeon 780M Graphics","cpu_threads":16,"memory_mib":15654,"title_id":"PPSA02225","title":"Ghost of Tsushima","content_version":"02.024.000","resolution":"3840x2160","window":{"spec":"seconds 60:25","first_present":739,"ms":25975.822},"presents":89,"frame_ms":{"p50":186.961,"p90":503.914,"p99":5466.559,"max":5466.559},"gpu_busy_ms_per_present":67.029,"worker_busy_pct":{"queue worker 0x0":59.163,"queue worker 0x40":40.121,"queue worker 0x20":62.298,"queue worker 0x48":78.312,"queue worker 0x38":0.0,"queue worker 0x52":0.0,"queue worker 0x30":0.0},"top_phases_ms_per_frame":{"Driver.Packet":691.637,"Driver.Packet.dispatch":485.227,"Driver.Dispatch":461.227,"Vulkan.Dispatch":227.449,"Vulkan.Dispatch.shader_resources":222.288,"GpuMutex.wait.dispatch":198.7,"Driver.Packet.pipeline_drain":87.161,"GpuMutex.wait.end":62.32},"trace_dropped":false,"trace":"C1a-60-25-aps5-trace.json.gz"}
{"commit":"d842941d04e3","dirty":false,"env":{"APS5_PROFILE_DRAW":"1","APS5_SKIP_REFUSED_DRAWS":"1","APS5_SOFT_DEPTH_CHECKS":"1","APS5_TRACE_SECONDS":"60:25"},"gpu":"NVIDIA GeForce RTX 4060 Laptop GPU","driver":"NVIDIA 617.42","os":"Windows 10.0.26200","cpu":"AMD Ryzen 7 7840HS w/ Radeon 780M Graphics","cpu_threads":16,"memory_mib":15654,"title_id":"PPSA02225","title":"Ghost of Tsushima","content_version":"02.024.000","resolution":"3840x2160","window":{"spec":"seconds 60:25","first_present":408,"ms":25142.192},"presents":93,"frame_ms":{"p50":184.116,"p90":386.367,"p99":5395.127,"max":5395.127},"gpu_busy_ms_per_present":70.753,"worker_busy_pct":{"queue worker 0x0":61.271,"queue worker 0x40":57.32,"queue worker 0x20":92.401,"queue worker 0x48":83.254,"queue worker 0x38":0.0,"queue worker 0x52":0.0,"queue worker 0x30":0.0},"top_phases_ms_per_frame":{"Driver.Packet":787.066,"Driver.Packet.dispatch":491.284,"Driver.Dispatch":458.983,"Vulkan.Dispatch":225.65,"Vulkan.Dispatch.shader_resources":221.506,"GpuMutex.wait.dispatch":218.671,"Driver.Packet.memory_wait":142.291,"Driver.Packet.pipeline_drain":91.348},"trace_dropped":false,"trace":"C1b-60-25-aps5-trace.json.gz"}
{"commit":"f3222bb7c416","dirty":false,"env":{"APS5_PROFILE_DRAW":"1","APS5_SKIP_REFUSED_DRAWS":"1","APS5_SOFT_DEPTH_CHECKS":"1","APS5_TRACE_SECONDS":"60:25"},"gpu":"NVIDIA GeForce RTX 4060 Laptop GPU","driver":"NVIDIA 617.42","os":"Windows 10.0.26200","cpu":"AMD Ryzen 7 7840HS w/ Radeon 780M Graphics","cpu_threads":16,"memory_mib":15654,"title_id":"PPSA02225","title":"Ghost of Tsushima","content_version":"02.024.000","resolution":"3840x2160","window":{"spec":"seconds 60:25","first_present":754,"ms":25248.374},"presents":101,"frame_ms":{"p50":156.209,"p90":414.904,"p99":694.305,"max":6420.211},"gpu_busy_ms_per_present":51.492,"worker_busy_pct":{"queue worker 0x0":38.28,"queue worker 0x40":42.371,"queue worker 0x20":81.522,"queue worker 0x48":78.891,"queue worker 0x38":0.0,"queue worker 0x52":0.0,"queue worker 0x30":0.0},"top_phases_ms_per_frame":{"Driver.Packet":589.463,"Driver.Packet.dispatch":408.703,"Driver.Dispatch":387.756,"Vulkan.Dispatch":194.072,"Vulkan.Dispatch.shader_resources":189.457,"GpuMutex.wait.dispatch":164.964,"Driver.Packet.memory_wait":99.298,"VideoOut.Flip":83.948},"trace_dropped":false,"trace":"C3a-60-25-aps5-trace.json.gz"}
{"commit":"f3222bb7c416","dirty":false,"env":{"APS5_PROFILE_DRAW":"1","APS5_SKIP_REFUSED_DRAWS":"1","APS5_SOFT_DEPTH_CHECKS":"1","APS5_TRACE_SECONDS":"60:25"},"gpu":"NVIDIA GeForce RTX 4060 Laptop GPU","driver":"NVIDIA 617.42","os":"Windows 10.0.26200","cpu":"AMD Ryzen 7 7840HS w/ Radeon 780M Graphics","cpu_threads":16,"memory_mib":15654,"title_id":"PPSA02225","title":"Ghost of Tsushima","content_version":"02.024.000","resolution":"3840x2160","window":{"spec":"seconds 60:25","first_present":410,"ms":25083.217},"presents":105,"frame_ms":{"p50":171.424,"p90":334.875,"p99":799.943,"max":5300.815},"gpu_busy_ms_per_present":56.56,"worker_busy_pct":{"queue worker 0x0":62.028,"queue worker 0x40":57.834,"queue worker 0x20":89.569,"queue worker 0x48":81.892,"queue worker 0x38":0.0,"queue worker 0x52":0.0,"queue worker 0x30":0.0},"top_phases_ms_per_frame":{"Driver.Packet":686.847,"Driver.Packet.dispatch":422.555,"Driver.Dispatch":395.098,"Vulkan.Dispatch":196.354,"Vulkan.Dispatch.shader_resources":191.891,"GpuMutex.wait.dispatch":182.028,"Driver.Packet.memory_wait":130.595,"GpuMutex.wait.flush":70.036},"trace_dropped":false,"trace":"C3b-60-25-aps5-trace.json.gz"}
trace_digest.py output (first lines of each run)

C1a

**seconds 60:25** from present 739: 89 presents, frame p50 187.0 / p90 503.9 / p99 5466.6 / max 5466.6 ms, GPU busy 67.0 ms per present
NVIDIA GeForce RTX 4060 Laptop GPU, NVIDIA 617.42, Windows 10.0.26200, 3840x2160, commit d842941d04e3, dropped: no


**Slowest frames** (largest slices inside each, inclusive)

- present 827: 5466.6 ms at 20509 ms: Driver.Packet (queue worker 0x40) 5425.5, Driver.Packet.dispatch (queue worker 0x40) 5425.5, Driver.Dispatch (queue worker 0x40) 5424.8, Driver.Packet (queue worker 0x0) 5361.7
- present 765: 985.2 ms at 5487 ms: Driver.WorkerWait (queue worker 0x40) 985.2, Driver.WorkerWait.idle_and_completion_poll (queue worker 0x40) 985.2, Driver.Packet (queue worker 0x20) 958.4, Driver.WorkerWait (queue worker 0x48) 
- present 825: 696.4 ms at 19583 ms: Driver.Packet (queue worker 0x20) 661.4, Driver.Packet (queue worker 0x40) 642.4, Driver.Packet.dispatch (queue worker 0x40) 642.3, Driver.Dispatch (queue worker 0x40) 641.7
- present 773: 618.2 ms at 8751 ms: Driver.WorkerWait (queue worker 0x40) 618.2, Driver.WorkerWait.idle_and_completion_poll (queue worker 0x40) 618.2, Driver.Packet (queue worker 0x48) 581.2, Driver.Packet.dispatch (queue worker 0
- present 787: 580.8 ms at 11669 ms: Driver.WorkerWait (queue worker 0x40) 580.8, Driver.WorkerWait.idle_and_completion_poll (queue worker 0x40) 580.8, Driver.Packet (queue worker 0x20) 547.7, Driver.Packet.dispatch (queue worker 

C1b

**seconds 60:25** from present 408: 93 presents, frame p50 184.1 / p90 386.4 / p99 5395.1 / max 5395.1 ms, GPU busy 70.8 ms per present
NVIDIA GeForce RTX 4060 Laptop GPU, NVIDIA 617.42, Windows 10.0.26200, 3840x2160, commit d842941d04e3, dropped: no


**Slowest frames** (largest slices inside each, inclusive)

- present 467: 5395.1 ms at 12482 ms: Driver.Packet (queue worker 0x20) 5382.4, Driver.Packet (queue worker 0x0) 5357.0, Driver.Packet (queue worker 0x40) 5356.1, Driver.Packet.dispatch (queue worker 0x40) 5356.1
- present 468: 830.2 ms at 17877 ms: Driver.Packet (queue worker 0x20) 808.6, Driver.Packet (queue worker 0x40) 701.8, Driver.Packet.dispatch (queue worker 0x40) 701.7, Driver.Dispatch (queue worker 0x40) 701.1
- present 437: 660.1 ms at 5976 ms: Driver.Packet (queue worker 0x48) 557.2, Driver.Packet.dispatch (queue worker 0x48) 556.8, Driver.Dispatch (queue worker 0x48) 556.7, Driver.Packet (queue worker 0x20) 547.8
- present 439: 602.5 ms at 6678 ms: Driver.Packet (queue worker 0x20) 586.7, Driver.Packet (queue worker 0x48) 572.4, Driver.Packet.dispatch (queue worker 0x48) 572.0, Driver.Dispatch (queue worker 0x48) 571.8
- present 428: 531.6 ms at 4013 ms: Driver.Packet (queue worker 0x20) 507.3, Driver.Packet (queue worker 0x40) 496.6, Driver.Packet.dispatch (queue worker 0x40) 496.6, Driver.Dispatch (queue worker 0x40) 496.4

C3a

**seconds 60:25** from present 754: 101 presents, frame p50 156.2 / p90 414.9 / p99 694.3 / max 6420.2 ms, GPU busy 51.5 ms per present
NVIDIA GeForce RTX 4060 Laptop GPU, NVIDIA 617.42, Windows 10.0.26200, 3840x2160, commit f3222bb7c416, dropped: no


**Slowest frames** (largest slices inside each, inclusive)

- present 842: 6420.2 ms at 16946 ms: Driver.Packet (queue worker 0x48) 6213.6, Driver.Packet.dispatch (queue worker 0x48) 6211.2, Driver.Dispatch (queue worker 0x48) 6208.4, Vulkan.Dispatch (queue worker 0x48) 6165.2
- present 778: 694.3 ms at 4299 ms: Driver.WorkerWait (queue worker 0x40) 694.3, Driver.WorkerWait.idle_and_completion_poll (queue worker 0x40) 694.3, Driver.WorkerWait (queue worker 0x0) 665.5, Driver.WorkerWait.idle_and_completi
- present 777: 673.5 ms at 3626 ms: Driver.WorkerWait (queue worker 0x40) 673.5, Driver.WorkerWait.idle_and_completion_poll (queue worker 0x40) 673.5, Driver.WorkerWait (queue worker 0x0) 663.7, Driver.WorkerWait.idle_and_completi
- present 770: 620.5 ms at 2010 ms: Driver.WorkerWait (queue worker 0x40) 620.5, Driver.WorkerWait.idle_and_completion_poll (queue worker 0x40) 620.5, Driver.Packet (queue worker 0x48) 617.7, Driver.Packet.dispatch (queue worker 0
- present 840: 509.5 ms at 16328 ms: Driver.Packet (queue worker 0x20) 489.3, Driver.Packet (queue worker 0x40) 473.2, Driver.Packet.dispatch (queue worker 0x40) 473.2, Driver.Dispatch (queue worker 0x40) 472.1

C3b

**seconds 60:25** from present 410: 105 presents, frame p50 171.4 / p90 334.9 / p99 799.9 / max 5300.8 ms, GPU busy 56.6 ms per present
NVIDIA GeForce RTX 4060 Laptop GPU, NVIDIA 617.42, Windows 10.0.26200, 3840x2160, commit f3222bb7c416, dropped: no


**Slowest frames** (largest slices inside each, inclusive)

- present 481: 5300.8 ms at 12980 ms: Driver.Packet (queue worker 0x20) 5286.9, Driver.Packet (queue worker 0x40) 5262.7, Driver.Packet.dispatch (queue worker 0x40) 5262.6, Driver.Dispatch (queue worker 0x40) 5262.4
- present 483: 799.9 ms at 18860 ms: Driver.Packet (queue worker 0x48) 766.6, Driver.Packet.dispatch (queue worker 0x48) 765.8, Driver.Dispatch (queue worker 0x48) 765.6, Vulkan.Dispatch (queue worker 0x48) 756.7
- present 482: 579.3 ms at 18281 ms: Driver.WorkerWait (queue worker 0x0) 567.1, Driver.WorkerWait.idle_and_completion_poll (queue worker 0x0) 566.8, Driver.Packet (queue worker 0x20) 505.5, VideoOut.Flip (presenter) 408.2
- present 486: 506.0 ms at 19970 ms: Driver.Packet (queue worker 0x20) 473.4, Driver.Packet (queue worker 0x40) 454.8, Driver.Packet.dispatch (queue worker 0x40) 454.5, Driver.Dispatch (queue worker 0x40) 454.2
- present 463: 453.0 ms at 9048 ms: Driver.Packet (queue worker 0x0) 416.5, Driver.Packet.dispatch (queue worker 0x0) 410.7, Driver.Packet (queue worker 0x20) 361.6, Driver.Packet (queue worker 0x40) 340.5

Traces, digests, the fps and [address] lines of all four runs and the ctest logs: https://github.com/sktharunbalaji13-cmd/AnyPS5/tree/evidence/got-ram-logo/ghost-of-tsushima/commits-2026-11-06

Checklist

  • Based on current main; no other open PR implements the same functions
  • One topic per PR; follow-ups go in a new PR
  • No comments in code except technical debt
  • Unimplemented paths throw (NotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file
  • No notes, investigation .md files or images added to the repository (attach them to this PR)
  • New third-party code is a submodule built from source
  • Generic behaviour, not specific to one title
  • Depends on: none
  • Fixes: none
  • Unblocks: PPSA02225 Ghost of Tsushima Director's Cut (PPSA02225) — bring-up progress #4461
  • GPUs tested: NVIDIA GeForce RTX 4060 Laptop GPU, driver 617.42, Windows 11 (26200)
  • AI-assisted: yes

🤖 Generated with Claude Code, OpenCode, Command Code and Gemini

…mory

An address-based build refreshes every 64 KiB block of a heap mirror whose
tracker stamp is newer than the mirror's generation. Blocks the driver itself
stamped after writing GPU results back to guest memory are flagged the same
way as blocks the title wrote, so a resident or plain heap mirror copied them
again although the mirror already held those bytes, then staged and
transferred them to the GPU.

compareBlock now compares the guest bytes with the mirror first and, when
they match, advances the block's generation without copying and without
marking the resident block changed, so no staging copy or GPU transfer
follows.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@github-actions github-actions Bot added perf Performance change perf numbers missing perf pull request without a before and after summary line unblocks title Names a title ID on the Unblocks line labels Nov 5, 2026
@github-actions

github-actions Bot commented Nov 5, 2026

Copy link
Copy Markdown

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

@github-actions github-actions Bot added the agc libSceAgc* label Nov 5, 2026
@oneandonlydean oneandonlydean self-assigned this Nov 5, 2026
A mirror whose blocks carry generation 0 is not write-watched, so every
block is flagged on every build and nothing says which bytes the title
changed. The compare-before-copy added for watched mirrors reduced the
copied-block count of those unwatched mirrors too, and the heap mirror
unwatch tests require the refused heap's mirror to be refreshed in full.
Comparing only applies to blocks with a nonzero generation again.

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

Copy link
Copy Markdown
Contributor

❌ NVIDIA GPU test: failed

PR head 2d7c0c8 merged onto main e9247a9 · tested 2026-11-05 23:17 UTC · 39 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,884 passed · 5 failed (1 new: 1 pass on main with the PR's tests, 3 also fail on main, 1 unstable on main) · 51 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,940 of 4,105 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 (969 tests run on the GPU)
Slow tests (>30 s, GPU tests timed with validation layers) ⚠️ agc_driver_pipeline_journal 120.1 s

Failing tests

This PR changes test files, so each failing test was also built and run on main with only the PR's test changes applied. ✅ there means the failure comes from the PR's other changes; ❌ means the test fails on main too, so this run does not show the PR caused it.

Test With this PR Same test on main e9247a9 (main + this PR's test changes only)
agc_driver_submit_progress ❌ failed ✅ passed
agc_driver_submit_progress: Failed (also failed when re-run alone), assertion and diagnostics
ctest: Failed

[write-watch] host imports resolve write protection: no (0 of 4 scratch pages written after a GPU read, 0 after a GPU write, 4 after the import); imported ranges stay watched
[write-watch] host imports resolve write protection: no (0 of 4 scratch pages written after a GPU read, 0 after a GPU write, 4 after the import); imported ranges stay watched
submission lost its real GPU completion store
[Shaders/ShaderRegistry.cpp:901 ReportPreparedAtUse] Compute shader 0x62fde916c100 was not registered; preparing its artifact at dispatch
Unstable on main (1, these also failed in recent main runs on this machine; not counted against this PR)
agc_driver_pipeline_journal: failed in 1 of the last 10 main runs
Failing on main too (3, not counted against this PR)
agc_driver_image_table
guest_mmap_executable
guest_socket_options_multicast
Validation IDs already present on main (9 IDs in 585 tests)
VUID-VkDeviceCreateInfo-pNext-pNext (585 tests): agc_driver, agc_driver_address_draw_space_reuse, agc_driver_address_passes, agc_driver_alias_copy_label, agc_driver_alpha_to_coverage, agc_driver_array_layer_target, agc_driver_bc_block_copy, agc_driver_bda_anchor_reads, and 577 more
VUID-VkShaderModuleCreateInfo-pCode-08737 (14 tests): agc_driver_dpp16_operands, agc_driver_dpp8_pk_fmac, agc_driver_dx10_clamp, agc_driver_f16_fma_denormal_modes, agc_driver_f16_fma_invalid_nan, agc_driver_float16_fma_rounding, agc_driver_float16_modifiers, agc_driver_float16_native, and 6 more
VUID-VkShaderModuleCreateInfo-pCode-08739 (14 tests): agc_driver_dpp16_operands, agc_driver_dpp8_pk_fmac, agc_driver_dx10_clamp, agc_driver_f16_fma_denormal_modes, agc_driver_f16_fma_invalid_nan, agc_driver_float16_fma_rounding, agc_driver_float16_modifiers, agc_driver_float16_native, and 6 more
VUID-VkShaderModuleCreateInfo-pCode-08741 (14 tests): agc_driver_dpp16_operands, agc_driver_dpp8_pk_fmac, agc_driver_dx10_clamp, agc_driver_f16_fma_denormal_modes, agc_driver_f16_fma_invalid_nan, agc_driver_float16_fma_rounding, agc_driver_float16_modifiers, agc_driver_float16_native, and 6 more
VUID-vkCmdCopyImage-srcImage-01548 (7 tests): agc_driver_depth_clear_hle, agc_driver_depth_plane_buffer_memory, agc_driver_depth_plane_partial_store, agc_driver_depth_plane_sampling, agc_driver_depth_storage_dispatch, agc_driver_depth_surface_from_storage, agc_driver_dispatch_move_depth
VUID-vkCmdCopyImage-srcImage-01551 (7 tests): agc_driver_depth_clear_hle, agc_driver_depth_plane_buffer_memory, agc_driver_depth_plane_partial_store, agc_driver_depth_plane_sampling, agc_driver_depth_storage_dispatch, agc_driver_depth_surface_from_storage, agc_driver_dispatch_move_depth
VUID-VkPipelineColorBlendStateCreateInfo-pAttachments-00605 (1 test): agc_driver_prepared_exports
VUID-VkPipelineShaderStageCreateInfo-module-parameter (1 test): agc_driver_float16_unused_nan_payloads
VUID-VkPipelineShaderStageCreateInfo-pSpecializationInfo-06849 (1 test): agc_driver_float16_unused_nan_payloads
Skipped (51)
agc_driver_gcn_display_present: skipped, no display: Vulkan support is either not configured in SDL or not available in current SDL video driver (offscreen) or platform
agc_driver_sample_order_grid_reference: skipped, the device does not keep depth drawn at custom sample locations at those locations, even after a transition that names them: the composite of uniform renders holds the guest's depth in 0 of 3005 sloped samples, so no path can be compared with it bit for bit
agc_driver_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
guest_http_uri_locale: 
guest_net_ctl: skipped, the host has no IPv4 address
guest_net_ctl_disconnected: 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_device_capability: 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_host_resolution_disabled: skipped, no display or Vulkan device: SDL_InitSubSystem(VIDEO | GAMECONTROLLER) failed: wayland,x11 not available
guest_video_out_host_resolution_four_k: skipped, no display or Vulkan device: SDL_InitSubSystem(VIDEO | GAMECONTROLLER) failed: wayland,x11 not available
guest_video_out_host_resolution_height_only: skipped, no display or Vulkan device: SDL_InitSubSystem(VIDEO | GAMECONTROLLER) failed: wayland,x11 not available
guest_video_out_host_resolution_limit: skipped, no display or Vulkan device: SDL_InitSubSystem(VIDEO | GAMECONTROLLER) failed: wayland,x11 not available
guest_video_out_host_resolution_malformed: skipped, no display or Vulkan device: SDL_InitSubSystem(VIDEO | GAMECONTROLLER) failed: wayland,x11 not available
guest_video_out_host_resolution_width_only: skipped, no display or Vulkan device: SDL_InitSubSystem(VIDEO | GAMECONTROLLER) failed: wayland,x11 not available
guest_video_out_output_mode: skipped, no display or Vulkan device: SDL_InitSubSystem(VIDEO | GAMECONTROLLER) failed: wayland,x11 not available
guest_video_out_resolution_status: skipped, no display or Vulkan device: SDL_InitSubSystem(VIDEO | GAMECONTROLLER) failed: wayland,x11 not available
guest_video_out_wqhd_detection: skipped, no display or Vulkan device: SDL_InitSubSystem(VIDEO | GAMECONTROLLER) failed: wayland,x11 not available
video_out_flip_aftergpu: skipped, no display or Vulkan device: DisplayWindow: Vulkan support is either not configured in SDL or not available in current SDL video driver (offscreen) or platform
video_out_flip_backtoback: skipped, no display or Vulkan device: DisplayWindow: Vulkan support is either not configured in SDL or not available in current SDL video driver (offscreen) or platform
video_out_flip_controls: skipped, no display or Vulkan device: DisplayWindow: Vulkan support is either not configured in SDL or not available in current SDL video driver (offscreen) or platform
video_out_flip_cpuflip: skipped, no display or Vulkan device: DisplayWindow: Vulkan support is either not configured in SDL or not available in current SDL video driver (offscreen) or platform
video_out_flip_cpuflip_in_order: skipped, no display or Vulkan device: DisplayWindow: Vulkan support is either not configured in SDL or not available in current SDL video driver (offscreen) or platform
video_out_flip_dcc: skipped, no display or Vulkan device: DisplayWindow: Vulkan support is either not configured in SDL or not available in current SDL video driver (offscreen) or platform
video_out_flip_deferred: skipped, no
Reproduce
git fetch origin 2d7c0c8ec6a33ef0e6a458168dbc1734b3429f6c e9247a966ff6cce55816ffe1d73a2679074348a4
git checkout e9247a966ff6cce55816ffe1d73a2679074348a4 && git merge --no-ff 2d7c0c8ec6a33ef0e6a458168dbc1734b3429f6c
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
# the failing tests, on this merge and on main:
ANYPS5_REQUIRE_VULKAN=1 ANYPS5_NO_SHADER_CACHE=1 VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation \
  ctest --test-dir build -R '^(agc_driver_submit_progress)$' --parallel 1 -V

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.

@sktharunbalaji13-cmd

Copy link
Copy Markdown
Contributor Author

The NVIDIA run's only new failure is agc_driver_submit_progress, the plain run of agc_driver_submit_progress_tests (without APS5_SUBMIT_PROGRESS=1). I do not think this change can reach it, and the test is unstable on this bot:

  • The change acts only in compareBlock, which works on heap mirrors. The driver builds a heap mirror when it cannot import an allocation (heapCopyReason, "heap mirror refused"). The failing log ends with host imports at shutdown: 1 live (0.1 MiB); made 1 (0.1 MiB), refused 0 ... build 1/0/0: the build imported the test's 64 KiB block, which points to the import path, where compareBlock is not used.
  • The bot's own history lists this test as failing on main: #15675 (AMD) shows agc_driver_submit_progress: failed in 8 of the last 10 main runs, and #15886 (NVIDIA, head 8d08706) shows failed in 2 of the last 10 main runs.
  • On Windows with an RTX 4060 Laptop, a local build with both commits of this PR passes agc_driver_submit_progress 10 of 10 times, and agc_submit_progress and agc_submit_progress_no_timeline pass, all with ANYPS5_REQUIRE_VULKAN=1 ANYPS5_NO_SHADER_CACHE=1 VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation.

The other four failures in that run (agc_driver_image_table, guest_mmap_executable, guest_socket_options_multicast, agc_driver_pipeline_journal) also fail or are unstable on main, and the bot reports no new validation IDs.

🤖 Addressed by Claude Code

@blawesom

blawesom commented Nov 6, 2026

Copy link
Copy Markdown
Contributor

Linux/RADV validation-layer run of head 2d7c0c8ec6a merged onto main 669f0673fae locally (clean merge).

Setup. CachyOS x86-64, kernel 7.3.1, AMD Radeon RX 9070 XT (RADV GFX1201), Mesa 26.2.5, Vulkan 1.4.363 loader with Khronos validation layer 1.4.363, GCC 16.2.1, Ninja, Release, -DANYPS5_ENABLE_SPIRV_TOOLS=ON. Both arms ran your focused pattern (agc_(heap_mirror|sparse_heap_mirror|address_copy_cap|address_space_unwatched|sparse_buffer|driver_graphics|graphics_profile|driver_resident_heap_mirror|driver_address_draw_space_reuse|driver_host_import_windows)) sequentially on the same GPU with ANYPS5_REQUIRE_VULKAN=1 ANYPS5_NO_SHADER_CACHE=1.

Results.

  • Main arm: 24 of 24 pass. This head: 24 of 24 pass. The per-test outcome lists are identical between the arms (two entries more than your Windows run, platform-conditional registration), including agc_heap_mirror_unwatch* and agc_sparse_heap_mirror_*, so the second commit's nonzero-generation restriction holds on RADV too.
  • Neither log contains a VUID- line or was not found but was requested by env var VK_INSTANCE_LAYERS.

That gives the focused set a clean run on a second vendor and OS alongside your Windows/NVIDIA run and the Ghost of Tsushima measurement.

AI-assisted: yes

@github-actions

github-actions Bot commented Nov 7, 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 5021 core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
core/libs/prx/libSceAgcDriver/tests/BdaResources.cpp
PR 6186 core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
PR 6197 core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
core/libs/prx/libSceAgcDriver/tests/BdaResources.cpp
PR 6412 core/libs/prx/libSceAgcDriver/tests/BdaResources.cpp
PR 6481 core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
PR 6918 core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
core/libs/prx/libSceAgcDriver/tests/BdaResources.cpp
PR 7457 core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
PR 7514 core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
PR 7622 core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
PR 7642 core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
core/libs/prx/libSceAgcDriver/tests/BdaResources.cpp
PR 9012 core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
PR 9289 core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
PR 9852 core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
PR 10193 core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
core/libs/prx/libSceAgcDriver/tests/BdaResources.cpp
PR 10442 core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
core/libs/prx/libSceAgcDriver/tests/BdaResources.cpp
PR 12157 core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
PR 13148 core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
PR 13863 core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
PR 13920 core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
PR 13928 core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
core/libs/prx/libSceAgcDriver/tests/BdaResources.cpp
PR 13929 core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
core/libs/prx/libSceAgcDriver/tests/BdaResources.cpp
PR 15296 core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
core/libs/prx/libSceAgcDriver/tests/execution/ResidentHeapMirror.cpp
PR 15302 core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
PR 15570 core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp

@oneandonlydean
oneandonlydean merged commit e72f4f2 into boykopovar:main Nov 7, 2026
14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agc libSceAgc* perf Performance change unblocks title Names a title ID on the Unblocks line

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants