perf(agc): store a resident heap mirror's write-back from its readback buffer #12827

Open
JJenkx wants to merge 3 commits from upstream-pr/12827 into main
JJenkx commented 2026-10-29 11:42:52 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by JJenkx on 2026-10-29T11:42:52Z.


Status (2026-12-01): head ce2550a3f277 is @oneandonlydean's merge of main, which re-applies this change on the piece-wise write-back path that #12840 introduced: a piece covered by a heap readback is now stored straight from the readback span instead of being copied into a temporary vector first. Linux at this head (Arch Linux, RX 6650 XT, Mesa RADV, Release, Vulkan validation layer active): ctest -R 'agc_driver_resident_heap_mirror|heap_mirror|resident' 29/29 passed, 0 VUID, 0 SYNC-HAZARD. His same-scene pair on PPSA21564 (base, head, head, base) is neutral: +0.44 ms frame p50 against a 1.0 ms noise floor. This PR therefore claims only the per-write-back copy it removes, not a scene speedup.

Current Linux qualification and scope (2026-11-19): commands, source pins, validation, readback attribution and attached evidence. This report addresses the review's alternative of retaining per-write-back attribution without claiming a scene-matched title speedup. The topic remains c12a20f45da5; no implementation change is implied by this description update.

The report applies the existing patch privately on main 50f2772c6b10, with the same diagnostic instrumentation and copied-writer fixture held constant in both arms. Full SDK builds pass. The same eight focused checks pass on each arm on Linux / AMD Radeon RX 6650 XT / RADV Mesa 26.2.7 / Khronos validation 1.4.363: no skips or VUIDs, seven layer insertions per arm, including actual sparse resident mirror execution.

Two separately queued cold-opening Mortal Shell II (PPSA34008) runs completed normally with fresh saves and identical cache conditions. The recorded UploadFinish.cpu_writers spans total 46,042 ms versus 14,906 ms over 10–120 s. These private-instrumentation observations are attribution only: at 135 s the baseline is black while the change shows a character/cutscene, and the sampled fault recordings lose data. They establish no FPS ratio, matched-scene gain or title unblock. The implementation removes the temporary readback copy; a merge decision need not rely on any numerical title speed claim from this new report.

Older contributor measurements and historical integrations below retain their own source/configuration pins and limitations; they are not new plain-main or current-main performance validation. The requested scene-matched performance rerun remains unproven by this latest local experiment.

Additional title measurements supplied by @mrfelek, 2026-11-04: full route, source pins, summaries and trace digests. On PPSA22408 (Hot Wheels Infinite Rush), RTX3080Ti/NVIDIA615.71.09, Ryzen5950X/Linux7.3, 3840×2160, warm shader caches and identical import/staging/shadow settings, their alternating A/B/A/B route compares plain main b11c7bf84f with that main plus this PR's c12a20f45d topic (5fcf8be8a4). The post-load flyover improves from 0.30/0.30 to 0.62/0.63 presents/s, with median frame p50 moving from3.94/4.10s to1.82/1.86s. This remains very slow gameplay.

The race-load window has no established improvement; the attached 330:10s trace windows land in loading and do not measure that post-load gain. The comment separately provides the post-load summary records. Later magenta/green artifacts also occur on their longer main control, and no exceptions occurred. These are the contributor's measurements, not locally reproduced title results. Their PPSA28416 multi-PR-tree switch pairs are attribution-only, not plain-main performance evidence. All measurements retain these historical source/configuration pins and do not qualify later heads.

Previous implementation report and contribution template:

What

GuestBufferMemory::WriteBack stores a resident heap mirror's write-back from its recorded readback buffer. It used to copy the readback into a new std::vector<std::byte> of the written range and store from that copy. ResidentBuffer::Store and storeChanged/storeSparse take a std::span<const std::byte>, and the readback buffer stays alive in heapReadbacks for the whole write-back, so the copy is dropped. A write-back without a recorded readback (ResidentBuffer::ReadDevice) still reads into a vector, as before. The bytes stored in the resident shadow and in guest memory are the same.

Why

In Echoes of the End (PPSA25636), a compute dispatch with atomic writes into a resident sparse heap mirror completes about once per second. Each completion writes back the dispatch's whole written range, about 540 MiB. A later build that reads the same heap waits for that write-back in CompletePendingCpuWrites (UploadFinish). Allocating, zeroing and filling the 540 MiB vector took most of each write-back.

The attribution below comes from a private integration tree (older main plus open PRs) with private counters (APS5_PROFILE_DRAW plus diagnostics). It is attribution, not a speed claim: 4 interleaved 900 s runs of the same build, with a private switch restoring the copy.

Per write-back (mean) with the copy without (this change)
copy into the vector 342 / 332 ms 0 / 0 ms
ResidentBuffer::Store 42 / 47 ms 78 / 81 ms
guest store (storeChanged) 35 / 36 ms 36 / 38 ms
CompletePendingCpuWrites sync per copied-writer overlap 511 / 503 ms 168 / 172 ms
total in those syncs per 900 s run 368 / 349 s 135 / 141 s

ResidentBuffer::Store reads the host-visible readback mapping directly now, so it got slower. The total per write-back still falls from about 419 ms to about 115 ms.

Tested

Arch Linux 7.2.9-arch1-1, AMD Radeon RX 6650 XT, RADV Mesa 26.2.4, Ryzen 9 7950X.

Focused tests on main and on the change (ANYPS5_REQUIRE_VULKAN=1 ANYPS5_NO_SHADER_CACHE=1 VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation ctest -V -j1 -R 'agc_driver_resident_heap_mirror|heap_mirror'; 9 tests):

  • main 4c7d275bef: 9/9 passed, 0 VUID-.
  • Change (same code on 4c7d275bef): 9/9 passed, 0 VUID-.
  • Neither log reports was not found but was requested by env var VK_INSTANCE_LAYERS.
  • agc_driver_resident_heap_mirror ran its resident tests on this device (the device has sparse residency; the log prints resident heap mirror tests passed, not the skip message). They dispatch stores into a resident heap mirror and check guest memory after the write-back.

