perf(agc): read DCC keys from a pending word fill instead of waiting for the GPU #10844

Merged
Raghav314 merged 2 commits from upstream-pr/10844 into main 2026-11-01 10:40:12 +00:00
Raghav314 commented 2026-10-25 04:29:41 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by Raghav314 on 2026-10-25T04:29:41Z.


What

Before a dispatch, the driver reads the DCC keys of each compressed texture it binds, to tell a cleared surface (filled with the clear colour) from one read as stored. When GPU work still pending can change those keys and the driver can't tell what it writes, it submits and waits for the GPU first.

DepthSurfaceView records a word fill over a surface's keys with NotePendingWordFill. The recorder keeps the word, but KeysAfterPendingWrites only read a write's single byte value, which a word fill doesn't have, so it took the keys as unknown and the dispatch waited. A word whose bytes differ gives mixed keys, which means the texture is read as stored. That is known without the GPU. KeysAfterPendingWrites now reads the bytes of a pending word fill over the range it covers, so those dispatches no longer wait.

Tested

Linux 7.3.0-3-cachyos, NVIDIA GeForce RTX 4090, driver 615.78.08, AMD Ryzen 7 7800X3D, Release build with SPIR-V tools off. Grand Theft Auto V (PPSA04264) 01.011.001, Fidelity mode, 3840x2160, standing still at the same spot in game. Captured as the Performance report form describes: warm caches (0 shader cache misses), APS5_TRACE_SECONDS=110:30 and no other APS5_TRACE_* or APS5_PROFILE_* switch, same machine and session.

1. On main. No measurable change:

presents frame p50 p90 p99 GPU busy / present
main e7e3e9c198 71 417.7 ms 457.4 ms 500.8 ms 254.0 ms
this PR d2da0f20c6 71 427.3 ms 467.2 ms 501.7 ms 249.9 ms

2. On top of #10837, which removes the depth plane copy churn that dominates main's frame:

presents frame p50 p90 p99 GPU busy / present
#10837 ce9c6cbd6a 105 285.9 ms 305.4 ms 330.1 ms 230.4 ms
#10837 + this PR 136d978b27 109 274.9 ms 294.3 ms 308.5 ms 219.3 ms

Recorder.WaitSerial goes from 105 to 95 ms per frame. 136d978b27 is this PR's commit cherry-picked onto #10837, with no other change. This PR does not depend on #10837 and applies to main on its own.

3. Why the gain is small on main and what is left. A temporary diagnostic (not in this PR) logged the writer behind each key-only pre-dispatch wait in GTA V with the heap build and both #10837 fixes. Queue 0 spends about 2 ms of each ~3 ms direct dispatch in that wait, about 88 waits per 10 s at ~32 ms each. Of the waits that the remaining pending writes force:

  • about 27% come from DepthSurfaceView's word fill, which this PR resolves;
  • about 73% come from a game compute shader whose written buffer covers the keys. Those values are only known after the GPU runs, so removing that wait needs the clear check moved to the GPU. That is a separate change.

On main, the depth plane copies remade on each use (Resources.Complete ~290 ms per frame) hide the saved wait time, so the change only shows once #10837 removes them.

Summary lines:

{"commit":"e7e3e9c1984c","dirty":false,"env":{"APS5_PLAYGO_UNLISTED_CHUNKS":"installed","APS5_TRACE_DIR":"<path>","APS5_TRACE_SECONDS":"110:30"},"gpu":"NVIDIA GeForce RTX 4090","driver":"NVIDIA 615.78.08","os":"Linux 7.3.0-3-cachyos","cpu":"AMD Ryzen 7 7800X3D 8-Core Processor","cpu_threads":16,"memory_mib":31742,"title_id":"PPSA04264","title":"Grand Theft Auto V","content_version":"01.011.001","resolution":"3840x2160","window":{"spec":"seconds 110:30","first_present":2802,"ms":30149.495},"presents":71,"frame_ms":{"p50":417.720,"p90":457.401,"p99":500.825,"max":500.825},"gpu_busy_ms_per_present":254.015,"worker_busy_pct":{"queue worker 0x0":99.769,"queue worker 0x38":49.067,"queue worker 0x20":74.752,"queue worker 0x30":52.642,"queue worker 0x28":60.067},"top_phases_ms_per_frame":{"Driver.Packet":1421.602,"Driver.Packet.memory_wait":896.746,"Driver.Packet.dispatch":414.894,"Driver.Dispatch":381.031,"Vulkan.Dispatch":294.592,"Resources.Complete":294.174,"Vulkan.Dispatch.shader_resources":293.096,"Recorder.Sync":126.274},"trace_dropped":false,"trace":"aps5-trace-e7e3e9c1984c-1418426.json.gz"}
{"commit":"d2da0f20c6c2","dirty":false,"env":{"APS5_PLAYGO_UNLISTED_CHUNKS":"installed","APS5_TRACE_DIR":"<path>","APS5_TRACE_SECONDS":"110:30"},"gpu":"NVIDIA GeForce RTX 4090","driver":"NVIDIA 615.78.08","os":"Linux 7.3.0-3-cachyos","cpu":"AMD Ryzen 7 7800X3D 8-Core Processor","cpu_threads":16,"memory_mib":31742,"title_id":"PPSA04264","title":"Grand Theft Auto V","content_version":"01.011.001","resolution":"3840x2160","window":{"spec":"seconds 110:30","first_present":2933,"ms":30079.328},"presents":71,"frame_ms":{"p50":427.333,"p90":467.221,"p99":501.692,"max":501.692},"gpu_busy_ms_per_present":249.894,"worker_busy_pct":{"queue worker 0x0":99.763,"queue worker 0x28":52.804,"queue worker 0x20":86.405,"queue worker 0x38":59.044,"queue worker 0x30":37.180},"top_phases_ms_per_frame":{"Driver.Packet":1415.500,"Driver.Packet.memory_wait":894.616,"Driver.Packet.dispatch":406.219,"Driver.Dispatch":377.685,"Vulkan.Dispatch":289.086,"Resources.Complete":288.190,"Vulkan.Dispatch.shader_resources":287.573,"Recorder.Sync":125.328},"trace_dropped":false,"trace":"aps5-trace-d2da0f20c6c2-1419664.json.gz"}
{"commit":"ce9c6cbd6ab6","dirty":false,"env":{"APS5_PLAYGO_UNLISTED_CHUNKS":"installed","APS5_TRACE_DIR":"<path>","APS5_TRACE_SECONDS":"110:30"},"gpu":"NVIDIA GeForce RTX 4090","driver":"NVIDIA 615.78.08","os":"Linux 7.3.0-3-cachyos","cpu":"AMD Ryzen 7 7800X3D 8-Core Processor","cpu_threads":16,"memory_mib":31742,"title_id":"PPSA04264","title":"Grand Theft Auto V","content_version":"01.011.001","resolution":"3840x2160","window":{"spec":"seconds 110:30","first_present":2782,"ms":30057.556},"presents":105,"frame_ms":{"p50":285.910,"p90":305.359,"p99":330.100,"max":347.130},"gpu_busy_ms_per_present":230.361,"worker_busy_pct":{"queue worker 0x0":99.632,"queue worker 0x20":85.138,"queue worker 0x28":57.109,"queue worker 0x30":39.919,"queue worker 0x38":31.444},"top_phases_ms_per_frame":{"Driver.Packet":887.891,"Driver.Packet.memory_wait":555.971,"Driver.Packet.dispatch":252.488,"Driver.Dispatch":233.429,"Recorder.WaitSerial":104.503,"Driver.Packet.draw":69.338,"Driver.Draw":69.113,"Vulkan.Dispatch":54.760},"trace_dropped":false,"trace":"aps5-trace-ce9c6cbd6ab6-1401969.json.gz"}
{"commit":"136d978b272e","dirty":false,"env":{"APS5_PLAYGO_UNLISTED_CHUNKS":"installed","APS5_TRACE_DIR":"<path>","APS5_TRACE_SECONDS":"110:30"},"gpu":"NVIDIA GeForce RTX 4090","driver":"NVIDIA 615.78.08","os":"Linux 7.3.0-3-cachyos","cpu":"AMD Ryzen 7 7800X3D 8-Core Processor","cpu_threads":16,"memory_mib":31742,"title_id":"PPSA04264","title":"Grand Theft Auto V","content_version":"01.011.001","resolution":"3840x2160","window":{"spec":"seconds 110:30","first_present":2517,"ms":30096.945},"presents":109,"frame_ms":{"p50":274.859,"p90":294.303,"p99":308.463,"max":328.216},"gpu_busy_ms_per_present":219.338,"worker_busy_pct":{"queue worker 0x0":99.598,"queue worker 0x20":83.848,"queue worker 0x30":34.028,"queue worker 0x38":46.243,"queue worker 0x28":45.536},"top_phases_ms_per_frame":{"Driver.Packet":844.679,"Driver.Packet.memory_wait":523.121,"Driver.Packet.dispatch":234.879,"Driver.Dispatch":222.949,"Recorder.WaitSerial":94.794,"Driver.Packet.draw":70.803,"Driver.Draw":70.580,"Graphics.Draw":55.813},"trace_dropped":false,"trace":"aps5-trace-136d978b272e-1424496.json.gz"}

Traces, as written by each capture:

Digests of all four are below.

Focused tests on main and on this PR, same machine and GPU, with ANYPS5_REQUIRE_VULKAN=1 ANYPS5_NO_SHADER_CACHE=1 VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation: agc_driver_dcc_key_presync_tests, agc_driver_dcc_keys_first_write_tests, agc_driver_fill_cover_keys_tests, agc_driver_key_miss_tests, agc_driver_sgpr_pattern_fill_keys_tests, agc_driver_depth_plane_guest_layers_tests, agc_driver_depth_copy_draw_tests, agc_driver_depth_storage_reuse_tests. All pass on both, no log has was not found but was requested by env var VK_INSTANCE_LAYERS, and neither has a VUID- error.

New cases in DccKeyPresync.cpp: RunMixedWordKeys records a fill of the keys with the word 0x00ff00ff, then checks three things. The keys are seen as pending but need no synchronization, the dispatch that samples the texture neither pre-syncs nor waits for the GPU, and it reads the stored texel. On main it fails with "the keys of a recorded fill of a word with different bytes need a synchronization". RunWordFillKeyBytes records a fill of the keys with the word 0x33221100 and checks that each of the first eight key bytes, read singly while the fill is still pending, is the matching byte of the word, and that two adjacent bytes read as different keys. It fails when the byte phase is off by one or only the first byte of the overlap is read.

trace_digest: main

seconds 110:30 from present 2802: 71 presents, frame p50 417.7 / p90 457.4 / p99 500.8 / max 500.8 ms, GPU busy 254.0 ms per present
NVIDIA GeForce RTX 4090, NVIDIA 615.78.08, Linux 7.3.0-3-cachyos, 3840x2160, commit e7e3e9c198, dropped: no

{"commit":"e7e3e9c1984c","dirty":false,"env":{"APS5_PLAYGO_UNLISTED_CHUNKS":"installed","APS5_TRACE_DIR":"<path>","APS5_TRACE_SECONDS":"110:30"},"gpu":"NVIDIA GeForce RTX 4090","driver":"NVIDIA 615.78.08","os":"Linux 7.3.0-3-cachyos","cpu":"AMD Ryzen 7 7800X3D 8-Core Processor","cpu_threads":16,"memory_mib":31742,"title_id":"PPSA04264","title":"Grand Theft Auto V","content_version":"01.011.001","resolution":"3840x2160","window":{"spec":"seconds 110:30","first_present":2802,"ms":30149.495},"presents":71,"frame_ms":{"p50":417.72,"p90":457.401,"p99":500.825,"max":500.825},"gpu_busy_ms_per_present":254.015,"worker_busy_pct":{"queue worker 0x0":99.769,"queue worker 0x38":49.067,"queue worker 0x20":74.752,"queue worker 0x30":52.642,"queue worker 0x28":60.067},"top_phases_ms_per_frame":{"Driver.Packet":1421.602,"Driver.Packet.memory_wait":896.746,"Driver.Packet.dispatch":414.894,"Driver.Dispatch":381.031,"Vulkan.Dispatch":294.592,"Resources.Complete":294.174,"Vulkan.Dispatch.shader_resources":293.096,"Recorder.Sync":126.274},"trace_dropped":false,"trace":"aps5-trace-e7e3e9c1984c-1418426.json.gz"}