Echoes of the End: same-scene main/change pairs on one machine (also posted with screenshots in https://github.com/boykopovar/AnyPS5/pull/12827#issuecomment-6505299937). Echoes does not boot on main alone:

  • Without #4449, host imports fail (-1000072003) and it segfaults at 32 s.
  • Without #8089, it aborts at 24 s: ShaderRecompiler::Recompile: value IR instruction definition does not dominate its use (#8050).
  • Without #11873 and #6867, it hits the early cold-load crash at 28 s.

Both sides therefore use the same private base: main 899ae3d1ad + #4449 + #8089 + #11873 + #6867, commit 27db71c581b. The change side is that base + this PR's commit, 3e83ee94776; its git patch-id equals c12a20f45da's. These runs therefore compare this PR on that private stack, not on bare main.

Runs:

  • 1800 s each, scripted pad input, the same warm seeded cache before every run (seed manifest 6a3bbca6eb39b28b), APS5_TRACE_SECONDS=1500:240, no other APS5_TRACE_*/APS5_PROFILE_* switch set.
  • Order: base, change, then six runs for other PRs, then change, base. Nothing crashed.
  • Machine: Arch Linux 7.2.9-arch1-1, Ryzen 9 7950X, RX 6650 XT, RADV Mesa 26.2.4, 3840x2160.
  • Scenes were checked with screenshots at 1440 s and 1795 s, which bracket the 1500–1740 s window.

Pair 1: in-game "Loading..." screen (cathedral with the blue crystal) in both windows. Base, then change:

{"commit":"27db71c581b4","dirty":false,"env":{"APS5_PAD_INPUT_FILE":"<path>","APS5_TRACE_DIR":"<path>","APS5_TRACE_SECONDS":"1500:240"},"gpu":"AMD Radeon RX 6650 XT (RADV NAVI23)","driver":"radv Mesa 26.2.4-arch1.1","os":"Linux 7.2.9-arch1-1","cpu":"AMD Ryzen 9 7950X 16-Core Processor","cpu_threads":32,"memory_mib":127901,"title_id":"PPSA25636","title":"Echoes of the End","content_version":"01.012.000","resolution":"3840x2160","window":{"spec":"seconds 1500:240","first_present":803,"ms":240007.014},"presents":125,"frame_ms":{"p50":1621.105,"p90":2233.242,"p99":8046.195,"max":8428.698},"gpu_busy_ms_per_present":816.406,"worker_busy_pct":{"queue worker 0x0":99.503,"queue worker 0x20":98.191},"top_phases_ms_per_frame":{"Driver.Packet":3760.159,"Driver.Packet.dispatch":2070.479,"Driver.Dispatch":1796.986,"Driver.Packet.memory_wait":1211.455,"Vulkan.Dispatch":1111.888,"Resources.Complete":1068.127,"Vulkan.Dispatch.shader_resources":1033.539,"Graphics.Draw":286.697},"trace_dropped":true,"trace_dropped_threads":{"queue worker 0x0":{"events_full_after_s":64.295,"events_lost":646426,"totals_full":false},"queue worker 0x20":{"events_full_after_s":217.500,"events_lost":27431,"totals_full":false}},"trace":"aps5-trace-27db71c581b4-196709.json.gz"}
{"commit":"3e83ee94776d","dirty":false,"env":{"APS5_PAD_INPUT_FILE":"<path>","APS5_TRACE_DIR":"<path>","APS5_TRACE_SECONDS":"1500:240"},"gpu":"AMD Radeon RX 6650 XT (RADV NAVI23)","driver":"radv Mesa 26.2.4-arch1.1","os":"Linux 7.2.9-arch1-1","cpu":"AMD Ryzen 9 7950X 16-Core Processor","cpu_threads":32,"memory_mib":127901,"title_id":"PPSA25636","title":"Echoes of the End","content_version":"01.012.000","resolution":"3840x2160","window":{"spec":"seconds 1500:240","first_present":1452,"ms":240019.614},"presents":341,"frame_ms":{"p50":704.873,"p90":877.547,"p99":1018.779,"max":1114.243},"gpu_busy_ms_per_present":335.082,"worker_busy_pct":{"queue worker 0x0":98.756,"queue worker 0x20":97.053},"top_phases_ms_per_frame":{"Driver.Packet":1357.357,"Driver.Packet.dispatch":671.973,"Driver.Dispatch":595.953,"Driver.Packet.memory_wait":456.245,"Vulkan.Dispatch":245.115,"Vulkan.Dispatch.shader_resources":233.316,"Resources.Complete":188.105,"Graphics.Draw":126.533},"trace_dropped":true,"trace_dropped_threads":{"queue worker 0x0":{"events_full_after_s":28.328,"events_lost":2033306,"totals_full":false},"queue worker 0x20":{"events_full_after_s":94.147,"events_lost":460849,"totals_full":false}},"trace":"aps5-trace-3e83ee94776d-824611.json.gz"}
  • frame p50 1621.1 → 704.9 ms, p90 2233.2 → 877.5 ms, GPU busy 816.4 → 335.1 ms per present.
  • Attribution from the first 25 s of each trace, the span both traces recorded fully: Resources.Complete on queue worker 0x20 (the copied-writer write-back) took 7.4 s on base and 3.5 s on the change. Recorder.Sync on that worker took 1.6 s and 0.8 s.

Pair 2: in-world scene (two characters at a ruined archway) in both windows. Base, then change:

{"commit":"27db71c581b4","dirty":false,"env":{"APS5_PAD_INPUT_FILE":"<path>","APS5_TRACE_DIR":"<path>","APS5_TRACE_SECONDS":"1500:240"},"gpu":"AMD Radeon RX 6650 XT (RADV NAVI23)","driver":"radv Mesa 26.2.4-arch1.1","os":"Linux 7.2.9-arch1-1","cpu":"AMD Ryzen 9 7950X 16-Core Processor","cpu_threads":32,"memory_mib":127901,"title_id":"PPSA25636","title":"Echoes of the End","content_version":"01.012.000","resolution":"3840x2160","window":{"spec":"seconds 1500:240","first_present":1054,"ms":240025.444},"presents":220,"frame_ms":{"p50":1084.471,"p90":1276.934,"p99":1413.076,"max":1538.887},"gpu_busy_ms_per_present":563.648,"worker_busy_pct":{"queue worker 0x0":99.116,"queue worker 0x20":97.803},"top_phases_ms_per_frame":{"Driver.Packet":2123.795,"Driver.Packet.dispatch":1102.659,"Driver.Dispatch":997.477,"Driver.Packet.memory_wait":748.864,"Vulkan.Dispatch":540.299,"Vulkan.Dispatch.shader_resources":527.130,"Resources.Complete":476.271,"GpuMutex.wait.indirect":155.197},"trace_dropped":true,"trace_dropped_threads":{"queue worker 0x0":{"events_full_after_s":39.845,"events_lost":1294831,"totals_full":false},"queue worker 0x20":{"events_full_after_s":127.742,"events_lost":221256,"totals_full":false}},"trace":"aps5-trace-27db71c581b4-1422189.json.gz"}
{"commit":"3e83ee94776d","dirty":false,"env":{"APS5_PAD_INPUT_FILE":"<path>","APS5_TRACE_DIR":"<path>","APS5_TRACE_SECONDS":"1500:240"},"gpu":"AMD Radeon RX 6650 XT (RADV NAVI23)","driver":"radv Mesa 26.2.4-arch1.1","os":"Linux 7.2.9-arch1-1","cpu":"AMD Ryzen 9 7950X 16-Core Processor","cpu_threads":32,"memory_mib":127901,"title_id":"PPSA25636","title":"Echoes of the End","content_version":"01.012.000","resolution":"3840x2160","window":{"spec":"seconds 1500:240","first_present":1305,"ms":240957.123},"presents":239,"frame_ms":{"p50":1018.347,"p90":1212.909,"p99":1379.782,"max":1666.358},"gpu_busy_ms_per_present":515.481,"worker_busy_pct":{"queue worker 0x0":99.162,"queue worker 0x20":97.691},"top_phases_ms_per_frame":{"Driver.Packet":1961.533,"Driver.Packet.dispatch":1018.941,"Driver.Dispatch":918.054,"Driver.Packet.memory_wait":701.249,"Vulkan.Dispatch":484.835,"Vulkan.Dispatch.shader_resources":472.343,"Resources.Complete":425.887,"Graphics.Draw":145.052},"trace_dropped":true,"trace_dropped_threads":{"queue worker 0x0":{"events_full_after_s":40.275,"events_lost":1403009,"totals_full":false},"queue worker 0x20":{"events_full_after_s":125.406,"events_lost":258029,"totals_full":false}},"trace":"aps5-trace-3e83ee94776d-787378.json.gz"}
  • frame p50 1084.5 vs 1018.3 ms, p90 1276.9 vs 1212.9 ms.
  • I don't read that as a difference with one run per side. The write-back this change shortens is mostly loading-phase work.
  • The change run reached this scene between 1300 s and 1440 s; the base run had reached it by 1300 s.

Caveats:

  • One run per side per scene. Pair 1 shows a drop in the loading scene; it doesn't establish a size for it.
  • All four traces filled their per-thread event buffers during the window (trace_dropped: true; the digests list the times). The frame times come from presents and are complete; only the per-phase totals are partial.

An earlier pair in this description (900 s runs, APS5_TRACE_SECONDS=600:240) landed on different scenes, so it is removed and is not evidence.

tools/trace_digest.py output for the four traces:

Pair 1 base (27db71c581b4)

seconds 1500:240 from present 803: 125 presents, frame p50 1621.1 / p90 2233.2 / p99 8046.2 / max 8428.7 ms, GPU busy 816.4 ms per present
AMD Radeon RX 6650 XT (RADV NAVI23), radv Mesa 26.2.4-arch1.1, Linux 7.2.9-arch1-1, 3840x2160, commit 27db71c581b4, dropped: yes

{"commit":"27db71c581b4","dirty":false,"env":{"APS5_PAD_INPUT_FILE":"<path>","APS5_TRACE_DIR":"<path>","APS5_TRACE_SECONDS":"1500:240"},"gpu":"AMD Radeon RX 6650 XT (RADV NAVI23)","driver":"radv Mesa 26.2.4-arch1.1","os":"Linux 7.2.9-arch1-1","cpu":"AMD Ryzen 9 7950X 16-Core Processor","cpu_threads":32,"memory_mib":127901,"title_id":"PPSA25636","title":"Echoes of the End","content_version":"01.012.000","resolution":"3840x2160","window":{"spec":"seconds 1500:240","first_present":803,"ms":240007.014},"presents":125,"frame_ms":{"p50":1621.105,"p90":2233.242,"p99":8046.195,"max":8428.698},"gpu_busy_ms_per_present":816.406,"worker_busy_pct":{"queue worker 0x0":99.503,"queue worker 0x20":98.191},"top_phases_ms_per_frame":{"Driver.Packet":3760.159,"Driver.Packet.dispatch":2070.479,"Driver.Dispatch":1796.986,"Driver.Packet.memory_wait":1211.455,"Vulkan.Dispatch":1111.888,"Resources.Complete":1068.127,"Vulkan.Dispatch.shader_resources":1033.539,"Graphics.Draw":286.697},"trace_dropped":true,"trace_dropped_threads":{"queue worker 0x0":{"events_full_after_s":64.295,"events_lost":646426,"totals_full":false},"queue worker 0x20":{"events_full_after_s":217.5,"events_lost":27431,"totals_full":false}},"trace":"aps5-trace-27db71c581b4-196709.json.gz"}

Slowest frames (largest slices inside each, inclusive)

  • present 891: 8428.7 ms at 158334 ms: Driver.Packet (queue worker 0x20) 8360.6, Driver.Packet.dispatch (queue worker 0x20) 5757.9, Driver.Dispatch (queue worker 0x20) 5523.9, Vulkan.Dispatch (queue worker 0x20) 5329.4
  • present 804: 8046.2 ms at 1538 ms: Driver.Packet (queue worker 0x20) 8000.2, Driver.Packet (queue worker 0x0) 7996.0, Driver.Packet.dispatch (queue worker 0x20) 5418.2, Driver.Dispatch (queue worker 0x20) 5363.3
  • present 871: 7934.5 ms at 115262 ms: Driver.Packet (queue worker 0x20) 7864.6, Driver.Packet.dispatch (queue worker 0x20) 6465.5, Driver.Dispatch (queue worker 0x20) 6382.0, Vulkan.Dispatch (queue worker 0x20) 6218.2
  • present 880: 7158.8 ms at 135237 ms: Driver.Packet (queue worker 0x20) 7103.9, Driver.Packet.dispatch (queue worker 0x20) 4626.4, Driver.Dispatch (queue worker 0x20) 4602.4, Vulkan.Dispatch (queue worker 0x20) 4348.6
  • present 840: 5908.3 ms at 65391 ms: Driver.Packet (queue worker 0x20) 5859.2, Driver.Packet.dispatch (queue worker 0x20) 3127.9, Driver.Dispatch (queue worker 0x20) 3056.1, Vulkan.Dispatch (queue worker 0x20) 2725.0

Threads (ms per frame)

thread busy wait untraced in slices < 20 us largest
shader prepare 0.4 (0 %) 0.0 (0 %) 1919.6 0.0 Shader.PrepareArtifact 0.4
shader prepare 0.1 (0 %) 0.0 (0 %) 1919.9 0.0 Shader.PrepareArtifact 0.1
shader prepare 0.4 (0 %) 0.0 (0 %) 1919.6 0.0 Shader.PrepareArtifact 0.4
shader prepare 0.2 (0 %) 0.0 (0 %) 1919.8 0.0 Shader.PrepareArtifact 0.2
shader prepare 0.1 (0 %) 0.0 (0 %) 1919.9 0.0 Shader.PrepareArtifact 0.1
shader prepare 0.2 (0 %) 0.0 (0 %) 1919.9 0.0 Shader.PrepareArtifact 0.2
shader prepare 0.4 (0 %) 0.0 (0 %) 1919.6 0.0 Shader.PrepareArtifact 0.4
shader prepare 0.1 (0 %) 0.0 (0 %) 1919.9 0.0 Shader.PrepareArtifact 0.1
shader prepare 0.3 (0 %) 0.0 (0 %) 1919.8 0.0 Shader.PrepareArtifact 0.3
shader prepare 0.6 (0 %) 0.0 (0 %) 1919.5 0.0 Shader.PrepareArtifact 0.6
shader prepare 0.1 (0 %) 0.0 (0 %) 1919.9 0.0 Shader.PrepareArtifact 0.1
shader prepare 16.9 (1 %) 0.0 (0 %) 1903.2 0.0 Shader.PrepareArtifact 16.9
shader prepare 0.4 (0 %) 0.0 (0 %) 1919.7 0.0 Shader.PrepareArtifact 0.4
shader prepare 0.6 (0 %) 0.0 (0 %) 1919.4 0.0 Shader.PrepareArtifact 0.6
shader prepare 0.1 (0 %) 0.0 (0 %) 1920.0 0.0 Shader.PrepareArtifact 0.1
shader prepare 0.1 (0 %) 0.0 (0 %) 1920.0 0.0 Shader.PrepareArtifact 0.1
shader prepare 2.4 (0 %) 0.0 (0 %) 1917.6 0.0 Vulkan.GraphicsPipelinePrebuild 2.4
shader prepare 2.6 (0 %) 0.0 (0 %) 1917.5 0.0 Vulkan.GraphicsPipelinePrebuild 2.6
shader prepare 1.7 (0 %) 0.0 (0 %) 1918.3 0.0 Vulkan.GraphicsPipelinePrebuild 1.7
shader prepare 0.8 (0 %) 0.0 (0 %) 1919.3 0.0 Vulkan.GraphicsPipelinePrebuild 0.8
shader prepare 0.2 (0 %) 0.0 (0 %) 1919.9 0.0 Vulkan.GraphicsPipelinePrebuild 0.2
shader prepare 0.1 (0 %) 0.0 (0 %) 1920.0 0.0 Vulkan.GraphicsPipelinePrebuild 0.1
shader prepare 2.1 (0 %) 0.0 (0 %) 1918.0 0.0 Vulkan.GraphicsPipelinePrebuild 2.1
shader prepare 0.8 (0 %) 0.0 (0 %) 1919.2 0.0 Vulkan.GraphicsPipelinePrebuild 0.8
shader prepare 0.6 (0 %) 0.0 (0 %) 1919.5 0.0 Vulkan.GraphicsPipelinePrebuild 0.6
shader prepare 1.8 (0 %) 0.0 (0 %) 1918.3 0.0 Vulkan.GraphicsPipelinePrebuild 1.8
shader prepare 0.4 (0 %) 0.0 (0 %) 1919.7 0.0 Vulkan.GraphicsPipelinePrebuild 0.4
shader prepare 1.8 (0 %) 0.0 (0 %) 1918.3 0.0 Vulkan.GraphicsPipelinePrebuild 1.8
shader prepare 1.1 (0 %) 0.0 (0 %) 1918.9 0.0 Vulkan.GraphicsPipelinePrebuild 1.1
shader prepare 2.2 (0 %) 0.0 (0 %) 1917.8 0.0 Vulkan.GraphicsPipelinePrebuild 2.2
shader prepare 1.8 (0 %) 0.0 (0 %) 1918.3 0.0 Vulkan.GraphicsPipelinePrebuild 1.8
shader prepare 0.3 (0 %) 0.0 (0 %) 1919.8 0.0 Vulkan.GraphicsPipelinePrebuild 0.3
queue worker 0x0 372.4 (19 %) 137.7 (7 %) 1410.0 21.7 Driver.Packet 503.7, Driver.EndSubmission 4.2
draw committer 386.0 (20 %) 103.1 (5 %) 1430.9 6.1 Graphics.Draw 265.8, Recorder.Submit 100.4
queue worker 0x20 553.3 (29 %) 1183.7 (62 %) 183.0 19.9 Driver.Packet 1687.9, Driver.EndSubmission 17.3
presenter 1.4 (0 %) 2.5 (0 %) 1916.1 0.1 VideoOut.Flip 3.9, Driver.Present 0.0
title 0.7 (0 %) 0.0 (0 %) 1919.3 0.0 Shader.ResolveAbi 0.5, Shader.ResolveGraphicsStagesAbi 0.1
title 0.9 (0 %) 0.0 (0 %) 1919.2 0.0 Shader.ResolveGraphicsStagesAbi 0.5, Shader.ResolveAbi 0.4
title 1.4 (0 %) 0.0 (0 %) 1918.6 0.0 Shader.ResolveAbi 0.9, Shader.ResolveGraphicsStagesAbi 0.5
title 1.2 (0 %) 0.0 (0 %) 1918.9 0.0 Shader.ResolveAbi 0.7, Shader.ResolveGraphicsAbi 0.5
title 2.0 (0 %) 0.0 (0 %) 1918.0 0.0 Shader.ResolveAbi 1.6, Shader.ResolveGraphicsStagesAbi 0.4
title 1.5 (0 %) 0.0 (0 %) 1918.5 0.0 Shader.ResolveAbi 0.9, Shader.ResolveGraphicsStagesAbi 0.6
title 0.9 (0 %) 0.0 (0 %) 1919.1 0.0 Shader.ResolveAbi 0.7, Shader.ResolveGraphicsStagesAbi 0.1
title 0.0 (0 %) 0.0 (0 %) 1920.0 0.0 Shader.Register 0.0, Shader.ResolveGraphicsStagesAbi 0.0
title 1.6 (0 %) 0.0 (0 %) 1918.4 0.0 Shader.ResolveAbi 1.0, Shader.ResolveGraphicsStagesAbi 0.5
title 1.8 (0 %) 0.0 (0 %) 1918.2 0.0 Shader.ResolveAbi 1.7, Shader.ResolveGraphicsStagesAbi 0.1
title 1.1 (0 %) 0.0 (0 %) 1919.0 0.0 Shader.ResolveAbi 1.0, Shader.ResolveGraphicsStagesAbi 0.1
title 1.9 (0 %) 0.0 (0 %) 1918.1 0.0 Shader.ResolveAbi 1.5, Shader.ResolveGraphicsStagesAbi 0.5
title 1.7 (0 %) 0.0 (0 %) 1918.3 0.0 Shader.ResolveAbi 0.9, Shader.ResolveGraphicsStagesAbi 0.6
title 1.0 (0 %) 0.0 (0 %) 1919.1 0.0 Shader.ResolveAbi 0.8, Shader.ResolveGraphicsStagesAbi 0.1
title 0.0 (0 %) 0.0 (0 %) 1920.1 0.0 Shader.ResolveGraphicsStagesAbi 0.0
title 0.0 (0 %) 0.0 (0 %) 1920.1 0.0 Shader.ResolveGraphicsStagesAbi 0.0
title 0.0 (0 %) 0.0 (0 %) 1920.1 0.0 Shader.ResolveGraphicsStagesAbi 0.0
gpu 817.7 (43 %) 0.0 (0 %) 1102.4 0.0 batch 817.7

Largest slices (ms per frame, inclusive, all threads): Driver.Packet 2191.6, Driver.Packet.dispatch 1045.8, Driver.Packet.memory_wait 991.9, Driver.Dispatch 930.1, batch 817.7, Resources.Complete 639.5, Vulkan.Dispatch 621.0, Vulkan.Dispatch.shader_resources 552.2, Graphics.Draw 269.5, Graphics.Draw.draw_and_resource_release 259.3

Longest waits

  • GpuMutex.wait.label (draw committer) 5338.8 ms at 115912 ms, present 871
  • Driver.Packet.memory_wait (queue worker 0x0) 4861.7 ms at 1687 ms, present 804
  • Driver.Packet.memory_wait (queue worker 0x20) 1520.9 ms at 6550 ms, present 804
  • Driver.Packet.memory_wait (queue worker 0x20) 1486.4 ms at 67904 ms, present 840
  • Driver.Packet.memory_wait (queue worker 0x20) 1317.8 ms at 163408 ms, present 891
  • Driver.Packet.memory_wait (queue worker 0x20) 1290.9 ms at 139408 ms, present 880
  • Driver.Packet.memory_wait (queue worker 0x20) 1214.3 ms at 171794 ms, present 893
  • Driver.Packet.memory_wait (queue worker 0x20) 1175.6 ms at 153312 ms, present 887
  • Driver.Packet.memory_wait (queue worker 0x20) 1075.1 ms at 143089 ms, present 881
  • Driver.Packet.memory_wait (queue worker 0x20) 1038.7 ms at 44088 ms, present 825

Largest GPU batches (GPU ranges inside, and the CPU slices that recorded each, inclusive)

  • batch 28342: 96.8 ms at 229615 ms, present 922: GPU no ranges; recorded by Graphics.Draw (draw committer) 17.3, Graphics.Draw.draw_and_resource_release (draw committer) 17.3, Resources.Complete (draw committer) 16.8, Recorder.Submit (draw committer) 1.3
  • batch 6271: 92.3 ms at 49316 ms, present 828: GPU no ranges; recorded by Graphics.Draw (draw committer) 18.2, Graphics.Draw.draw_and_resource_release (draw committer) 18.2, Resources.Complete (draw committer) 17.8, Recorder.Submit (draw committer) 1.3
  • batch 23373: 92.1 ms at 189292 ms, present 901: GPU no ranges; recorded by Graphics.Draw (draw committer) 4.4, Graphics.Draw.draw_and_resource_release (draw committer) 4.4, Resources.Complete (draw committer) 3.8, Recorder.Submit (draw committer) 1.0
  • batch 26484: 92.1 ms at 214467 ms, present 914: GPU no ranges; recorded by Graphics.Draw (draw committer) 19.5, Graphics.Draw.draw_and_resource_release (draw committer) 19.5, Resources.Complete (draw committer) 17.9, Recorder.Submit (draw committer) 1.7
  • batch 25528: 92.0 ms at 207050 ms, present 910: GPU no ranges; recorded by Graphics.Draw (draw committer) 17.8, Graphics.Draw.draw_and_resource_release (draw committer) 17.8, Resources.Complete (draw committer) 17.2, Recorder.Submit (draw committer) 1.6
Pair 1 change (3e83ee94776d)

seconds 1500:240 from present 1452: 341 presents, frame p50 704.9 / p90 877.5 / p99 1018.8 / max 1114.2 ms, GPU busy 335.1 ms per present
AMD Radeon RX 6650 XT (RADV NAVI23), radv Mesa 26.2.4-arch1.1, Linux 7.2.9-arch1-1, 3840x2160, commit 3e83ee94776d, dropped: yes

{"commit":"3e83ee94776d","dirty":false,"env":{"APS5_PAD_INPUT_FILE":"<path>","APS5_TRACE_DIR":"<path>","APS5_TRACE_SECONDS":"1500:240"},"gpu":"AMD Radeon RX 6650 XT (RADV NAVI23)","driver":"radv Mesa 26.2.4-arch1.1","os":"Linux 7.2.9-arch1-1","cpu":"AMD Ryzen 9 7950X 16-Core Processor","cpu_threads":32,"memory_mib":127901,"title_id":"PPSA25636","title":"Echoes of the End","content_version":"01.012.000","resolution":"3840x2160","window":{"spec":"seconds 1500:240","first_present":1452,"ms":240019.614},"presents":341,"frame_ms":{"p50":704.873,"p90":877.547,"p99":1018.779,"max":1114.243},"gpu_busy_ms_per_present":335.082,"worker_busy_pct":{"queue worker 0x0":98.756,"queue worker 0x20":97.053},"top_phases_ms_per_frame":{"Driver.Packet":1357.357,"Driver.Packet.dispatch":671.973,"Driver.Dispatch":595.953,"Driver.Packet.memory_wait":456.245,"Vulkan.Dispatch":245.115,"Vulkan.Dispatch.shader_resources":233.316,"Resources.Complete":188.105,"Graphics.Draw":126.533},"trace_dropped":true,"trace_dropped_threads":{"queue worker 0x0":{"events_full_after_s":28.328,"events_lost":2033306,"totals_full":false},"queue worker 0x20":{"events_full_after_s":94.147,"events_lost":460849,"totals_full":false}},"trace":"aps5-trace-3e83ee94776d-824611.json.gz"}

Slowest frames (largest slices inside each, inclusive)

  • present 1537: 1114.2 ms at 64067 ms: Driver.Packet (queue worker 0x20) 1072.2, Driver.Packet.memory_wait (queue worker 0x20) 771.6, batch (gpu) 448.3, Graphics.Draw (draw committer) 346.5
  • present 1536: 1042.5 ms at 63025 ms: Driver.Packet (queue worker 0x20) 1003.4, Driver.Packet.memory_wait (queue worker 0x20) 606.2, batch (gpu) 434.7, Driver.Packet.dispatch (queue worker 0x20) 359.5
  • present 1582: 1040.9 ms at 102636 ms: batch (gpu) 445.1, Graphics.Draw (draw committer) 292.0, Graphics.Draw.draw_and_resource_release (draw committer) 286.1, Resources.Complete (draw committer) 177.8
  • present 1516: 1018.8 ms at 47246 ms: Driver.Packet (queue worker 0x20) 981.9, Driver.Packet.memory_wait (queue worker 0x20) 639.7, batch (gpu) 419.8, Driver.Packet.dispatch (queue worker 0x20) 302.5
  • present 1539: 995.8 ms at 66117 ms: Driver.Packet (queue worker 0x20) 951.9, Driver.Packet.memory_wait (queue worker 0x20) 653.9, batch (gpu) 429.6, Driver.Packet.dispatch (queue worker 0x20) 278.7

Threads (ms per frame)

thread busy wait untraced in slices < 20 us largest
queue worker 0x0 61.7 (9 %) 19.9 (3 %) 622.4 8.0 Driver.Packet 79.6, Driver.EndSubmission 1.1
draw committer 204.6 (29 %) 13.6 (2 %) 485.7 6.1 Graphics.Draw 118.1, Recorder.Submit 70.5
queue worker 0x20 78.6 (11 %) 196.4 (28 %) 428.9 7.6 Driver.Packet 262.9, Driver.EndSubmission 4.6
presenter 1.2 (0 %) 0.4 (0 %) 702.3 0.1 VideoOut.Flip 1.6, Driver.Present 0.0
title 0.0 (0 %) 0.0 (0 %) 703.9 0.0 Shader.ResolveGraphicsStagesAbi 0.0, Shader.ResolveAbi 0.0
title 0.0 (0 %) 0.0 (0 %) 703.9 0.0 Shader.ResolveGraphicsStagesAbi 0.0
title 0.0 (0 %) 0.0 (0 %) 703.9 0.0 Shader.ResolveAbi 0.0, Shader.ResolveGraphicsStagesAbi 0.0
title 0.0 (0 %) 0.0 (0 %) 703.9 0.0 Shader.ResolveGraphicsStagesAbi 0.0
title 0.0 (0 %) 0.0 (0 %) 703.9 0.0 Shader.ResolveGraphicsStagesAbi 0.0
title 0.0 (0 %) 0.0 (0 %) 703.9 0.0 Shader.ResolveGraphicsStagesAbi 0.0
title 0.0 (0 %) 0.0 (0 %) 703.9 0.0 Shader.ResolveGraphicsStagesAbi 0.0, Shader.ResolveAbi 0.0
title 0.0 (0 %) 0.0 (0 %) 703.9 0.0 Shader.ResolveGraphicsStagesAbi 0.0
title 0.0 (0 %) 0.0 (0 %) 703.9 0.0 Shader.ResolveGraphicsStagesAbi 0.0
title 0.0 (0 %) 0.0 (0 %) 703.9 0.0 Shader.ResolveGraphicsStagesAbi 0.0, Shader.ResolveAbi 0.0
title 0.0 (0 %) 0.0 (0 %) 703.9 0.0 Shader.ResolveGraphicsStagesAbi 0.0, Shader.ResolveGraphicsAbi 0.0
title 0.0 (0 %) 0.0 (0 %) 703.9 0.0 Shader.ResolveGraphicsStagesAbi 0.0, Shader.ResolveAbi 0.0
title 0.0 (0 %) 0.0 (0 %) 703.9 0.0 Shader.ResolveGraphicsStagesAbi 0.0, Shader.ResolveAbi 0.0
title 0.0 (0 %) 0.0 (0 %) 703.9 0.0 Shader.ResolveGraphicsStagesAbi 0.0
title 0.0 (0 %) 0.0 (0 %) 703.9 0.0 Shader.ResolveGraphicsStagesAbi 0.0
title 0.0 (0 %) 0.0 (0 %) 703.9 0.0 Shader.ResolveGraphicsStagesAbi 0.0
title 0.0 (0 %) 0.0 (0 %) 703.9 0.0 Shader.ResolveGraphicsStagesAbi 0.0
title 0.0 (0 %) 0.0 (0 %) 703.9 0.0 Shader.ResolveGraphicsStagesAbi 0.0
gpu 335.0 (48 %) 0.0 (0 %) 368.8 0.0 batch 335.0

Largest slices (ms per frame, inclusive, all threads): Driver.Packet 342.5, batch 335.0, Driver.Packet.memory_wait 168.9, Driver.Packet.dispatch 142.4, Driver.Dispatch 130.2, Graphics.Draw 119.0, Graphics.Draw.draw_and_resource_release 114.0, Recorder.Submit 88.1, Resources.Complete 70.1, Vulkan.Dispatch 61.7

Longest waits

  • Driver.Packet.memory_wait (queue worker 0x20) 563.0 ms at 64595 ms, present 1537
  • Driver.Packet.memory_wait (queue worker 0x20) 528.3 ms at 47712 ms, present 1516
  • Driver.Packet.memory_wait (queue worker 0x20) 518.2 ms at 5077 ms, present 1458
  • Driver.Packet.memory_wait (queue worker 0x20) 483.0 ms at 77579 ms, present 1552
  • Driver.Packet.memory_wait (queue worker 0x20) 474.4 ms at 63573 ms, present 1536
  • Driver.Packet.memory_wait (queue worker 0x20) 468.9 ms at 60112 ms, present 1532
  • Driver.Packet.memory_wait (queue worker 0x20) 467.4 ms at 67594 ms, present 1540
  • Driver.Packet.memory_wait (queue worker 0x20) 462.3 ms at 93349 ms, present 1570
  • Driver.Packet.memory_wait (queue worker 0x20) 461.6 ms at 89623 ms, present 1566
  • Driver.Packet.memory_wait (queue worker 0x20) 459.2 ms at 72564 ms, present 1546

Largest GPU batches (GPU ranges inside, and the CPU slices that recorded each, inclusive)

  • batch 1533: 63.0 ms at 6130 ms, present 1459: GPU no ranges; recorded by Driver.Packet (queue worker 0x0) 87.1, Driver.Packet.dispatch (queue worker 0x0) 67.2, Driver.Dispatch (queue worker 0x0) 66.7, Vulkan.Dispatch (queue worker 0x0) 66.3
  • batch 24304: 61.9 ms at 100732 ms, present 1579: GPU no ranges; recorded by no CPU slices
  • batch 47713: 58.2 ms at 190825 ms, present 1705: GPU no ranges; recorded by no CPU slices
  • batch 31496: 58.0 ms at 129247 ms, present 1617: GPU no ranges; recorded by no CPU slices
  • batch 54226: 55.5 ms at 211510 ms, present 1742: GPU no ranges; recorded by no CPU slices
Pair 2 base (27db71c581b4)

seconds 1500:240 from present 1054: 220 presents, frame p50 1084.5 / p90 1276.9 / p99 1413.1 / max 1538.9 ms, GPU busy 563.6 ms per present
AMD Radeon RX 6650 XT (RADV NAVI23), radv Mesa 26.2.4-arch1.1, Linux 7.2.9-arch1-1, 3840x2160, commit 27db71c581b4, dropped: yes

{"commit":"27db71c581b4","dirty":false,"env":{"APS5_PAD_INPUT_FILE":"<path>","APS5_TRACE_DIR":"<path>","APS5_TRACE_SECONDS":"1500:240"},"gpu":"AMD Radeon RX 6650 XT (RADV NAVI23)","driver":"radv Mesa 26.2.4-arch1.1","os":"Linux 7.2.9-arch1-1","cpu":"AMD Ryzen 9 7950X 16-Core Processor","cpu_threads":32,"memory_mib":127901,"title_id":"PPSA25636","title":"Echoes of the End","content_version":"01.012.000","resolution":"3840x2160","window":{"spec":"seconds 1500:240","first_present":1054,"ms":240025.444},"presents":220,"frame_ms":{"p50":1084.471,"p90":1276.934,"p99":1413.076,"max":1538.887},"gpu_busy_ms_per_present":563.648,"worker_busy_pct":{"queue worker 0x0":99.116,"queue worker 0x20":97.803},"top_phases_ms_per_frame":{"Driver.Packet":2123.795,"Driver.Packet.dispatch":1102.659,"Driver.Dispatch":997.477,"Driver.Packet.memory_wait":748.864,"Vulkan.Dispatch":540.299,"Vulkan.Dispatch.shader_resources":527.13,"Resources.Complete":476.271,"GpuMutex.wait.indirect":155.197},"trace_dropped":true,"trace_dropped_threads":{"queue worker 0x0":{"events_full_after_s":39.845,"events_lost":1294831,"totals_full":false},"queue worker 0x20":{"events_full_after_s":127.742,"events_lost":221256,"totals_full":false}},"trace":"aps5-trace-27db71c581b4-1422189.json.gz"}

Slowest frames (largest slices inside each, inclusive)

  • present 1188: 1538.9 ms at 143780 ms: batch (gpu) 699.6, Graphics.Draw (draw committer) 261.7, Graphics.Draw.draw_and_resource_release (draw committer) 255.5, Resources.Complete (draw committer) 153.5
  • present 1075: 1467.7 ms at 23008 ms: Driver.Packet (queue worker 0x0) 1444.3, Driver.Packet (queue worker 0x20) 1431.0, Driver.Packet.dispatch (queue worker 0x0) 1163.0, Driver.Packet.memory_wait (queue worker 0x20) 1030.0
  • present 1131: 1413.1 ms at 79436 ms: Driver.Packet (queue worker 0x20) 1370.3, Driver.Packet.memory_wait (queue worker 0x20) 835.1, batch (gpu) 647.8, Driver.Packet.dispatch (queue worker 0x20) 391.8
  • present 1217: 1405.0 ms at 176843 ms: batch (gpu) 633.7, Graphics.Draw (draw committer) 282.5, Graphics.Draw.draw_and_resource_release (draw committer) 266.7, Resources.Complete (draw committer) 183.9
  • present 1211: 1405.0 ms at 169563 ms: batch (gpu) 641.1, Graphics.Draw (draw committer) 246.8, Graphics.Draw.draw_and_resource_release (draw committer) 241.0, Resources.Complete (draw committer) 139.4

Threads (ms per frame)

thread busy wait untraced in slices < 20 us largest
shader prepare 0.0 (0 %) 0.0 (0 %) 1091.0 0.0 Vulkan.GraphicsPipelinePrebuild 0.0
queue worker 0x0 142.6 (13 %) 36.1 (3 %) 912.3 12.6 Driver.Packet 176.1, Driver.EndSubmission 1.4
draw committer 237.7 (22 %) 15.9 (1 %) 837.4 6.2 Graphics.Draw 136.5, Recorder.Submit 81.0
queue worker 0x20 124.1 (11 %) 454.9 (42 %) 512.1 12.1 Driver.Packet 557.7, Driver.EndSubmission 8.3
presenter 1.2 (0 %) 0.4 (0 %) 1089.3 0.1 VideoOut.Flip 1.7, Driver.Present 0.0
title 0.0 (0 %) 0.0 (0 %) 1091.0 0.0 Shader.ResolveGraphicsStagesAbi 0.0, Shader.ResolveGraphicsAbi 0.0
title 0.0 (0 %) 0.0 (0 %) 1091.0 0.0 Shader.ResolveGraphicsStagesAbi 0.0
title 0.0 (0 %) 0.0 (0 %) 1091.0 0.0 Shader.ResolveGraphicsStagesAbi 0.0
title 0.0 (0 %) 0.0 (0 %) 1091.0 0.0 Shader.ResolveGraphicsStagesAbi 0.0
title 0.0 (0 %) 0.0 (0 %) 1091.0 0.0 Shader.ResolveGraphicsStagesAbi 0.0, Shader.ResolveGraphicsAbi 0.0
title 0.0 (0 %) 0.0 (0 %) 1091.0 0.0 Shader.ResolveGraphicsStagesAbi 0.0, Shader.ResolveAbi 0.0
title 0.0 (0 %) 0.0 (0 %) 1091.0 0.0 Shader.ResolveGraphicsStagesAbi 0.0, Shader.ResolveAbi 0.0
title 0.0 (0 %) 0.0 (0 %) 1091.0 0.0 Shader.ResolveGraphicsStagesAbi 0.0, Shader.ResolveAbi 0.0
title 0.0 (0 %) 0.0 (0 %) 1091.0 0.0 Shader.ResolveGraphicsStagesAbi 0.0, Shader.ResolveAbi 0.0
title 0.0 (0 %) 0.0 (0 %) 1091.0 0.0 Shader.ResolveGraphicsStagesAbi 0.0
title 0.0 (0 %) 0.0 (0 %) 1091.0 0.0 Shader.ResolveGraphicsStagesAbi 0.0
title 0.0 (0 %) 0.0 (0 %) 1091.0 0.0 Shader.ResolveGraphicsStagesAbi 0.0
title 0.0 (0 %) 0.0 (0 %) 1091.0 0.0 Shader.ResolveGraphicsStagesAbi 0.0, Shader.ResolveGraphicsAbi 0.0
title 0.0 (0 %) 0.0 (0 %) 1091.0 0.0 Shader.ResolveGraphicsStagesAbi 0.0
title 0.0 (0 %) 0.0 (0 %) 1091.0 0.0 Shader.ResolveGraphicsStagesAbi 0.0
title 0.0 (0 %) 0.0 (0 %) 1091.0 0.0 Shader.ResolveGraphicsStagesAbi 0.0
title 0.0 (0 %) 0.0 (0 %) 1091.0 0.0 Shader.ResolveGraphicsStagesAbi 0.0
gpu 563.6 (52 %) 0.0 (0 %) 527.5 0.0 batch 563.6

Largest slices (ms per frame, inclusive, all threads): Driver.Packet 733.8, batch 563.6, Driver.Packet.memory_wait 392.9, Driver.Packet.dispatch 287.7, Driver.Dispatch 253.6, Resources.Complete 152.3, Graphics.Draw 139.3, Graphics.Draw.draw_and_resource_release 132.6, Vulkan.Dispatch 130.4, Vulkan.Dispatch.shader_resources 127.2

Longest waits

  • Driver.Packet.memory_wait (queue worker 0x20) 860.8 ms at 23593 ms, present 1075
  • Driver.Packet.memory_wait (queue worker 0x20) 803.9 ms at 93357 ms, present 1143
  • Driver.Packet.memory_wait (queue worker 0x20) 787.8 ms at 7836 ms, present 1060
  • Driver.Packet.memory_wait (queue worker 0x20) 763.5 ms at 86557 ms, present 1137
  • Driver.Packet.memory_wait (queue worker 0x20) 762.1 ms at 117553 ms, present 1165
  • Driver.Packet.memory_wait (queue worker 0x20) 752.7 ms at 26194 ms, present 1077
  • Driver.Packet.memory_wait (queue worker 0x20) 752.0 ms at 68716 ms, present 1121
  • Driver.Packet.memory_wait (queue worker 0x20) 751.3 ms at 29724 ms, present 1080
  • Driver.Packet.memory_wait (queue worker 0x20) 749.3 ms at 60117 ms, present 1113
  • Driver.Packet.memory_wait (queue worker 0x20) 736.6 ms at 31050 ms, present 1081

Largest GPU batches (GPU ranges inside, and the CPU slices that recorded each, inclusive)

  • batch 20717: 92.8 ms at 104520 ms, present 1153: GPU no ranges; recorded by Graphics.Draw (draw committer) 1.8, Graphics.Draw.draw_and_resource_release (draw committer) 1.8, Resources.Complete (draw committer) 1.0, Recorder.Submit (draw committer) 1.0
  • batch 20082: 89.9 ms at 101161 ms, present 1150: GPU no ranges; recorded by no CPU slices
  • batch 16749: 89.4 ms at 83585 ms, present 1134: GPU no ranges; recorded by Graphics.Draw (draw committer) 1.3, Graphics.Draw.draw_and_resource_release (draw committer) 1.3, Recorder.Submit (draw committer) 1.1, Resources.Complete (draw committer) 0.8
  • batch 22993: 87.2 ms at 116465 ms, present 1164: GPU no ranges; recorded by Graphics.Draw (draw committer) 1.3, Graphics.Draw.draw_and_resource_release (draw committer) 1.3, Recorder.Submit (draw committer) 0.9, Resources.Complete (draw committer) 0.8
  • batch 11047: 84.3 ms at 54026 ms, present 1107: GPU no ranges; recorded by Graphics.Draw (draw committer) 1.8, Graphics.Draw.draw_and_resource_release (draw committer) 1.8, Resources.Complete (draw committer) 1.3, Recorder.Submit (draw committer) 1.2
Pair 2 change (3e83ee94776d)

seconds 1500:240 from present 1305: 239 presents, frame p50 1018.3 / p90 1212.9 / p99 1379.8 / max 1666.4 ms, GPU busy 515.5 ms per present
AMD Radeon RX 6650 XT (RADV NAVI23), radv Mesa 26.2.4-arch1.1, Linux 7.2.9-arch1-1, 3840x2160, commit 3e83ee94776d, dropped: yes

{"commit":"3e83ee94776d","dirty":false,"env":{"APS5_PAD_INPUT_FILE":"<path>","APS5_TRACE_DIR":"<path>","APS5_TRACE_SECONDS":"1500:240"},"gpu":"AMD Radeon RX 6650 XT (RADV NAVI23)","driver":"radv Mesa 26.2.4-arch1.1","os":"Linux 7.2.9-arch1-1","cpu":"AMD Ryzen 9 7950X 16-Core Processor","cpu_threads":32,"memory_mib":127901,"title_id":"PPSA25636","title":"Echoes of the End","content_version":"01.012.000","resolution":"3840x2160","window":{"spec":"seconds 1500:240","first_present":1305,"ms":240957.123},"presents":239,"frame_ms":{"p50":1018.347,"p90":1212.909,"p99":1379.782,"max":1666.358},"gpu_busy_ms_per_present":515.481,"worker_busy_pct":{"queue worker 0x0":99.162,"queue worker 0x20":97.691},"top_phases_ms_per_frame":{"Driver.Packet":1961.533,"Driver.Packet.dispatch":1018.941,"Driver.Dispatch":918.054,"Driver.Packet.memory_wait":701.249,"Vulkan.Dispatch":484.835,"Vulkan.Dispatch.shader_resources":472.343,"Resources.Complete":425.887,"Graphics.Draw":145.052},"trace_dropped":true,"trace_dropped_threads":{"queue worker 0x0":{"events_full_after_s":40.275,"events_lost":1403009,"totals_full":false},"queue worker 0x20":{"events_full_after_s":125.406,"events_lost":258029,"totals_full":false}},"trace":"aps5-trace-3e83ee94776d-787378.json.gz"}

Slowest frames (largest slices inside each, inclusive)

  • present 1400: 1666.4 ms at 100003 ms: Driver.Packet (queue worker 0x20) 1609.5, Driver.Packet.memory_wait (queue worker 0x20) 1197.9, batch (gpu) 791.3, Driver.Packet.dispatch (queue worker 0x20) 392.3
  • present 1516: 1411.0 ms at 210954 ms: batch (gpu) 625.2, Graphics.Draw (draw committer) 212.6, Graphics.Draw.draw_and_resource_release (draw committer) 199.8, Resources.Complete (draw committer) 114.9
  • present 1526: 1379.8 ms at 222276 ms: batch (gpu) 625.2, Graphics.Draw (draw committer) 195.8, Graphics.Draw.draw_and_resource_release (draw committer) 182.9, Resources.Complete (draw committer) 101.6
  • present 1504: 1378.1 ms at 197928 ms: batch (gpu) 602.2, Graphics.Draw (draw committer) 248.9, Graphics.Draw.draw_and_resource_release (draw committer) 231.7, Resources.Complete (draw committer) 137.7
  • present 1329: 1376.8 ms at 26094 ms: Driver.Packet (queue worker 0x0) 1346.1, Driver.Packet (queue worker 0x20) 1329.8, Driver.Packet.dispatch (queue worker 0x0) 1107.1, Driver.Packet.memory_wait (queue worker 0x20) 934.6

Threads (ms per frame)

thread busy wait untraced in slices < 20 us largest
queue worker 0x0 133.0 (13 %) 33.3 (3 %) 841.9 11.3 Driver.Packet 164.0, Driver.EndSubmission 1.3
draw committer 222.2 (22 %) 13.3 (1 %) 772.7 6.2 Graphics.Draw 131.0, Recorder.Submit 69.2
queue worker 0x20 109.4 (11 %) 413.8 (41 %) 485.0 11.0 Driver.Packet 504.6, Driver.EndSubmission 7.0
presenter 1.1 (0 %) 0.4 (0 %) 1006.6 0.1 VideoOut.Flip 1.5, Driver.Present 0.0
title 0.0 (0 %) 0.0 (0 %) 1008.2 0.0 Shader.ResolveGraphicsStagesAbi 0.0
title 0.0 (0 %) 0.0 (0 %) 1008.2 0.0 Shader.ResolveGraphicsStagesAbi 0.0
title 0.0 (0 %) 0.0 (0 %) 1008.2 0.0 Shader.ResolveGraphicsStagesAbi 0.0
title 0.0 (0 %) 0.0 (0 %) 1008.2 0.0 Shader.ResolveGraphicsStagesAbi 0.0
title 0.0 (0 %) 0.0 (0 %) 1008.2 0.0 Shader.ResolveGraphicsStagesAbi 0.0
title 0.0 (0 %) 0.0 (0 %) 1008.2 0.0 Shader.ResolveGraphicsStagesAbi 0.0
title 0.0 (0 %) 0.0 (0 %) 1008.2 0.0 Shader.ResolveGraphicsStagesAbi 0.0
title 0.0 (0 %) 0.0 (0 %) 1008.2 0.0 Shader.ResolveGraphicsStagesAbi 0.0
title 0.0 (0 %) 0.0 (0 %) 1008.2 0.0 Shader.ResolveGraphicsStagesAbi 0.0
title 0.0 (0 %) 0.0 (0 %) 1008.2 0.0 Shader.ResolveGraphicsStagesAbi 0.0
title 0.0 (0 %) 0.0 (0 %) 1008.2 0.0 Shader.ResolveGraphicsStagesAbi 0.0
title 0.0 (0 %) 0.0 (0 %) 1008.2 0.0 Shader.ResolveGraphicsStagesAbi 0.0
title 0.0 (0 %) 0.0 (0 %) 1008.2 0.0 Shader.ResolveGraphicsStagesAbi 0.0
title 0.0 (0 %) 0.0 (0 %) 1008.2 0.0 Shader.ResolveGraphicsStagesAbi 0.0
title 0.0 (0 %) 0.0 (0 %) 1008.2 0.0 Shader.ResolveGraphicsStagesAbi 0.0
title 0.0 (0 %) 0.0 (0 %) 1008.2 0.0 Shader.ResolveGraphicsStagesAbi 0.0
title 0.0 (0 %) 0.0 (0 %) 1008.2 0.0 Shader.ResolveGraphicsStagesAbi 0.0
title 0.0 (0 %) 0.0 (0 %) 1008.2 0.0 Shader.ResolveGraphicsStagesAbi 0.0
gpu 514.3 (51 %) 0.0 (0 %) 493.9 0.0 batch 514.3

Largest slices (ms per frame, inclusive, all threads): Driver.Packet 668.7, batch 514.3, Driver.Packet.memory_wait 361.7, Driver.Packet.dispatch 261.5, Driver.Dispatch 238.7, Resources.Complete 150.2, Graphics.Draw 133.5, Graphics.Draw.draw_and_resource_release 127.1, Vulkan.Dispatch 127.1, Vulkan.Dispatch.shader_resources 124.1

Longest waits

  • Driver.Packet.memory_wait (queue worker 0x20) 1038.3 ms at 100613 ms, present 1400
  • Driver.Packet.memory_wait (queue worker 0x20) 841.4 ms at 1625 ms, present 1306
  • Driver.Packet.memory_wait (queue worker 0x20) 792.3 ms at 26652 ms, present 1329
  • Driver.Packet.memory_wait (queue worker 0x20) 788.0 ms at 4300 ms, present 1308
  • Driver.Packet.memory_wait (queue worker 0x20) 759.9 ms at 98126 ms, present 1398
  • Driver.Packet.memory_wait (queue worker 0x20) 754.4 ms at 38696 ms, present 1340
  • Driver.Packet.memory_wait (queue worker 0x20) 746.3 ms at 103174 ms, present 1402
  • Driver.Packet.memory_wait (queue worker 0x20) 728.5 ms at 17755 ms, present 1321
  • Driver.Packet.memory_wait (queue worker 0x20) 724.9 ms at 67461 ms, present 1368
  • Driver.Packet.memory_wait (queue worker 0x20) 709.3 ms at 32374 ms, present 1334

Largest GPU batches (GPU ranges inside, and the CPU slices that recorded each, inclusive)

  • batch 1837: 82.9 ms at 9670 ms, present 1313: GPU no ranges; recorded by Graphics.Draw (draw committer) 1.2, Graphics.Draw.draw_and_resource_release (draw committer) 1.2, Recorder.Submit (draw committer) 1.0, Resources.Complete (draw committer) 0.7
  • batch 19740: 82.0 ms at 101010 ms, present 1400: GPU no ranges; recorded by Graphics.Draw (draw committer) 1.9, Graphics.Draw.draw_and_resource_release (draw committer) 1.9, Resources.Complete (draw committer) 1.4, Recorder.Submit (draw committer) 1.0
  • batch 35355: 81.1 ms at 176278 ms, present 1477: GPU no ranges; recorded by Graphics.Draw (draw committer) 1.1, Graphics.Draw.draw_and_resource_release (draw committer) 1.1, Recorder.Submit (draw committer) 0.7, Resources.Complete (draw committer) 0.7
  • batch 25257: 80.5 ms at 129168 ms, present 1427: GPU no ranges; recorded by Graphics.Draw (draw committer) 2.2, Graphics.Draw.draw_and_resource_release (draw committer) 2.2, Recorder.Submit (draw committer) 1.0, Resources.Complete (draw committer) 0.9
  • batch 44894: 80.4 ms at 221753 ms, present 1525: GPU no ranges; recorded by Graphics.Draw (draw committer) 1.2, Graphics.Draw.draw_and_resource_release (draw committer) 1.2, Recorder.Submit (draw committer) 0.8, Resources.Complete (draw committer) 0.7

Attached in the release https://github.com/JJenkx/AnyPS5/releases/tag/heap-writeback-readback-samescene-20261029: the four traces, the four summary lines, their digests, the 1440 s and 1795 s screenshots and the seed manifest. The earlier release https://github.com/JJenkx/AnyPS5/releases/tag/heap-writeback-readback-evidence holds the focused-test VVL logs.

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: none claimed
  • GPUs tested: AMD Radeon RX 6650 XT, RADV Mesa 26.2.4, Arch Linux 7.2.9-arch1-1
  • AI-assisted: yes

Summary by CodeRabbit

  • Performance Improvements
    • Graphics data synchronization now reuses available readback data when possible instead of always allocating a temporary copy. This reduces unnecessary temporary memory use in affected workloads while preserving existing synchronization behavior and visible functionality. When reusable readback data is unavailable, synchronization continues to read the required data directly.
<!-- greyfinch-sync:boykopovar/AnyPS5:issue:5067348213 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/12827). Originally posted by [JJenkx](https://github.com/JJenkx) on 2026-10-29T11:42:52Z. --- <!-- claude-pr12827-status-20261201 --> **Status (2026-12-01):** head `ce2550a3f277` is @oneandonlydean's merge of `main`, which re-applies this change on the piece-wise write-back path that #12840 introduced: a piece covered by a heap readback is now stored straight from the readback span instead of being copied into a temporary vector first. Linux at this head (Arch Linux, RX 6650 XT, Mesa RADV, Release, Vulkan validation layer active): `ctest -R 'agc_driver_resident_heap_mirror|heap_mirror|resident'` 29/29 passed, 0 VUID, 0 SYNC-HAZARD. His same-scene pair on PPSA21564 (base, head, head, base) is neutral: +0.44 ms frame p50 against a 1.0 ms noise floor. This PR therefore claims only the per-write-back copy it removes, not a scene speedup. <!-- codex-pr12827-current-attribution-20261119 --> **Current Linux qualification and scope (2026-11-19):** [commands, source pins, validation, readback attribution and attached evidence](https://github.com/boykopovar/AnyPS5/pull/12827#issuecomment-7000939792). This report addresses the review's alternative of retaining per-write-back attribution without claiming a scene-matched title speedup. The topic remains `c12a20f45da5`; no implementation change is implied by this description update. The report applies the existing patch privately on main `50f2772c6b10`, with the same diagnostic instrumentation and copied-writer fixture held constant in both arms. Full SDK builds pass. The same eight focused checks pass on each arm on Linux / AMD Radeon RX 6650 XT / RADV Mesa 26.2.7 / Khronos validation 1.4.363: no skips or VUIDs, seven layer insertions per arm, including actual sparse resident mirror execution. Two separately queued cold-opening Mortal Shell II (PPSA34008) runs completed normally with fresh saves and identical cache conditions. The recorded `UploadFinish.cpu_writers` spans total 46,042 ms versus 14,906 ms over 10–120 s. These private-instrumentation observations are **attribution only**: at 135 s the baseline is black while the change shows a character/cutscene, and the sampled fault recordings lose data. They establish no FPS ratio, matched-scene gain or title unblock. The implementation removes the temporary readback copy; a merge decision need not rely on any numerical title speed claim from this new report. Older contributor measurements and historical integrations below retain their own source/configuration pins and limitations; they are not new plain-main or current-main performance validation. The requested scene-matched performance rerun remains unproven by this latest local experiment. <!-- codex-pr12827-external-title-evidence-20261104 --> **Additional title measurements supplied by @mrfelek, 2026-11-04:** [full route, source pins, summaries and trace digests](https://github.com/boykopovar/AnyPS5/pull/12827#issuecomment-6639171818). On PPSA22408 (Hot Wheels Infinite Rush), RTX3080Ti/NVIDIA615.71.09, Ryzen5950X/Linux7.3, 3840×2160, warm shader caches and identical import/staging/shadow settings, their alternating A/B/A/B route compares plain main `b11c7bf84f` with that main plus this PR's `c12a20f45d` topic (`5fcf8be8a4`). The post-load flyover improves from 0.30/0.30 to 0.62/0.63 presents/s, with median frame p50 moving from3.94/4.10s to1.82/1.86s. This remains very slow gameplay. The race-load window has no established improvement; the attached 330:10s trace windows land in loading and do not measure that post-load gain. The comment separately provides the post-load summary records. Later magenta/green artifacts also occur on their longer main control, and no exceptions occurred. These are the contributor's measurements, not locally reproduced title results. Their PPSA28416 multi-PR-tree switch pairs are attribution-only, not plain-main performance evidence. All measurements retain these historical source/configuration pins and do not qualify later heads. Previous implementation report and contribution template: ### What `GuestBufferMemory::WriteBack` stores a resident heap mirror's write-back from its recorded readback buffer. It used to copy the readback into a new `std::vector<std::byte>` of the written range and store from that copy. `ResidentBuffer::Store` and `storeChanged`/`storeSparse` take a `std::span<const std::byte>`, and the readback buffer stays alive in `heapReadbacks` for the whole write-back, so the copy is dropped. A write-back without a recorded readback (`ResidentBuffer::ReadDevice`) still reads into a vector, as before. The bytes stored in the resident shadow and in guest memory are the same. ### Why In Echoes of the End (PPSA25636), a compute dispatch with atomic writes into a resident sparse heap mirror completes about once per second. Each completion writes back the dispatch's whole written range, about 540 MiB. A later build that reads the same heap waits for that write-back in `CompletePendingCpuWrites` (`UploadFinish`). Allocating, zeroing and filling the 540 MiB vector took most of each write-back. The attribution below comes from a private integration tree (older `main` plus open PRs) with private counters (`APS5_PROFILE_DRAW` plus diagnostics). It is attribution, not a speed claim: 4 interleaved 900 s runs of the same build, with a private switch restoring the copy. | Per write-back (mean) | with the copy | without (this change) | |---|---|---| | copy into the vector | 342 / 332 ms | 0 / 0 ms | | `ResidentBuffer::Store` | 42 / 47 ms | 78 / 81 ms | | guest store (`storeChanged`) | 35 / 36 ms | 36 / 38 ms | | `CompletePendingCpuWrites` sync per copied-writer overlap | 511 / 503 ms | 168 / 172 ms | | total in those syncs per 900 s run | 368 / 349 s | 135 / 141 s | `ResidentBuffer::Store` reads the host-visible readback mapping directly now, so it got slower. The total per write-back still falls from about 419 ms to about 115 ms. ### Tested Arch Linux 7.2.9-arch1-1, AMD Radeon RX 6650 XT, RADV Mesa 26.2.4, Ryzen 9 7950X. **Focused tests on `main` and on the change** (`ANYPS5_REQUIRE_VULKAN=1 ANYPS5_NO_SHADER_CACHE=1 VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation ctest -V -j1 -R 'agc_driver_resident_heap_mirror|heap_mirror'`; 9 tests): - `main` 4c7d275bef8: 9/9 passed, 0 `VUID-`. - Change (same code on 4c7d275bef8): 9/9 passed, 0 `VUID-`. - Neither log reports `was not found but was requested by env var VK_INSTANCE_LAYERS`. - `agc_driver_resident_heap_mirror` ran its resident tests on this device (the device has sparse residency; the log prints `resident heap mirror tests passed`, not the skip message). They dispatch stores into a resident heap mirror and check guest memory after the write-back. **Echoes of the End: same-scene `main`/change pairs on one machine** (also posted with screenshots in https://github.com/boykopovar/AnyPS5/pull/12827#issuecomment-6505299937). Echoes does not boot on `main` alone: - Without #4449, host imports fail (`-1000072003`) and it segfaults at 32 s. - Without #8089, it aborts at 24 s: `ShaderRecompiler::Recompile: value IR instruction definition does not dominate its use` (#8050). - Without #11873 and #6867, it hits the early cold-load crash at 28 s. Both sides therefore use the same private base: `main` 899ae3d1ad3 + #4449 + #8089 + #11873 + #6867, commit 27db71c581b. The change side is that base + this PR's commit, 3e83ee94776; its `git patch-id` equals `c12a20f45da`'s. These runs therefore compare this PR on that private stack, not on bare `main`. Runs: - 1800 s each, scripted pad input, the same warm seeded cache before every run (seed manifest `6a3bbca6eb39b28b`), `APS5_TRACE_SECONDS=1500:240`, no other `APS5_TRACE_*`/`APS5_PROFILE_*` switch set. - Order: base, change, then six runs for other PRs, then change, base. Nothing crashed. - Machine: Arch Linux 7.2.9-arch1-1, Ryzen 9 7950X, RX 6650 XT, RADV Mesa 26.2.4, 3840x2160. - Scenes were checked with screenshots at 1440 s and 1795 s, which bracket the 1500–1740 s window. **Pair 1: in-game "Loading..." screen (cathedral with the blue crystal) in both windows.** Base, then change: ``` {"commit":"27db71c581b4","dirty":false,"env":{"APS5_PAD_INPUT_FILE":"<path>","APS5_TRACE_DIR":"<path>","APS5_TRACE_SECONDS":"1500:240"},"gpu":"AMD Radeon RX 6650 XT (RADV NAVI23)","driver":"radv Mesa 26.2.4-arch1.1","os":"Linux 7.2.9-arch1-1","cpu":"AMD Ryzen 9 7950X 16-Core Processor","cpu_threads":32,"memory_mib":127901,"title_id":"PPSA25636","title":"Echoes of the End","content_version":"01.012.000","resolution":"3840x2160","window":{"spec":"seconds 1500:240","first_present":803,"ms":240007.014},"presents":125,"frame_ms":{"p50":1621.105,"p90":2233.242,"p99":8046.195,"max":8428.698},"gpu_busy_ms_per_present":816.406,"worker_busy_pct":{"queue worker 0x0":99.503,"queue worker 0x20":98.191},"top_phases_ms_per_frame":{"Driver.Packet":3760.159,"Driver.Packet.dispatch":2070.479,"Driver.Dispatch":1796.986,"Driver.Packet.memory_wait":1211.455,"Vulkan.Dispatch":1111.888,"Resources.Complete":1068.127,"Vulkan.Dispatch.shader_resources":1033.539,"Graphics.Draw":286.697},"trace_dropped":true,"trace_dropped_threads":{"queue worker 0x0":{"events_full_after_s":64.295,"events_lost":646426,"totals_full":false},"queue worker 0x20":{"events_full_after_s":217.500,"events_lost":27431,"totals_full":false}},"trace":"aps5-trace-27db71c581b4-196709.json.gz"} {"commit":"3e83ee94776d","dirty":false,"env":{"APS5_PAD_INPUT_FILE":"<path>","APS5_TRACE_DIR":"<path>","APS5_TRACE_SECONDS":"1500:240"},"gpu":"AMD Radeon RX 6650 XT (RADV NAVI23)","driver":"radv Mesa 26.2.4-arch1.1","os":"Linux 7.2.9-arch1-1","cpu":"AMD Ryzen 9 7950X 16-Core Processor","cpu_threads":32,"memory_mib":127901,"title_id":"PPSA25636","title":"Echoes of the End","content_version":"01.012.000","resolution":"3840x2160","window":{"spec":"seconds 1500:240","first_present":1452,"ms":240019.614},"presents":341,"frame_ms":{"p50":704.873,"p90":877.547,"p99":1018.779,"max":1114.243},"gpu_busy_ms_per_present":335.082,"worker_busy_pct":{"queue worker 0x0":98.756,"queue worker 0x20":97.053},"top_phases_ms_per_frame":{"Driver.Packet":1357.357,"Driver.Packet.dispatch":671.973,"Driver.Dispatch":595.953,"Driver.Packet.memory_wait":456.245,"Vulkan.Dispatch":245.115,"Vulkan.Dispatch.shader_resources":233.316,"Resources.Complete":188.105,"Graphics.Draw":126.533},"trace_dropped":true,"trace_dropped_threads":{"queue worker 0x0":{"events_full_after_s":28.328,"events_lost":2033306,"totals_full":false},"queue worker 0x20":{"events_full_after_s":94.147,"events_lost":460849,"totals_full":false}},"trace":"aps5-trace-3e83ee94776d-824611.json.gz"} ``` - frame p50 1621.1 → 704.9 ms, p90 2233.2 → 877.5 ms, GPU busy 816.4 → 335.1 ms per present. - Attribution from the first 25 s of each trace, the span both traces recorded fully: `Resources.Complete` on queue worker 0x20 (the copied-writer write-back) took 7.4 s on base and 3.5 s on the change. `Recorder.Sync` on that worker took 1.6 s and 0.8 s. **Pair 2: in-world scene (two characters at a ruined archway) in both windows.** Base, then change: ``` {"commit":"27db71c581b4","dirty":false,"env":{"APS5_PAD_INPUT_FILE":"<path>","APS5_TRACE_DIR":"<path>","APS5_TRACE_SECONDS":"1500:240"},"gpu":"AMD Radeon RX 6650 XT (RADV NAVI23)","driver":"radv Mesa 26.2.4-arch1.1","os":"Linux 7.2.9-arch1-1","cpu":"AMD Ryzen 9 7950X 16-Core Processor","cpu_threads":32,"memory_mib":127901,"title_id":"PPSA25636","title":"Echoes of the End","content_version":"01.012.000","resolution":"3840x2160","window":{"spec":"seconds 1500:240","first_present":1054,"ms":240025.444},"presents":220,"frame_ms":{"p50":1084.471,"p90":1276.934,"p99":1413.076,"max":1538.887},"gpu_busy_ms_per_present":563.648,"worker_busy_pct":{"queue worker 0x0":99.116,"queue worker 0x20":97.803},"top_phases_ms_per_frame":{"Driver.Packet":2123.795,"Driver.Packet.dispatch":1102.659,"Driver.Dispatch":997.477,"Driver.Packet.memory_wait":748.864,"Vulkan.Dispatch":540.299,"Vulkan.Dispatch.shader_resources":527.130,"Resources.Complete":476.271,"GpuMutex.wait.indirect":155.197},"trace_dropped":true,"trace_dropped_threads":{"queue worker 0x0":{"events_full_after_s":39.845,"events_lost":1294831,"totals_full":false},"queue worker 0x20":{"events_full_after_s":127.742,"events_lost":221256,"totals_full":false}},"trace":"aps5-trace-27db71c581b4-1422189.json.gz"} {"commit":"3e83ee94776d","dirty":false,"env":{"APS5_PAD_INPUT_FILE":"<path>","APS5_TRACE_DIR":"<path>","APS5_TRACE_SECONDS":"1500:240"},"gpu":"AMD Radeon RX 6650 XT (RADV NAVI23)","driver":"radv Mesa 26.2.4-arch1.1","os":"Linux 7.2.9-arch1-1","cpu":"AMD Ryzen 9 7950X 16-Core Processor","cpu_threads":32,"memory_mib":127901,"title_id":"PPSA25636","title":"Echoes of the End","content_version":"01.012.000","resolution":"3840x2160","window":{"spec":"seconds 1500:240","first_present":1305,"ms":240957.123},"presents":239,"frame_ms":{"p50":1018.347,"p90":1212.909,"p99":1379.782,"max":1666.358},"gpu_busy_ms_per_present":515.481,"worker_busy_pct":{"queue worker 0x0":99.162,"queue worker 0x20":97.691},"top_phases_ms_per_frame":{"Driver.Packet":1961.533,"Driver.Packet.dispatch":1018.941,"Driver.Dispatch":918.054,"Driver.Packet.memory_wait":701.249,"Vulkan.Dispatch":484.835,"Vulkan.Dispatch.shader_resources":472.343,"Resources.Complete":425.887,"Graphics.Draw":145.052},"trace_dropped":true,"trace_dropped_threads":{"queue worker 0x0":{"events_full_after_s":40.275,"events_lost":1403009,"totals_full":false},"queue worker 0x20":{"events_full_after_s":125.406,"events_lost":258029,"totals_full":false}},"trace":"aps5-trace-3e83ee94776d-787378.json.gz"} ``` - frame p50 1084.5 vs 1018.3 ms, p90 1276.9 vs 1212.9 ms. - I don't read that as a difference with one run per side. The write-back this change shortens is mostly loading-phase work. - The change run reached this scene between 1300 s and 1440 s; the base run had reached it by 1300 s. Caveats: - One run per side per scene. Pair 1 shows a drop in the loading scene; it doesn't establish a size for it. - All four traces filled their per-thread event buffers during the window (`trace_dropped: true`; the digests list the times). The frame times come from presents and are complete; only the per-phase totals are partial. An earlier pair in this description (900 s runs, `APS5_TRACE_SECONDS=600:240`) landed on different scenes, so it is removed and is not evidence. `tools/trace_digest.py` output for the four traces: <details><summary>Pair 1 base (27db71c581b4)</summary> **seconds 1500:240** from present 803: 125 presents, frame p50 1621.1 / p90 2233.2 / p99 8046.2 / max 8428.7 ms, GPU busy 816.4 ms per present AMD Radeon RX 6650 XT (RADV NAVI23), radv Mesa 26.2.4-arch1.1, Linux 7.2.9-arch1-1, 3840x2160, commit 27db71c581b4, dropped: yes ```json {"commit":"27db71c581b4","dirty":false,"env":{"APS5_PAD_INPUT_FILE":"<path>","APS5_TRACE_DIR":"<path>","APS5_TRACE_SECONDS":"1500:240"},"gpu":"AMD Radeon RX 6650 XT (RADV NAVI23)","driver":"radv Mesa 26.2.4-arch1.1","os":"Linux 7.2.9-arch1-1","cpu":"AMD Ryzen 9 7950X 16-Core Processor","cpu_threads":32,"memory_mib":127901,"title_id":"PPSA25636","title":"Echoes of the End","content_version":"01.012.000","resolution":"3840x2160","window":{"spec":"seconds 1500:240","first_present":803,"ms":240007.014},"presents":125,"frame_ms":{"p50":1621.105,"p90":2233.242,"p99":8046.195,"max":8428.698},"gpu_busy_ms_per_present":816.406,"worker_busy_pct":{"queue worker 0x0":99.503,"queue worker 0x20":98.191},"top_phases_ms_per_frame":{"Driver.Packet":3760.159,"Driver.Packet.dispatch":2070.479,"Driver.Dispatch":1796.986,"Driver.Packet.memory_wait":1211.455,"Vulkan.Dispatch":1111.888,"Resources.Complete":1068.127,"Vulkan.Dispatch.shader_resources":1033.539,"Graphics.Draw":286.697},"trace_dropped":true,"trace_dropped_threads":{"queue worker 0x0":{"events_full_after_s":64.295,"events_lost":646426,"totals_full":false},"queue worker 0x20":{"events_full_after_s":217.5,"events_lost":27431,"totals_full":false}},"trace":"aps5-trace-27db71c581b4-196709.json.gz"} ``` **Slowest frames** (largest slices inside each, inclusive) - present 891: 8428.7 ms at 158334 ms: Driver.Packet (queue worker 0x20) 8360.6, Driver.Packet.dispatch (queue worker 0x20) 5757.9, Driver.Dispatch (queue worker 0x20) 5523.9, Vulkan.Dispatch (queue worker 0x20) 5329.4 - present 804: 8046.2 ms at 1538 ms: Driver.Packet (queue worker 0x20) 8000.2, Driver.Packet (queue worker 0x0) 7996.0, Driver.Packet.dispatch (queue worker 0x20) 5418.2, Driver.Dispatch (queue worker 0x20) 5363.3 - present 871: 7934.5 ms at 115262 ms: Driver.Packet (queue worker 0x20) 7864.6, Driver.Packet.dispatch (queue worker 0x20) 6465.5, Driver.Dispatch (queue worker 0x20) 6382.0, Vulkan.Dispatch (queue worker 0x20) 6218.2 - present 880: 7158.8 ms at 135237 ms: Driver.Packet (queue worker 0x20) 7103.9, Driver.Packet.dispatch (queue worker 0x20) 4626.4, Driver.Dispatch (queue worker 0x20) 4602.4, Vulkan.Dispatch (queue worker 0x20) 4348.6 - present 840: 5908.3 ms at 65391 ms: Driver.Packet (queue worker 0x20) 5859.2, Driver.Packet.dispatch (queue worker 0x20) 3127.9, Driver.Dispatch (queue worker 0x20) 3056.1, Vulkan.Dispatch (queue worker 0x20) 2725.0 **Threads** (ms per frame) | thread | busy | wait | untraced | in slices < 20 us | largest | |---|---|---|---|---|---| | shader prepare | 0.4 (0 %) | 0.0 (0 %) | 1919.6 | 0.0 | Shader.PrepareArtifact 0.4 | | shader prepare | 0.1 (0 %) | 0.0 (0 %) | 1919.9 | 0.0 | Shader.PrepareArtifact 0.1 | | shader prepare | 0.4 (0 %) | 0.0 (0 %) | 1919.6 | 0.0 | Shader.PrepareArtifact 0.4 | | shader prepare | 0.2 (0 %) | 0.0 (0 %) | 1919.8 | 0.0 | Shader.PrepareArtifact 0.2 | | shader prepare | 0.1 (0 %) | 0.0 (0 %) | 1919.9 | 0.0 | Shader.PrepareArtifact 0.1 | | shader prepare | 0.2 (0 %) | 0.0 (0 %) | 1919.9 | 0.0 | Shader.PrepareArtifact 0.2 | | shader prepare | 0.4 (0 %) | 0.0 (0 %) | 1919.6 | 0.0 | Shader.PrepareArtifact 0.4 | | shader prepare | 0.1 (0 %) | 0.0 (0 %) | 1919.9 | 0.0 | Shader.PrepareArtifact 0.1 | | shader prepare | 0.3 (0 %) | 0.0 (0 %) | 1919.8 | 0.0 | Shader.PrepareArtifact 0.3 | | shader prepare | 0.6 (0 %) | 0.0 (0 %) | 1919.5 | 0.0 | Shader.PrepareArtifact 0.6 | | shader prepare | 0.1 (0 %) | 0.0 (0 %) | 1919.9 | 0.0 | Shader.PrepareArtifact 0.1 | | shader prepare | 16.9 (1 %) | 0.0 (0 %) | 1903.2 | 0.0 | Shader.PrepareArtifact 16.9 | | shader prepare | 0.4 (0 %) | 0.0 (0 %) | 1919.7 | 0.0 | Shader.PrepareArtifact 0.4 | | shader prepare | 0.6 (0 %) | 0.0 (0 %) | 1919.4 | 0.0 | Shader.PrepareArtifact 0.6 | | shader prepare | 0.1 (0 %) | 0.0 (0 %) | 1920.0 | 0.0 | Shader.PrepareArtifact 0.1 | | shader prepare | 0.1 (0 %) | 0.0 (0 %) | 1920.0 | 0.0 | Shader.PrepareArtifact 0.1 | | shader prepare | 2.4 (0 %) | 0.0 (0 %) | 1917.6 | 0.0 | Vulkan.GraphicsPipelinePrebuild 2.4 | | shader prepare | 2.6 (0 %) | 0.0 (0 %) | 1917.5 | 0.0 | Vulkan.GraphicsPipelinePrebuild 2.6 | | shader prepare | 1.7 (0 %) | 0.0 (0 %) | 1918.3 | 0.0 | Vulkan.GraphicsPipelinePrebuild 1.7 | | shader prepare | 0.8 (0 %) | 0.0 (0 %) | 1919.3 | 0.0 | Vulkan.GraphicsPipelinePrebuild 0.8 | | shader prepare | 0.2 (0 %) | 0.0 (0 %) | 1919.9 | 0.0 | Vulkan.GraphicsPipelinePrebuild 0.2 | | shader prepare | 0.1 (0 %) | 0.0 (0 %) | 1920.0 | 0.0 | Vulkan.GraphicsPipelinePrebuild 0.1 | | shader prepare | 2.1 (0 %) | 0.0 (0 %) | 1918.0 | 0.0 | Vulkan.GraphicsPipelinePrebuild 2.1 | | shader prepare | 0.8 (0 %) | 0.0 (0 %) | 1919.2 | 0.0 | Vulkan.GraphicsPipelinePrebuild 0.8 | | shader prepare | 0.6 (0 %) | 0.0 (0 %) | 1919.5 | 0.0 | Vulkan.GraphicsPipelinePrebuild 0.6 | | shader prepare | 1.8 (0 %) | 0.0 (0 %) | 1918.3 | 0.0 | Vulkan.GraphicsPipelinePrebuild 1.8 | | shader prepare | 0.4 (0 %) | 0.0 (0 %) | 1919.7 | 0.0 | Vulkan.GraphicsPipelinePrebuild 0.4 | | shader prepare | 1.8 (0 %) | 0.0 (0 %) | 1918.3 | 0.0 | Vulkan.GraphicsPipelinePrebuild 1.8 | | shader prepare | 1.1 (0 %) | 0.0 (0 %) | 1918.9 | 0.0 | Vulkan.GraphicsPipelinePrebuild 1.1 | | shader prepare | 2.2 (0 %) | 0.0 (0 %) | 1917.8 | 0.0 | Vulkan.GraphicsPipelinePrebuild 2.2 | | shader prepare | 1.8 (0 %) | 0.0 (0 %) | 1918.3 | 0.0 | Vulkan.GraphicsPipelinePrebuild 1.8 | | shader prepare | 0.3 (0 %) | 0.0 (0 %) | 1919.8 | 0.0 | Vulkan.GraphicsPipelinePrebuild 0.3 | | queue worker 0x0 | 372.4 (19 %) | 137.7 (7 %) | 1410.0 | 21.7 | Driver.Packet 503.7, Driver.EndSubmission 4.2 | | draw committer | 386.0 (20 %) | 103.1 (5 %) | 1430.9 | 6.1 | Graphics.Draw 265.8, Recorder.Submit 100.4 | | queue worker 0x20 | 553.3 (29 %) | 1183.7 (62 %) | 183.0 | 19.9 | Driver.Packet 1687.9, Driver.EndSubmission 17.3 | | presenter | 1.4 (0 %) | 2.5 (0 %) | 1916.1 | 0.1 | VideoOut.Flip 3.9, Driver.Present 0.0 | | title | 0.7 (0 %) | 0.0 (0 %) | 1919.3 | 0.0 | Shader.ResolveAbi 0.5, Shader.ResolveGraphicsStagesAbi 0.1 | | title | 0.9 (0 %) | 0.0 (0 %) | 1919.2 | 0.0 | Shader.ResolveGraphicsStagesAbi 0.5, Shader.ResolveAbi 0.4 | | title | 1.4 (0 %) | 0.0 (0 %) | 1918.6 | 0.0 | Shader.ResolveAbi 0.9, Shader.ResolveGraphicsStagesAbi 0.5 | | title | 1.2 (0 %) | 0.0 (0 %) | 1918.9 | 0.0 | Shader.ResolveAbi 0.7, Shader.ResolveGraphicsAbi 0.5 | | title | 2.0 (0 %) | 0.0 (0 %) | 1918.0 | 0.0 | Shader.ResolveAbi 1.6, Shader.ResolveGraphicsStagesAbi 0.4 | | title | 1.5 (0 %) | 0.0 (0 %) | 1918.5 | 0.0 | Shader.ResolveAbi 0.9, Shader.ResolveGraphicsStagesAbi 0.6 | | title | 0.9 (0 %) | 0.0 (0 %) | 1919.1 | 0.0 | Shader.ResolveAbi 0.7, Shader.ResolveGraphicsStagesAbi 0.1 | | title | 0.0 (0 %) | 0.0 (0 %) | 1920.0 | 0.0 | Shader.Register 0.0, Shader.ResolveGraphicsStagesAbi 0.0 | | title | 1.6 (0 %) | 0.0 (0 %) | 1918.4 | 0.0 | Shader.ResolveAbi 1.0, Shader.ResolveGraphicsStagesAbi 0.5 | | title | 1.8 (0 %) | 0.0 (0 %) | 1918.2 | 0.0 | Shader.ResolveAbi 1.7, Shader.ResolveGraphicsStagesAbi 0.1 | | title | 1.1 (0 %) | 0.0 (0 %) | 1919.0 | 0.0 | Shader.ResolveAbi 1.0, Shader.ResolveGraphicsStagesAbi 0.1 | | title | 1.9 (0 %) | 0.0 (0 %) | 1918.1 | 0.0 | Shader.ResolveAbi 1.5, Shader.ResolveGraphicsStagesAbi 0.5 | | title | 1.7 (0 %) | 0.0 (0 %) | 1918.3 | 0.0 | Shader.ResolveAbi 0.9, Shader.ResolveGraphicsStagesAbi 0.6 | | title | 1.0 (0 %) | 0.0 (0 %) | 1919.1 | 0.0 | Shader.ResolveAbi 0.8, Shader.ResolveGraphicsStagesAbi 0.1 | | title | 0.0 (0 %) | 0.0 (0 %) | 1920.1 | 0.0 | Shader.ResolveGraphicsStagesAbi 0.0 | | title | 0.0 (0 %) | 0.0 (0 %) | 1920.1 | 0.0 | Shader.ResolveGraphicsStagesAbi 0.0 | | title | 0.0 (0 %) | 0.0 (0 %) | 1920.1 | 0.0 | Shader.ResolveGraphicsStagesAbi 0.0 | | gpu | 817.7 (43 %) | 0.0 (0 %) | 1102.4 | 0.0 | batch 817.7 | **Largest slices** (ms per frame, inclusive, all threads): Driver.Packet 2191.6, Driver.Packet.dispatch 1045.8, Driver.Packet.memory_wait 991.9, Driver.Dispatch 930.1, batch 817.7, Resources.Complete 639.5, Vulkan.Dispatch 621.0, Vulkan.Dispatch.shader_resources 552.2, Graphics.Draw 269.5, Graphics.Draw.draw_and_resource_release 259.3 **Longest waits** - GpuMutex.wait.label (draw committer) 5338.8 ms at 115912 ms, present 871 - Driver.Packet.memory_wait (queue worker 0x0) 4861.7 ms at 1687 ms, present 804 - Driver.Packet.memory_wait (queue worker 0x20) 1520.9 ms at 6550 ms, present 804 - Driver.Packet.memory_wait (queue worker 0x20) 1486.4 ms at 67904 ms, present 840 - Driver.Packet.memory_wait (queue worker 0x20) 1317.8 ms at 163408 ms, present 891 - Driver.Packet.memory_wait (queue worker 0x20) 1290.9 ms at 139408 ms, present 880 - Driver.Packet.memory_wait (queue worker 0x20) 1214.3 ms at 171794 ms, present 893 - Driver.Packet.memory_wait (queue worker 0x20) 1175.6 ms at 153312 ms, present 887 - Driver.Packet.memory_wait (queue worker 0x20) 1075.1 ms at 143089 ms, present 881 - Driver.Packet.memory_wait (queue worker 0x20) 1038.7 ms at 44088 ms, present 825 **Largest GPU batches** (GPU ranges inside, and the CPU slices that recorded each, inclusive) - batch 28342: 96.8 ms at 229615 ms, present 922: GPU no ranges; recorded by Graphics.Draw (draw committer) 17.3, Graphics.Draw.draw_and_resource_release (draw committer) 17.3, Resources.Complete (draw committer) 16.8, Recorder.Submit (draw committer) 1.3 - batch 6271: 92.3 ms at 49316 ms, present 828: GPU no ranges; recorded by Graphics.Draw (draw committer) 18.2, Graphics.Draw.draw_and_resource_release (draw committer) 18.2, Resources.Complete (draw committer) 17.8, Recorder.Submit (draw committer) 1.3 - batch 23373: 92.1 ms at 189292 ms, present 901: GPU no ranges; recorded by Graphics.Draw (draw committer) 4.4, Graphics.Draw.draw_and_resource_release (draw committer) 4.4, Resources.Complete (draw committer) 3.8, Recorder.Submit (draw committer) 1.0 - batch 26484: 92.1 ms at 214467 ms, present 914: GPU no ranges; recorded by Graphics.Draw (draw committer) 19.5, Graphics.Draw.draw_and_resource_release (draw committer) 19.5, Resources.Complete (draw committer) 17.9, Recorder.Submit (draw committer) 1.7 - batch 25528: 92.0 ms at 207050 ms, present 910: GPU no ranges; recorded by Graphics.Draw (draw committer) 17.8, Graphics.Draw.draw_and_resource_release (draw committer) 17.8, Resources.Complete (draw committer) 17.2, Recorder.Submit (draw committer) 1.6 </details> <details><summary>Pair 1 change (3e83ee94776d)</summary> **seconds 1500:240** from present 1452: 341 presents, frame p50 704.9 / p90 877.5 / p99 1018.8 / max 1114.2 ms, GPU busy 335.1 ms per present AMD Radeon RX 6650 XT (RADV NAVI23), radv Mesa 26.2.4-arch1.1, Linux 7.2.9-arch1-1, 3840x2160, commit 3e83ee94776d, dropped: yes ```json {"commit":"3e83ee94776d","dirty":false,"env":{"APS5_PAD_INPUT_FILE":"<path>","APS5_TRACE_DIR":"<path>","APS5_TRACE_SECONDS":"1500:240"},"gpu":"AMD Radeon RX 6650 XT (RADV NAVI23)","driver":"radv Mesa 26.2.4-arch1.1","os":"Linux 7.2.9-arch1-1","cpu":"AMD Ryzen 9 7950X 16-Core Processor","cpu_threads":32,"memory_mib":127901,"title_id":"PPSA25636","title":"Echoes of the End","content_version":"01.012.000","resolution":"3840x2160","window":{"spec":"seconds 1500:240","first_present":1452,"ms":240019.614},"presents":341,"frame_ms":{"p50":704.873,"p90":877.547,"p99":1018.779,"max":1114.243},"gpu_busy_ms_per_present":335.082,"worker_busy_pct":{"queue worker 0x0":98.756,"queue worker 0x20":97.053},"top_phases_ms_per_frame":{"Driver.Packet":1357.357,"Driver.Packet.dispatch":671.973,"Driver.Dispatch":595.953,"Driver.Packet.memory_wait":456.245,"Vulkan.Dispatch":245.115,"Vulkan.Dispatch.shader_resources":233.316,"Resources.Complete":188.105,"Graphics.Draw":126.533},"trace_dropped":true,"trace_dropped_threads":{"queue worker 0x0":{"events_full_after_s":28.328,"events_lost":2033306,"totals_full":false},"queue worker 0x20":{"events_full_after_s":94.147,"events_lost":460849,"totals_full":false}},"trace":"aps5-trace-3e83ee94776d-824611.json.gz"} ``` **Slowest frames** (largest slices inside each, inclusive) - present 1537: 1114.2 ms at 64067 ms: Driver.Packet (queue worker 0x20) 1072.2, Driver.Packet.memory_wait (queue worker 0x20) 771.6, batch (gpu) 448.3, Graphics.Draw (draw committer) 346.5 - present 1536: 1042.5 ms at 63025 ms: Driver.Packet (queue worker 0x20) 1003.4, Driver.Packet.memory_wait (queue worker 0x20) 606.2, batch (gpu) 434.7, Driver.Packet.dispatch (queue worker 0x20) 359.5 - present 1582: 1040.9 ms at 102636 ms: batch (gpu) 445.1, Graphics.Draw (draw committer) 292.0, Graphics.Draw.draw_and_resource_release (draw committer) 286.1, Resources.Complete (draw committer) 177.8 - present 1516: 1018.8 ms at 47246 ms: Driver.Packet (queue worker 0x20) 981.9, Driver.Packet.memory_wait (queue worker 0x20) 639.7, batch (gpu) 419.8, Driver.Packet.dispatch (queue worker 0x20) 302.5 - present 1539: 995.8 ms at 66117 ms: Driver.Packet (queue worker 0x20) 951.9, Driver.Packet.memory_wait (queue worker 0x20) 653.9, batch (gpu) 429.6, Driver.Packet.dispatch (queue worker 0x20) 278.7 **Threads** (ms per frame) | thread | busy | wait | untraced | in slices < 20 us | largest | |---|---|---|---|---|---| | queue worker 0x0 | 61.7 (9 %) | 19.9 (3 %) | 622.4 | 8.0 | Driver.Packet 79.6, Driver.EndSubmission 1.1 | | draw committer | 204.6 (29 %) | 13.6 (2 %) | 485.7 | 6.1 | Graphics.Draw 118.1, Recorder.Submit 70.5 | | queue worker 0x20 | 78.6 (11 %) | 196.4 (28 %) | 428.9 | 7.6 | Driver.Packet 262.9, Driver.EndSubmission 4.6 | | presenter | 1.2 (0 %) | 0.4 (0 %) | 702.3 | 0.1 | VideoOut.Flip 1.6, Driver.Present 0.0 | | title | 0.0 (0 %) | 0.0 (0 %) | 703.9 | 0.0 | Shader.ResolveGraphicsStagesAbi 0.0, Shader.ResolveAbi 0.0 | | title | 0.0 (0 %) | 0.0 (0 %) | 703.9 | 0.0 | Shader.ResolveGraphicsStagesAbi 0.0 | | title | 0.0 (0 %) | 0.0 (0 %) | 703.9 | 0.0 | Shader.ResolveAbi 0.0, Shader.ResolveGraphicsStagesAbi 0.0 | | title | 0.0 (0 %) | 0.0 (0 %) | 703.9 | 0.0 | Shader.ResolveGraphicsStagesAbi 0.0 | | title | 0.0 (0 %) | 0.0 (0 %) | 703.9 | 0.0 | Shader.ResolveGraphicsStagesAbi 0.0 | | title | 0.0 (0 %) | 0.0 (0 %) | 703.9 | 0.0 | Shader.ResolveGraphicsStagesAbi 0.0 | | title | 0.0 (0 %) | 0.0 (0 %) | 703.9 | 0.0 | Shader.ResolveGraphicsStagesAbi 0.0, Shader.ResolveAbi 0.0 | | title | 0.0 (0 %) | 0.0 (0 %) | 703.9 | 0.0 | Shader.ResolveGraphicsStagesAbi 0.0 | | title | 0.0 (0 %) | 0.0 (0 %) | 703.9 | 0.0 | Shader.ResolveGraphicsStagesAbi 0.0 | | title | 0.0 (0 %) | 0.0 (0 %) | 703.9 | 0.0 | Shader.ResolveGraphicsStagesAbi 0.0, Shader.ResolveAbi 0.0 | | title | 0.0 (0 %) | 0.0 (0 %) | 703.9 | 0.0 | Shader.ResolveGraphicsStagesAbi 0.0, Shader.ResolveGraphicsAbi 0.0 | | title | 0.0 (0 %) | 0.0 (0 %) | 703.9 | 0.0 | Shader.ResolveGraphicsStagesAbi 0.0, Shader.ResolveAbi 0.0 | | title | 0.0 (0 %) | 0.0 (0 %) | 703.9 | 0.0 | Shader.ResolveGraphicsStagesAbi 0.0, Shader.ResolveAbi 0.0 | | title | 0.0 (0 %) | 0.0 (0 %) | 703.9 | 0.0 | Shader.ResolveGraphicsStagesAbi 0.0 | | title | 0.0 (0 %) | 0.0 (0 %) | 703.9 | 0.0 | Shader.ResolveGraphicsStagesAbi 0.0 | | title | 0.0 (0 %) | 0.0 (0 %) | 703.9 | 0.0 | Shader.ResolveGraphicsStagesAbi 0.0 | | title | 0.0 (0 %) | 0.0 (0 %) | 703.9 | 0.0 | Shader.ResolveGraphicsStagesAbi 0.0 | | title | 0.0 (0 %) | 0.0 (0 %) | 703.9 | 0.0 | Shader.ResolveGraphicsStagesAbi 0.0 | | gpu | 335.0 (48 %) | 0.0 (0 %) | 368.8 | 0.0 | batch 335.0 | **Largest slices** (ms per frame, inclusive, all threads): Driver.Packet 342.5, batch 335.0, Driver.Packet.memory_wait 168.9, Driver.Packet.dispatch 142.4, Driver.Dispatch 130.2, Graphics.Draw 119.0, Graphics.Draw.draw_and_resource_release 114.0, Recorder.Submit 88.1, Resources.Complete 70.1, Vulkan.Dispatch 61.7 **Longest waits** - Driver.Packet.memory_wait (queue worker 0x20) 563.0 ms at 64595 ms, present 1537 - Driver.Packet.memory_wait (queue worker 0x20) 528.3 ms at 47712 ms, present 1516 - Driver.Packet.memory_wait (queue worker 0x20) 518.2 ms at 5077 ms, present 1458 - Driver.Packet.memory_wait (queue worker 0x20) 483.0 ms at 77579 ms, present 1552 - Driver.Packet.memory_wait (queue worker 0x20) 474.4 ms at 63573 ms, present 1536 - Driver.Packet.memory_wait (queue worker 0x20) 468.9 ms at 60112 ms, present 1532 - Driver.Packet.memory_wait (queue worker 0x20) 467.4 ms at 67594 ms, present 1540 - Driver.Packet.memory_wait (queue worker 0x20) 462.3 ms at 93349 ms, present 1570 - Driver.Packet.memory_wait (queue worker 0x20) 461.6 ms at 89623 ms, present 1566 - Driver.Packet.memory_wait (queue worker 0x20) 459.2 ms at 72564 ms, present 1546 **Largest GPU batches** (GPU ranges inside, and the CPU slices that recorded each, inclusive) - batch 1533: 63.0 ms at 6130 ms, present 1459: GPU no ranges; recorded by Driver.Packet (queue worker 0x0) 87.1, Driver.Packet.dispatch (queue worker 0x0) 67.2, Driver.Dispatch (queue worker 0x0) 66.7, Vulkan.Dispatch (queue worker 0x0) 66.3 - batch 24304: 61.9 ms at 100732 ms, present 1579: GPU no ranges; recorded by no CPU slices - batch 47713: 58.2 ms at 190825 ms, present 1705: GPU no ranges; recorded by no CPU slices - batch 31496: 58.0 ms at 129247 ms, present 1617: GPU no ranges; recorded by no CPU slices - batch 54226: 55.5 ms at 211510 ms, present 1742: GPU no ranges; recorded by no CPU slices </details> <details><summary>Pair 2 base (27db71c581b4)</summary> **seconds 1500:240** from present 1054: 220 presents, frame p50 1084.5 / p90 1276.9 / p99 1413.1 / max 1538.9 ms, GPU busy 563.6 ms per present AMD Radeon RX 6650 XT (RADV NAVI23), radv Mesa 26.2.4-arch1.1, Linux 7.2.9-arch1-1, 3840x2160, commit 27db71c581b4, dropped: yes ```json {"commit":"27db71c581b4","dirty":false,"env":{"APS5_PAD_INPUT_FILE":"<path>","APS5_TRACE_DIR":"<path>","APS5_TRACE_SECONDS":"1500:240"},"gpu":"AMD Radeon RX 6650 XT (RADV NAVI23)","driver":"radv Mesa 26.2.4-arch1.1","os":"Linux 7.2.9-arch1-1","cpu":"AMD Ryzen 9 7950X 16-Core Processor","cpu_threads":32,"memory_mib":127901,"title_id":"PPSA25636","title":"Echoes of the End","content_version":"01.012.000","resolution":"3840x2160","window":{"spec":"seconds 1500:240","first_present":1054,"ms":240025.444},"presents":220,"frame_ms":{"p50":1084.471,"p90":1276.934,"p99":1413.076,"max":1538.887},"gpu_busy_ms_per_present":563.648,"worker_busy_pct":{"queue worker 0x0":99.116,"queue worker 0x20":97.803},"top_phases_ms_per_frame":{"Driver.Packet":2123.795,"Driver.Packet.dispatch":1102.659,"Driver.Dispatch":997.477,"Driver.Packet.memory_wait":748.864,"Vulkan.Dispatch":540.299,"Vulkan.Dispatch.shader_resources":527.13,"Resources.Complete":476.271,"GpuMutex.wait.indirect":155.197},"trace_dropped":true,"trace_dropped_threads":{"queue worker 0x0":{"events_full_after_s":39.845,"events_lost":1294831,"totals_full":false},"queue worker 0x20":{"events_full_after_s":127.742,"events_lost":221256,"totals_full":false}},"trace":"aps5-trace-27db71c581b4-1422189.json.gz"} ``` **Slowest frames** (largest slices inside each, inclusive) - present 1188: 1538.9 ms at 143780 ms: batch (gpu) 699.6, Graphics.Draw (draw committer) 261.7, Graphics.Draw.draw_and_resource_release (draw committer) 255.5, Resources.Complete (draw committer) 153.5 - present 1075: 1467.7 ms at 23008 ms: Driver.Packet (queue worker 0x0) 1444.3, Driver.Packet (queue worker 0x20) 1431.0, Driver.Packet.dispatch (queue worker 0x0) 1163.0, Driver.Packet.memory_wait (queue worker 0x20) 1030.0 - present 1131: 1413.1 ms at 79436 ms: Driver.Packet (queue worker 0x20) 1370.3, Driver.Packet.memory_wait (queue worker 0x20) 835.1, batch (gpu) 647.8, Driver.Packet.dispatch (queue worker 0x20) 391.8 - present 1217: 1405.0 ms at 176843 ms: batch (gpu) 633.7, Graphics.Draw (draw committer) 282.5, Graphics.Draw.draw_and_resource_release (draw committer) 266.7, Resources.Complete (draw committer) 183.9 - present 1211: 1405.0 ms at 169563 ms: batch (gpu) 641.1, Graphics.Draw (draw committer) 246.8, Graphics.Draw.draw_and_resource_release (draw committer) 241.0, Resources.Complete (draw committer) 139.4 **Threads** (ms per frame) | thread | busy | wait | untraced | in slices < 20 us | largest | |---|---|---|---|---|---| | shader prepare | 0.0 (0 %) | 0.0 (0 %) | 1091.0 | 0.0 | Vulkan.GraphicsPipelinePrebuild 0.0 | | queue worker 0x0 | 142.6 (13 %) | 36.1 (3 %) | 912.3 | 12.6 | Driver.Packet 176.1, Driver.EndSubmission 1.4 | | draw committer | 237.7 (22 %) | 15.9 (1 %) | 837.4 | 6.2 | Graphics.Draw 136.5, Recorder.Submit 81.0 | | queue worker 0x20 | 124.1 (11 %) | 454.9 (42 %) | 512.1 | 12.1 | Driver.Packet 557.7, Driver.EndSubmission 8.3 | | presenter | 1.2 (0 %) | 0.4 (0 %) | 1089.3 | 0.1 | VideoOut.Flip 1.7, Driver.Present 0.0 | | title | 0.0 (0 %) | 0.0 (0 %) | 1091.0 | 0.0 | Shader.ResolveGraphicsStagesAbi 0.0, Shader.ResolveGraphicsAbi 0.0 | | title | 0.0 (0 %) | 0.0 (0 %) | 1091.0 | 0.0 | Shader.ResolveGraphicsStagesAbi 0.0 | | title | 0.0 (0 %) | 0.0 (0 %) | 1091.0 | 0.0 | Shader.ResolveGraphicsStagesAbi 0.0 | | title | 0.0 (0 %) | 0.0 (0 %) | 1091.0 | 0.0 | Shader.ResolveGraphicsStagesAbi 0.0 | | title | 0.0 (0 %) | 0.0 (0 %) | 1091.0 | 0.0 | Shader.ResolveGraphicsStagesAbi 0.0, Shader.ResolveGraphicsAbi 0.0 | | title | 0.0 (0 %) | 0.0 (0 %) | 1091.0 | 0.0 | Shader.ResolveGraphicsStagesAbi 0.0, Shader.ResolveAbi 0.0 | | title | 0.0 (0 %) | 0.0 (0 %) | 1091.0 | 0.0 | Shader.ResolveGraphicsStagesAbi 0.0, Shader.ResolveAbi 0.0 | | title | 0.0 (0 %) | 0.0 (0 %) | 1091.0 | 0.0 | Shader.ResolveGraphicsStagesAbi 0.0, Shader.ResolveAbi 0.0 | | title | 0.0 (0 %) | 0.0 (0 %) | 1091.0 | 0.0 | Shader.ResolveGraphicsStagesAbi 0.0, Shader.ResolveAbi 0.0 | | title | 0.0 (0 %) | 0.0 (0 %) | 1091.0 | 0.0 | Shader.ResolveGraphicsStagesAbi 0.0 | | title | 0.0 (0 %) | 0.0 (0 %) | 1091.0 | 0.0 | Shader.ResolveGraphicsStagesAbi 0.0 | | title | 0.0 (0 %) | 0.0 (0 %) | 1091.0 | 0.0 | Shader.ResolveGraphicsStagesAbi 0.0 | | title | 0.0 (0 %) | 0.0 (0 %) | 1091.0 | 0.0 | Shader.ResolveGraphicsStagesAbi 0.0, Shader.ResolveGraphicsAbi 0.0 | | title | 0.0 (0 %) | 0.0 (0 %) | 1091.0 | 0.0 | Shader.ResolveGraphicsStagesAbi 0.0 | | title | 0.0 (0 %) | 0.0 (0 %) | 1091.0 | 0.0 | Shader.ResolveGraphicsStagesAbi 0.0 | | title | 0.0 (0 %) | 0.0 (0 %) | 1091.0 | 0.0 | Shader.ResolveGraphicsStagesAbi 0.0 | | title | 0.0 (0 %) | 0.0 (0 %) | 1091.0 | 0.0 | Shader.ResolveGraphicsStagesAbi 0.0 | | gpu | 563.6 (52 %) | 0.0 (0 %) | 527.5 | 0.0 | batch 563.6 | **Largest slices** (ms per frame, inclusive, all threads): Driver.Packet 733.8, batch 563.6, Driver.Packet.memory_wait 392.9, Driver.Packet.dispatch 287.7, Driver.Dispatch 253.6, Resources.Complete 152.3, Graphics.Draw 139.3, Graphics.Draw.draw_and_resource_release 132.6, Vulkan.Dispatch 130.4, Vulkan.Dispatch.shader_resources 127.2 **Longest waits** - Driver.Packet.memory_wait (queue worker 0x20) 860.8 ms at 23593 ms, present 1075 - Driver.Packet.memory_wait (queue worker 0x20) 803.9 ms at 93357 ms, present 1143 - Driver.Packet.memory_wait (queue worker 0x20) 787.8 ms at 7836 ms, present 1060 - Driver.Packet.memory_wait (queue worker 0x20) 763.5 ms at 86557 ms, present 1137 - Driver.Packet.memory_wait (queue worker 0x20) 762.1 ms at 117553 ms, present 1165 - Driver.Packet.memory_wait (queue worker 0x20) 752.7 ms at 26194 ms, present 1077 - Driver.Packet.memory_wait (queue worker 0x20) 752.0 ms at 68716 ms, present 1121 - Driver.Packet.memory_wait (queue worker 0x20) 751.3 ms at 29724 ms, present 1080 - Driver.Packet.memory_wait (queue worker 0x20) 749.3 ms at 60117 ms, present 1113 - Driver.Packet.memory_wait (queue worker 0x20) 736.6 ms at 31050 ms, present 1081 **Largest GPU batches** (GPU ranges inside, and the CPU slices that recorded each, inclusive) - batch 20717: 92.8 ms at 104520 ms, present 1153: GPU no ranges; recorded by Graphics.Draw (draw committer) 1.8, Graphics.Draw.draw_and_resource_release (draw committer) 1.8, Resources.Complete (draw committer) 1.0, Recorder.Submit (draw committer) 1.0 - batch 20082: 89.9 ms at 101161 ms, present 1150: GPU no ranges; recorded by no CPU slices - batch 16749: 89.4 ms at 83585 ms, present 1134: GPU no ranges; recorded by Graphics.Draw (draw committer) 1.3, Graphics.Draw.draw_and_resource_release (draw committer) 1.3, Recorder.Submit (draw committer) 1.1, Resources.Complete (draw committer) 0.8 - batch 22993: 87.2 ms at 116465 ms, present 1164: GPU no ranges; recorded by Graphics.Draw (draw committer) 1.3, Graphics.Draw.draw_and_resource_release (draw committer) 1.3, Recorder.Submit (draw committer) 0.9, Resources.Complete (draw committer) 0.8 - batch 11047: 84.3 ms at 54026 ms, present 1107: GPU no ranges; recorded by Graphics.Draw (draw committer) 1.8, Graphics.Draw.draw_and_resource_release (draw committer) 1.8, Resources.Complete (draw committer) 1.3, Recorder.Submit (draw committer) 1.2 </details> <details><summary>Pair 2 change (3e83ee94776d)</summary> **seconds 1500:240** from present 1305: 239 presents, frame p50 1018.3 / p90 1212.9 / p99 1379.8 / max 1666.4 ms, GPU busy 515.5 ms per present AMD Radeon RX 6650 XT (RADV NAVI23), radv Mesa 26.2.4-arch1.1, Linux 7.2.9-arch1-1, 3840x2160, commit 3e83ee94776d, dropped: yes ```json {"commit":"3e83ee94776d","dirty":false,"env":{"APS5_PAD_INPUT_FILE":"<path>","APS5_TRACE_DIR":"<path>","APS5_TRACE_SECONDS":"1500:240"},"gpu":"AMD Radeon RX 6650 XT (RADV NAVI23)","driver":"radv Mesa 26.2.4-arch1.1","os":"Linux 7.2.9-arch1-1","cpu":"AMD Ryzen 9 7950X 16-Core Processor","cpu_threads":32,"memory_mib":127901,"title_id":"PPSA25636","title":"Echoes of the End","content_version":"01.012.000","resolution":"3840x2160","window":{"spec":"seconds 1500:240","first_present":1305,"ms":240957.123},"presents":239,"frame_ms":{"p50":1018.347,"p90":1212.909,"p99":1379.782,"max":1666.358},"gpu_busy_ms_per_present":515.481,"worker_busy_pct":{"queue worker 0x0":99.162,"queue worker 0x20":97.691},"top_phases_ms_per_frame":{"Driver.Packet":1961.533,"Driver.Packet.dispatch":1018.941,"Driver.Dispatch":918.054,"Driver.Packet.memory_wait":701.249,"Vulkan.Dispatch":484.835,"Vulkan.Dispatch.shader_resources":472.343,"Resources.Complete":425.887,"Graphics.Draw":145.052},"trace_dropped":true,"trace_dropped_threads":{"queue worker 0x0":{"events_full_after_s":40.275,"events_lost":1403009,"totals_full":false},"queue worker 0x20":{"events_full_after_s":125.406,"events_lost":258029,"totals_full":false}},"trace":"aps5-trace-3e83ee94776d-787378.json.gz"} ``` **Slowest frames** (largest slices inside each, inclusive) - present 1400: 1666.4 ms at 100003 ms: Driver.Packet (queue worker 0x20) 1609.5, Driver.Packet.memory_wait (queue worker 0x20) 1197.9, batch (gpu) 791.3, Driver.Packet.dispatch (queue worker 0x20) 392.3 - present 1516: 1411.0 ms at 210954 ms: batch (gpu) 625.2, Graphics.Draw (draw committer) 212.6, Graphics.Draw.draw_and_resource_release (draw committer) 199.8, Resources.Complete (draw committer) 114.9 - present 1526: 1379.8 ms at 222276 ms: batch (gpu) 625.2, Graphics.Draw (draw committer) 195.8, Graphics.Draw.draw_and_resource_release (draw committer) 182.9, Resources.Complete (draw committer) 101.6 - present 1504: 1378.1 ms at 197928 ms: batch (gpu) 602.2, Graphics.Draw (draw committer) 248.9, Graphics.Draw.draw_and_resource_release (draw committer) 231.7, Resources.Complete (draw committer) 137.7 - present 1329: 1376.8 ms at 26094 ms: Driver.Packet (queue worker 0x0) 1346.1, Driver.Packet (queue worker 0x20) 1329.8, Driver.Packet.dispatch (queue worker 0x0) 1107.1, Driver.Packet.memory_wait (queue worker 0x20) 934.6 **Threads** (ms per frame) | thread | busy | wait | untraced | in slices < 20 us | largest | |---|---|---|---|---|---| | queue worker 0x0 | 133.0 (13 %) | 33.3 (3 %) | 841.9 | 11.3 | Driver.Packet 164.0, Driver.EndSubmission 1.3 | | draw committer | 222.2 (22 %) | 13.3 (1 %) | 772.7 | 6.2 | Graphics.Draw 131.0, Recorder.Submit 69.2 | | queue worker 0x20 | 109.4 (11 %) | 413.8 (41 %) | 485.0 | 11.0 | Driver.Packet 504.6, Driver.EndSubmission 7.0 | | presenter | 1.1 (0 %) | 0.4 (0 %) | 1006.6 | 0.1 | VideoOut.Flip 1.5, Driver.Present 0.0 | | title | 0.0 (0 %) | 0.0 (0 %) | 1008.2 | 0.0 | Shader.ResolveGraphicsStagesAbi 0.0 | | title | 0.0 (0 %) | 0.0 (0 %) | 1008.2 | 0.0 | Shader.ResolveGraphicsStagesAbi 0.0 | | title | 0.0 (0 %) | 0.0 (0 %) | 1008.2 | 0.0 | Shader.ResolveGraphicsStagesAbi 0.0 | | title | 0.0 (0 %) | 0.0 (0 %) | 1008.2 | 0.0 | Shader.ResolveGraphicsStagesAbi 0.0 | | title | 0.0 (0 %) | 0.0 (0 %) | 1008.2 | 0.0 | Shader.ResolveGraphicsStagesAbi 0.0 | | title | 0.0 (0 %) | 0.0 (0 %) | 1008.2 | 0.0 | Shader.ResolveGraphicsStagesAbi 0.0 | | title | 0.0 (0 %) | 0.0 (0 %) | 1008.2 | 0.0 | Shader.ResolveGraphicsStagesAbi 0.0 | | title | 0.0 (0 %) | 0.0 (0 %) | 1008.2 | 0.0 | Shader.ResolveGraphicsStagesAbi 0.0 | | title | 0.0 (0 %) | 0.0 (0 %) | 1008.2 | 0.0 | Shader.ResolveGraphicsStagesAbi 0.0 | | title | 0.0 (0 %) | 0.0 (0 %) | 1008.2 | 0.0 | Shader.ResolveGraphicsStagesAbi 0.0 | | title | 0.0 (0 %) | 0.0 (0 %) | 1008.2 | 0.0 | Shader.ResolveGraphicsStagesAbi 0.0 | | title | 0.0 (0 %) | 0.0 (0 %) | 1008.2 | 0.0 | Shader.ResolveGraphicsStagesAbi 0.0 | | title | 0.0 (0 %) | 0.0 (0 %) | 1008.2 | 0.0 | Shader.ResolveGraphicsStagesAbi 0.0 | | title | 0.0 (0 %) | 0.0 (0 %) | 1008.2 | 0.0 | Shader.ResolveGraphicsStagesAbi 0.0 | | title | 0.0 (0 %) | 0.0 (0 %) | 1008.2 | 0.0 | Shader.ResolveGraphicsStagesAbi 0.0 | | title | 0.0 (0 %) | 0.0 (0 %) | 1008.2 | 0.0 | Shader.ResolveGraphicsStagesAbi 0.0 | | title | 0.0 (0 %) | 0.0 (0 %) | 1008.2 | 0.0 | Shader.ResolveGraphicsStagesAbi 0.0 | | title | 0.0 (0 %) | 0.0 (0 %) | 1008.2 | 0.0 | Shader.ResolveGraphicsStagesAbi 0.0 | | gpu | 514.3 (51 %) | 0.0 (0 %) | 493.9 | 0.0 | batch 514.3 | **Largest slices** (ms per frame, inclusive, all threads): Driver.Packet 668.7, batch 514.3, Driver.Packet.memory_wait 361.7, Driver.Packet.dispatch 261.5, Driver.Dispatch 238.7, Resources.Complete 150.2, Graphics.Draw 133.5, Graphics.Draw.draw_and_resource_release 127.1, Vulkan.Dispatch 127.1, Vulkan.Dispatch.shader_resources 124.1 **Longest waits** - Driver.Packet.memory_wait (queue worker 0x20) 1038.3 ms at 100613 ms, present 1400 - Driver.Packet.memory_wait (queue worker 0x20) 841.4 ms at 1625 ms, present 1306 - Driver.Packet.memory_wait (queue worker 0x20) 792.3 ms at 26652 ms, present 1329 - Driver.Packet.memory_wait (queue worker 0x20) 788.0 ms at 4300 ms, present 1308 - Driver.Packet.memory_wait (queue worker 0x20) 759.9 ms at 98126 ms, present 1398 - Driver.Packet.memory_wait (queue worker 0x20) 754.4 ms at 38696 ms, present 1340 - Driver.Packet.memory_wait (queue worker 0x20) 746.3 ms at 103174 ms, present 1402 - Driver.Packet.memory_wait (queue worker 0x20) 728.5 ms at 17755 ms, present 1321 - Driver.Packet.memory_wait (queue worker 0x20) 724.9 ms at 67461 ms, present 1368 - Driver.Packet.memory_wait (queue worker 0x20) 709.3 ms at 32374 ms, present 1334 **Largest GPU batches** (GPU ranges inside, and the CPU slices that recorded each, inclusive) - batch 1837: 82.9 ms at 9670 ms, present 1313: GPU no ranges; recorded by Graphics.Draw (draw committer) 1.2, Graphics.Draw.draw_and_resource_release (draw committer) 1.2, Recorder.Submit (draw committer) 1.0, Resources.Complete (draw committer) 0.7 - batch 19740: 82.0 ms at 101010 ms, present 1400: GPU no ranges; recorded by Graphics.Draw (draw committer) 1.9, Graphics.Draw.draw_and_resource_release (draw committer) 1.9, Resources.Complete (draw committer) 1.4, Recorder.Submit (draw committer) 1.0 - batch 35355: 81.1 ms at 176278 ms, present 1477: GPU no ranges; recorded by Graphics.Draw (draw committer) 1.1, Graphics.Draw.draw_and_resource_release (draw committer) 1.1, Recorder.Submit (draw committer) 0.7, Resources.Complete (draw committer) 0.7 - batch 25257: 80.5 ms at 129168 ms, present 1427: GPU no ranges; recorded by Graphics.Draw (draw committer) 2.2, Graphics.Draw.draw_and_resource_release (draw committer) 2.2, Recorder.Submit (draw committer) 1.0, Resources.Complete (draw committer) 0.9 - batch 44894: 80.4 ms at 221753 ms, present 1525: GPU no ranges; recorded by Graphics.Draw (draw committer) 1.2, Graphics.Draw.draw_and_resource_release (draw committer) 1.2, Recorder.Submit (draw committer) 0.8, Resources.Complete (draw committer) 0.7 </details> Attached in the release https://github.com/JJenkx/AnyPS5/releases/tag/heap-writeback-readback-samescene-20261029: the four traces, the four summary lines, their digests, the 1440 s and 1795 s screenshots and the seed manifest. The earlier release https://github.com/JJenkx/AnyPS5/releases/tag/heap-writeback-readback-evidence holds the focused-test VVL logs. ### Checklist - [x] Based on current `main`; no other open PR implements the same functions - [x] One topic per PR; follow-ups go in a new PR - [x] No comments in code except [technical debt](https://github.com/boykopovar/AnyPS5/blob/main/docs/dev/CONVENTIONS.md) - [x] Unimplemented paths throw (`NotImplemented_nid_no_patch`); silent stubs are listed under Silent stubs in their library's [technical debt](https://github.com/boykopovar/AnyPS5/tree/main/docs/dev/debt) file - [x] No notes, investigation `.md` files or images added to the repository (attach them to this PR) - [x] New third-party code is a submodule built from source - [x] Generic behaviour, not specific to one title - [x] Depends on: none - [x] Fixes: none - [x] Unblocks: none claimed - [x] GPUs tested: AMD Radeon RX 6650 XT, RADV Mesa 26.2.4, Arch Linux 7.2.9-arch1-1 - [x] AI-assisted: yes <!-- This is an auto-generated comment: release notes by coderabbit.ai --> <!-- coderabbit-ai-generated:v1 --> ## Summary by CodeRabbit * **Performance Improvements** * Graphics data synchronization now reuses available readback data when possible instead of always allocating a temporary copy. This reduces unnecessary temporary memory use in affected workloads while preserving existing synchronization behavior and visible functionality. When reusable readback data is unavailable, synchronization continues to read the required data directly. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
XairRrR commented 2026-10-29 11:48:43 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by XairRrR on 2026-10-29T11:48:43Z.

Review: CHANGES_REQUESTED


Reviewed — changes requested

The code change is correct, merges cleanly, builds, and the focused resident heap mirror tests pass with validation on. The block is on evidence only: this is a perf PR, and its description does not yet carry the same-scene main/change summary lines that CONTRIBUTING.md requires.

What I ran

  • Head: c12a20f45da55cd45da092e937ee196416cc2f72
  • main: ba5b5330b37724bca4b99f30faab504653635a04 (the head's parent, so the PR is on current main)
  • Machine: Arch Linux 7.2.11-zen, GCC 16.2.1, Intel Core i9-14900KF, NVIDIA GeForce RTX 4070 Ti SUPER (driver 615.78.08). Release build, Ninja, BUILD_TESTING=ON, in a clean worktree with main merged with the PR head (--no-ff).
git diff --check origin/main...refs/review/12827
python3 tools/check_conventions.py --base origin/main
cmake --build build -j10
VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation ANYPS5_NO_SHADER_CACHE=1 ANYPS5_REQUIRE_VULKAN=1 VK_LOADER_DEBUG=error,warn,layer \
  ctest --test-dir build -R 'agc_driver_resident_heap_mirror|heap_mirror|resident' -V -j4 --output-on-failure
# the same build and ctest command on origin/main
# coverage check: gdb breakpoints with backtraces on ResidentBuffer::RecordReadback, ::ReadDevice and ::Store
gdb -batch -x count.gdb build/tests/agc_driver_resident_heap_mirror_tests
# perf label gate on the PR description
python3 -c "import pr_labels; print(pr_labels.has_numbers(body))"

Results

Check Result
Merge into main Clean
git diff --check Clean
check_conventions.py All conventions checks passed.
Build (merged tree and main) OK
Focused tests, merged tree 14/14 passed, 0 VUID- lines
Focused tests, main 14/14 passed, 0 VUID- lines
Validation layer loaded Yes: Inserted device layer "VK_LAYER_KHRONOS_validation" in 6 Vulkan tests in each log; no was not found but was requested by env var VK_INSTANCE_LAYERS
Changed branch exercised Yes: agc_driver_resident_heap_mirror_tests records 16 readbacks (RecordCopyBacks) and calls ResidentBuffer::Store 8 times from GuestBufferMemory::WriteBack; ReadDevice is never called
Test durations All under 1 s
tools/pr_labels.py has_numbers on the description False
ctest, merged tree
 1/14 Test #1304: agc_driver_partially_resident_snapshot ..........   Passed    0.40 sec
 2/14 Test #1548: agc_driver_partially_resident_pending_stores ....   Passed    0.14 sec
 3/14 Test #1583: agc_heap_mirror_unwatch .........................   Passed    0.01 sec
 4/14 Test #1584: agc_heap_mirror_unwatch_no_space_cache ..........   Passed    0.01 sec
 5/14 Test #1585: agc_sparse_heap_mirror_unwatch ..................   Passed    0.00 sec
 6/14 Test #1586: agc_sparse_heap_mirror_unwatch_no_space_cache ...   Passed    0.00 sec
 7/14 Test #1587: agc_sparse_heap_mirror_budget ...................   Passed    0.01 sec
 8/14 Test #1588: agc_heap_mirror_run_unwatch .....................   Passed    0.01 sec
 9/14 Test #1589: agc_heap_mirror_run_unwatch_no_space_cache ......   Passed    0.00 sec
10/14 Test #1590: agc_heap_mirror_unwatched_import ................   Passed    0.00 sec
11/14 Test  #829: agc_resident_present ............................   Passed    0.61 sec
12/14 Test #1257: agc_driver_linear_target_resident ...............   Passed    0.63 sec
13/14 Test #1368: agc_driver_resident_heap_mirror .................   Passed    0.74 sec
14/14 Test #1626: agc_driver_uint8x4_color_target_no_resident .....   Passed    0.37 sec
100% tests passed out of 14
1368: resident heap mirror tests passed
gdb call counts, agc_driver_resident_heap_mirror_tests (merged tree)
     16 HIT RecordReadback      (callers: ShaderResources::MarkGpuWrites -> GuestBufferMemory::RecordCopyBacks)
      8 HIT Store               (caller: GuestBufferMemory::WriteBack)
      0 HIT ReadDevice
resident heap mirror tests passed

Negative control

None. The PR adds or changes no tests, and the change is meant to store the same bytes as before, so no existing test should fail when it is reverted. The gdb run above shows that the existing agc_driver_resident_heap_mirror test does reach the changed recorded-readback branch and checks guest memory after it.

Findings

Blocking

  1. The perf evidence required by CONTRIBUTING.md is not in the description. CONTRIBUTING.md:71 requires a perf(...) PR to show the summary lines of main and of the change, from the same machine and scene. It keeps perf numbers missing on the PR until the description holds two valid summary lines with different commits. Two things are missing:

    • The four lines in the description are shortened with ..., so they are not JSON. tools/pr_labels.py has_numbers returns False on the current description, which is why the label is still set. The full lines are only in the external release.
    • By the description's own account, the base and change windows cover different scenes: logo and fade frames on the base side, the loading screen on the change side. So the lines cannot support or refute a speed change. "Reached the loading scene earlier in 2 of 2 runs" is suggestive, but it is not the same-scene comparison the rule asks for.

    Using main + #4449/#8089/#11873/#6867 as the base, because the title does not boot on main alone, is well explained. Whether that is an acceptable stand-in for main is for the maintainers to decide.

Non-blocking

None about the code. What I checked:

  • Lifetime. current now points into the readback Buffer mapping. That buffer is owned by heapReadbacks (and by recorder.Keep) from GuestBufferMemory.cpp:5876-5877 until heapReadbacks.clear() after the loop. Nothing in ResidentBuffer::Store, storeSparse or storeChanged modifies heapReadbacks, so the span stays valid across GuestBufferMemory.cpp:6291-6303.
  • Same bytes, same visibility. The old memcpy read the same mapping at the same point. ResidentBuffer::Store's GuestBytesZero check scans host pointers, so passing the mapping instead of a vector does not change its meaning.
  • Memory type. The readback Buffer uses the default HOST_VISIBLE | HOST_COHERENT flags, and Context::BufferMemoryType prefers a HOST_CACHED type for those flags. So the extra reads of the mapping (by Store, then by storeChanged/storeSparse) are cached reads wherever the driver exposes such a type. The description's ResidentBuffer::Store 42 → 78 ms is consistent with that.

Not verified

  • Any frame-time or per-write-back timing. I did not launch a title, and I did not measure the copy removal on this NVIDIA machine.
  • The ReadDevice fallback branch (no recorded readback). No focused test reaches it. Its behaviour is unchanged apart from moving the vector into read.
  • The private attribution counters in the description's table.

To get this to a good state

  1. Paste the full, unshortened aps5-summary.jsonl lines (one base, one change) into the description, so that the perf numbers missing gate can parse them.
  2. Provide a pair whose trace windows cover the same scene on both sides. For example, use a window that starts after both builds have reached the in-world loading screen, with runs long enough for the base to get there too. Attach the tools/trace_digest.py output for that pair as before.
<!-- greyfinch-sync:boykopovar/AnyPS5:review:5697175500 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/12827#pullrequestreview-5697175500). Originally posted by [XairRrR](https://github.com/XairRrR) on 2026-10-29T11:48:43Z. **Review:** CHANGES_REQUESTED --- # Reviewed — changes requested The code change is correct, merges cleanly, builds, and the focused resident heap mirror tests pass with validation on. The block is on evidence only: this is a `perf` PR, and its description does not yet carry the same-scene `main`/change summary lines that CONTRIBUTING.md requires. ## What I ran - Head: `c12a20f45da55cd45da092e937ee196416cc2f72` - `main`: `ba5b5330b37724bca4b99f30faab504653635a04` (the head's parent, so the PR is on current `main`) - Machine: Arch Linux 7.2.11-zen, GCC 16.2.1, Intel Core i9-14900KF, NVIDIA GeForce RTX 4070 Ti SUPER (driver 615.78.08). Release build, Ninja, `BUILD_TESTING=ON`, in a clean worktree with `main` merged with the PR head (`--no-ff`). ```sh git diff --check origin/main...refs/review/12827 python3 tools/check_conventions.py --base origin/main cmake --build build -j10 VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation ANYPS5_NO_SHADER_CACHE=1 ANYPS5_REQUIRE_VULKAN=1 VK_LOADER_DEBUG=error,warn,layer \ ctest --test-dir build -R 'agc_driver_resident_heap_mirror|heap_mirror|resident' -V -j4 --output-on-failure # the same build and ctest command on origin/main # coverage check: gdb breakpoints with backtraces on ResidentBuffer::RecordReadback, ::ReadDevice and ::Store gdb -batch -x count.gdb build/tests/agc_driver_resident_heap_mirror_tests # perf label gate on the PR description python3 -c "import pr_labels; print(pr_labels.has_numbers(body))" ``` ## Results | Check | Result | |---|---| | Merge into `main` | Clean | | `git diff --check` | Clean | | `check_conventions.py` | `All conventions checks passed.` | | Build (merged tree and `main`) | OK | | Focused tests, merged tree | 14/14 passed, 0 `VUID-` lines | | Focused tests, `main` | 14/14 passed, 0 `VUID-` lines | | Validation layer loaded | Yes: `Inserted device layer "VK_LAYER_KHRONOS_validation"` in 6 Vulkan tests in each log; no `was not found but was requested by env var VK_INSTANCE_LAYERS` | | Changed branch exercised | Yes: `agc_driver_resident_heap_mirror_tests` records 16 readbacks (`RecordCopyBacks`) and calls `ResidentBuffer::Store` 8 times from `GuestBufferMemory::WriteBack`; `ReadDevice` is never called | | Test durations | All under 1 s | | `tools/pr_labels.py` `has_numbers` on the description | `False` | <details><summary>ctest, merged tree</summary> ``` 1/14 Test #1304: agc_driver_partially_resident_snapshot .......... Passed 0.40 sec 2/14 Test #1548: agc_driver_partially_resident_pending_stores .... Passed 0.14 sec 3/14 Test #1583: agc_heap_mirror_unwatch ......................... Passed 0.01 sec 4/14 Test #1584: agc_heap_mirror_unwatch_no_space_cache .......... Passed 0.01 sec 5/14 Test #1585: agc_sparse_heap_mirror_unwatch .................. Passed 0.00 sec 6/14 Test #1586: agc_sparse_heap_mirror_unwatch_no_space_cache ... Passed 0.00 sec 7/14 Test #1587: agc_sparse_heap_mirror_budget ................... Passed 0.01 sec 8/14 Test #1588: agc_heap_mirror_run_unwatch ..................... Passed 0.01 sec 9/14 Test #1589: agc_heap_mirror_run_unwatch_no_space_cache ...... Passed 0.00 sec 10/14 Test #1590: agc_heap_mirror_unwatched_import ................ Passed 0.00 sec 11/14 Test #829: agc_resident_present ............................ Passed 0.61 sec 12/14 Test #1257: agc_driver_linear_target_resident ............... Passed 0.63 sec 13/14 Test #1368: agc_driver_resident_heap_mirror ................. Passed 0.74 sec 14/14 Test #1626: agc_driver_uint8x4_color_target_no_resident ..... Passed 0.37 sec 100% tests passed out of 14 1368: resident heap mirror tests passed ``` </details> <details><summary>gdb call counts, agc_driver_resident_heap_mirror_tests (merged tree)</summary> ``` 16 HIT RecordReadback (callers: ShaderResources::MarkGpuWrites -> GuestBufferMemory::RecordCopyBacks) 8 HIT Store (caller: GuestBufferMemory::WriteBack) 0 HIT ReadDevice resident heap mirror tests passed ``` </details> ## Negative control None. The PR adds or changes no tests, and the change is meant to store the same bytes as before, so no existing test should fail when it is reverted. The gdb run above shows that the existing `agc_driver_resident_heap_mirror` test does reach the changed recorded-readback branch and checks guest memory after it. ## Findings ### Blocking 1. **The `perf` evidence required by CONTRIBUTING.md is not in the description.** [CONTRIBUTING.md:71](https://github.com/boykopovar/AnyPS5/blob/ba5b5330b37724bca4b99f30faab504653635a04/CONTRIBUTING.md#L71-L71) requires a `perf(...)` PR to show the summary lines of `main` and of the change, from the same machine and scene. It keeps `perf numbers missing` on the PR until the description holds two valid summary lines with different commits. Two things are missing: - The four lines in the description are shortened with `...`, so they are not JSON. [`tools/pr_labels.py` `has_numbers`](https://github.com/boykopovar/AnyPS5/blob/ba5b5330b37724bca4b99f30faab504653635a04/tools/pr_labels.py#L50-L63) returns `False` on the current description, which is why the label is still set. The full lines are only in the external release. - By the description's own account, the base and change windows cover different scenes: logo and fade frames on the base side, the loading screen on the change side. So the lines cannot support or refute a speed change. "Reached the loading scene earlier in 2 of 2 runs" is suggestive, but it is not the same-scene comparison the rule asks for. Using `main` + #4449/#8089/#11873/#6867 as the base, because the title does not boot on `main` alone, is well explained. Whether that is an acceptable stand-in for `main` is for the maintainers to decide. ### Non-blocking None about the code. What I checked: - **Lifetime.** `current` now points into the readback `Buffer` mapping. That buffer is owned by `heapReadbacks` (and by `recorder.Keep`) from [GuestBufferMemory.cpp:5876-5877](https://github.com/boykopovar/AnyPS5/blob/c12a20f45da55cd45da092e937ee196416cc2f72/core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp#L5876-L5877) until `heapReadbacks.clear()` after the loop. Nothing in `ResidentBuffer::Store`, `storeSparse` or `storeChanged` modifies `heapReadbacks`, so the span stays valid across [GuestBufferMemory.cpp:6291-6303](https://github.com/boykopovar/AnyPS5/blob/c12a20f45da55cd45da092e937ee196416cc2f72/core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp#L6291-L6303). - **Same bytes, same visibility.** The old `memcpy` read the same mapping at the same point. `ResidentBuffer::Store`'s `GuestBytesZero` check scans host pointers, so passing the mapping instead of a vector does not change its meaning. - **Memory type.** The readback `Buffer` uses the default `HOST_VISIBLE | HOST_COHERENT` flags, and [`Context::BufferMemoryType`](https://github.com/boykopovar/AnyPS5/blob/ba5b5330b37724bca4b99f30faab504653635a04/core/libs/prx/libSceAgcDriver/Graphics/include/Context.hpp#L309-L319) prefers a `HOST_CACHED` type for those flags. So the extra reads of the mapping (by `Store`, then by `storeChanged`/`storeSparse`) are cached reads wherever the driver exposes such a type. The description's `ResidentBuffer::Store` 42 → 78 ms is consistent with that. ## Not verified - Any frame-time or per-write-back timing. I did not launch a title, and I did not measure the copy removal on this NVIDIA machine. - The `ReadDevice` fallback branch (no recorded readback). No focused test reaches it. Its behaviour is unchanged apart from moving the vector into `read`. - The private attribution counters in the description's table. ## To get this to a good state 1. Paste the full, unshortened `aps5-summary.jsonl` lines (one base, one change) into the description, so that the `perf numbers missing` gate can parse them. 2. Provide a pair whose trace windows cover the same scene on both sides. For example, use a window that starts after both builds have reached the in-world loading screen, with runs long enough for the base to get there too. Attach the `tools/trace_digest.py` output for that pair as before.
adriadam10 commented 2026-10-29 15:49:02 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by adriadam10 on 2026-10-29T15:49:02Z.

Review: CHANGES_REQUESTED


The code change itself checks out: the readback span in GuestBufferMemory.cpp:6295 stays alive in heapReadbacks until it is cleared after the write-back loop, Store/storeSparse/storeChanged only read it, and the size is checked against the write-back length. The NVIDIA CI run is clean (0 new failures, 0 new validation IDs).

What blocks it is evidence, as the perf label bot and @XairRrR's review say:

  • Paste the aps5-summary.jsonl line of main and of the change from the same title, scene and machine, plus the tools/trace_digest.py output. The pair in the description lands on different scenes (the description says so itself), so it does not qualify.
  • If the same-scene rerun you announced still can't be matched, drop the speed framing and state only the per-write-back attribution, which is already clearly labelled as such.

Happy to merge once the report is in and the review request is cleared.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5700708916 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/12827#pullrequestreview-5700708916). Originally posted by [adriadam10](https://github.com/adriadam10) on 2026-10-29T15:49:02Z. **Review:** CHANGES_REQUESTED --- The code change itself checks out: the readback span in `GuestBufferMemory.cpp:6295` stays alive in `heapReadbacks` until it is cleared after the write-back loop, `Store`/`storeSparse`/`storeChanged` only read it, and the size is checked against the write-back length. The NVIDIA CI run is clean (0 new failures, 0 new validation IDs). What blocks it is evidence, as the `perf` label bot and @XairRrR's review say: - Paste the `aps5-summary.jsonl` line of `main` and of the change from the same title, scene and machine, plus the `tools/trace_digest.py` output. The pair in the description lands on different scenes (the description says so itself), so it does not qualify. - If the same-scene rerun you announced still can't be matched, drop the speed framing and state only the per-write-back attribution, which is already clearly labelled as such. Happy to merge once the report is in and the review request is cleared.
XairRrR commented 2026-11-02 20:27:26 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by XairRrR on 2026-11-02T20:27:26Z.

Review: APPROVED


Re-checked — approved

The code is the same commit (c12a20f). The description now holds the full aps5-summary.jsonl lines of two same-scene base/change pairs, with trace digests, so the one blocking finding of my last review is resolved.

What changed since my last review

  • No new commits. delta.patch shows c12a20f45d = c12a20f45d.
  • The description was rewritten:
    • the earlier different-scene pair is gone and is marked as not evidence;
    • two pairs of full, unshortened summary lines from 1800 s runs (window 1500:240) were added, with scene screenshots at 1440 s and 1795 s;
    • the tools/trace_digest.py output for all four traces is now in the description.
  • Comments from the author on 2026-10-29 and 2026-11-02 ask for a re-check of that report.

What I ran

Head c12a20f45da55cd45da092e937ee196416cc2f72, main 096c45570f516de76a43bbe1b97781381c84f55f, merged tree deea710d7d1c33842a4cb6ce865061c3f49a9daa. Debian 13 VM (Xeon Gold 6136), GCC 14.2.0, lavapipe (Mesa 26.1.6). Release, Ninja, BUILD_TESTING=ON.

git diff --check 096c45570f516de76a43bbe1b97781381c84f55f...c12a20f45da55cd45da092e937ee196416cc2f72
python3 tools/check_conventions.py --base 096c45570f516de76a43bbe1b97781381c84f55f
# perf gate on the pair-1 base and change lines, copied verbatim from the description
python3 -I -c "import sys; sys.path.insert(0,'tools'); import pr_labels; print(pr_labels.has_numbers(sys.argv[1]+chr(10)+sys.argv[2]))" '<base line>' '<change line>'
VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation ANYPS5_NO_SHADER_CACHE=1 ANYPS5_REQUIRE_VULKAN=1 VK_LOADER_DEBUG=error,warn,layer \
  ctest --test-dir build -j8 --test-load 32 -V -R "heap_mirror|resident"

The script also built the merged tree and ran the selected tests and the validation comparison against main.

Check Result
Merge into main Clean
git diff --check Clean
check_conventions.py All conventions checks passed.
Build and libs OK
Selected tests (2031 run) 0 new failures, 0 timeouts. 7 known failures also fail on main.
Validation vs main (757 tests) Layer loaded in 756 and missing in none; 0 tests with new VUID-
Focused heap_mirror|resident tests (16), with validation 16/16 passed; 0 VUID- lines; no was not found line; the layer was inserted in 6 tests; resident heap mirror tests passed printed, longest test 2.08 s
pr_labels.has_numbers on the pair-1 lines True

Previous findings

  • Blocking: the perf evidence required by CONTRIBUTING.md:73 was missing. Resolved.
    • The lines now parse. The four summary lines are full JSON inside fenced blocks. On the pair-1 base (27db71c581b4) and change (3e83ee94776d) lines, has_numbers returns True, so the perf numbers missing gate is satisfied.
    • Same scene on both sides. Pair 1 has the in-game "Loading..." screen in both windows, confirmed by screenshots at 1440 s and 1795 s (author-reported). Same title, machine, resolution, seed cache and window. Frame p50 goes from 1621.1 to 704.9 ms.
    • The second pair is reported honestly. Pair 2 (in-world) is called inconclusive, and the caveats state one run per side and that per-phase totals are partial (trace_dropped).
    • The screenshots and traces are in the author's release, which I did not open.
    • The base is main + #4449/#8089/#11873/#6867 on both sides. As I said before, the maintainers decide whether that stands in for main. The description is clear that this is not a bare-main result.

New findings

Blocking

None.

Non-blocking

None. I re-checked the span lifetime on the merged tree:

  • heapReadbacks is filled in RecordCopyBacks.
  • It is cleared only in releaseHeapReferences (GuestBufferMemory.cpp:6652-6656). That function is called from takeHeapReferences before the build and at the end of WriteBack (GuestBufferMemory.cpp:6781), after the loop.
  • So the span assigned at GuestBufferMemory.cpp:6720 stays valid through Store/storeSparse/storeChanged (GuestBufferMemory.cpp:6726-6728).

This agrees with adriadam10's review.

Not verified

  • Any frame-time or per-write-back timing. I launched no title and opened neither the external release nor its screenshots and traces. The scene match is author-reported.
  • The ReadDevice fallback branch (no recorded readback). No focused test reaches it; it only moved into the read vector.
  • Negative control: none. No tests were added or changed, and the change stores the same bytes.
<!-- greyfinch-sync:boykopovar/AnyPS5:review:5742864634 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/12827#pullrequestreview-5742864634). Originally posted by [XairRrR](https://github.com/XairRrR) on 2026-11-02T20:27:26Z. **Review:** APPROVED --- # Re-checked — approved The code is the same commit (`c12a20f`). The description now holds the full `aps5-summary.jsonl` lines of two same-scene base/change pairs, with trace digests, so the one blocking finding of my last review is resolved. ## What changed since my last review - No new commits. delta.patch shows `c12a20f45d = c12a20f45d`. - The description was rewritten: - the earlier different-scene pair is gone and is marked as not evidence; - two pairs of full, unshortened summary lines from 1800 s runs (window `1500:240`) were added, with scene screenshots at 1440 s and 1795 s; - the `tools/trace_digest.py` output for all four traces is now in the description. - Comments from the author on 2026-10-29 and 2026-11-02 ask for a re-check of that report. ## What I ran Head `c12a20f45da55cd45da092e937ee196416cc2f72`, `main` `096c45570f516de76a43bbe1b97781381c84f55f`, merged tree `deea710d7d1c33842a4cb6ce865061c3f49a9daa`. Debian 13 VM (Xeon Gold 6136), GCC 14.2.0, lavapipe (Mesa 26.1.6). Release, Ninja, `BUILD_TESTING=ON`. ```sh git diff --check 096c45570f516de76a43bbe1b97781381c84f55f...c12a20f45da55cd45da092e937ee196416cc2f72 python3 tools/check_conventions.py --base 096c45570f516de76a43bbe1b97781381c84f55f # perf gate on the pair-1 base and change lines, copied verbatim from the description python3 -I -c "import sys; sys.path.insert(0,'tools'); import pr_labels; print(pr_labels.has_numbers(sys.argv[1]+chr(10)+sys.argv[2]))" '<base line>' '<change line>' VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation ANYPS5_NO_SHADER_CACHE=1 ANYPS5_REQUIRE_VULKAN=1 VK_LOADER_DEBUG=error,warn,layer \ ctest --test-dir build -j8 --test-load 32 -V -R "heap_mirror|resident" ``` The script also built the merged tree and ran the selected tests and the validation comparison against `main`. | Check | Result | |---|---| | Merge into `main` | Clean | | `git diff --check` | Clean | | `check_conventions.py` | `All conventions checks passed.` | | Build and `libs` | OK | | Selected tests (2031 run) | 0 new failures, 0 timeouts. 7 known failures also fail on `main`. | | Validation vs `main` (757 tests) | Layer loaded in 756 and missing in none; 0 tests with new `VUID-` | | Focused `heap_mirror\|resident` tests (16), with validation | 16/16 passed; 0 `VUID-` lines; no `was not found` line; the layer was inserted in 6 tests; `resident heap mirror tests passed` printed, longest test 2.08 s | | `pr_labels.has_numbers` on the pair-1 lines | `True` | ## Previous findings - **Blocking: the `perf` evidence required by [CONTRIBUTING.md:73](https://github.com/boykopovar/AnyPS5/blob/096c45570f516de76a43bbe1b97781381c84f55f/CONTRIBUTING.md#L73-L73) was missing.** Resolved. - **The lines now parse.** The four summary lines are full JSON inside fenced blocks. On the pair-1 base (`27db71c581b4`) and change (`3e83ee94776d`) lines, `has_numbers` returns `True`, so the `perf numbers missing` gate is satisfied. - **Same scene on both sides.** Pair 1 has the in-game "Loading..." screen in both windows, confirmed by screenshots at 1440 s and 1795 s (author-reported). Same title, machine, resolution, seed cache and window. Frame p50 goes from 1621.1 to 704.9 ms. - **The second pair is reported honestly.** Pair 2 (in-world) is called inconclusive, and the caveats state one run per side and that per-phase totals are partial (`trace_dropped`). - The screenshots and traces are in the author's release, which I did not open. - The base is `main` + #4449/#8089/#11873/#6867 on both sides. As I said before, the maintainers decide whether that stands in for `main`. The description is clear that this is not a bare-`main` result. ## New findings ### Blocking None. ### Non-blocking None. I re-checked the span lifetime on the merged tree: - `heapReadbacks` is filled in `RecordCopyBacks`. - It is cleared only in `releaseHeapReferences` (`GuestBufferMemory.cpp:6652-6656`). That function is called from `takeHeapReferences` before the build and at the end of `WriteBack` (`GuestBufferMemory.cpp:6781`), after the loop. - So the span assigned at `GuestBufferMemory.cpp:6720` stays valid through `Store`/`storeSparse`/`storeChanged` (`GuestBufferMemory.cpp:6726-6728`). This agrees with adriadam10's review. ## Not verified - Any frame-time or per-write-back timing. I launched no title and opened neither the external release nor its screenshots and traces. The scene match is author-reported. - The `ReadDevice` fallback branch (no recorded readback). No focused test reaches it; it only moved into the `read` vector. - Negative control: none. No tests were added or changed, and the change stores the same bytes. <!-- anyps5-bots job=1908 head=c12a20f45da55cd45da092e937ee196416cc2f72 -->
MarcZX10 commented 2026-11-18 06:15:56 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-18T06:15:56Z.

Review: COMMENTED


Reviewed — no blocking findings

The change uses the recorded readback buffer directly for resident heap write-back; I found no defect in the code inspected, but tests were not run here, so a formal approval is not justified.

What I ran

Reviewed head c12a20f45da55cd45da092e937ee196416cc2f72 using repo_read.py searches and targeted reads. No tests or builds were run.

Results

Check Result Note
Diff and changed code passed Reviewed the write-back and readback lifetime paths
Tests and build not run No execution environment was available

Negative control

Not run; no test execution was available to change code under test and confirm a failure.

Findings

Blocking

None.

Non-blocking

None.

Sources

The reviewed write-back change is pinned to GuestBufferMemory.cpp at this head.

Not verified

Tests and build were not run. Read: description.md lines 1–200, commits.md, manifest.json, diff.patch, and targeted ranges in GuestBufferMemory.cpp and ResidentMirror.cpp. The changed file was included in the prepared files; no changed files were excluded by the manifest.

To get this to a good state

Nothing is required. The focused tests described in the PR remain to be independently run on this head.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5951661231 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/12827#pullrequestreview-5951661231). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-11-18T06:15:56Z. **Review:** COMMENTED --- # Reviewed — no blocking findings The change uses the recorded readback buffer directly for resident heap write-back; I found no defect in the code inspected, but tests were not run here, so a formal approval is not justified. ## What I ran Reviewed head `c12a20f45da55cd45da092e937ee196416cc2f72` using `repo_read.py` searches and targeted reads. No tests or builds were run. ## Results | Check | Result | Note | |---|---|---| | Diff and changed code | passed | Reviewed the write-back and readback lifetime paths | | Tests and build | not run | No execution environment was available | ## Negative control Not run; no test execution was available to change code under test and confirm a failure. ## Findings ### Blocking None. ### Non-blocking None. ## Sources The reviewed write-back change is pinned to [GuestBufferMemory.cpp at this head](https://github.com/boykopovar/AnyPS5/blob/c12a20f45da55cd45da092e937ee196416cc2f72/core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp#L6291-L6303). ## Not verified Tests and build were not run. Read: `description.md` lines 1–200, `commits.md`, `manifest.json`, `diff.patch`, and targeted ranges in `GuestBufferMemory.cpp` and `ResidentMirror.cpp`. The changed file was included in the prepared files; no changed files were excluded by the manifest. ## To get this to a good state Nothing is required. The focused tests described in the PR remain to be independently run on this head.
MarcZX10 commented 2026-11-30 02:46:27 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-30T02:46:27Z.

Review: APPROVED


Reviewed — looks good

Nothing blocks this change; the implementation uses the recorded readback span for resident write-back and keeps the existing device-read fallback.

What I ran

Reviewed head ce2550a3f2775ccc20f49fb47ccbf6e36968ec1d using repo_read.py to inspect the prepared diff and targeted source ranges. No build or tests were run.

Results

Check Result Note
Diff and target code passed Change and relevant paths inspected
Build and tests not run No commands available in this review
Readback lifetime and fallback passed Readback is retained through write-back; fallback remains

Findings

Blocking

None.

Non-blocking

None.

Not verified

The full changed source file was excluded as too large; the changed hunk and targeted surrounding ranges were read through the pinned reader. The full build and focused tests described in the PR description were author-reported and not run in this review. Hardware behavior and performance were not independently verified. ResidentBuffer readback buffer host visibility/coherency implementation was not inspected.

To get this to a good state

Nothing is required.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:6106313822 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/12827#pullrequestreview-6106313822). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-11-30T02:46:27Z. **Review:** APPROVED --- # Reviewed — looks good Nothing blocks this change; the implementation uses the recorded readback span for resident write-back and keeps the existing device-read fallback. ## What I ran Reviewed head `ce2550a3f2775ccc20f49fb47ccbf6e36968ec1d` using `repo_read.py` to inspect the prepared diff and targeted source ranges. No build or tests were run. ## Results | Check | Result | Note | |---|---|---| | Diff and target code | passed | Change and relevant paths inspected | | Build and tests | not run | No commands available in this review | | Readback lifetime and fallback | passed | Readback is retained through write-back; fallback remains | ## Findings ### Blocking None. ### Non-blocking None. ## Not verified The full changed source file was excluded as too large; the changed hunk and targeted surrounding ranges were read through the pinned reader. The full build and focused tests described in the PR description were author-reported and not run in this review. Hardware behavior and performance were not independently verified. `ResidentBuffer` readback buffer host visibility/coherency implementation was not inspected. ## To get this to a good state Nothing is required.
ligmaSec commented 2026-12-03 22:54:39 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by ligmaSec on 2026-12-03T22:54:39Z.

Review: COMMENTED


The trial merge with main is clean. The selected heap readback still owns the bytes while exact consumes the bounded span, and the direct device read retains its own vector. Please include a resident-mirror control with a nonzero offset and multiple declared pieces in the same readback, alongside the direct-read control. This catches using the span base or its full length when storing a clipped piece. I have no paired Vulkan result for this head yet.

AI-assisted: yes.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:6180075821 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/12827#pullrequestreview-6180075821). Originally posted by [ligmaSec](https://github.com/ligmaSec) on 2026-12-03T22:54:39Z. **Review:** COMMENTED --- The trial merge with `main` is clean. The selected heap readback still owns the bytes while `exact` consumes the bounded span, and the direct device read retains its own vector. Please include a resident-mirror control with a nonzero offset and multiple declared pieces in the same readback, alongside the direct-read control. This catches using the span base or its full length when storing a clipped piece. I have no paired Vulkan result for this head yet. AI-assisted: yes.
MarcZX10 commented 2026-12-04 02:28:25 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-12-04T02:28:25Z.

Review: APPROVED


Reviewed — looks good

Nothing blocks this; the points below are optional.

What I ran

Reviewed head 79c65447269ee77f1902c2c0eb9df2ff6db30cce. I inspected the prepared diff and changed code with repo_read.py; I did not run tests or compile anything.

Results

Check Result Note
Diff and changed code passed All three reviewed files inspected
Runtime tests not run No tests run during this review

Negative control

Not run; the regression tests cover separate readbacks, one shared readback, and direct reads.

Findings

Blocking

None.

Non-blocking

None.

Sources

Not verified

  • Runtime behavior on a Vulkan device; tests were not run.
  • Full text of GuestBufferMemory.cpp was not included in the review folder; its changed function context was read with repo_read.py.
  • Files reviewed: GuestBufferMemory.hpp, GuestBufferMemory.cpp, and ResidentHeapMirror.cpp. files.json lists no excluded files.

To get this to a good state

Nothing required.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:6182133677 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/12827#pullrequestreview-6182133677). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-12-04T02:28:25Z. **Review:** APPROVED --- # Reviewed — looks good Nothing blocks this; the points below are optional. ## What I ran Reviewed head `79c65447269ee77f1902c2c0eb9df2ff6db30cce`. I inspected the prepared diff and changed code with `repo_read.py`; I did not run tests or compile anything. ## Results | Check | Result | Note | |---|---|---| | Diff and changed code | passed | All three reviewed files inspected | | Runtime tests | not run | No tests run during this review | ## Negative control Not run; the regression tests cover separate readbacks, one shared readback, and direct reads. ## Findings ### Blocking None. ### Non-blocking None. ## Sources - The resident write-back uses a bounded readback subspan when available and retains the direct device-read fallback: [GuestBufferMemory.cpp at the reviewed head](https://github.com/boykopovar/AnyPS5/blob/79c65447269ee77f1902c2c0eb9df2ff6db30cce/core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp#L9027-L9038). - The added regression cases exercise separate and shared readbacks plus direct reads: [ResidentHeapMirror.cpp at the reviewed head](https://github.com/boykopovar/AnyPS5/blob/79c65447269ee77f1902c2c0eb9df2ff6db30cce/core/libs/prx/libSceAgcDriver/tests/execution/ResidentHeapMirror.cpp#L321-L411). ## Not verified - Runtime behavior on a Vulkan device; tests were not run. - Full text of `GuestBufferMemory.cpp` was not included in the review folder; its changed function context was read with `repo_read.py`. - Files reviewed: `GuestBufferMemory.hpp`, `GuestBufferMemory.cpp`, and `ResidentHeapMirror.cpp`. `files.json` lists no excluded files. ## To get this to a good state Nothing required.
This pull request cannot be merged automatically due to conflicts.
Merge manually to resolve the conflicts.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin 'upstream-pr/12827:upstream-pr/12827'
git switch 'upstream-pr/12827'

Merge

Merge the changes and update on Forgejo.

Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.

git switch 'main'
git merge --no-ff 'upstream-pr/12827'
git switch 'upstream-pr/12827'
git rebase 'main'
git switch 'main'
git merge --ff-only 'upstream-pr/12827'
git switch 'upstream-pr/12827'
git rebase 'main'
git switch 'main'
git merge --no-ff 'upstream-pr/12827'
git switch 'main'
git merge --squash 'upstream-pr/12827'
git switch 'main'
git merge --ff-only 'upstream-pr/12827'
git switch 'main'
git merge 'upstream-pr/12827'
git push origin 'main'
Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
boykopovar/AnyPS5!12827
No description provided.