Slowest frames (largest slices inside each, inclusive)

  • present 2864: 500.8 ms at 26046 ms: Driver.WorkerWait (queue worker 0x38) 500.8, Driver.WorkerWait.idle_and_completion_poll (queue worker 0x38) 500.8, Driver.Packet (queue worker 0x20) 500.1, Driver.Packet (queue worker 0x30) 499.4
  • present 2865: 481.6 ms at 26546 ms: Driver.WorkerWait (queue worker 0x38) 481.6, Driver.WorkerWait.idle_and_completion_poll (queue worker 0x38) 481.6, Driver.WorkerWait (queue worker 0x28) 481.6, Driver.WorkerWait.idle_and_completion_poll (queue worker 0x28) 481.6
  • present 2847: 479.4 ms at 18676 ms: Driver.WorkerWait (queue worker 0x28) 479.4, Driver.WorkerWait.idle_and_completion_poll (queue worker 0x28) 479.4, Driver.Packet (queue worker 0x20) 478.4, Driver.Packet (queue worker 0x38) 478.2
  • present 2866: 470.9 ms at 27028 ms: Driver.Packet (queue worker 0x28) 469.7, Driver.Packet.memory_wait (queue worker 0x28) 469.7, Driver.Packet (queue worker 0x38) 469.6, Driver.Packet.memory_wait (queue worker 0x38) 469.6
  • present 2867: 464.9 ms at 27499 ms: Driver.WorkerWait (queue worker 0x30) 464.9, Driver.WorkerWait.idle_and_completion_poll (queue worker 0x30) 464.9, Driver.Packet (queue worker 0x38) 464.9, Driver.Packet (queue worker 0x20) 464.0

Threads (ms per frame)

thread busy wait untraced in slices < 20 us largest
queue worker 0x0 203.9 (48 %) 205.6 (48 %) 15.2 79.5 Driver.Packet 403.7, Driver.EndSubmission 4.5
draw committer 69.7 (16 %) 57.7 (14 %) 297.3 21.6 Graphics.Draw 49.7, Recorder.Submit 19.8
presenter 0.6 (0 %) 0.0 (0 %) 424.0 0.1 VideoOut.Flip 0.6, Driver.Present 0.0
title 0.0 (0 %) 0.0 (0 %) 424.6 0.0
queue worker 0x38 78.9 (19 %) 319.1 (75 %) 26.7 0.2 Driver.Packet 208.3, Driver.EndSubmission 0.1
queue worker 0x20 48.4 (11 %) 370.0 (87 %) 6.2 6.8 Driver.Packet 316.6, Driver.EndSubmission 0.0
title 0.0 (0 %) 0.0 (0 %) 424.6 0.0 Shader.ResolveGraphicsStagesAbi 0.0
queue worker 0x30 89.0 (21 %) 323.7 (76 %) 11.9 0.7 Driver.Packet 223.3, Driver.EndSubmission 0.2
queue worker 0x28 70.7 (17 %) 350.8 (83 %) 3.1 3.0 Driver.Packet 254.7, Driver.EndSubmission 0.1
title 0.0 (0 %) 0.0 (0 %) 424.6 0.0 Shader.ResolveGraphicsStagesAbi 0.0
title 0.0 (0 %) 0.0 (0 %) 424.6 0.0
gpu 254.5 (60 %) 0.0 (0 %) 170.1 0.0 batch 254.5

Largest slices (ms per frame, inclusive, all threads): Driver.Packet 1406.6, Driver.Packet.memory_wait 896.7, Driver.WorkerWait 647.5, Driver.WorkerWait.idle_and_completion_poll 647.5, Driver.Packet.dispatch 413.7, Driver.Dispatch 379.2, Resources.Complete 293.2, Vulkan.Dispatch 293.1, Vulkan.Dispatch.shader_resources 291.8, batch 254.5

Longest waits

  • Driver.WorkerWait (queue worker 0x38) 2528.9 ms at 19205 ms, present 2848
  • Driver.WorkerWait (queue worker 0x30) 2446.2 ms at 11416 ms, present 2830
  • Driver.WorkerWait (queue worker 0x38) 2336.7 ms at 15012 ms, present 2838
  • Driver.WorkerWait (queue worker 0x30) 2310.3 ms at 23737 ms, present 2858
  • Driver.WorkerWait (queue worker 0x38) 1925.4 ms at 25104 ms, present 2861
  • Driver.WorkerWait (queue worker 0x38) 1859.0 ms at 22456 ms, present 2855
  • Driver.WorkerWait (queue worker 0x28) 1674.3 ms at 19612 ms, present 2849
  • Driver.WorkerWait (queue worker 0x30) 1494.7 ms at 4958 ms, present 2814
  • Driver.WorkerWait (queue worker 0x30) 1395.0 ms at 7907 ms, present 2821
  • Driver.WorkerWait (queue worker 0x28) 1223.5 ms at 11827 ms, present 2831

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

  • batch 6312: 186.2 ms at 26176 ms, present 2864: GPU no ranges; recorded by Recorder.Sync (queue worker 0x28) 186.4, Driver.Packet (queue worker 0x28) 51.8, Driver.Packet.dispatch (queue worker 0x28) 51.8, Driver.Dispatch (queue worker 0x28) 51.8
  • batch 6438: 183.0 ms at 26687 ms, present 2865: GPU no ranges; recorded by Recorder.Sync (queue worker 0x30) 183.1, Driver.Packet (queue worker 0x30) 52.6, Driver.Packet.dispatch (queue worker 0x30) 52.6, Driver.Dispatch (queue worker 0x30) 52.6
  • batch 6524: 181.6 ms at 27126 ms, present 2866: GPU no ranges; recorded by GpuMutex.wait.draw (draw committer) 270.0, Graphics.Draw (draw committer) 0.3, Graphics.Draw.draw_and_resource_release (draw committer) 0.3
  • batch 6648: 177.9 ms at 27631 ms, present 2867: GPU no ranges; recorded by Recorder.Sync (queue worker 0x38) 178.0, Driver.Packet (queue worker 0x38) 59.0, Driver.Packet.dispatch (queue worker 0x38) 59.0, Driver.Dispatch (queue worker 0x38) 59.0
  • batch 4757: 171.0 ms at 18784 ms, present 2847: GPU no ranges; recorded by Recorder.Sync (queue worker 0x30) 171.2, Driver.Packet (queue worker 0x30) 45.6, Driver.Packet.dispatch (queue worker 0x30) 45.6, Driver.Dispatch (queue worker 0x30) 45.6
trace_digest: this PR on main

seconds 110:30 from present 2933: 71 presents, frame p50 427.3 / p90 467.2 / p99 501.7 / max 501.7 ms, GPU busy 249.9 ms per present
NVIDIA GeForce RTX 4090, NVIDIA 615.78.08, Linux 7.3.0-3-cachyos, 3840x2160, commit d2da0f20c6, dropped: no

{"commit":"d2da0f20c6c2","dirty":false,"env":{"APS5_PLAYGO_UNLISTED_CHUNKS":"installed","APS5_TRACE_DIR":"<path>","APS5_TRACE_SECONDS":"110:30"},"gpu":"NVIDIA GeForce RTX 4090","driver":"NVIDIA 615.78.08","os":"Linux 7.3.0-3-cachyos","cpu":"AMD Ryzen 7 7800X3D 8-Core Processor","cpu_threads":16,"memory_mib":31742,"title_id":"PPSA04264","title":"Grand Theft Auto V","content_version":"01.011.001","resolution":"3840x2160","window":{"spec":"seconds 110:30","first_present":2933,"ms":30079.328},"presents":71,"frame_ms":{"p50":427.333,"p90":467.221,"p99":501.692,"max":501.692},"gpu_busy_ms_per_present":249.894,"worker_busy_pct":{"queue worker 0x0":99.763,"queue worker 0x28":52.804,"queue worker 0x20":86.405,"queue worker 0x38":59.044,"queue worker 0x30":37.18},"top_phases_ms_per_frame":{"Driver.Packet":1415.5,"Driver.Packet.memory_wait":894.616,"Driver.Packet.dispatch":406.219,"Driver.Dispatch":377.685,"Vulkan.Dispatch":289.086,"Resources.Complete":288.19,"Vulkan.Dispatch.shader_resources":287.573,"Recorder.Sync":125.328},"trace_dropped":false,"trace":"aps5-trace-d2da0f20c6c2-1419664.json.gz"}

Slowest frames (largest slices inside each, inclusive)

  • present 3000: 501.7 ms at 28118 ms: Driver.WorkerWait (queue worker 0x38) 501.7, Driver.WorkerWait.idle_and_completion_poll (queue worker 0x38) 501.7, Driver.WorkerWait (queue worker 0x30) 501.7, Driver.WorkerWait.idle_and_completion_poll (queue worker 0x30) 501.7
  • present 2999: 500.1 ms at 27618 ms: Driver.WorkerWait (queue worker 0x30) 500.1, Driver.WorkerWait.idle_and_completion_poll (queue worker 0x30) 500.1, Driver.Packet (queue worker 0x20) 499.0, Driver.Packet (queue worker 0x28) 498.7
  • present 3002: 495.9 ms at 29102 ms: Driver.Packet (queue worker 0x20) 494.9, Driver.Packet.memory_wait (queue worker 0x20) 494.9, Driver.Packet (queue worker 0x38) 494.8, Driver.Packet.memory_wait (queue worker 0x38) 494.8
  • present 3001: 482.9 ms at 28619 ms: Driver.WorkerWait (queue worker 0x20) 482.9, Driver.WorkerWait.idle_and_completion_poll (queue worker 0x20) 482.9, Driver.WorkerWait (queue worker 0x38) 482.9, Driver.WorkerWait.idle_and_completion_poll (queue worker 0x38) 482.9
  • present 3003: 481.3 ms at 29598 ms: Driver.Packet (queue worker 0x0) 461.3, Driver.Packet (queue worker 0x38) 358.6, Driver.Packet.dispatch (queue worker 0x38) 311.1, Driver.Dispatch (queue worker 0x38) 310.3

Threads (ms per frame)

thread busy wait untraced in slices < 20 us largest
queue worker 0x0 200.4 (47 %) 208.0 (49 %) 15.3 80.2 Driver.Packet 404.4, Driver.EndSubmission 2.8
draw committer 69.9 (16 %) 54.2 (13 %) 299.5 21.8 Graphics.Draw 49.4, Recorder.Submit 20.3
presenter 0.6 (0 %) 0.3 (0 %) 422.8 0.1 VideoOut.Flip 0.8, Driver.Present 0.0
title 0.0 (0 %) 0.0 (0 %) 423.6 0.0 Shader.ResolveGraphicsStagesAbi 0.0
queue worker 0x28 78.5 (19 %) 335.1 (79 %) 10.1 1.5 Driver.Packet 223.4, Driver.EndSubmission 0.1
queue worker 0x20 60.4 (14 %) 356.1 (84 %) 7.1 8.1 Driver.Packet 365.1, Driver.EndSubmission 0.0
queue worker 0x38 98.3 (23 %) 323.5 (76 %) 1.8 0.1 Driver.Packet 250.0, Driver.EndSubmission 0.1
title 0.0 (0 %) 0.0 (0 %) 423.6 0.0 Shader.ResolveGraphicsStagesAbi 0.0
title 0.0 (0 %) 0.0 (0 %) 423.7 0.0 Shader.ResolveGraphicsStagesAbi 0.0
queue worker 0x30 50.8 (12 %) 359.6 (85 %) 13.3 0.9 Driver.Packet 157.4, Driver.EndSubmission 0.0
title 0.0 (0 %) 0.0 (0 %) 423.7 0.0 Shader.ResolveGraphicsStagesAbi 0.0
gpu 253.6 (60 %) 0.0 (0 %) 170.1 0.0 batch 253.6

Largest slices (ms per frame, inclusive, all threads): Driver.Packet 1400.4, Driver.Packet.memory_wait 894.6, Driver.WorkerWait 666.1, Driver.WorkerWait.idle_and_completion_poll 666.1, Driver.Packet.dispatch 405.0, Driver.Dispatch 375.9, Vulkan.Dispatch 287.7, Resources.Complete 287.3, Vulkan.Dispatch.shader_resources 286.3, batch 253.6

Longest waits

  • Driver.WorkerWait (queue worker 0x30) 4148.4 ms at 2687 ms, present 2940
  • Driver.WorkerWait (queue worker 0x30) 2887.5 ms at 25733 ms, present 2994
  • Driver.WorkerWait (queue worker 0x28) 2849.5 ms at 22562 ms, present 2987
  • Driver.WorkerWait (queue worker 0x30) 2771.5 ms at 15379 ms, present 2971
  • Driver.WorkerWait (queue worker 0x38) 2415.5 ms at 16655 ms, present 2974
  • Driver.WorkerWait (queue worker 0x30) 1843.9 ms at 46 ms, present 2933
  • Driver.WorkerWait (queue worker 0x28) 1802.1 ms at 9066 ms, present 2956
  • Driver.WorkerWait (queue worker 0x38) 1656.0 ms at 6344 ms, present 2949
  • Driver.WorkerWait (queue worker 0x30) 1655.2 ms at 7514 ms, present 2952
  • Driver.WorkerWait (queue worker 0x38) 1635.7 ms at 2912 ms, present 2940

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

  • batch 6717: 210.1 ms at 27748 ms, present 2999: GPU no ranges; recorded by Recorder.Sync (queue worker 0x38) 210.3, Driver.Packet (queue worker 0x38) 54.7, Driver.Packet.dispatch (queue worker 0x38) 54.7, Driver.Dispatch (queue worker 0x38) 54.7
  • batch 6831: 184.7 ms at 28269 ms, present 3000: GPU no ranges; recorded by Recorder.Sync (queue worker 0x28) 184.9, Driver.Packet (queue worker 0x28) 54.8, Driver.Packet.dispatch (queue worker 0x28) 54.8, Driver.Dispatch (queue worker 0x28) 54.8
  • batch 6904: 184.0 ms at 28715 ms, present 3001: GPU no ranges; recorded by GpuMutex.wait.draw (draw committer) 44.1, Graphics.Draw (draw committer) 0.6, Graphics.Draw.draw_and_resource_release (draw committer) 0.5, Recorder.Submit (draw committer) 0.0
  • batch 6992: 180.5 ms at 29198 ms, present 3002: GPU no ranges; recorded by GpuMutex.wait.draw (draw committer) 46.8, Graphics.Draw (draw committer) 0.3, Graphics.Draw.draw_and_resource_release (draw committer) 0.2, Recorder.Submit (draw committer) 0.0
  • batch 7107: 176.7 ms at 29743 ms, present 3003: GPU no ranges; recorded by Recorder.Sync (queue worker 0x38) 176.8, Driver.Packet (queue worker 0x38) 66.2, Driver.Packet.dispatch (queue worker 0x38) 66.2, Driver.Dispatch (queue worker 0x38) 66.2
trace_digest: #10837

seconds 110:30 from present 2782: 105 presents, frame p50 285.9 / p90 305.4 / p99 330.1 / max 347.1 ms, GPU busy 230.4 ms per present
NVIDIA GeForce RTX 4090, NVIDIA 615.78.08, Linux 7.3.0-3-cachyos, 3840x2160, commit ce9c6cbd6a, dropped: no

{"commit":"ce9c6cbd6ab6","dirty":false,"env":{"APS5_PLAYGO_UNLISTED_CHUNKS":"installed","APS5_TRACE_DIR":"<path>","APS5_TRACE_SECONDS":"110:30"},"gpu":"NVIDIA GeForce RTX 4090","driver":"NVIDIA 615.78.08","os":"Linux 7.3.0-3-cachyos","cpu":"AMD Ryzen 7 7800X3D 8-Core Processor","cpu_threads":16,"memory_mib":31742,"title_id":"PPSA04264","title":"Grand Theft Auto V","content_version":"01.011.001","resolution":"3840x2160","window":{"spec":"seconds 110:30","first_present":2782,"ms":30057.556},"presents":105,"frame_ms":{"p50":285.91,"p90":305.359,"p99":330.1,"max":347.13},"gpu_busy_ms_per_present":230.361,"worker_busy_pct":{"queue worker 0x0":99.632,"queue worker 0x20":85.138,"queue worker 0x28":57.109,"queue worker 0x30":39.919,"queue worker 0x38":31.444},"top_phases_ms_per_frame":{"Driver.Packet":887.891,"Driver.Packet.memory_wait":555.971,"Driver.Packet.dispatch":252.488,"Driver.Dispatch":233.429,"Recorder.WaitSerial":104.503,"Driver.Packet.draw":69.338,"Driver.Draw":69.113,"Vulkan.Dispatch":54.76},"trace_dropped":false,"trace":"aps5-trace-ce9c6cbd6ab6-1401969.json.gz"}

Slowest frames (largest slices inside each, inclusive)

  • present 2802: 347.1 ms at 5770 ms: Driver.WorkerWait (queue worker 0x38) 347.1, Driver.WorkerWait.idle_and_completion_poll (queue worker 0x38) 347.1, Driver.Packet (queue worker 0x28) 346.0, Driver.Packet (queue worker 0x20) 345.4
  • present 2804: 330.1 ms at 6439 ms: Driver.WorkerWait (queue worker 0x30) 330.1, Driver.WorkerWait.idle_and_completion_poll (queue worker 0x30) 330.1, Driver.Packet (queue worker 0x38) 329.2, Driver.Packet.memory_wait (queue worker 0x38) 329.2
  • present 2803: 321.8 ms at 6117 ms: Driver.WorkerWait (queue worker 0x30) 321.8, Driver.WorkerWait.idle_and_completion_poll (queue worker 0x30) 321.8, Driver.WorkerWait (queue worker 0x38) 321.8, Driver.WorkerWait.idle_and_completion_poll (queue worker 0x38) 321.8
  • present 2822: 321.5 ms at 11902 ms: Driver.WorkerWait (queue worker 0x30) 321.5, Driver.WorkerWait.idle_and_completion_poll (queue worker 0x30) 321.5, Driver.WorkerWait (queue worker 0x38) 321.5, Driver.WorkerWait.idle_and_completion_poll (queue worker 0x38) 321.5
  • present 2806: 318.7 ms at 7074 ms: Driver.WorkerWait (queue worker 0x30) 318.7, Driver.WorkerWait.idle_and_completion_poll (queue worker 0x30) 318.7, Driver.Packet (queue worker 0x20) 318.6, Driver.Packet (queue worker 0x38) 317.5

Threads (ms per frame)

thread busy wait untraced in slices < 20 us largest
queue worker 0x0 125.9 (44 %) 145.5 (51 %) 14.9 79.0 Driver.Packet 263.0, Driver.EndSubmission 7.1
draw committer 46.7 (16 %) 8.6 (3 %) 231.0 21.0 Graphics.Draw 46.3, Recorder.Sync 0.3
presenter 0.6 (0 %) 0.1 (0 %) 285.6 0.1 VideoOut.Flip 0.6, Driver.Present 0.0
title 0.0 (0 %) 0.0 (0 %) 286.3 0.0 Shader.ResolveGraphicsStagesAbi 0.0
title 0.0 (0 %) 0.0 (0 %) 286.3 0.0 Shader.ResolveGraphicsStagesAbi 0.0
queue worker 0x20 31.5 (11 %) 248.9 (87 %) 5.9 7.9 Driver.Packet 242.9, Driver.EndSubmission 0.0
queue worker 0x28 24.4 (9 %) 259.5 (91 %) 2.4 1.9 Driver.Packet 163.3, Driver.EndSubmission 0.0
title 0.0 (0 %) 0.0 (0 %) 286.3 0.0 Shader.ResolveGraphicsStagesAbi 0.0
queue worker 0x30 16.3 (6 %) 245.6 (86 %) 24.4 0.4 Driver.Packet 114.2, Driver.EndSubmission 0.0
queue worker 0x38 12.7 (4 %) 263.2 (92 %) 10.3 0.1 Driver.Packet 90.0, Driver.EndSubmission 0.0
title 0.0 (0 %) 0.0 (0 %) 286.3 0.0 Shader.ResolveGraphicsStagesAbi 0.0
gpu 230.4 (80 %) 0.0 (0 %) 55.9 0.0 batch 230.4

Largest slices (ms per frame, inclusive, all threads): Driver.Packet 873.3, Driver.Packet.memory_wait 556.0, Driver.WorkerWait 491.7, Driver.WorkerWait.idle_and_completion_poll 491.7, Driver.Packet.dispatch 251.4, Driver.Dispatch 231.7, batch 230.4, Recorder.WaitSerial 104.5, Driver.Packet.draw 59.4, Driver.Draw 59.1

Longest waits

  • Driver.WorkerWait (queue worker 0x38) 3175.8 ms at 18365 ms, present 2845
  • Driver.WorkerWait (queue worker 0x38) 3029.0 ms at 25016 ms, present 2869
  • Driver.WorkerWait (queue worker 0x38) 2208.6 ms at 11431 ms, present 2820
  • Driver.WorkerWait (queue worker 0x38) 1999.6 ms at 4440 ms, present 2797
  • Driver.WorkerWait (queue worker 0x30) 1872.0 ms at 23351 ms, present 2863
  • Driver.WorkerWait (queue worker 0x30) 1842.7 ms at 14816 ms, present 2832
  • Driver.WorkerWait (queue worker 0x30) 1654.0 ms at 3269 ms, present 2793
  • Driver.WorkerWait (queue worker 0x30) 1522.0 ms at 5873 ms, present 2802
  • Driver.WorkerWait (queue worker 0x38) 1249.3 ms at 16737 ms, present 2839
  • Driver.WorkerWait (queue worker 0x30) 1229.8 ms at 18094 ms, present 2844

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

  • batch 2151: 190.6 ms at 5873 ms, present 2802: GPU no ranges; recorded by Driver.WorkerWait (queue worker 0x30) 1522.0, Driver.WorkerWait.idle_and_completion_poll (queue worker 0x30) 1522.0, Driver.Packet (queue worker 0x30) 357.1, Driver.Packet.memory_wait (queue worker 0x30) 317.4
  • batch 2703: 180.1 ms at 7493 ms, present 2807: GPU no ranges; recorded by Driver.Packet (queue worker 0x38) 403.4, Driver.Packet.memory_wait (queue worker 0x38) 368.6, Driver.WorkerWait (queue worker 0x38) 219.7, Driver.WorkerWait.idle_and_completion_poll (queue worker 0x38) 219.7
  • batch 2593: 179.6 ms at 7179 ms, present 2806: GPU no ranges; recorded by Driver.Packet (queue worker 0x20) 254.9, Driver.Packet.memory_wait (queue worker 0x20) 215.0, Driver.Packet.dispatch (queue worker 0x20) 39.9, Driver.Dispatch (queue worker 0x20) 35.6
  • batch 2272: 177.2 ms at 6209 ms, present 2803: GPU no ranges; recorded by Driver.Packet (queue worker 0x0) 33.1, Driver.Packet.memory_wait (queue worker 0x0) 32.8, Driver.Dispatch.materialize (queue worker 0x0) 10.6, Resources.Prepare (queue worker 0x0) 1.7
  • batch 2809: 174.8 ms at 7818 ms, present 2808: GPU no ranges; recorded by Driver.Packet (queue worker 0x28) 392.6, Driver.Packet.memory_wait (queue worker 0x28) 351.1, Driver.WorkerWait (queue worker 0x28) 212.5, Driver.WorkerWait.idle_and_completion_poll (queue worker 0x28) 212.4
trace_digest: #10837 + this PR

seconds 110:30 from present 2517: 109 presents, frame p50 274.9 / p90 294.3 / p99 308.5 / max 328.2 ms, GPU busy 219.3 ms per present
NVIDIA GeForce RTX 4090, NVIDIA 615.78.08, Linux 7.3.0-3-cachyos, 3840x2160, commit 136d978b272e, dropped: no

{"commit":"136d978b272e","dirty":false,"env":{"APS5_PLAYGO_UNLISTED_CHUNKS":"installed","APS5_TRACE_DIR":"<path>","APS5_TRACE_SECONDS":"110:30"},"gpu":"NVIDIA GeForce RTX 4090","driver":"NVIDIA 615.78.08","os":"Linux 7.3.0-3-cachyos","cpu":"AMD Ryzen 7 7800X3D 8-Core Processor","cpu_threads":16,"memory_mib":31742,"title_id":"PPSA04264","title":"Grand Theft Auto V","content_version":"01.011.001","resolution":"3840x2160","window":{"spec":"seconds 110:30","first_present":2517,"ms":30096.945},"presents":109,"frame_ms":{"p50":274.859,"p90":294.303,"p99":308.463,"max":328.216},"gpu_busy_ms_per_present":219.338,"worker_busy_pct":{"queue worker 0x0":99.598,"queue worker 0x20":83.848,"queue worker 0x30":34.028,"queue worker 0x38":46.243,"queue worker 0x28":45.536},"top_phases_ms_per_frame":{"Driver.Packet":844.679,"Driver.Packet.memory_wait":523.121,"Driver.Packet.dispatch":234.879,"Driver.Dispatch":222.949,"Recorder.WaitSerial":94.794,"Driver.Packet.draw":70.803,"Driver.Draw":70.58,"Graphics.Draw":55.813},"trace_dropped":false,"trace":"aps5-trace-136d978b272e-1424496.json.gz"}

Slowest frames (largest slices inside each, inclusive)

  • present 2529: 328.2 ms at 3509 ms: Driver.WorkerWait (queue worker 0x38) 328.2, Driver.WorkerWait.idle_and_completion_poll (queue worker 0x38) 328.2, Driver.Packet (queue worker 0x20) 327.2, Driver.Packet (queue worker 0x30) 327.2
  • present 2525: 308.5 ms at 2330 ms: Driver.WorkerWait (queue worker 0x38) 308.5, Driver.WorkerWait.idle_and_completion_poll (queue worker 0x38) 308.5, Driver.Packet (queue worker 0x28) 308.4, Driver.Packet (queue worker 0x20) 307.7
  • present 2519: 305.8 ms at 586 ms: Driver.Packet (queue worker 0x28) 304.9, Driver.Packet.memory_wait (queue worker 0x28) 304.9, Driver.Packet (queue worker 0x0) 289.5, Driver.WorkerWait (queue worker 0x20) 261.6
  • present 2533: 304.3 ms at 4727 ms: Driver.WorkerWait (queue worker 0x30) 304.3, Driver.WorkerWait.idle_and_completion_poll (queue worker 0x30) 304.3, Driver.Packet (queue worker 0x28) 303.3, Driver.Packet (queue worker 0x38) 303.1
  • present 2532: 301.5 ms at 4426 ms: Driver.WorkerWait (queue worker 0x30) 301.5, Driver.WorkerWait.idle_and_completion_poll (queue worker 0x30) 301.5, Driver.WorkerWait (queue worker 0x38) 301.5, Driver.WorkerWait.idle_and_completion_poll (queue worker 0x38) 301.5

Threads (ms per frame)

thread busy wait untraced in slices < 20 us largest
queue worker 0x0 126.2 (46 %) 134.8 (49 %) 15.1 81.8 Driver.Packet 252.2, Driver.EndSubmission 7.5
draw committer 47.7 (17 %) 8.9 (3 %) 219.5 21.2 Graphics.Draw 47.4, Recorder.Sync 0.2
presenter 0.6 (0 %) 0.0 (0 %) 275.5 0.1 VideoOut.Flip 0.6, Driver.Present 0.0
title 0.0 (0 %) 0.0 (0 %) 276.1 0.0 Shader.ResolveGraphicsStagesAbi 0.0
queue worker 0x20 33.9 (12 %) 239.2 (87 %) 3.1 8.1 Driver.Packet 230.6, Driver.EndSubmission 0.0
queue worker 0x30 13.9 (5 %) 225.8 (82 %) 36.5 0.8 Driver.Packet 93.9, Driver.EndSubmission 0.0
title 0.0 (0 %) 0.0 (0 %) 276.1 0.0 Shader.ResolveGraphicsStagesAbi 0.0
queue worker 0x38 18.2 (7 %) 255.8 (93 %) 2.1 0.3 Driver.Packet 127.6, Driver.EndSubmission 0.0
queue worker 0x28 19.1 (7 %) 246.8 (89 %) 10.2 1.2 Driver.Packet 125.6, Driver.EndSubmission 0.0
title 0.0 (0 %) 0.0 (0 %) 276.1 0.0 Shader.ResolveGraphicsStagesAbi 0.0
title 0.0 (0 %) 0.0 (0 %) 276.1 0.0
gpu 221.4 (80 %) 0.0 (0 %) 54.8 0.0 batch 221.4

Largest slices (ms per frame, inclusive, all threads): Driver.Packet 829.9, Driver.Packet.memory_wait 523.1, Driver.WorkerWait 474.8, Driver.WorkerWait.idle_and_completion_poll 474.8, Driver.Packet.dispatch 233.8, batch 221.4, Driver.Dispatch 221.2, Recorder.WaitSerial 94.8, Driver.Packet.draw 60.7, Driver.Draw 60.5

Longest waits

  • Driver.WorkerWait (queue worker 0x28) 3048.2 ms at 25105 ms, present 2608
  • Driver.WorkerWait (queue worker 0x30) 2298.5 ms at 9566 ms, present 2551
  • Driver.WorkerWait (queue worker 0x28) 2109.9 ms at 17346 ms, present 2580
  • Driver.WorkerWait (queue worker 0x38) 1721.2 ms at 5705 ms, present 2536
  • Driver.WorkerWait (queue worker 0x30) 1567.7 ms at 14609 ms, present 2570
  • Driver.WorkerWait (queue worker 0x30) 1566.8 ms at 22047 ms, present 2597
  • Driver.WorkerWait (queue worker 0x38) 1406.9 ms at 3322 ms, present 2528
  • Driver.WorkerWait (queue worker 0x38) 1321.9 ms at 27659 ms, present 2617
  • Driver.WorkerWait (queue worker 0x30) 1319.7 ms at 16490 ms, present 2577
  • Driver.WorkerWait (queue worker 0x30) 1285.4 ms at 19280 ms, present 2587

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

  • batch 1448: 161.8 ms at 3939 ms, present 2530: GPU no ranges; recorded by Driver.Packet (queue worker 0x20) 237.3, Driver.Packet.memory_wait (queue worker 0x20) 200.5, Driver.Packet.dispatch (queue worker 0x20) 36.8, Driver.Dispatch (queue worker 0x20) 36.7
  • batch 9827: 158.7 ms at 25429 ms, present 2609: GPU no ranges; recorded by Driver.Packet (queue worker 0x30) 357.6, Driver.Packet.memory_wait (queue worker 0x30) 323.0, Driver.WorkerWait (queue worker 0x30) 190.6, Driver.WorkerWait.idle_and_completion_poll (queue worker 0x30) 190.6
  • batch 10254: 157.9 ms at 26566 ms, present 2613: GPU no ranges; recorded by Driver.Packet (queue worker 0x20) 316.8, Driver.Packet.memory_wait (queue worker 0x20) 274.5, Driver.WorkerWait (queue worker 0x20) 190.0, Driver.WorkerWait.idle_and_completion_poll (queue worker 0x20) 190.0
  • batch 1770: 156.9 ms at 4838 ms, present 2533: GPU no ranges; recorded by Driver.Packet (queue worker 0x20) 321.5, Driver.Packet.memory_wait (queue worker 0x20) 275.2, Driver.WorkerWait (queue worker 0x20) 195.3, Driver.WorkerWait.idle_and_completion_poll (queue worker 0x20) 195.3
  • batch 913: 155.9 ms at 2446 ms, present 2525: GPU no ranges; recorded by Driver.Packet (queue worker 0x28) 675.0, Driver.Packet.memory_wait (queue worker 0x28) 604.1, Driver.WorkerWait (queue worker 0x28) 500.9, Driver.WorkerWait.idle_and_completion_poll (queue worker 0x28) 500.9

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
  • GPUs tested: NVIDIA GeForce RTX 4090, driver 615.78.08, Linux 7.3.0-3-cachyos
  • AI-assisted: yes
<!-- greyfinch-sync:boykopovar/AnyPS5:issue:5001788639 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/10844). Originally posted by [Raghav314](https://github.com/Raghav314) on 2026-10-25T04:29:41Z. --- ### What Before a dispatch, the driver reads the DCC keys of each compressed texture it binds, to tell a cleared surface (filled with the clear colour) from one read as stored. When GPU work still pending can change those keys and the driver can't tell what it writes, it submits and waits for the GPU first. `DepthSurfaceView` records a word fill over a surface's keys with `NotePendingWordFill`. The recorder keeps the word, but `KeysAfterPendingWrites` only read a write's single byte value, which a word fill doesn't have, so it took the keys as unknown and the dispatch waited. A word whose bytes differ gives mixed keys, which means the texture is read as stored. That is known without the GPU. `KeysAfterPendingWrites` now reads the bytes of a pending word fill over the range it covers, so those dispatches no longer wait. ### Tested Linux 7.3.0-3-cachyos, NVIDIA GeForce RTX 4090, driver 615.78.08, AMD Ryzen 7 7800X3D, Release build with SPIR-V tools off. Grand Theft Auto V (PPSA04264) 01.011.001, Fidelity mode, 3840x2160, standing still at the same spot in game. Captured as the Performance report form describes: warm caches (0 shader cache misses), `APS5_TRACE_SECONDS=110:30` and no other `APS5_TRACE_*` or `APS5_PROFILE_*` switch, same machine and session. **1. On main.** No measurable change: | | presents | frame p50 | p90 | p99 | GPU busy / present | |---|---|---|---|---|---| | main e7e3e9c198 | 71 | 417.7 ms | 457.4 ms | 500.8 ms | 254.0 ms | | this PR d2da0f20c6 | 71 | 427.3 ms | 467.2 ms | 501.7 ms | 249.9 ms | **2. On top of #10837**, which removes the depth plane copy churn that dominates main's frame: | | presents | frame p50 | p90 | p99 | GPU busy / present | |---|---|---|---|---|---| | #10837 ce9c6cbd6a | 105 | 285.9 ms | 305.4 ms | 330.1 ms | 230.4 ms | | #10837 + this PR 136d978b27 | 109 | 274.9 ms | 294.3 ms | 308.5 ms | 219.3 ms | `Recorder.WaitSerial` goes from 105 to 95 ms per frame. 136d978b27 is this PR's commit cherry-picked onto #10837, with no other change. This PR does not depend on #10837 and applies to main on its own. **3. Why the gain is small on main and what is left.** A temporary diagnostic (not in this PR) logged the writer behind each key-only pre-dispatch wait in GTA V with the heap build and both #10837 fixes. Queue 0 spends about 2 ms of each ~3 ms direct dispatch in that wait, about 88 waits per 10 s at ~32 ms each. Of the waits that the remaining pending writes force: - about 27% come from `DepthSurfaceView`'s word fill, which this PR resolves; - about 73% come from a game compute shader whose written buffer covers the keys. Those values are only known after the GPU runs, so removing that wait needs the clear check moved to the GPU. That is a separate change. On main, the depth plane copies remade on each use (`Resources.Complete` ~290 ms per frame) hide the saved wait time, so the change only shows once #10837 removes them. Summary lines: ```json {"commit":"e7e3e9c1984c","dirty":false,"env":{"APS5_PLAYGO_UNLISTED_CHUNKS":"installed","APS5_TRACE_DIR":"<path>","APS5_TRACE_SECONDS":"110:30"},"gpu":"NVIDIA GeForce RTX 4090","driver":"NVIDIA 615.78.08","os":"Linux 7.3.0-3-cachyos","cpu":"AMD Ryzen 7 7800X3D 8-Core Processor","cpu_threads":16,"memory_mib":31742,"title_id":"PPSA04264","title":"Grand Theft Auto V","content_version":"01.011.001","resolution":"3840x2160","window":{"spec":"seconds 110:30","first_present":2802,"ms":30149.495},"presents":71,"frame_ms":{"p50":417.720,"p90":457.401,"p99":500.825,"max":500.825},"gpu_busy_ms_per_present":254.015,"worker_busy_pct":{"queue worker 0x0":99.769,"queue worker 0x38":49.067,"queue worker 0x20":74.752,"queue worker 0x30":52.642,"queue worker 0x28":60.067},"top_phases_ms_per_frame":{"Driver.Packet":1421.602,"Driver.Packet.memory_wait":896.746,"Driver.Packet.dispatch":414.894,"Driver.Dispatch":381.031,"Vulkan.Dispatch":294.592,"Resources.Complete":294.174,"Vulkan.Dispatch.shader_resources":293.096,"Recorder.Sync":126.274},"trace_dropped":false,"trace":"aps5-trace-e7e3e9c1984c-1418426.json.gz"} {"commit":"d2da0f20c6c2","dirty":false,"env":{"APS5_PLAYGO_UNLISTED_CHUNKS":"installed","APS5_TRACE_DIR":"<path>","APS5_TRACE_SECONDS":"110:30"},"gpu":"NVIDIA GeForce RTX 4090","driver":"NVIDIA 615.78.08","os":"Linux 7.3.0-3-cachyos","cpu":"AMD Ryzen 7 7800X3D 8-Core Processor","cpu_threads":16,"memory_mib":31742,"title_id":"PPSA04264","title":"Grand Theft Auto V","content_version":"01.011.001","resolution":"3840x2160","window":{"spec":"seconds 110:30","first_present":2933,"ms":30079.328},"presents":71,"frame_ms":{"p50":427.333,"p90":467.221,"p99":501.692,"max":501.692},"gpu_busy_ms_per_present":249.894,"worker_busy_pct":{"queue worker 0x0":99.763,"queue worker 0x28":52.804,"queue worker 0x20":86.405,"queue worker 0x38":59.044,"queue worker 0x30":37.180},"top_phases_ms_per_frame":{"Driver.Packet":1415.500,"Driver.Packet.memory_wait":894.616,"Driver.Packet.dispatch":406.219,"Driver.Dispatch":377.685,"Vulkan.Dispatch":289.086,"Resources.Complete":288.190,"Vulkan.Dispatch.shader_resources":287.573,"Recorder.Sync":125.328},"trace_dropped":false,"trace":"aps5-trace-d2da0f20c6c2-1419664.json.gz"} {"commit":"ce9c6cbd6ab6","dirty":false,"env":{"APS5_PLAYGO_UNLISTED_CHUNKS":"installed","APS5_TRACE_DIR":"<path>","APS5_TRACE_SECONDS":"110:30"},"gpu":"NVIDIA GeForce RTX 4090","driver":"NVIDIA 615.78.08","os":"Linux 7.3.0-3-cachyos","cpu":"AMD Ryzen 7 7800X3D 8-Core Processor","cpu_threads":16,"memory_mib":31742,"title_id":"PPSA04264","title":"Grand Theft Auto V","content_version":"01.011.001","resolution":"3840x2160","window":{"spec":"seconds 110:30","first_present":2782,"ms":30057.556},"presents":105,"frame_ms":{"p50":285.910,"p90":305.359,"p99":330.100,"max":347.130},"gpu_busy_ms_per_present":230.361,"worker_busy_pct":{"queue worker 0x0":99.632,"queue worker 0x20":85.138,"queue worker 0x28":57.109,"queue worker 0x30":39.919,"queue worker 0x38":31.444},"top_phases_ms_per_frame":{"Driver.Packet":887.891,"Driver.Packet.memory_wait":555.971,"Driver.Packet.dispatch":252.488,"Driver.Dispatch":233.429,"Recorder.WaitSerial":104.503,"Driver.Packet.draw":69.338,"Driver.Draw":69.113,"Vulkan.Dispatch":54.760},"trace_dropped":false,"trace":"aps5-trace-ce9c6cbd6ab6-1401969.json.gz"} {"commit":"136d978b272e","dirty":false,"env":{"APS5_PLAYGO_UNLISTED_CHUNKS":"installed","APS5_TRACE_DIR":"<path>","APS5_TRACE_SECONDS":"110:30"},"gpu":"NVIDIA GeForce RTX 4090","driver":"NVIDIA 615.78.08","os":"Linux 7.3.0-3-cachyos","cpu":"AMD Ryzen 7 7800X3D 8-Core Processor","cpu_threads":16,"memory_mib":31742,"title_id":"PPSA04264","title":"Grand Theft Auto V","content_version":"01.011.001","resolution":"3840x2160","window":{"spec":"seconds 110:30","first_present":2517,"ms":30096.945},"presents":109,"frame_ms":{"p50":274.859,"p90":294.303,"p99":308.463,"max":328.216},"gpu_busy_ms_per_present":219.338,"worker_busy_pct":{"queue worker 0x0":99.598,"queue worker 0x20":83.848,"queue worker 0x30":34.028,"queue worker 0x38":46.243,"queue worker 0x28":45.536},"top_phases_ms_per_frame":{"Driver.Packet":844.679,"Driver.Packet.memory_wait":523.121,"Driver.Packet.dispatch":234.879,"Driver.Dispatch":222.949,"Recorder.WaitSerial":94.794,"Driver.Packet.draw":70.803,"Driver.Draw":70.580,"Graphics.Draw":55.813},"trace_dropped":false,"trace":"aps5-trace-136d978b272e-1424496.json.gz"} ``` Traces, as written by each capture: - main: [aps5-trace-e7e3e9c1984c-1418426.json.gz](https://github.com/Raghav314/AnyPS5/releases/download/perf-traces-dcc-word-fill-keys/aps5-trace-e7e3e9c1984c-1418426.json.gz) - this PR on main: [aps5-trace-d2da0f20c6c2-1419664.json.gz](https://github.com/Raghav314/AnyPS5/releases/download/perf-traces-dcc-word-fill-keys/aps5-trace-d2da0f20c6c2-1419664.json.gz) - #10837: [aps5-trace-ce9c6cbd6ab6-1401969.json.gz](https://github.com/Raghav314/AnyPS5/releases/download/perf-traces-dcc-word-fill-keys/aps5-trace-ce9c6cbd6ab6-1401969.json.gz) - #10837 + this PR: [aps5-trace-136d978b272e-1424496.json.gz](https://github.com/Raghav314/AnyPS5/releases/download/perf-traces-dcc-word-fill-keys/aps5-trace-136d978b272e-1424496.json.gz) Digests of all four are below. Focused tests on main and on this PR, same machine and GPU, with `ANYPS5_REQUIRE_VULKAN=1 ANYPS5_NO_SHADER_CACHE=1 VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation`: `agc_driver_dcc_key_presync_tests`, `agc_driver_dcc_keys_first_write_tests`, `agc_driver_fill_cover_keys_tests`, `agc_driver_key_miss_tests`, `agc_driver_sgpr_pattern_fill_keys_tests`, `agc_driver_depth_plane_guest_layers_tests`, `agc_driver_depth_copy_draw_tests`, `agc_driver_depth_storage_reuse_tests`. All pass on both, no log has `was not found but was requested by env var VK_INSTANCE_LAYERS`, and neither has a `VUID-` error. New cases in `DccKeyPresync.cpp`: `RunMixedWordKeys` records a fill of the keys with the word `0x00ff00ff`, then checks three things. The keys are seen as pending but need no synchronization, the dispatch that samples the texture neither pre-syncs nor waits for the GPU, and it reads the stored texel. On main it fails with "the keys of a recorded fill of a word with different bytes need a synchronization". `RunWordFillKeyBytes` records a fill of the keys with the word `0x33221100` and checks that each of the first eight key bytes, read singly while the fill is still pending, is the matching byte of the word, and that two adjacent bytes read as different keys. It fails when the byte phase is off by one or only the first byte of the overlap is read. <details><summary>trace_digest: main</summary> **seconds 110:30** from present 2802: 71 presents, frame p50 417.7 / p90 457.4 / p99 500.8 / max 500.8 ms, GPU busy 254.0 ms per present NVIDIA GeForce RTX 4090, NVIDIA 615.78.08, Linux 7.3.0-3-cachyos, 3840x2160, commit e7e3e9c1984c, dropped: no ```json {"commit":"e7e3e9c1984c","dirty":false,"env":{"APS5_PLAYGO_UNLISTED_CHUNKS":"installed","APS5_TRACE_DIR":"<path>","APS5_TRACE_SECONDS":"110:30"},"gpu":"NVIDIA GeForce RTX 4090","driver":"NVIDIA 615.78.08","os":"Linux 7.3.0-3-cachyos","cpu":"AMD Ryzen 7 7800X3D 8-Core Processor","cpu_threads":16,"memory_mib":31742,"title_id":"PPSA04264","title":"Grand Theft Auto V","content_version":"01.011.001","resolution":"3840x2160","window":{"spec":"seconds 110:30","first_present":2802,"ms":30149.495},"presents":71,"frame_ms":{"p50":417.72,"p90":457.401,"p99":500.825,"max":500.825},"gpu_busy_ms_per_present":254.015,"worker_busy_pct":{"queue worker 0x0":99.769,"queue worker 0x38":49.067,"queue worker 0x20":74.752,"queue worker 0x30":52.642,"queue worker 0x28":60.067},"top_phases_ms_per_frame":{"Driver.Packet":1421.602,"Driver.Packet.memory_wait":896.746,"Driver.Packet.dispatch":414.894,"Driver.Dispatch":381.031,"Vulkan.Dispatch":294.592,"Resources.Complete":294.174,"Vulkan.Dispatch.shader_resources":293.096,"Recorder.Sync":126.274},"trace_dropped":false,"trace":"aps5-trace-e7e3e9c1984c-1418426.json.gz"} ``` **Slowest frames** (largest slices inside each, inclusive) - present 2864: 500.8 ms at 26046 ms: Driver.WorkerWait (queue worker 0x38) 500.8, Driver.WorkerWait.idle_and_completion_poll (queue worker 0x38) 500.8, Driver.Packet (queue worker 0x20) 500.1, Driver.Packet (queue worker 0x30) 499.4 - present 2865: 481.6 ms at 26546 ms: Driver.WorkerWait (queue worker 0x38) 481.6, Driver.WorkerWait.idle_and_completion_poll (queue worker 0x38) 481.6, Driver.WorkerWait (queue worker 0x28) 481.6, Driver.WorkerWait.idle_and_completion_poll (queue worker 0x28) 481.6 - present 2847: 479.4 ms at 18676 ms: Driver.WorkerWait (queue worker 0x28) 479.4, Driver.WorkerWait.idle_and_completion_poll (queue worker 0x28) 479.4, Driver.Packet (queue worker 0x20) 478.4, Driver.Packet (queue worker 0x38) 478.2 - present 2866: 470.9 ms at 27028 ms: Driver.Packet (queue worker 0x28) 469.7, Driver.Packet.memory_wait (queue worker 0x28) 469.7, Driver.Packet (queue worker 0x38) 469.6, Driver.Packet.memory_wait (queue worker 0x38) 469.6 - present 2867: 464.9 ms at 27499 ms: Driver.WorkerWait (queue worker 0x30) 464.9, Driver.WorkerWait.idle_and_completion_poll (queue worker 0x30) 464.9, Driver.Packet (queue worker 0x38) 464.9, Driver.Packet (queue worker 0x20) 464.0 **Threads** (ms per frame) | thread | busy | wait | untraced | in slices < 20 us | largest | |---|---|---|---|---|---| | queue worker 0x0 | 203.9 (48 %) | 205.6 (48 %) | 15.2 | 79.5 | Driver.Packet 403.7, Driver.EndSubmission 4.5 | | draw committer | 69.7 (16 %) | 57.7 (14 %) | 297.3 | 21.6 | Graphics.Draw 49.7, Recorder.Submit 19.8 | | presenter | 0.6 (0 %) | 0.0 (0 %) | 424.0 | 0.1 | VideoOut.Flip 0.6, Driver.Present 0.0 | | title | 0.0 (0 %) | 0.0 (0 %) | 424.6 | 0.0 | | | queue worker 0x38 | 78.9 (19 %) | 319.1 (75 %) | 26.7 | 0.2 | Driver.Packet 208.3, Driver.EndSubmission 0.1 | | queue worker 0x20 | 48.4 (11 %) | 370.0 (87 %) | 6.2 | 6.8 | Driver.Packet 316.6, Driver.EndSubmission 0.0 | | title | 0.0 (0 %) | 0.0 (0 %) | 424.6 | 0.0 | Shader.ResolveGraphicsStagesAbi 0.0 | | queue worker 0x30 | 89.0 (21 %) | 323.7 (76 %) | 11.9 | 0.7 | Driver.Packet 223.3, Driver.EndSubmission 0.2 | | queue worker 0x28 | 70.7 (17 %) | 350.8 (83 %) | 3.1 | 3.0 | Driver.Packet 254.7, Driver.EndSubmission 0.1 | | title | 0.0 (0 %) | 0.0 (0 %) | 424.6 | 0.0 | Shader.ResolveGraphicsStagesAbi 0.0 | | title | 0.0 (0 %) | 0.0 (0 %) | 424.6 | 0.0 | | | gpu | 254.5 (60 %) | 0.0 (0 %) | 170.1 | 0.0 | batch 254.5 | **Largest slices** (ms per frame, inclusive, all threads): Driver.Packet 1406.6, Driver.Packet.memory_wait 896.7, Driver.WorkerWait 647.5, Driver.WorkerWait.idle_and_completion_poll 647.5, Driver.Packet.dispatch 413.7, Driver.Dispatch 379.2, Resources.Complete 293.2, Vulkan.Dispatch 293.1, Vulkan.Dispatch.shader_resources 291.8, batch 254.5 **Longest waits** - Driver.WorkerWait (queue worker 0x38) 2528.9 ms at 19205 ms, present 2848 - Driver.WorkerWait (queue worker 0x30) 2446.2 ms at 11416 ms, present 2830 - Driver.WorkerWait (queue worker 0x38) 2336.7 ms at 15012 ms, present 2838 - Driver.WorkerWait (queue worker 0x30) 2310.3 ms at 23737 ms, present 2858 - Driver.WorkerWait (queue worker 0x38) 1925.4 ms at 25104 ms, present 2861 - Driver.WorkerWait (queue worker 0x38) 1859.0 ms at 22456 ms, present 2855 - Driver.WorkerWait (queue worker 0x28) 1674.3 ms at 19612 ms, present 2849 - Driver.WorkerWait (queue worker 0x30) 1494.7 ms at 4958 ms, present 2814 - Driver.WorkerWait (queue worker 0x30) 1395.0 ms at 7907 ms, present 2821 - Driver.WorkerWait (queue worker 0x28) 1223.5 ms at 11827 ms, present 2831 **Largest GPU batches** (GPU ranges inside, and the CPU slices that recorded each, inclusive) - batch 6312: 186.2 ms at 26176 ms, present 2864: GPU no ranges; recorded by Recorder.Sync (queue worker 0x28) 186.4, Driver.Packet (queue worker 0x28) 51.8, Driver.Packet.dispatch (queue worker 0x28) 51.8, Driver.Dispatch (queue worker 0x28) 51.8 - batch 6438: 183.0 ms at 26687 ms, present 2865: GPU no ranges; recorded by Recorder.Sync (queue worker 0x30) 183.1, Driver.Packet (queue worker 0x30) 52.6, Driver.Packet.dispatch (queue worker 0x30) 52.6, Driver.Dispatch (queue worker 0x30) 52.6 - batch 6524: 181.6 ms at 27126 ms, present 2866: GPU no ranges; recorded by GpuMutex.wait.draw (draw committer) 270.0, Graphics.Draw (draw committer) 0.3, Graphics.Draw.draw_and_resource_release (draw committer) 0.3 - batch 6648: 177.9 ms at 27631 ms, present 2867: GPU no ranges; recorded by Recorder.Sync (queue worker 0x38) 178.0, Driver.Packet (queue worker 0x38) 59.0, Driver.Packet.dispatch (queue worker 0x38) 59.0, Driver.Dispatch (queue worker 0x38) 59.0 - batch 4757: 171.0 ms at 18784 ms, present 2847: GPU no ranges; recorded by Recorder.Sync (queue worker 0x30) 171.2, Driver.Packet (queue worker 0x30) 45.6, Driver.Packet.dispatch (queue worker 0x30) 45.6, Driver.Dispatch (queue worker 0x30) 45.6 </details> <details><summary>trace_digest: this PR on main</summary> **seconds 110:30** from present 2933: 71 presents, frame p50 427.3 / p90 467.2 / p99 501.7 / max 501.7 ms, GPU busy 249.9 ms per present NVIDIA GeForce RTX 4090, NVIDIA 615.78.08, Linux 7.3.0-3-cachyos, 3840x2160, commit d2da0f20c6c2, dropped: no ```json {"commit":"d2da0f20c6c2","dirty":false,"env":{"APS5_PLAYGO_UNLISTED_CHUNKS":"installed","APS5_TRACE_DIR":"<path>","APS5_TRACE_SECONDS":"110:30"},"gpu":"NVIDIA GeForce RTX 4090","driver":"NVIDIA 615.78.08","os":"Linux 7.3.0-3-cachyos","cpu":"AMD Ryzen 7 7800X3D 8-Core Processor","cpu_threads":16,"memory_mib":31742,"title_id":"PPSA04264","title":"Grand Theft Auto V","content_version":"01.011.001","resolution":"3840x2160","window":{"spec":"seconds 110:30","first_present":2933,"ms":30079.328},"presents":71,"frame_ms":{"p50":427.333,"p90":467.221,"p99":501.692,"max":501.692},"gpu_busy_ms_per_present":249.894,"worker_busy_pct":{"queue worker 0x0":99.763,"queue worker 0x28":52.804,"queue worker 0x20":86.405,"queue worker 0x38":59.044,"queue worker 0x30":37.18},"top_phases_ms_per_frame":{"Driver.Packet":1415.5,"Driver.Packet.memory_wait":894.616,"Driver.Packet.dispatch":406.219,"Driver.Dispatch":377.685,"Vulkan.Dispatch":289.086,"Resources.Complete":288.19,"Vulkan.Dispatch.shader_resources":287.573,"Recorder.Sync":125.328},"trace_dropped":false,"trace":"aps5-trace-d2da0f20c6c2-1419664.json.gz"} ``` **Slowest frames** (largest slices inside each, inclusive) - present 3000: 501.7 ms at 28118 ms: Driver.WorkerWait (queue worker 0x38) 501.7, Driver.WorkerWait.idle_and_completion_poll (queue worker 0x38) 501.7, Driver.WorkerWait (queue worker 0x30) 501.7, Driver.WorkerWait.idle_and_completion_poll (queue worker 0x30) 501.7 - present 2999: 500.1 ms at 27618 ms: Driver.WorkerWait (queue worker 0x30) 500.1, Driver.WorkerWait.idle_and_completion_poll (queue worker 0x30) 500.1, Driver.Packet (queue worker 0x20) 499.0, Driver.Packet (queue worker 0x28) 498.7 - present 3002: 495.9 ms at 29102 ms: Driver.Packet (queue worker 0x20) 494.9, Driver.Packet.memory_wait (queue worker 0x20) 494.9, Driver.Packet (queue worker 0x38) 494.8, Driver.Packet.memory_wait (queue worker 0x38) 494.8 - present 3001: 482.9 ms at 28619 ms: Driver.WorkerWait (queue worker 0x20) 482.9, Driver.WorkerWait.idle_and_completion_poll (queue worker 0x20) 482.9, Driver.WorkerWait (queue worker 0x38) 482.9, Driver.WorkerWait.idle_and_completion_poll (queue worker 0x38) 482.9 - present 3003: 481.3 ms at 29598 ms: Driver.Packet (queue worker 0x0) 461.3, Driver.Packet (queue worker 0x38) 358.6, Driver.Packet.dispatch (queue worker 0x38) 311.1, Driver.Dispatch (queue worker 0x38) 310.3 **Threads** (ms per frame) | thread | busy | wait | untraced | in slices < 20 us | largest | |---|---|---|---|---|---| | queue worker 0x0 | 200.4 (47 %) | 208.0 (49 %) | 15.3 | 80.2 | Driver.Packet 404.4, Driver.EndSubmission 2.8 | | draw committer | 69.9 (16 %) | 54.2 (13 %) | 299.5 | 21.8 | Graphics.Draw 49.4, Recorder.Submit 20.3 | | presenter | 0.6 (0 %) | 0.3 (0 %) | 422.8 | 0.1 | VideoOut.Flip 0.8, Driver.Present 0.0 | | title | 0.0 (0 %) | 0.0 (0 %) | 423.6 | 0.0 | Shader.ResolveGraphicsStagesAbi 0.0 | | queue worker 0x28 | 78.5 (19 %) | 335.1 (79 %) | 10.1 | 1.5 | Driver.Packet 223.4, Driver.EndSubmission 0.1 | | queue worker 0x20 | 60.4 (14 %) | 356.1 (84 %) | 7.1 | 8.1 | Driver.Packet 365.1, Driver.EndSubmission 0.0 | | queue worker 0x38 | 98.3 (23 %) | 323.5 (76 %) | 1.8 | 0.1 | Driver.Packet 250.0, Driver.EndSubmission 0.1 | | title | 0.0 (0 %) | 0.0 (0 %) | 423.6 | 0.0 | Shader.ResolveGraphicsStagesAbi 0.0 | | title | 0.0 (0 %) | 0.0 (0 %) | 423.7 | 0.0 | Shader.ResolveGraphicsStagesAbi 0.0 | | queue worker 0x30 | 50.8 (12 %) | 359.6 (85 %) | 13.3 | 0.9 | Driver.Packet 157.4, Driver.EndSubmission 0.0 | | title | 0.0 (0 %) | 0.0 (0 %) | 423.7 | 0.0 | Shader.ResolveGraphicsStagesAbi 0.0 | | gpu | 253.6 (60 %) | 0.0 (0 %) | 170.1 | 0.0 | batch 253.6 | **Largest slices** (ms per frame, inclusive, all threads): Driver.Packet 1400.4, Driver.Packet.memory_wait 894.6, Driver.WorkerWait 666.1, Driver.WorkerWait.idle_and_completion_poll 666.1, Driver.Packet.dispatch 405.0, Driver.Dispatch 375.9, Vulkan.Dispatch 287.7, Resources.Complete 287.3, Vulkan.Dispatch.shader_resources 286.3, batch 253.6 **Longest waits** - Driver.WorkerWait (queue worker 0x30) 4148.4 ms at 2687 ms, present 2940 - Driver.WorkerWait (queue worker 0x30) 2887.5 ms at 25733 ms, present 2994 - Driver.WorkerWait (queue worker 0x28) 2849.5 ms at 22562 ms, present 2987 - Driver.WorkerWait (queue worker 0x30) 2771.5 ms at 15379 ms, present 2971 - Driver.WorkerWait (queue worker 0x38) 2415.5 ms at 16655 ms, present 2974 - Driver.WorkerWait (queue worker 0x30) 1843.9 ms at 46 ms, present 2933 - Driver.WorkerWait (queue worker 0x28) 1802.1 ms at 9066 ms, present 2956 - Driver.WorkerWait (queue worker 0x38) 1656.0 ms at 6344 ms, present 2949 - Driver.WorkerWait (queue worker 0x30) 1655.2 ms at 7514 ms, present 2952 - Driver.WorkerWait (queue worker 0x38) 1635.7 ms at 2912 ms, present 2940 **Largest GPU batches** (GPU ranges inside, and the CPU slices that recorded each, inclusive) - batch 6717: 210.1 ms at 27748 ms, present 2999: GPU no ranges; recorded by Recorder.Sync (queue worker 0x38) 210.3, Driver.Packet (queue worker 0x38) 54.7, Driver.Packet.dispatch (queue worker 0x38) 54.7, Driver.Dispatch (queue worker 0x38) 54.7 - batch 6831: 184.7 ms at 28269 ms, present 3000: GPU no ranges; recorded by Recorder.Sync (queue worker 0x28) 184.9, Driver.Packet (queue worker 0x28) 54.8, Driver.Packet.dispatch (queue worker 0x28) 54.8, Driver.Dispatch (queue worker 0x28) 54.8 - batch 6904: 184.0 ms at 28715 ms, present 3001: GPU no ranges; recorded by GpuMutex.wait.draw (draw committer) 44.1, Graphics.Draw (draw committer) 0.6, Graphics.Draw.draw_and_resource_release (draw committer) 0.5, Recorder.Submit (draw committer) 0.0 - batch 6992: 180.5 ms at 29198 ms, present 3002: GPU no ranges; recorded by GpuMutex.wait.draw (draw committer) 46.8, Graphics.Draw (draw committer) 0.3, Graphics.Draw.draw_and_resource_release (draw committer) 0.2, Recorder.Submit (draw committer) 0.0 - batch 7107: 176.7 ms at 29743 ms, present 3003: GPU no ranges; recorded by Recorder.Sync (queue worker 0x38) 176.8, Driver.Packet (queue worker 0x38) 66.2, Driver.Packet.dispatch (queue worker 0x38) 66.2, Driver.Dispatch (queue worker 0x38) 66.2 </details> <details><summary>trace_digest: #10837</summary> **seconds 110:30** from present 2782: 105 presents, frame p50 285.9 / p90 305.4 / p99 330.1 / max 347.1 ms, GPU busy 230.4 ms per present NVIDIA GeForce RTX 4090, NVIDIA 615.78.08, Linux 7.3.0-3-cachyos, 3840x2160, commit ce9c6cbd6ab6, dropped: no ```json {"commit":"ce9c6cbd6ab6","dirty":false,"env":{"APS5_PLAYGO_UNLISTED_CHUNKS":"installed","APS5_TRACE_DIR":"<path>","APS5_TRACE_SECONDS":"110:30"},"gpu":"NVIDIA GeForce RTX 4090","driver":"NVIDIA 615.78.08","os":"Linux 7.3.0-3-cachyos","cpu":"AMD Ryzen 7 7800X3D 8-Core Processor","cpu_threads":16,"memory_mib":31742,"title_id":"PPSA04264","title":"Grand Theft Auto V","content_version":"01.011.001","resolution":"3840x2160","window":{"spec":"seconds 110:30","first_present":2782,"ms":30057.556},"presents":105,"frame_ms":{"p50":285.91,"p90":305.359,"p99":330.1,"max":347.13},"gpu_busy_ms_per_present":230.361,"worker_busy_pct":{"queue worker 0x0":99.632,"queue worker 0x20":85.138,"queue worker 0x28":57.109,"queue worker 0x30":39.919,"queue worker 0x38":31.444},"top_phases_ms_per_frame":{"Driver.Packet":887.891,"Driver.Packet.memory_wait":555.971,"Driver.Packet.dispatch":252.488,"Driver.Dispatch":233.429,"Recorder.WaitSerial":104.503,"Driver.Packet.draw":69.338,"Driver.Draw":69.113,"Vulkan.Dispatch":54.76},"trace_dropped":false,"trace":"aps5-trace-ce9c6cbd6ab6-1401969.json.gz"} ``` **Slowest frames** (largest slices inside each, inclusive) - present 2802: 347.1 ms at 5770 ms: Driver.WorkerWait (queue worker 0x38) 347.1, Driver.WorkerWait.idle_and_completion_poll (queue worker 0x38) 347.1, Driver.Packet (queue worker 0x28) 346.0, Driver.Packet (queue worker 0x20) 345.4 - present 2804: 330.1 ms at 6439 ms: Driver.WorkerWait (queue worker 0x30) 330.1, Driver.WorkerWait.idle_and_completion_poll (queue worker 0x30) 330.1, Driver.Packet (queue worker 0x38) 329.2, Driver.Packet.memory_wait (queue worker 0x38) 329.2 - present 2803: 321.8 ms at 6117 ms: Driver.WorkerWait (queue worker 0x30) 321.8, Driver.WorkerWait.idle_and_completion_poll (queue worker 0x30) 321.8, Driver.WorkerWait (queue worker 0x38) 321.8, Driver.WorkerWait.idle_and_completion_poll (queue worker 0x38) 321.8 - present 2822: 321.5 ms at 11902 ms: Driver.WorkerWait (queue worker 0x30) 321.5, Driver.WorkerWait.idle_and_completion_poll (queue worker 0x30) 321.5, Driver.WorkerWait (queue worker 0x38) 321.5, Driver.WorkerWait.idle_and_completion_poll (queue worker 0x38) 321.5 - present 2806: 318.7 ms at 7074 ms: Driver.WorkerWait (queue worker 0x30) 318.7, Driver.WorkerWait.idle_and_completion_poll (queue worker 0x30) 318.7, Driver.Packet (queue worker 0x20) 318.6, Driver.Packet (queue worker 0x38) 317.5 **Threads** (ms per frame) | thread | busy | wait | untraced | in slices < 20 us | largest | |---|---|---|---|---|---| | queue worker 0x0 | 125.9 (44 %) | 145.5 (51 %) | 14.9 | 79.0 | Driver.Packet 263.0, Driver.EndSubmission 7.1 | | draw committer | 46.7 (16 %) | 8.6 (3 %) | 231.0 | 21.0 | Graphics.Draw 46.3, Recorder.Sync 0.3 | | presenter | 0.6 (0 %) | 0.1 (0 %) | 285.6 | 0.1 | VideoOut.Flip 0.6, Driver.Present 0.0 | | title | 0.0 (0 %) | 0.0 (0 %) | 286.3 | 0.0 | Shader.ResolveGraphicsStagesAbi 0.0 | | title | 0.0 (0 %) | 0.0 (0 %) | 286.3 | 0.0 | Shader.ResolveGraphicsStagesAbi 0.0 | | queue worker 0x20 | 31.5 (11 %) | 248.9 (87 %) | 5.9 | 7.9 | Driver.Packet 242.9, Driver.EndSubmission 0.0 | | queue worker 0x28 | 24.4 (9 %) | 259.5 (91 %) | 2.4 | 1.9 | Driver.Packet 163.3, Driver.EndSubmission 0.0 | | title | 0.0 (0 %) | 0.0 (0 %) | 286.3 | 0.0 | Shader.ResolveGraphicsStagesAbi 0.0 | | queue worker 0x30 | 16.3 (6 %) | 245.6 (86 %) | 24.4 | 0.4 | Driver.Packet 114.2, Driver.EndSubmission 0.0 | | queue worker 0x38 | 12.7 (4 %) | 263.2 (92 %) | 10.3 | 0.1 | Driver.Packet 90.0, Driver.EndSubmission 0.0 | | title | 0.0 (0 %) | 0.0 (0 %) | 286.3 | 0.0 | Shader.ResolveGraphicsStagesAbi 0.0 | | gpu | 230.4 (80 %) | 0.0 (0 %) | 55.9 | 0.0 | batch 230.4 | **Largest slices** (ms per frame, inclusive, all threads): Driver.Packet 873.3, Driver.Packet.memory_wait 556.0, Driver.WorkerWait 491.7, Driver.WorkerWait.idle_and_completion_poll 491.7, Driver.Packet.dispatch 251.4, Driver.Dispatch 231.7, batch 230.4, Recorder.WaitSerial 104.5, Driver.Packet.draw 59.4, Driver.Draw 59.1 **Longest waits** - Driver.WorkerWait (queue worker 0x38) 3175.8 ms at 18365 ms, present 2845 - Driver.WorkerWait (queue worker 0x38) 3029.0 ms at 25016 ms, present 2869 - Driver.WorkerWait (queue worker 0x38) 2208.6 ms at 11431 ms, present 2820 - Driver.WorkerWait (queue worker 0x38) 1999.6 ms at 4440 ms, present 2797 - Driver.WorkerWait (queue worker 0x30) 1872.0 ms at 23351 ms, present 2863 - Driver.WorkerWait (queue worker 0x30) 1842.7 ms at 14816 ms, present 2832 - Driver.WorkerWait (queue worker 0x30) 1654.0 ms at 3269 ms, present 2793 - Driver.WorkerWait (queue worker 0x30) 1522.0 ms at 5873 ms, present 2802 - Driver.WorkerWait (queue worker 0x38) 1249.3 ms at 16737 ms, present 2839 - Driver.WorkerWait (queue worker 0x30) 1229.8 ms at 18094 ms, present 2844 **Largest GPU batches** (GPU ranges inside, and the CPU slices that recorded each, inclusive) - batch 2151: 190.6 ms at 5873 ms, present 2802: GPU no ranges; recorded by Driver.WorkerWait (queue worker 0x30) 1522.0, Driver.WorkerWait.idle_and_completion_poll (queue worker 0x30) 1522.0, Driver.Packet (queue worker 0x30) 357.1, Driver.Packet.memory_wait (queue worker 0x30) 317.4 - batch 2703: 180.1 ms at 7493 ms, present 2807: GPU no ranges; recorded by Driver.Packet (queue worker 0x38) 403.4, Driver.Packet.memory_wait (queue worker 0x38) 368.6, Driver.WorkerWait (queue worker 0x38) 219.7, Driver.WorkerWait.idle_and_completion_poll (queue worker 0x38) 219.7 - batch 2593: 179.6 ms at 7179 ms, present 2806: GPU no ranges; recorded by Driver.Packet (queue worker 0x20) 254.9, Driver.Packet.memory_wait (queue worker 0x20) 215.0, Driver.Packet.dispatch (queue worker 0x20) 39.9, Driver.Dispatch (queue worker 0x20) 35.6 - batch 2272: 177.2 ms at 6209 ms, present 2803: GPU no ranges; recorded by Driver.Packet (queue worker 0x0) 33.1, Driver.Packet.memory_wait (queue worker 0x0) 32.8, Driver.Dispatch.materialize (queue worker 0x0) 10.6, Resources.Prepare (queue worker 0x0) 1.7 - batch 2809: 174.8 ms at 7818 ms, present 2808: GPU no ranges; recorded by Driver.Packet (queue worker 0x28) 392.6, Driver.Packet.memory_wait (queue worker 0x28) 351.1, Driver.WorkerWait (queue worker 0x28) 212.5, Driver.WorkerWait.idle_and_completion_poll (queue worker 0x28) 212.4 </details> <details><summary>trace_digest: #10837 + this PR</summary> **seconds 110:30** from present 2517: 109 presents, frame p50 274.9 / p90 294.3 / p99 308.5 / max 328.2 ms, GPU busy 219.3 ms per present NVIDIA GeForce RTX 4090, NVIDIA 615.78.08, Linux 7.3.0-3-cachyos, 3840x2160, commit 136d978b272e, dropped: no ```json {"commit":"136d978b272e","dirty":false,"env":{"APS5_PLAYGO_UNLISTED_CHUNKS":"installed","APS5_TRACE_DIR":"<path>","APS5_TRACE_SECONDS":"110:30"},"gpu":"NVIDIA GeForce RTX 4090","driver":"NVIDIA 615.78.08","os":"Linux 7.3.0-3-cachyos","cpu":"AMD Ryzen 7 7800X3D 8-Core Processor","cpu_threads":16,"memory_mib":31742,"title_id":"PPSA04264","title":"Grand Theft Auto V","content_version":"01.011.001","resolution":"3840x2160","window":{"spec":"seconds 110:30","first_present":2517,"ms":30096.945},"presents":109,"frame_ms":{"p50":274.859,"p90":294.303,"p99":308.463,"max":328.216},"gpu_busy_ms_per_present":219.338,"worker_busy_pct":{"queue worker 0x0":99.598,"queue worker 0x20":83.848,"queue worker 0x30":34.028,"queue worker 0x38":46.243,"queue worker 0x28":45.536},"top_phases_ms_per_frame":{"Driver.Packet":844.679,"Driver.Packet.memory_wait":523.121,"Driver.Packet.dispatch":234.879,"Driver.Dispatch":222.949,"Recorder.WaitSerial":94.794,"Driver.Packet.draw":70.803,"Driver.Draw":70.58,"Graphics.Draw":55.813},"trace_dropped":false,"trace":"aps5-trace-136d978b272e-1424496.json.gz"} ``` **Slowest frames** (largest slices inside each, inclusive) - present 2529: 328.2 ms at 3509 ms: Driver.WorkerWait (queue worker 0x38) 328.2, Driver.WorkerWait.idle_and_completion_poll (queue worker 0x38) 328.2, Driver.Packet (queue worker 0x20) 327.2, Driver.Packet (queue worker 0x30) 327.2 - present 2525: 308.5 ms at 2330 ms: Driver.WorkerWait (queue worker 0x38) 308.5, Driver.WorkerWait.idle_and_completion_poll (queue worker 0x38) 308.5, Driver.Packet (queue worker 0x28) 308.4, Driver.Packet (queue worker 0x20) 307.7 - present 2519: 305.8 ms at 586 ms: Driver.Packet (queue worker 0x28) 304.9, Driver.Packet.memory_wait (queue worker 0x28) 304.9, Driver.Packet (queue worker 0x0) 289.5, Driver.WorkerWait (queue worker 0x20) 261.6 - present 2533: 304.3 ms at 4727 ms: Driver.WorkerWait (queue worker 0x30) 304.3, Driver.WorkerWait.idle_and_completion_poll (queue worker 0x30) 304.3, Driver.Packet (queue worker 0x28) 303.3, Driver.Packet (queue worker 0x38) 303.1 - present 2532: 301.5 ms at 4426 ms: Driver.WorkerWait (queue worker 0x30) 301.5, Driver.WorkerWait.idle_and_completion_poll (queue worker 0x30) 301.5, Driver.WorkerWait (queue worker 0x38) 301.5, Driver.WorkerWait.idle_and_completion_poll (queue worker 0x38) 301.5 **Threads** (ms per frame) | thread | busy | wait | untraced | in slices < 20 us | largest | |---|---|---|---|---|---| | queue worker 0x0 | 126.2 (46 %) | 134.8 (49 %) | 15.1 | 81.8 | Driver.Packet 252.2, Driver.EndSubmission 7.5 | | draw committer | 47.7 (17 %) | 8.9 (3 %) | 219.5 | 21.2 | Graphics.Draw 47.4, Recorder.Sync 0.2 | | presenter | 0.6 (0 %) | 0.0 (0 %) | 275.5 | 0.1 | VideoOut.Flip 0.6, Driver.Present 0.0 | | title | 0.0 (0 %) | 0.0 (0 %) | 276.1 | 0.0 | Shader.ResolveGraphicsStagesAbi 0.0 | | queue worker 0x20 | 33.9 (12 %) | 239.2 (87 %) | 3.1 | 8.1 | Driver.Packet 230.6, Driver.EndSubmission 0.0 | | queue worker 0x30 | 13.9 (5 %) | 225.8 (82 %) | 36.5 | 0.8 | Driver.Packet 93.9, Driver.EndSubmission 0.0 | | title | 0.0 (0 %) | 0.0 (0 %) | 276.1 | 0.0 | Shader.ResolveGraphicsStagesAbi 0.0 | | queue worker 0x38 | 18.2 (7 %) | 255.8 (93 %) | 2.1 | 0.3 | Driver.Packet 127.6, Driver.EndSubmission 0.0 | | queue worker 0x28 | 19.1 (7 %) | 246.8 (89 %) | 10.2 | 1.2 | Driver.Packet 125.6, Driver.EndSubmission 0.0 | | title | 0.0 (0 %) | 0.0 (0 %) | 276.1 | 0.0 | Shader.ResolveGraphicsStagesAbi 0.0 | | title | 0.0 (0 %) | 0.0 (0 %) | 276.1 | 0.0 | | | gpu | 221.4 (80 %) | 0.0 (0 %) | 54.8 | 0.0 | batch 221.4 | **Largest slices** (ms per frame, inclusive, all threads): Driver.Packet 829.9, Driver.Packet.memory_wait 523.1, Driver.WorkerWait 474.8, Driver.WorkerWait.idle_and_completion_poll 474.8, Driver.Packet.dispatch 233.8, batch 221.4, Driver.Dispatch 221.2, Recorder.WaitSerial 94.8, Driver.Packet.draw 60.7, Driver.Draw 60.5 **Longest waits** - Driver.WorkerWait (queue worker 0x28) 3048.2 ms at 25105 ms, present 2608 - Driver.WorkerWait (queue worker 0x30) 2298.5 ms at 9566 ms, present 2551 - Driver.WorkerWait (queue worker 0x28) 2109.9 ms at 17346 ms, present 2580 - Driver.WorkerWait (queue worker 0x38) 1721.2 ms at 5705 ms, present 2536 - Driver.WorkerWait (queue worker 0x30) 1567.7 ms at 14609 ms, present 2570 - Driver.WorkerWait (queue worker 0x30) 1566.8 ms at 22047 ms, present 2597 - Driver.WorkerWait (queue worker 0x38) 1406.9 ms at 3322 ms, present 2528 - Driver.WorkerWait (queue worker 0x38) 1321.9 ms at 27659 ms, present 2617 - Driver.WorkerWait (queue worker 0x30) 1319.7 ms at 16490 ms, present 2577 - Driver.WorkerWait (queue worker 0x30) 1285.4 ms at 19280 ms, present 2587 **Largest GPU batches** (GPU ranges inside, and the CPU slices that recorded each, inclusive) - batch 1448: 161.8 ms at 3939 ms, present 2530: GPU no ranges; recorded by Driver.Packet (queue worker 0x20) 237.3, Driver.Packet.memory_wait (queue worker 0x20) 200.5, Driver.Packet.dispatch (queue worker 0x20) 36.8, Driver.Dispatch (queue worker 0x20) 36.7 - batch 9827: 158.7 ms at 25429 ms, present 2609: GPU no ranges; recorded by Driver.Packet (queue worker 0x30) 357.6, Driver.Packet.memory_wait (queue worker 0x30) 323.0, Driver.WorkerWait (queue worker 0x30) 190.6, Driver.WorkerWait.idle_and_completion_poll (queue worker 0x30) 190.6 - batch 10254: 157.9 ms at 26566 ms, present 2613: GPU no ranges; recorded by Driver.Packet (queue worker 0x20) 316.8, Driver.Packet.memory_wait (queue worker 0x20) 274.5, Driver.WorkerWait (queue worker 0x20) 190.0, Driver.WorkerWait.idle_and_completion_poll (queue worker 0x20) 190.0 - batch 1770: 156.9 ms at 4838 ms, present 2533: GPU no ranges; recorded by Driver.Packet (queue worker 0x20) 321.5, Driver.Packet.memory_wait (queue worker 0x20) 275.2, Driver.WorkerWait (queue worker 0x20) 195.3, Driver.WorkerWait.idle_and_completion_poll (queue worker 0x20) 195.3 - batch 913: 155.9 ms at 2446 ms, present 2525: GPU no ranges; recorded by Driver.Packet (queue worker 0x28) 675.0, Driver.Packet.memory_wait (queue worker 0x28) 604.1, Driver.WorkerWait (queue worker 0x28) 500.9, Driver.WorkerWait.idle_and_completion_poll (queue worker 0x28) 500.9 </details> ### 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 - [x] Unimplemented paths throw (`NotImplemented_nid_no_patch`); silent stubs are listed under Silent stubs in their library's technical 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 - [x] GPUs tested: NVIDIA GeForce RTX 4090, driver 615.78.08, Linux 7.3.0-3-cachyos - [x] AI-assisted: yes
MarcZX10 commented 2026-10-25 04:33:55 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-25T04:33:55Z.

Review: APPROVED


Reviewed exact head d2da0f20c6c24704746a2f534ccd2527cce9d779 against current main.

KeysAfterPendingWrites now derives each byte of a pending aligned word fill using the byte's offset from the recorded write start, while retaining the newest-write-first coverage logic. It only reports Mixed when the bytes actually covering the requested key range disagree, and leaves uncovered bytes to the existing memory comparison. The new regression uses 0x00ff00ff, checks the pending writer is known without pre-sync, dispatches without a GPU wait, and verifies the sampled stored texel. The existing uniform-word, writer-wait, and no-writer cases remain in the focused test.

git diff --check and tools/check_conventions.py --base upstream/main --head upstream/pr-10844 pass. Hosted eligibility, intake, labels, report, and current conventions checks pass; the product build/test matrix is skipped by repository policy. The author reports the focused test on main and this head under Vulkan validation, plus the GTA V measurements. I could not run the Vulkan test locally: this container has no /dev/dri, and the available shared build was configured without the AGC execution test and would require a broad dependency rebuild.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5641515917 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/10844#pullrequestreview-5641515917). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-10-25T04:33:55Z. **Review:** APPROVED --- Reviewed exact head `d2da0f20c6c24704746a2f534ccd2527cce9d779` against current `main`. `KeysAfterPendingWrites` now derives each byte of a pending aligned word fill using the byte's offset from the recorded write start, while retaining the newest-write-first coverage logic. It only reports `Mixed` when the bytes actually covering the requested key range disagree, and leaves uncovered bytes to the existing memory comparison. The new regression uses `0x00ff00ff`, checks the pending writer is known without pre-sync, dispatches without a GPU wait, and verifies the sampled stored texel. The existing uniform-word, writer-wait, and no-writer cases remain in the focused test. `git diff --check` and `tools/check_conventions.py --base upstream/main --head upstream/pr-10844` pass. Hosted eligibility, intake, labels, report, and current conventions checks pass; the product build/test matrix is skipped by repository policy. The author reports the focused test on main and this head under Vulkan validation, plus the GTA V measurements. I could not run the Vulkan test locally: this container has no `/dev/dri`, and the available shared build was configured without the AGC execution test and would require a broad dependency rebuild.
MarcZX10 commented 2026-10-25 04:35:38 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-25T04:35:38Z.

Review: APPROVED


Re-reviewed the updated exact head ca958bcb6320a1ad124be5a072ebd6a1546a5d28. The added RunWordFillKeyBytes case checks all eight bytes across two recorded words, with the expected little-endian byte selected by (offset % 4), and confirms a two-byte range containing different values does not produce a uniform metadata byte. This directly covers the range/phase edge cases in addition to the mixed-key dispatch regression from the prior head.

git diff --check and tools/check_conventions.py --base upstream/main --head upstream/pr-10844 pass. Hosted eligibility, labels, report, and current conventions pass; product jobs are skipped by repository policy. The added Vulkan case was not runnable locally: there is no /dev/dri, and the available shared build lacks this AGC execution-test configuration. The author-reported Vulkan validation results therefore remain external evidence.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5641523869 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/10844#pullrequestreview-5641523869). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-10-25T04:35:38Z. **Review:** APPROVED --- Re-reviewed the updated exact head `ca958bcb6320a1ad124be5a072ebd6a1546a5d28`. The added `RunWordFillKeyBytes` case checks all eight bytes across two recorded words, with the expected little-endian byte selected by `(offset % 4)`, and confirms a two-byte range containing different values does not produce a uniform metadata byte. This directly covers the range/phase edge cases in addition to the mixed-key dispatch regression from the prior head. `git diff --check` and `tools/check_conventions.py --base upstream/main --head upstream/pr-10844` pass. Hosted eligibility, labels, report, and current conventions pass; product jobs are skipped by repository policy. The added Vulkan case was not runnable locally: there is no `/dev/dri`, and the available shared build lacks this AGC execution-test configuration. The author-reported Vulkan validation results therefore remain external evidence.
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!10844
No description provided.