perf(agc): hold 262144 draw-cache entries by default #26597

Merged
JJenkx merged 3 commits from upstream-pr/26597 into main 2026-11-25 15:39:02 +00:00
JJenkx commented 2026-11-24 09:21:04 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by JJenkx on 2026-11-24T09:21:04Z.


What

The draw cache's default entry count goes from 65536 to 262144 (DrawCache.cpp drawCacheEntries). The byte budget (APS5_DRAW_CACHE_BYTES, 256 MiB) is unchanged and still bounds what the cache holds, and APS5_DRAW_CACHE_ENTRIES=65536 restores the previous default. The key and shape sighting tables that decide admission stay at the previous size, 65,536 × 4 keys (Driver::DrawKeySightingKeys(), sized from min(entries, 65536)). Sizing them from the larger cap, as the first version of this PR did, admitted far more one-off draws: on Trails in the Sky the 2nd Chapter the cache then sat at its byte budget (~106,500 entries) and inserted up to ~75 % more entries per 10 s, which cost ~5 % of frames.

#21467 raised the default from 4096 to 65536 for the same reason on Anger Foot. Snoopy and the Great Mystery Club (PPSA28795) now overflows 65536: in its backyard scene the cache is pinned at 65,536 entries while holding ~149 MiB of its budget, and it evicts ~110,000 entries per 10 s that would be hit again. Only 5-10 % of lookups hit, and about half of all draws then pay Driver.Draw.shader_compile_and_link (~29 µs each, ~34 ms per frame) on a queue worker that is 99 % busy. The measurements are in #26586.

agc_driver_draw_cache_capacity keeps its 4352-draw reuse case unchanged and adds DefaultEntryCapExceedsThePreviousOne: with APS5_DRAW_CACHE_ENTRIES unset, it requires the default cap from the now-public Driver::DrawCacheEntries() (renamed from the private drawCacheEntries()) to be 262,144, and the sighting tables to hold 65,536 × 4 keys, above the previous 65,536. An earlier version instead inserted 70,000 distinct draws and checked that none were evicted. It held but took about 60 s under the validation layer on an RTX 4070, over the 30 s test limit, so it was replaced. Its results are kept below.

Tested

Current head 8c0d924948 (rebased onto main 7c44e0ba9d, sighting tables kept at the previous size), RX 6700 XT, Windows: agc_driver_draw_cache_capacity passes 3 of 3 under VK_LAYER_KHRONOS_validation 1.4.363 (6 insertions, 0 VUID-). Speed below for this head was measured on main 7c44e0ba9d with the same change applied (min(entries, 65536) sighting tables), arms differing only in the library set and APS5_DRAW_CACHE_ENTRIES (65536 on main, 262144 on the change), one unmeasured warm-up per set, alternating runs, APS5_TRACE_SECONDS only:

title main presents / 20 s this head main p50 this head p50
Snoopy (PPSA28795) backyard, 180 s route 227, 243 317, 316 88.6, 81.3 ms 62.4, 62.7 ms
Trails in the Sky the 2nd Chapter (PPSA35169) field, 400 s 470, 469 481, 477 42.6, 42.7 ms 42.0, 42.5 ms

The measurements from here down are for the first version (sighting tables sized from 262144).

Windows 11 Enterprise 22621, Ryzen 9 5950X, RX 6700 XT (AMD 26.11.2), WinLibs GCC 15.2 UCRT r7, Release. main c5c9134731 and this branch 6ca1d5633b built in the same tree.

agc_driver_draw_cache_capacity (current test, head 7e01571ddc), Linux 7.3.5, GCC 16.2.1, Release, RX 7900 XTX, with the Khronos validation layer inserted: passes 3 of 3 runs in 5.3 to 6.0 s, with 0 VUID and 0 SYNC messages. With main's 65,536 default restored in DrawCache.cpp it fails with the default draw cache entry cap is 65536, not 262144.

Earlier 70,000-draw test (head 6ca1d5633b): passed 3 of 3 runs with this change (25.2 s each). With main's DrawCache.cpp it failed 3 of 3 with sighting and inserting 70000 more distinct draws evicted 6814 entries (6974 and 6861 in the other runs). @cozejarr's RTX 4070 run reproduced both: about 6,900 evictions on main and a pass on this branch.

Speed, Snoopy (PPSA28795) backyard. Standard 180 s route with scripted input, title relinked once, arms differ only in the libraries. Only APS5_TRACE_SECONDS=100:20 was set, no other trace or profile switch. The order was main, PR, PR, main, and every run reached the cap.

Run Build Presents (20 s) Frame p50 / p90 / p99 (ms) GPU busy per present (ms)
1 main 230 87.2 / 91.4 / 101.0 41.6
2 this PR 297 67.1 / 71.3 / 74.0 31.6
3 this PR 286 69.8 / 73.8 / 79.0 32.1
4 main 230 87.1 / 90.9 / 98.1 44.1
mean main 230.0 87.2 / 91.1 / 99.5 42.8
mean this PR 291.5 68.4 / 72.6 / 76.5 31.9

+27 % presents, and every run with this change is faster than every main run.

Other titles, same machine, measured with APS5_DRAW_CACHE_ENTRIES=262144 on a main binary (equivalent to this change):

  • Another Crab's Treasure (PPSA20423), beach: most likely a few percent slower. 4 runs per side gave a mean p50 of 87.9 ms against 90.5 ms (two default runs alone were 13 ms apart), and 3 more per side on main bd9a6c00a6 gave 88.7 against 94.0 ms (details). Neither set separates on its own, but both point the same way.
  • Spirit of the Island (PPSA13934), island: already at the 60 Hz cap (p50 16.7 ms), no change.
  • Trails in the Sky the 2nd Chapter (PPSA35169), field: about 5 % slower with the first version (472/465 against 448/443 presents per 20 s, details). The cause was the sighting tables growing with the cap (analysis); with them kept at the previous size the current head is about 2 % faster there (table above).
aps5-summary.jsonl, run 1 (main)
{"commit":"c5c9134731cb","dirty":false,"env":{"APS5_PAD_INPUT_FILE":"<path>","APS5_PLAYGO_UNLISTED_CHUNKS":"installed","APS5_TRACE_DIR":"<path>","APS5_TRACE_SECONDS":"100:20"},"gpu":"AMD Radeon RX 6700 XT","driver":"AMD proprietary driver 26.11.2 (AMD proprietary shader compiler)","os":"Windows 10.0.22621","cpu":"AMD Ryzen 9 5950X 16-Core Processor","cpu_threads":32,"memory_mib":65457,"title_id":"PPSA28795","title":"Snoopy & The Great Mystery Club","content_version":"01.000.002","resolution":"1920x1080","window":{"spec":"seconds 100:20","first_present":2144,"ms":20058.295},"presents":230,"frame_ms":{"p50":87.203,"p90":91.364,"p99":101.042,"max":103.419},"gpu_busy_ms_per_present":41.608,"worker_busy_pct":{"queue worker 0x0":98.758},"phase_totals_ms":{"Driver.Completion":0.401,"Driver.Dispatch":160.068,"Driver.Dispatch.capture_resources":0.103,"Driver.Dispatch.decode_key_device_setup":25.686,"Driver.Dispatch.lookup_cache":2.898,"Driver.Dispatch.materialize":0.022,"Driver.Dispatch.prepared_invocation":0.016,"Driver.Draw":15314.529,"Driver.Draw.device_setup":4879.851,"Driver.Draw.draw_enqueued":1263.311,"Driver.Draw.post_compile_prepare":153.861,"Driver.Draw.prepare":996.721,"Driver.Draw.shader_compile_and_link":7388.428,"Driver.EndSubmission":0.190,"Driver.Packet":19808.628,"Driver.Packet.device_lock":66.761,"Driver.Packet.dispatch":162.120,"Driver.Packet.draw":15446.057,"Driver.Packet.execute":259.995,"Driver.Packet.flip_flush":0.362,"Driver.Packet.flush_between_packets":138.498,"Driver.Packet.memory_wait":0.007,"Driver.Packet.pipeline_drain":3450.700,"Driver.Packet.pipeline_prepare":104.935,"Driver.Packet.prepare_memory":96.671,"Driver.Packet.rendering_wait":0.289,"Driver.Present":122.845,"Driver.Present.acquire_image":57.777,"Driver.Present.device_setup":0.126,"Driver.Present.gpu_mutex_wait":4.074,"Driver.Present.inflight_wait":0.604,"Driver.Present.present_display_buffer":21.535,"Driver.Present.queue_present":34.421,"Driver.Present.release_and_callback":0.228,"Driver.Present.render_fence_wait":3.417,"Driver.Present.resize":0.406,"Driver.Present.validate":0.112,"Driver.Suspend":0.030,"GpuMutex.wait.dispatch":0.842,"GpuMutex.wait.draw":1.663,"GpuMutex.wait.end":0.470,"GpuMutex.wait.fill":85.506,"GpuMutex.wait.flush":0.623,"GpuMutex.wait.label":10.064,"GpuMutex.wait.present":3.359,"Graphics.Draw":9799.335,"Graphics.Draw.draw_and_resource_release":8143.190,"Graphics.Draw.index_upload":360.849,"Graphics.Draw.validate":717.638,"Graphics.Draw.vertex_upload":474.228,"Graphics.DrawWithRecipe":75.168,"Graphics.DrawWithRecipe.draw_and_resource_release":60.856,"Graphics.DrawWithRecipe.index_upload":4.213,"Graphics.DrawWithRecipe.validate":3.600,"Graphics.DrawWithRecipe.vertex_upload":5.466,"Recorder.Reap":32.827,"Recorder.Submit":120.633,"Recorder.Sync":3359.830,"Resources.Complete":13.848,"Resources.Prepare":1.755,"Shader.DrawStage":3842.211,"Shader.DrawStage.capture_resources":2141.988,"Shader.DrawStage.materialize":992.223,"Shader.DrawStage.prepared_invocation":653.667,"Shader.ResolveAbi":127.637,"Shader.ResolveGraphicsAbi":52.456,"Shader.ResolveGraphicsStagesAbi":112.796,"VideoOut.Flip":135.142,"VideoOut.Flip.completion_mutex_wait":0.252,"VideoOut.Flip.config_mutex_wait":0.031,"VideoOut.Flip.frame_limit":0.155,"VideoOut.Flip.notify_game":12.902,"VideoOut.Flip.present":119.219,"VideoOut.Flip.validate":0.343,"VideoOut.Flip.vblank_wait":0.223,"VideoOut.Flip.window_prepare":0.418,"VideoOut.Flip.window_title":1.325,"VideoOut.Readiness":0.624,"VideoOut.Readiness.locks_validate":0.238,"Vulkan.Acquire":57.489,"Vulkan.Acquire.acquire_fence_wait":30.657,"Vulkan.Acquire.acquire_image":25.728,"Vulkan.Acquire.fence_reset":0.643,"Vulkan.Acquire.retired_swapchains":0.343,"Vulkan.Dispatch":19.178,"Vulkan.Dispatch.command_record":6.446,"Vulkan.Dispatch.shader_resources":12.553,"Vulkan.DispatchRecipe":6.911,"Vulkan.DispatchRecipe.command_record":6.813,"Vulkan.DrawFromRecipe":76.960,"Vulkan.Present":12.424,"Vulkan.Present.command_record_scale":6.925,"Vulkan.Present.pixel_upload":0.547,"Vulkan.Present.queue_submit":4.780,"Vulkan.QueuePresent":34.002,"Vulkan.QueuePresent.queue_present":33.567,"Vulkan.Retire":3.355,"Vulkan.Retire.wait":2.190},"top_phases_ms_per_frame":{"Driver.Packet":86.124,"Driver.Packet.draw":67.157,"Driver.Draw":66.585,"Graphics.Draw":42.606,"Graphics.Draw.draw_and_resource_release":35.405,"Driver.Draw.shader_compile_and_link":32.124,"Driver.Draw.device_setup":21.217,"Shader.DrawStage":16.705},"owned_draw_counts":{},"graphics_track":{"Graphics.Barrier.dcc-clear":3680,"Graphics.Barrier.dcc-keys":2618,"Graphics.Barrier.dispatch-lead":690,"Graphics.Barrier.dispatch-trail":920,"Graphics.Barrier.draw":25294,"Graphics.Barrier.fill":3680,"Graphics.Barrier.label-run":12910,"Graphics.Barrier.present-blit":920,"Graphics.Barrier.staging-in":1610,"Graphics.Barrier.staging-out":690,"Graphics.Barrier.storage-writeback":5799,"Graphics.BarrierMerged.dispatch-lead":230,"Graphics.BarrierMerged.fill":1840,"Graphics.BarrierMerged.staging-in":460,"Graphics.BarrierMerged.staging-out":690,"Graphics.BarrierMerged.storage-writeback":1561,"Graphics.Copy":1840,"Graphics.Copy.bytes":384004320,"Graphics.RenderPass":9651,"Graphics.RenderPass.Close.command":4353,"Graphics.RenderPass.Close.image":2040,"Graphics.RenderPass.Close.key":451,"Graphics.RenderPass.Close.new-batch":2807,"Graphics.RenderPass.Continued":486621},"trace_dropped":true,"trace_dropped_threads":{"queue worker 0x0":{"events_full_after_s":6.007,"events_lost":614596,"totals_full":false}},"trace":"aps5-trace-c5c9134731cb-259608.json.gz"}
aps5-summary.jsonl, run 2 (this PR)
{"commit":"6ca1d5633b9e","dirty":false,"env":{"APS5_PAD_INPUT_FILE":"<path>","APS5_PLAYGO_UNLISTED_CHUNKS":"installed","APS5_TRACE_DIR":"<path>","APS5_TRACE_SECONDS":"100:20"},"gpu":"AMD Radeon RX 6700 XT","driver":"AMD proprietary driver 26.11.2 (AMD proprietary shader compiler)","os":"Windows 10.0.22621","cpu":"AMD Ryzen 9 5950X 16-Core Processor","cpu_threads":32,"memory_mib":65457,"title_id":"PPSA28795","title":"Snoopy & The Great Mystery Club","content_version":"01.000.002","resolution":"1920x1080","window":{"spec":"seconds 100:20","first_present":2254,"ms":20058.019},"presents":297,"frame_ms":{"p50":67.063,"p90":71.287,"p99":74.000,"max":74.631},"gpu_busy_ms_per_present":31.615,"worker_busy_pct":{"queue worker 0x0":98.496},"phase_totals_ms":{"Driver.Completion":0.454,"Driver.Dispatch":159.468,"Driver.Dispatch.capture_resources":0.274,"Driver.Dispatch.decode_key_device_setup":32.591,"Driver.Dispatch.lookup_cache":3.700,"Driver.Dispatch.materialize":0.057,"Driver.Dispatch.prepared_invocation":0.042,"Driver.Draw":13898.723,"Driver.Draw.device_setup":6356.890,"Driver.Draw.draw_enqueued":2116.942,"Driver.Draw.post_compile_prepare":134.784,"Driver.Draw.prepare":1003.337,"Driver.Draw.shader_compile_and_link":3512.897,"Driver.EndSubmission":0.236,"Driver.Packet":19755.691,"Driver.Packet.device_lock":86.182,"Driver.Packet.dispatch":161.917,"Driver.Packet.draw":14026.376,"Driver.Packet.execute":293.291,"Driver.Packet.flip_flush":0.448,"Driver.Packet.flush_between_packets":164.195,"Driver.Packet.memory_wait":0.004,"Driver.Packet.pipeline_drain":4663.766,"Driver.Packet.pipeline_prepare":124.317,"Driver.Packet.prepare_memory":109.154,"Driver.Packet.rendering_wait":0.370,"Driver.Present":160.639,"Driver.Present.acquire_image":75.840,"Driver.Present.device_setup":0.149,"Driver.Present.gpu_mutex_wait":8.847,"Driver.Present.inflight_wait":0.788,"Driver.Present.present_display_buffer":27.707,"Driver.Present.queue_present":43.484,"Driver.Present.release_and_callback":0.291,"Driver.Present.render_fence_wait":2.672,"Driver.Present.resize":0.529,"Driver.Present.validate":0.148,"Driver.Suspend":0.043,"GpuMutex.wait.dispatch":0.249,"GpuMutex.wait.draw":3.146,"GpuMutex.wait.end":0.609,"GpuMutex.wait.fill":64.390,"GpuMutex.wait.flush":0.292,"GpuMutex.wait.label":11.502,"GpuMutex.wait.present":7.929,"Graphics.Draw":6346.418,"Graphics.Draw.draw_and_resource_release":5651.637,"Graphics.Draw.index_upload":142.370,"Graphics.Draw.validate":305.485,"Graphics.Draw.vertex_upload":199.999,"Graphics.DrawWithRecipe":4492.204,"Graphics.DrawWithRecipe.draw_and_resource_release":3628.481,"Graphics.DrawWithRecipe.index_upload":252.543,"Graphics.DrawWithRecipe.validate":219.696,"Graphics.DrawWithRecipe.vertex_upload":330.132,"Recorder.Reap":38.421,"Recorder.Submit":137.931,"Recorder.Sync":4553.971,"Resources.Complete":17.828,"Resources.Prepare":2.185,"Shader.DrawStage":1423.172,"Shader.DrawStage.capture_resources":926.006,"Shader.DrawStage.materialize":292.421,"Shader.DrawStage.prepared_invocation":190.431,"Shader.ResolveAbi":169.577,"Shader.ResolveGraphicsAbi":77.550,"Shader.ResolveGraphicsStagesAbi":150.437,"VideoOut.Flip":166.259,"VideoOut.Flip.completion_mutex_wait":0.313,"VideoOut.Flip.config_mutex_wait":0.041,"VideoOut.Flip.frame_limit":0.198,"VideoOut.Flip.notify_game":10.758,"VideoOut.Flip.present":151.740,"VideoOut.Flip.validate":0.489,"VideoOut.Flip.vblank_wait":0.292,"VideoOut.Flip.window_prepare":0.551,"VideoOut.Flip.window_title":1.558,"VideoOut.Readiness":0.817,"VideoOut.Readiness.locks_validate":0.291,"Vulkan.Acquire":75.454,"Vulkan.Acquire.acquire_fence_wait":40.592,"Vulkan.Acquire.acquire_image":33.372,"Vulkan.Acquire.fence_reset":0.848,"Vulkan.Acquire.retired_swapchains":0.478,"Vulkan.Dispatch":24.990,"Vulkan.Dispatch.command_record":8.475,"Vulkan.Dispatch.shader_resources":16.280,"Vulkan.DispatchRecipe":9.006,"Vulkan.DispatchRecipe.command_record":8.888,"Vulkan.DrawFromRecipe":4617.428,"Vulkan.Present":16.152,"Vulkan.Present.command_record_scale":8.915,"Vulkan.Present.pixel_upload":0.763,"Vulkan.Present.queue_submit":6.253,"Vulkan.QueuePresent":42.928,"Vulkan.QueuePresent.queue_present":42.378,"Vulkan.Retire":2.610,"Vulkan.Retire.wait":1.304},"top_phases_ms_per_frame":{"Driver.Packet":66.517,"Driver.Packet.draw":47.227,"Driver.Draw":46.797,"Driver.Draw.device_setup":21.404,"Graphics.Draw":21.368,"Graphics.Draw.draw_and_resource_release":19.029,"Driver.Packet.pipeline_drain":15.703,"Vulkan.DrawFromRecipe":15.547},"owned_draw_counts":{},"graphics_track":{"Graphics.Barrier.dcc-clear":4752,"Graphics.Barrier.dcc-keys":2446,"Graphics.Barrier.dispatch-lead":891,"Graphics.Barrier.dispatch-trail":1188,"Graphics.Barrier.draw":32435,"Graphics.Barrier.fill":4752,"Graphics.Barrier.label-run":15777,"Graphics.Barrier.present-blit":1188,"Graphics.Barrier.staging-in":2079,"Graphics.Barrier.staging-out":891,"Graphics.Barrier.storage-writeback":7363,"Graphics.BarrierMerged.dispatch-lead":297,"Graphics.BarrierMerged.fill":2376,"Graphics.BarrierMerged.staging-in":594,"Graphics.BarrierMerged.staging-out":891,"Graphics.BarrierMerged.storage-writeback":2141,"Graphics.Copy":2376,"Graphics.Copy.bytes":495866448,"Graphics.RenderPass":12474,"Graphics.RenderPass.Close.command":5552,"Graphics.RenderPass.Close.image":2908,"Graphics.RenderPass.Close.key":594,"Graphics.RenderPass.Close.new-batch":3420,"Graphics.RenderPass.Continued":628364},"trace_dropped":true,"trace_dropped_threads":{"queue worker 0x0":{"events_full_after_s":8.104,"events_lost":389056,"totals_full":false}},"trace":"aps5-trace-6ca1d5633b9e-268596.json.gz"}
tools/trace_digest.py --top 6, run 1 (main)

seconds 100:20 from present 2144: 230 presents, frame p50 87.2 / p90 91.4 / p99 101.0 / max 103.4 ms, GPU busy 41.6 ms per present
AMD Radeon RX 6700 XT, AMD proprietary driver 26.11.2 (AMD proprietary shader compiler), Windows 10.0.22621, 1920x1080, commit c5c9134731, dropped: yes

{"commit":"c5c9134731cb","dirty":false,"env":{"APS5_PAD_INPUT_FILE":"<path>","APS5_PLAYGO_UNLISTED_CHUNKS":"installed","APS5_TRACE_DIR":"<path>","APS5_TRACE_SECONDS":"100:20"},"gpu":"AMD Radeon RX 6700 XT","driver":"AMD proprietary driver 26.11.2 (AMD proprietary shader compiler)","os":"Windows 10.0.22621","cpu":"AMD Ryzen 9 5950X 16-Core Processor","cpu_threads":32,"memory_mib":65457,"title_id":"PPSA28795","title":"Snoopy & The Great Mystery Club","content_version":"01.000.002","resolution":"1920x1080","window":{"spec":"seconds 100:20","first_present":2144,"ms":20058.295},"presents":230,"frame_ms":{"p50":87.203,"p90":91.364,"p99":101.042,"max":103.419},"gpu_busy_ms_per_present":41.608,"worker_busy_pct":{"queue worker 0x0":98.758},"phase_totals_ms":{"Driver.Completion":0.401,"Driver.Dispatch":160.068,"Driver.Dispatch.capture_resources":0.103,"Driver.Dispatch.decode_key_device_setup":25.686,"Driver.Dispatch.lookup_cache":2.898,"Driver.Dispatch.materialize":0.022,"Driver.Dispatch.prepared_invocation":0.016,"Driver.Draw":15314.529,"Driver.Draw.device_setup":4879.851,"Driver.Draw.draw_enqueued":1263.311,"Driver.Draw.post_compile_prepare":153.861,"Driver.Draw.prepare":996.721,"Driver.Draw.shader_compile_and_link":7388.428,"Driver.EndSubmission":0.19,"Driver.Packet":19808.628,"Driver.Packet.device_lock":66.761,"Driver.Packet.dispatch":162.12,"Driver.Packet.draw":15446.057,"Driver.Packet.execute":259.995,"Driver.Packet.flip_flush":0.362,"Driver.Packet.flush_between_packets":138.498,"Driver.Packet.memory_wait":0.007,"Driver.Packet.pipeline_drain":3450.7,"Driver.Packet.pipeline_prepare":104.935,"Driver.Packet.prepare_memory":96.671,"Driver.Packet.rendering_wait":0.289,"Driver.Present":122.845,"Driver.Present.acquire_image":57.777,"Driver.Present.device_setup":0.126,"Driver.Present.gpu_mutex_wait":4.074,"Driver.Present.inflight_wait":0.604,"Driver.Present.present_display_buffer":21.535,"Driver.Present.queue_present":34.421,"Driver.Present.release_and_callback":0.228,"Driver.Present.render_fence_wait":3.417,"Driver.Present.resize":0.406,"Driver.Present.validate":0.112,"Driver.Suspend":0.03,"GpuMutex.wait.dispatch":0.842,"GpuMutex.wait.draw":1.663,"GpuMutex.wait.end":0.47,"GpuMutex.wait.fill":85.506,"GpuMutex.wait.flush":0.623,"GpuMutex.wait.label":10.064,"GpuMutex.wait.present":3.359,"Graphics.Draw":9799.335,"Graphics.Draw.draw_and_resource_release":8143.19,"Graphics.Draw.index_upload":360.849,"Graphics.Draw.validate":717.638,"Graphics.Draw.vertex_upload":474.228,"Graphics.DrawWithRecipe":75.168,"Graphics.DrawWithRecipe.draw_and_resource_release":60.856,"Graphics.DrawWithRecipe.index_upload":4.213,"Graphics.DrawWithRecipe.validate":3.6,"Graphics.DrawWithRecipe.vertex_upload":5.466,"Recorder.Reap":32.827,"Recorder.Submit":120.633,"Recorder.Sync":3359.83,"Resources.Complete":13.848,"Resources.Prepare":1.755,"Shader.DrawStage":3842.211,"Shader.DrawStage.capture_resources":2141.988,"Shader.DrawStage.materialize":992.223,"Shader.DrawStage.prepared_invocation":653.667,"Shader.ResolveAbi":127.637,"Shader.ResolveGraphicsAbi":52.456,"Shader.ResolveGraphicsStagesAbi":112.796,"VideoOut.Flip":135.142,"VideoOut.Flip.completion_mutex_wait":0.252,"VideoOut.Flip.config_mutex_wait":0.031,"VideoOut.Flip.frame_limit":0.155,"VideoOut.Flip.notify_game":12.902,"VideoOut.Flip.present":119.219,"VideoOut.Flip.validate":0.343,"VideoOut.Flip.vblank_wait":0.223,"VideoOut.Flip.window_prepare":0.418,"VideoOut.Flip.window_title":1.325,"VideoOut.Readiness":0.624,"VideoOut.Readiness.locks_validate":0.238,"Vulkan.Acquire":57.489,"Vulkan.Acquire.acquire_fence_wait":30.657,"Vulkan.Acquire.acquire_image":25.728,"Vulkan.Acquire.fence_reset":0.643,"Vulkan.Acquire.retired_swapchains":0.343,"Vulkan.Dispatch":19.178,"Vulkan.Dispatch.command_record":6.446,"Vulkan.Dispatch.shader_resources":12.553,"Vulkan.DispatchRecipe":6.911,"Vulkan.DispatchRecipe.command_record":6.813,"Vulkan.DrawFromRecipe":76.96,"Vulkan.Present":12.424,"Vulkan.Present.command_record_scale":6.925,"Vulkan.Present.pixel_upload":0.547,"Vulkan.Present.queue_submit":4.78,"Vulkan.QueuePresent":34.002,"Vulkan.QueuePresent.queue_present":33.567,"Vulkan.Retire":3.355,"Vulkan.Retire.wait":2.19},"top_phases_ms_per_frame":{"Driver.Packet":86.124,"Driver.Packet.draw":67.157,"Driver.Draw":66.585,"Graphics.Draw":42.606,"Graphics.Draw.draw_and_resource_release":35.405,"Driver.Draw.shader_compile_and_link":32.124,"Driver.Draw.device_setup":21.217,"Shader.DrawStage":16.705},"owned_draw_counts":{},"graphics_track":{"Graphics.Barrier.dcc-clear":3680,"Graphics.Barrier.dcc-keys":2618,"Graphics.Barrier.dispatch-lead":690,"Graphics.Barrier.dispatch-trail":920,"Graphics.Barrier.draw":25294,"Graphics.Barrier.fill":3680,"Graphics.Barrier.label-run":12910,"Graphics.Barrier.present-blit":920,"Graphics.Barrier.staging-in":1610,"Graphics.Barrier.staging-out":690,"Graphics.Barrier.storage-writeback":5799,"Graphics.BarrierMerged.dispatch-lead":230,"Graphics.BarrierMerged.fill":1840,"Graphics.BarrierMerged.staging-in":460,"Graphics.BarrierMerged.staging-out":690,"Graphics.BarrierMerged.storage-writeback":1561,"Graphics.Copy":1840,"Graphics.Copy.bytes":384004320,"Graphics.RenderPass":9651,"Graphics.RenderPass.Close.command":4353,"Graphics.RenderPass.Close.image":2040,"Graphics.RenderPass.Close.key":451,"Graphics.RenderPass.Close.new-batch":2807,"Graphics.RenderPass.Continued":486621},"trace_dropped":true,"trace_dropped_threads":{"queue worker 0x0":{"events_full_after_s":6.007,"events_lost":614596,"totals_full":false}},"trace":"aps5-trace-c5c9134731cb-259608.json.gz"}

Incomplete trace: recorded data was lost. Slice-based timings, waits and batch inventories cover retained events only; missing slices are not idle time. Summary statistics are reported separately.

  • queue worker 0x0: 614596 events lost; buffer full at 6006.7 ms; over the 67 of 230 frames that ended before it: busy 67.6 ms per frame (76 %), wait 0.4, largest Driver.Packet 68.0, Vulkan.Dispatch 0.0 (the thread table divides the retained slices by every frame)

Slowest frames (largest slices inside each, inclusive)

  • present 2174: 103.4 ms at 2663 ms: Driver.Packet (queue worker 0x0) 83.4, batch (gpu) 62.5, Driver.Packet.draw (queue worker 0x0) 50.6, Driver.Draw (queue worker 0x0) 50.0
  • present 2206: 101.6 ms at 5483 ms: Driver.Packet (queue worker 0x0) 80.5, batch (gpu) 60.9, Driver.Packet.draw (queue worker 0x0) 48.6, Driver.Draw (queue worker 0x0) 48.0
  • present 2207: 101.0 ms at 5585 ms: Driver.Packet (queue worker 0x0) 80.9, batch (gpu) 65.7, Driver.Packet.draw (queue worker 0x0) 49.2, Driver.Draw (queue worker 0x0) 48.5
  • present 2244: 94.7 ms at 8751 ms: batch (gpu) 60.1, Recorder.Sync (draw committer) 29.2, Graphics.Draw (draw committer) 18.8, Graphics.Draw.draw_and_resource_release (draw committer) 15.3
  • present 2153: 93.9 ms at 804 ms: Driver.Packet (queue worker 0x0) 73.9, Driver.Packet.draw (queue worker 0x0) 57.1, Driver.Draw (queue worker 0x0) 56.2, batch (gpu) 40.2

Persistent spikes (frame time above the fastest frame that separates it from a longer frame; one entry per stall, not per frame)

  • present 2174: 103.4 ms at 2663 ms, persistence 28.3 ms
  • present 2244: 94.7 ms at 8751 ms, persistence 19.6 ms
  • present 2206: 101.6 ms at 5483 ms, persistence 18.3 ms
  • present 2363: 93.4 ms at 19077 ms, persistence 17.3 ms
  • present 2278: 92.3 ms at 11708 ms, persistence 13.4 ms
  • present 2316: 92.8 ms at 14999 ms, persistence 10.8 ms

Threads (ms per frame)

thread busy wait untraced in slices < 20 us largest
queue worker 0x0 19.9 (23 %) 0.1 (0 %) 67.2 37.3 Driver.Packet 20.0, Vulkan.Dispatch 0.0
draw committer 34.9 (40 %) 0.0 (0 %) 52.2 50.0 Graphics.Draw 19.9, Recorder.Sync 14.6
presenter 0.5 (1 %) 0.2 (0 %) 86.6 0.1 VideoOut.Flip 0.6, Driver.Present 0.0
title 0.0 (0 %) 0.0 (0 %) 87.2 0.2 Shader.ResolveGraphicsStagesAbi 0.0, Shader.ResolveAbi 0.0
title 0.0 (0 %) 0.0 (0 %) 87.2 0.1 Shader.ResolveAbi 0.0, Shader.ResolveGraphicsStagesAbi 0.0
title 0.0 (0 %) 0.0 (0 %) 87.2 0.1 Shader.ResolveAbi 0.0, Shader.ResolveGraphicsStagesAbi 0.0
title 0.0 (0 %) 0.0 (0 %) 87.2 0.1 Shader.ResolveAbi 0.0, Shader.ResolveGraphicsStagesAbi 0.0
title 0.0 (0 %) 0.0 (0 %) 87.2 0.1 Shader.ResolveAbi 0.0, Shader.ResolveGraphicsStagesAbi 0.0
title 0.0 (0 %) 0.0 (0 %) 87.2 0.1 Shader.ResolveAbi 0.0, Shader.ResolveGraphicsStagesAbi 0.0
title 0.0 (0 %) 0.0 (0 %) 87.2 0.1 Shader.ResolveAbi 0.0, Shader.ResolveGraphicsStagesAbi 0.0
title 0.0 (0 %) 0.0 (0 %) 87.2 0.1 Shader.ResolveAbi 0.0, Shader.ResolveGraphicsStagesAbi 0.0
title 0.0 (0 %) 0.0 (0 %) 87.2 0.0 Shader.ResolveAbi 0.0, Shader.ResolveGraphicsStagesAbi 0.0
title 0.0 (0 %) 0.0 (0 %) 87.2 0.0 Shader.ResolveAbi 0.0, Shader.ResolveGraphicsStagesAbi 0.0
title 0.0 (0 %) 0.0 (0 %) 87.2 0.0 Shader.ResolveAbi 0.0, Shader.ResolveGraphicsStagesAbi 0.0
title 0.0 (0 %) 0.0 (0 %) 87.2 0.1 Shader.ResolveAbi 0.0, Shader.ResolveGraphicsStagesAbi 0.0
title 0.0 (0 %) 0.0 (0 %) 87.2 0.1 Shader.ResolveGraphicsStagesAbi 0.0, Shader.ResolveAbi 0.0
title 0.0 (0 %) 0.0 (0 %) 87.2 0.1 Shader.ResolveAbi 0.0, Shader.ResolveGraphicsStagesAbi 0.0
gpu 41.6 (48 %) 0.0 (0 %) 45.6 0.0 batch 41.6

Largest slices (ms per frame, inclusive, all threads): batch 41.6, Driver.Packet 20.0, Graphics.Draw 19.9, Graphics.Draw.draw_and_resource_release 15.7, Driver.Packet.draw 15.1, Driver.Draw 14.9

Longest waits

  • Driver.Present.gpu_mutex_wait (presenter) 2.5 ms at 1 ms, present 2144
  • Driver.Present.render_fence_wait (presenter) 1.6 ms at 4 ms, present 2144
  • Vulkan.Acquire.acquire_fence_wait (presenter) 0.2 ms at 18292 ms, present 2354
  • Vulkan.Acquire.acquire_fence_wait (presenter) 0.2 ms at 13627 ms, present 2300
  • Vulkan.Acquire.acquire_fence_wait (presenter) 0.2 ms at 8240 ms, present 2238
  • Vulkan.Acquire.acquire_fence_wait (presenter) 0.2 ms at 3557 ms, present 2184

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

  • batch 697: 33.0 ms at 2728 ms, present 2174: GPU no ranges; recorded by Graphics.Draw (draw committer) 4.0, Graphics.Draw.draw_and_resource_release (draw committer) 3.0, Recorder.Reap (draw committer) 0.1, Recorder.Submit (draw committer) 0.0
  • batch 1423: 33.0 ms at 5547 ms, present 2206: GPU no ranges; recorded by Graphics.Draw (draw committer) 3.9, Graphics.Draw.draw_and_resource_release (draw committer) 3.0, Recorder.Reap (draw committer) 0.1, Recorder.Submit (draw committer) 0.0
  • batch 1446: 32.7 ms at 5648 ms, present 2207: GPU no ranges; recorded by Graphics.Draw (draw committer) 3.9, Graphics.Draw.draw_and_resource_release (draw committer) 3.0, Recorder.Reap (draw committer) 0.1, Recorder.Submit (draw committer) 0.0
  • batch 2275: 31.7 ms at 8809 ms, present 2244: GPU no ranges; recorded by Graphics.Draw (draw committer) 3.9, Graphics.Draw.draw_and_resource_release (draw committer) 3.0, Recorder.Reap (draw committer) 0.1, Recorder.Submit (draw committer) 0.0
  • batch 605: 19.7 ms at 2371 ms, present 2170: GPU no ranges; recorded by Graphics.Draw (draw committer) 4.5, Graphics.Draw.draw_and_resource_release (draw committer) 3.2, Recorder.Reap (draw committer) 0.1, Recorder.Submit (draw committer) 0.0
tools/trace_digest.py --top 6, run 2 (this PR)

seconds 100:20 from present 2254: 297 presents, frame p50 67.1 / p90 71.3 / p99 74.0 / max 74.6 ms, GPU busy 31.6 ms per present
AMD Radeon RX 6700 XT, AMD proprietary driver 26.11.2 (AMD proprietary shader compiler), Windows 10.0.22621, 1920x1080, commit 6ca1d5633b9e, dropped: yes

{"commit":"6ca1d5633b9e","dirty":false,"env":{"APS5_PAD_INPUT_FILE":"<path>","APS5_PLAYGO_UNLISTED_CHUNKS":"installed","APS5_TRACE_DIR":"<path>","APS5_TRACE_SECONDS":"100:20"},"gpu":"AMD Radeon RX 6700 XT","driver":"AMD proprietary driver 26.11.2 (AMD proprietary shader compiler)","os":"Windows 10.0.22621","cpu":"AMD Ryzen 9 5950X 16-Core Processor","cpu_threads":32,"memory_mib":65457,"title_id":"PPSA28795","title":"Snoopy & The Great Mystery Club","content_version":"01.000.002","resolution":"1920x1080","window":{"spec":"seconds 100:20","first_present":2254,"ms":20058.019},"presents":297,"frame_ms":{"p50":67.063,"p90":71.287,"p99":74.0,"max":74.631},"gpu_busy_ms_per_present":31.615,"worker_busy_pct":{"queue worker 0x0":98.496},"phase_totals_ms":{"Driver.Completion":0.454,"Driver.Dispatch":159.468,"Driver.Dispatch.capture_resources":0.274,"Driver.Dispatch.decode_key_device_setup":32.591,"Driver.Dispatch.lookup_cache":3.7,"Driver.Dispatch.materialize":0.057,"Driver.Dispatch.prepared_invocation":0.042,"Driver.Draw":13898.723,"Driver.Draw.device_setup":6356.89,"Driver.Draw.draw_enqueued":2116.942,"Driver.Draw.post_compile_prepare":134.784,"Driver.Draw.prepare":1003.337,"Driver.Draw.shader_compile_and_link":3512.897,"Driver.EndSubmission":0.236,"Driver.Packet":19755.691,"Driver.Packet.device_lock":86.182,"Driver.Packet.dispatch":161.917,"Driver.Packet.draw":14026.376,"Driver.Packet.execute":293.291,"Driver.Packet.flip_flush":0.448,"Driver.Packet.flush_between_packets":164.195,"Driver.Packet.memory_wait":0.004,"Driver.Packet.pipeline_drain":4663.766,"Driver.Packet.pipeline_prepare":124.317,"Driver.Packet.prepare_memory":109.154,"Driver.Packet.rendering_wait":0.37,"Driver.Present":160.639,"Driver.Present.acquire_image":75.84,"Driver.Present.device_setup":0.149,"Driver.Present.gpu_mutex_wait":8.847,"Driver.Present.inflight_wait":0.788,"Driver.Present.present_display_buffer":27.707,"Driver.Present.queue_present":43.484,"Driver.Present.release_and_callback":0.291,"Driver.Present.render_fence_wait":2.672,"Driver.Present.resize":0.529,"Driver.Present.validate":0.148,"Driver.Suspend":0.043,"GpuMutex.wait.dispatch":0.249,"GpuMutex.wait.draw":3.146,"GpuMutex.wait.end":0.609,"GpuMutex.wait.fill":64.39,"GpuMutex.wait.flush":0.292,"GpuMutex.wait.label":11.502,"GpuMutex.wait.present":7.929,"Graphics.Draw":6346.418,"Graphics.Draw.draw_and_resource_release":5651.637,"Graphics.Draw.index_upload":142.37,"Graphics.Draw.validate":305.485,"Graphics.Draw.vertex_upload":199.999,"Graphics.DrawWithRecipe":4492.204,"Graphics.DrawWithRecipe.draw_and_resource_release":3628.481,"Graphics.DrawWithRecipe.index_upload":252.543,"Graphics.DrawWithRecipe.validate":219.696,"Graphics.DrawWithRecipe.vertex_upload":330.132,"Recorder.Reap":38.421,"Recorder.Submit":137.931,"Recorder.Sync":4553.971,"Resources.Complete":17.828,"Resources.Prepare":2.185,"Shader.DrawStage":1423.172,"Shader.DrawStage.capture_resources":926.006,"Shader.DrawStage.materialize":292.421,"Shader.DrawStage.prepared_invocation":190.431,"Shader.ResolveAbi":169.577,"Shader.ResolveGraphicsAbi":77.55,"Shader.ResolveGraphicsStagesAbi":150.437,"VideoOut.Flip":166.259,"VideoOut.Flip.completion_mutex_wait":0.313,"VideoOut.Flip.config_mutex_wait":0.041,"VideoOut.Flip.frame_limit":0.198,"VideoOut.Flip.notify_game":10.758,"VideoOut.Flip.present":151.74,"VideoOut.Flip.validate":0.489,"VideoOut.Flip.vblank_wait":0.292,"VideoOut.Flip.window_prepare":0.551,"VideoOut.Flip.window_title":1.558,"VideoOut.Readiness":0.817,"VideoOut.Readiness.locks_validate":0.291,"Vulkan.Acquire":75.454,"Vulkan.Acquire.acquire_fence_wait":40.592,"Vulkan.Acquire.acquire_image":33.372,"Vulkan.Acquire.fence_reset":0.848,"Vulkan.Acquire.retired_swapchains":0.478,"Vulkan.Dispatch":24.99,"Vulkan.Dispatch.command_record":8.475,"Vulkan.Dispatch.shader_resources":16.28,"Vulkan.DispatchRecipe":9.006,"Vulkan.DispatchRecipe.command_record":8.888,"Vulkan.DrawFromRecipe":4617.428,"Vulkan.Present":16.152,"Vulkan.Present.command_record_scale":8.915,"Vulkan.Present.pixel_upload":0.763,"Vulkan.Present.queue_submit":6.253,"Vulkan.QueuePresent":42.928,"Vulkan.QueuePresent.queue_present":42.378,"Vulkan.Retire":2.61,"Vulkan.Retire.wait":1.304},"top_phases_ms_per_frame":{"Driver.Packet":66.517,"Driver.Packet.draw":47.227,"Driver.Draw":46.797,"Driver.Draw.device_setup":21.404,"Graphics.Draw":21.368,"Graphics.Draw.draw_and_resource_release":19.029,"Driver.Packet.pipeline_drain":15.703,"Vulkan.DrawFromRecipe":15.547},"owned_draw_counts":{},"graphics_track":{"Graphics.Barrier.dcc-clear":4752,"Graphics.Barrier.dcc-keys":2446,"Graphics.Barrier.dispatch-lead":891,"Graphics.Barrier.dispatch-trail":1188,"Graphics.Barrier.draw":32435,"Graphics.Barrier.fill":4752,"Graphics.Barrier.label-run":15777,"Graphics.Barrier.present-blit":1188,"Graphics.Barrier.staging-in":2079,"Graphics.Barrier.staging-out":891,"Graphics.Barrier.storage-writeback":7363,"Graphics.BarrierMerged.dispatch-lead":297,"Graphics.BarrierMerged.fill":2376,"Graphics.BarrierMerged.staging-in":594,"Graphics.BarrierMerged.staging-out":891,"Graphics.BarrierMerged.storage-writeback":2141,"Graphics.Copy":2376,"Graphics.Copy.bytes":495866448,"Graphics.RenderPass":12474,"Graphics.RenderPass.Close.command":5552,"Graphics.RenderPass.Close.image":2908,"Graphics.RenderPass.Close.key":594,"Graphics.RenderPass.Close.new-batch":3420,"Graphics.RenderPass.Continued":628364},"trace_dropped":true,"trace_dropped_threads":{"queue worker 0x0":{"events_full_after_s":8.104,"events_lost":389056,"totals_full":false}},"trace":"aps5-trace-6ca1d5633b9e-268596.json.gz"}

Incomplete trace: recorded data was lost. Slice-based timings, waits and batch inventories cover retained events only; missing slices are not idle time. Summary statistics are reported separately.

  • queue worker 0x0: 389056 events lost; buffer full at 8103.6 ms; over the 119 of 297 frames that ended before it: busy 51.8 ms per frame (76 %), wait 0.2, largest Driver.Packet 51.9, Driver.Completion 0.0 (the thread table divides the retained slices by every frame)

Slowest frames (largest slices inside each, inclusive)

  • present 2427: 74.6 ms at 11672 ms: batch (gpu) 32.3, Graphics.Draw (draw committer) 14.4, Recorder.Sync (draw committer) 13.7, Graphics.Draw.draw_and_resource_release (draw committer) 12.8
  • present 2480: 74.4 ms at 15305 ms: batch (gpu) 32.6, Recorder.Sync (draw committer) 15.1, Graphics.Draw (draw committer) 13.0, Graphics.Draw.draw_and_resource_release (draw committer) 11.7
  • present 2472: 74.0 ms at 14749 ms: batch (gpu) 32.1, Recorder.Sync (draw committer) 15.0, Graphics.Draw (draw committer) 13.5, Graphics.Draw.draw_and_resource_release (draw committer) 12.2
  • present 2476: 74.0 ms at 15027 ms: batch (gpu) 32.5, Recorder.Sync (draw committer) 15.5, Graphics.Draw (draw committer) 13.4, Graphics.Draw.draw_and_resource_release (draw committer) 12.0
  • present 2489: 73.9 ms at 15928 ms: batch (gpu) 32.1, Graphics.Draw (draw committer) 15.5, Recorder.Sync (draw committer) 15.2, Graphics.Draw.draw_and_resource_release (draw committer) 13.0

Persistent spikes (frame time above the fastest frame that separates it from a longer frame; one entry per stall, not per frame)

  • present 2427: 74.6 ms at 11672 ms, persistence 10.6 ms
  • present 2371: 73.0 ms at 7920 ms, persistence 9.0 ms
  • present 2337: 73.0 ms at 5631 ms, persistence 8.8 ms
  • present 2480: 74.4 ms at 15305 ms, persistence 8.7 ms
  • present 2472: 74.0 ms at 14749 ms, persistence 8.3 ms
  • present 2476: 74.0 ms at 15027 ms, persistence 8.0 ms

Threads (ms per frame)

thread busy wait untraced in slices < 20 us largest
queue worker 0x0 20.8 (31 %) 0.1 (0 %) 46.6 29.7 Driver.Packet 20.9, Driver.Completion 0.0
draw committer 31.8 (47 %) 0.0 (0 %) 35.7 54.9 Recorder.Sync 15.3, Graphics.Draw 13.2
presenter 0.4 (1 %) 0.2 (0 %) 66.9 0.1 VideoOut.Flip 0.6, Driver.Present 0.0
title 0.0 (0 %) 0.0 (0 %) 67.5 0.2 Shader.ResolveGraphicsStagesAbi 0.0, Shader.ResolveAbi 0.0
title 0.0 (0 %) 0.0 (0 %) 67.5 0.1 Shader.ResolveAbi 0.0, Shader.ResolveGraphicsStagesAbi 0.0
title 0.0 (0 %) 0.0 (0 %) 67.5 0.1 Shader.ResolveAbi 0.0, Shader.ResolveGraphicsStagesAbi 0.0
title 0.0 (0 %) 0.0 (0 %) 67.5 0.1 Shader.ResolveAbi 0.0, Shader.ResolveGraphicsAbi 0.0
title 0.0 (0 %) 0.0 (0 %) 67.5 0.1 Shader.ResolveAbi 0.0, Shader.ResolveGraphicsStagesAbi 0.0
title 0.0 (0 %) 0.0 (0 %) 67.5 0.1 Shader.ResolveAbi 0.0, Shader.ResolveGraphicsStagesAbi 0.0
title 0.0 (0 %) 0.0 (0 %) 67.5 0.0 Shader.ResolveAbi 0.0, Shader.ResolveGraphicsStagesAbi 0.0
title 0.0 (0 %) 0.0 (0 %) 67.5 0.0 Shader.ResolveAbi 0.0, Shader.ResolveGraphicsStagesAbi 0.0
title 0.0 (0 %) 0.0 (0 %) 67.5 0.0 Shader.ResolveAbi 0.0, Shader.ResolveGraphicsStagesAbi 0.0
title 0.0 (0 %) 0.0 (0 %) 67.5 0.1 Shader.ResolveAbi 0.0, Shader.ResolveGraphicsStagesAbi 0.0
title 0.0 (0 %) 0.0 (0 %) 67.5 0.1 Shader.ResolveAbi 0.0, Shader.ResolveGraphicsStagesAbi 0.0
title 0.0 (0 %) 0.0 (0 %) 67.5 0.0 Shader.ResolveAbi 0.0, Shader.ResolveGraphicsAbi 0.0
title 0.0 (0 %) 0.0 (0 %) 67.5 0.1 Shader.ResolveAbi 0.0, Shader.ResolveGraphicsAbi 0.0
title 0.0 (0 %) 0.0 (0 %) 67.5 0.1 Shader.ResolveAbi 0.0, Shader.ResolveGraphicsAbi 0.0
gpu 31.6 (47 %) 0.0 (0 %) 35.9 0.0 batch 31.6

Largest slices (ms per frame, inclusive, all threads): batch 31.6, Driver.Packet 20.9, Recorder.Sync 15.3, Driver.Packet.draw 14.4, Driver.Draw 14.3, Graphics.Draw 13.2

Longest waits

  • Driver.Present.gpu_mutex_wait (presenter) 6.8 ms at 1 ms, present 2254
  • Vulkan.Acquire.acquire_fence_wait (presenter) 2.5 ms at 8 ms, present 2254
  • Driver.Present.render_fence_wait (presenter) 0.5 ms at 10 ms, present 2254
  • GpuMutex.wait.fill (queue worker 0x0) 0.2 ms at 1738 ms, present 2279
  • Vulkan.Acquire.acquire_fence_wait (presenter) 0.2 ms at 8613 ms, present 2381
  • Vulkan.Acquire.acquire_fence_wait (presenter) 0.2 ms at 12761 ms, present 2443

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

  • batch 275: 18.9 ms at 923 ms, present 2267: GPU no ranges; recorded by Graphics.Draw (draw committer) 3.9, Graphics.Draw.draw_and_resource_release (draw committer) 3.0, Recorder.Submit (draw committer) 0.0, Recorder.Reap (draw committer) 0.0
  • batch 3997: 18.8 ms at 13155 ms, present 2448: GPU no ranges; recorded by Graphics.Draw (draw committer) 4.1, Graphics.Draw.draw_and_resource_release (draw committer) 3.1, Recorder.Submit (draw committer) 0.0, Graphics.Draw.validate (draw committer) 0.0
  • batch 4763: 18.8 ms at 15704 ms, present 2485: GPU no ranges; recorded by Graphics.Draw (draw committer) 4.0, Graphics.Draw.draw_and_resource_release (draw committer) 3.1, Recorder.Submit (draw committer) 0.0, Graphics.Draw.index_upload (draw committer) 0.0
  • batch 3956: 18.8 ms at 13011 ms, present 2446: GPU no ranges; recorded by Graphics.Draw (draw committer) 3.7, Graphics.Draw.draw_and_resource_release (draw committer) 3.0, Recorder.Submit (draw committer) 0.0, Graphics.Draw.index_upload (draw committer) 0.0
  • batch 4784: 18.8 ms at 15771 ms, present 2486: GPU no ranges; recorded by Graphics.Draw (draw committer) 3.8, Graphics.Draw.draw_and_resource_release (draw committer) 3.0, Recorder.Submit (draw committer) 0.0, Graphics.Draw.index_upload (draw committer) 0.0

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 and the licence notice of code adapted from upstream (see AGENTS.md)
  • 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: #26586
  • Unblocks: none
  • GPUs tested: AMD Radeon RX 6700 XT, AMD 26.11.2, Windows 11 22621
  • AI-assisted: yes
<!-- greyfinch-sync:boykopovar/AnyPS5:issue:5469417872 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/26597). Originally posted by [JJenkx](https://github.com/JJenkx) on 2026-11-24T09:21:04Z. --- ### What The draw cache's default entry count goes from 65536 to 262144 (`DrawCache.cpp` `drawCacheEntries`). The byte budget (`APS5_DRAW_CACHE_BYTES`, 256 MiB) is unchanged and still bounds what the cache holds, and `APS5_DRAW_CACHE_ENTRIES=65536` restores the previous default. The key and shape sighting tables that decide admission stay at the previous size, 65,536 × 4 keys (`Driver::DrawKeySightingKeys()`, sized from `min(entries, 65536)`). Sizing them from the larger cap, as the first version of this PR did, admitted far more one-off draws: on Trails in the Sky the 2nd Chapter the cache then sat at its byte budget (~106,500 entries) and inserted up to ~75 % more entries per 10 s, which cost ~5 % of frames. #21467 raised the default from 4096 to 65536 for the same reason on Anger Foot. Snoopy and the Great Mystery Club (PPSA28795) now overflows 65536: in its backyard scene the cache is pinned at 65,536 entries while holding ~149 MiB of its budget, and it evicts ~110,000 entries per 10 s that would be hit again. Only 5-10 % of lookups hit, and about half of all draws then pay `Driver.Draw.shader_compile_and_link` (~29 µs each, ~34 ms per frame) on a queue worker that is 99 % busy. The measurements are in #26586. `agc_driver_draw_cache_capacity` keeps its 4352-draw reuse case unchanged and adds `DefaultEntryCapExceedsThePreviousOne`: with `APS5_DRAW_CACHE_ENTRIES` unset, it requires the default cap from the now-public `Driver::DrawCacheEntries()` (renamed from the private `drawCacheEntries()`) to be 262,144, and the sighting tables to hold 65,536 × 4 keys, above the previous 65,536. An earlier version instead inserted 70,000 distinct draws and checked that none were evicted. It held but took about 60 s under the validation layer on an RTX 4070, over the 30 s test limit, so it was replaced. Its results are kept below. ### Tested **Current head `8c0d924948`** (rebased onto `main` `7c44e0ba9d`, sighting tables kept at the previous size), RX 6700 XT, Windows: `agc_driver_draw_cache_capacity` passes 3 of 3 under `VK_LAYER_KHRONOS_validation` 1.4.363 (6 insertions, 0 `VUID-`). Speed below for this head was measured on `main` `7c44e0ba9d` with the same change applied (`min(entries, 65536)` sighting tables), arms differing only in the library set and `APS5_DRAW_CACHE_ENTRIES` (65536 on `main`, 262144 on the change), one unmeasured warm-up per set, alternating runs, `APS5_TRACE_SECONDS` only: | title | `main` presents / 20 s | this head | `main` p50 | this head p50 | |---|---|---|---|---| | Snoopy (PPSA28795) backyard, 180 s route | 227, 243 | 317, 316 | 88.6, 81.3 ms | 62.4, 62.7 ms | | Trails in the Sky the 2nd Chapter (PPSA35169) field, 400 s | 470, 469 | 481, 477 | 42.6, 42.7 ms | 42.0, 42.5 ms | The measurements from here down are for the first version (sighting tables sized from 262144). Windows 11 Enterprise 22621, Ryzen 9 5950X, RX 6700 XT (AMD 26.11.2), WinLibs GCC 15.2 UCRT r7, Release. `main` `c5c9134731` and this branch `6ca1d5633b` built in the same tree. **`agc_driver_draw_cache_capacity`** (current test, head `7e01571ddc`), Linux 7.3.5, GCC 16.2.1, Release, RX 7900 XTX, with the Khronos validation layer inserted: passes 3 of 3 runs in 5.3 to 6.0 s, with 0 VUID and 0 SYNC messages. With `main`'s 65,536 default restored in `DrawCache.cpp` it fails with `the default draw cache entry cap is 65536, not 262144`. **Earlier 70,000-draw test** (head `6ca1d5633b`): passed 3 of 3 runs with this change (25.2 s each). With `main`'s `DrawCache.cpp` it failed 3 of 3 with `sighting and inserting 70000 more distinct draws evicted 6814 entries` (6974 and 6861 in the other runs). @cozejarr's RTX 4070 run reproduced both: about 6,900 evictions on `main` and a pass on this branch. **Speed, Snoopy (PPSA28795) backyard.** Standard 180 s route with scripted input, title relinked once, arms differ only in the libraries. Only `APS5_TRACE_SECONDS=100:20` was set, no other trace or profile switch. The order was `main`, PR, PR, `main`, and every run reached the cap. | Run | Build | Presents (20 s) | Frame p50 / p90 / p99 (ms) | GPU busy per present (ms) | |---|---|---|---|---| | 1 | `main` | 230 | 87.2 / 91.4 / 101.0 | 41.6 | | 2 | this PR | 297 | 67.1 / 71.3 / 74.0 | 31.6 | | 3 | this PR | 286 | 69.8 / 73.8 / 79.0 | 32.1 | | 4 | `main` | 230 | 87.1 / 90.9 / 98.1 | 44.1 | | **mean** | `main` | 230.0 | 87.2 / 91.1 / 99.5 | 42.8 | | **mean** | this PR | 291.5 | 68.4 / 72.6 / 76.5 | 31.9 | +27 % presents, and every run with this change is faster than every `main` run. **Other titles, same machine, measured with `APS5_DRAW_CACHE_ENTRIES=262144` on a `main` binary (equivalent to this change):** - Another Crab's Treasure (PPSA20423), beach: most likely a few percent slower. 4 runs per side gave a mean p50 of 87.9 ms against 90.5 ms (two default runs alone were 13 ms apart), and 3 more per side on `main` `bd9a6c00a6` gave 88.7 against 94.0 ms ([details](https://github.com/boykopovar/AnyPS5/pull/26597#issuecomment-7139717166)). Neither set separates on its own, but both point the same way. - Spirit of the Island (PPSA13934), island: already at the 60 Hz cap (p50 16.7 ms), no change. - Trails in the Sky the 2nd Chapter (PPSA35169), field: about 5 % slower with the first version (472/465 against 448/443 presents per 20 s, [details](https://github.com/boykopovar/AnyPS5/pull/26597#issuecomment-7145466148)). The cause was the sighting tables growing with the cap ([analysis](https://github.com/boykopovar/AnyPS5/pull/26597#issuecomment-7147351566)); with them kept at the previous size the current head is about 2 % faster there (table above). <details><summary><code>aps5-summary.jsonl</code>, run 1 (<code>main</code>)</summary> ```json {"commit":"c5c9134731cb","dirty":false,"env":{"APS5_PAD_INPUT_FILE":"<path>","APS5_PLAYGO_UNLISTED_CHUNKS":"installed","APS5_TRACE_DIR":"<path>","APS5_TRACE_SECONDS":"100:20"},"gpu":"AMD Radeon RX 6700 XT","driver":"AMD proprietary driver 26.11.2 (AMD proprietary shader compiler)","os":"Windows 10.0.22621","cpu":"AMD Ryzen 9 5950X 16-Core Processor","cpu_threads":32,"memory_mib":65457,"title_id":"PPSA28795","title":"Snoopy & The Great Mystery Club","content_version":"01.000.002","resolution":"1920x1080","window":{"spec":"seconds 100:20","first_present":2144,"ms":20058.295},"presents":230,"frame_ms":{"p50":87.203,"p90":91.364,"p99":101.042,"max":103.419},"gpu_busy_ms_per_present":41.608,"worker_busy_pct":{"queue worker 0x0":98.758},"phase_totals_ms":{"Driver.Completion":0.401,"Driver.Dispatch":160.068,"Driver.Dispatch.capture_resources":0.103,"Driver.Dispatch.decode_key_device_setup":25.686,"Driver.Dispatch.lookup_cache":2.898,"Driver.Dispatch.materialize":0.022,"Driver.Dispatch.prepared_invocation":0.016,"Driver.Draw":15314.529,"Driver.Draw.device_setup":4879.851,"Driver.Draw.draw_enqueued":1263.311,"Driver.Draw.post_compile_prepare":153.861,"Driver.Draw.prepare":996.721,"Driver.Draw.shader_compile_and_link":7388.428,"Driver.EndSubmission":0.190,"Driver.Packet":19808.628,"Driver.Packet.device_lock":66.761,"Driver.Packet.dispatch":162.120,"Driver.Packet.draw":15446.057,"Driver.Packet.execute":259.995,"Driver.Packet.flip_flush":0.362,"Driver.Packet.flush_between_packets":138.498,"Driver.Packet.memory_wait":0.007,"Driver.Packet.pipeline_drain":3450.700,"Driver.Packet.pipeline_prepare":104.935,"Driver.Packet.prepare_memory":96.671,"Driver.Packet.rendering_wait":0.289,"Driver.Present":122.845,"Driver.Present.acquire_image":57.777,"Driver.Present.device_setup":0.126,"Driver.Present.gpu_mutex_wait":4.074,"Driver.Present.inflight_wait":0.604,"Driver.Present.present_display_buffer":21.535,"Driver.Present.queue_present":34.421,"Driver.Present.release_and_callback":0.228,"Driver.Present.render_fence_wait":3.417,"Driver.Present.resize":0.406,"Driver.Present.validate":0.112,"Driver.Suspend":0.030,"GpuMutex.wait.dispatch":0.842,"GpuMutex.wait.draw":1.663,"GpuMutex.wait.end":0.470,"GpuMutex.wait.fill":85.506,"GpuMutex.wait.flush":0.623,"GpuMutex.wait.label":10.064,"GpuMutex.wait.present":3.359,"Graphics.Draw":9799.335,"Graphics.Draw.draw_and_resource_release":8143.190,"Graphics.Draw.index_upload":360.849,"Graphics.Draw.validate":717.638,"Graphics.Draw.vertex_upload":474.228,"Graphics.DrawWithRecipe":75.168,"Graphics.DrawWithRecipe.draw_and_resource_release":60.856,"Graphics.DrawWithRecipe.index_upload":4.213,"Graphics.DrawWithRecipe.validate":3.600,"Graphics.DrawWithRecipe.vertex_upload":5.466,"Recorder.Reap":32.827,"Recorder.Submit":120.633,"Recorder.Sync":3359.830,"Resources.Complete":13.848,"Resources.Prepare":1.755,"Shader.DrawStage":3842.211,"Shader.DrawStage.capture_resources":2141.988,"Shader.DrawStage.materialize":992.223,"Shader.DrawStage.prepared_invocation":653.667,"Shader.ResolveAbi":127.637,"Shader.ResolveGraphicsAbi":52.456,"Shader.ResolveGraphicsStagesAbi":112.796,"VideoOut.Flip":135.142,"VideoOut.Flip.completion_mutex_wait":0.252,"VideoOut.Flip.config_mutex_wait":0.031,"VideoOut.Flip.frame_limit":0.155,"VideoOut.Flip.notify_game":12.902,"VideoOut.Flip.present":119.219,"VideoOut.Flip.validate":0.343,"VideoOut.Flip.vblank_wait":0.223,"VideoOut.Flip.window_prepare":0.418,"VideoOut.Flip.window_title":1.325,"VideoOut.Readiness":0.624,"VideoOut.Readiness.locks_validate":0.238,"Vulkan.Acquire":57.489,"Vulkan.Acquire.acquire_fence_wait":30.657,"Vulkan.Acquire.acquire_image":25.728,"Vulkan.Acquire.fence_reset":0.643,"Vulkan.Acquire.retired_swapchains":0.343,"Vulkan.Dispatch":19.178,"Vulkan.Dispatch.command_record":6.446,"Vulkan.Dispatch.shader_resources":12.553,"Vulkan.DispatchRecipe":6.911,"Vulkan.DispatchRecipe.command_record":6.813,"Vulkan.DrawFromRecipe":76.960,"Vulkan.Present":12.424,"Vulkan.Present.command_record_scale":6.925,"Vulkan.Present.pixel_upload":0.547,"Vulkan.Present.queue_submit":4.780,"Vulkan.QueuePresent":34.002,"Vulkan.QueuePresent.queue_present":33.567,"Vulkan.Retire":3.355,"Vulkan.Retire.wait":2.190},"top_phases_ms_per_frame":{"Driver.Packet":86.124,"Driver.Packet.draw":67.157,"Driver.Draw":66.585,"Graphics.Draw":42.606,"Graphics.Draw.draw_and_resource_release":35.405,"Driver.Draw.shader_compile_and_link":32.124,"Driver.Draw.device_setup":21.217,"Shader.DrawStage":16.705},"owned_draw_counts":{},"graphics_track":{"Graphics.Barrier.dcc-clear":3680,"Graphics.Barrier.dcc-keys":2618,"Graphics.Barrier.dispatch-lead":690,"Graphics.Barrier.dispatch-trail":920,"Graphics.Barrier.draw":25294,"Graphics.Barrier.fill":3680,"Graphics.Barrier.label-run":12910,"Graphics.Barrier.present-blit":920,"Graphics.Barrier.staging-in":1610,"Graphics.Barrier.staging-out":690,"Graphics.Barrier.storage-writeback":5799,"Graphics.BarrierMerged.dispatch-lead":230,"Graphics.BarrierMerged.fill":1840,"Graphics.BarrierMerged.staging-in":460,"Graphics.BarrierMerged.staging-out":690,"Graphics.BarrierMerged.storage-writeback":1561,"Graphics.Copy":1840,"Graphics.Copy.bytes":384004320,"Graphics.RenderPass":9651,"Graphics.RenderPass.Close.command":4353,"Graphics.RenderPass.Close.image":2040,"Graphics.RenderPass.Close.key":451,"Graphics.RenderPass.Close.new-batch":2807,"Graphics.RenderPass.Continued":486621},"trace_dropped":true,"trace_dropped_threads":{"queue worker 0x0":{"events_full_after_s":6.007,"events_lost":614596,"totals_full":false}},"trace":"aps5-trace-c5c9134731cb-259608.json.gz"} ``` </details> <details><summary><code>aps5-summary.jsonl</code>, run 2 (this PR)</summary> ```json {"commit":"6ca1d5633b9e","dirty":false,"env":{"APS5_PAD_INPUT_FILE":"<path>","APS5_PLAYGO_UNLISTED_CHUNKS":"installed","APS5_TRACE_DIR":"<path>","APS5_TRACE_SECONDS":"100:20"},"gpu":"AMD Radeon RX 6700 XT","driver":"AMD proprietary driver 26.11.2 (AMD proprietary shader compiler)","os":"Windows 10.0.22621","cpu":"AMD Ryzen 9 5950X 16-Core Processor","cpu_threads":32,"memory_mib":65457,"title_id":"PPSA28795","title":"Snoopy & The Great Mystery Club","content_version":"01.000.002","resolution":"1920x1080","window":{"spec":"seconds 100:20","first_present":2254,"ms":20058.019},"presents":297,"frame_ms":{"p50":67.063,"p90":71.287,"p99":74.000,"max":74.631},"gpu_busy_ms_per_present":31.615,"worker_busy_pct":{"queue worker 0x0":98.496},"phase_totals_ms":{"Driver.Completion":0.454,"Driver.Dispatch":159.468,"Driver.Dispatch.capture_resources":0.274,"Driver.Dispatch.decode_key_device_setup":32.591,"Driver.Dispatch.lookup_cache":3.700,"Driver.Dispatch.materialize":0.057,"Driver.Dispatch.prepared_invocation":0.042,"Driver.Draw":13898.723,"Driver.Draw.device_setup":6356.890,"Driver.Draw.draw_enqueued":2116.942,"Driver.Draw.post_compile_prepare":134.784,"Driver.Draw.prepare":1003.337,"Driver.Draw.shader_compile_and_link":3512.897,"Driver.EndSubmission":0.236,"Driver.Packet":19755.691,"Driver.Packet.device_lock":86.182,"Driver.Packet.dispatch":161.917,"Driver.Packet.draw":14026.376,"Driver.Packet.execute":293.291,"Driver.Packet.flip_flush":0.448,"Driver.Packet.flush_between_packets":164.195,"Driver.Packet.memory_wait":0.004,"Driver.Packet.pipeline_drain":4663.766,"Driver.Packet.pipeline_prepare":124.317,"Driver.Packet.prepare_memory":109.154,"Driver.Packet.rendering_wait":0.370,"Driver.Present":160.639,"Driver.Present.acquire_image":75.840,"Driver.Present.device_setup":0.149,"Driver.Present.gpu_mutex_wait":8.847,"Driver.Present.inflight_wait":0.788,"Driver.Present.present_display_buffer":27.707,"Driver.Present.queue_present":43.484,"Driver.Present.release_and_callback":0.291,"Driver.Present.render_fence_wait":2.672,"Driver.Present.resize":0.529,"Driver.Present.validate":0.148,"Driver.Suspend":0.043,"GpuMutex.wait.dispatch":0.249,"GpuMutex.wait.draw":3.146,"GpuMutex.wait.end":0.609,"GpuMutex.wait.fill":64.390,"GpuMutex.wait.flush":0.292,"GpuMutex.wait.label":11.502,"GpuMutex.wait.present":7.929,"Graphics.Draw":6346.418,"Graphics.Draw.draw_and_resource_release":5651.637,"Graphics.Draw.index_upload":142.370,"Graphics.Draw.validate":305.485,"Graphics.Draw.vertex_upload":199.999,"Graphics.DrawWithRecipe":4492.204,"Graphics.DrawWithRecipe.draw_and_resource_release":3628.481,"Graphics.DrawWithRecipe.index_upload":252.543,"Graphics.DrawWithRecipe.validate":219.696,"Graphics.DrawWithRecipe.vertex_upload":330.132,"Recorder.Reap":38.421,"Recorder.Submit":137.931,"Recorder.Sync":4553.971,"Resources.Complete":17.828,"Resources.Prepare":2.185,"Shader.DrawStage":1423.172,"Shader.DrawStage.capture_resources":926.006,"Shader.DrawStage.materialize":292.421,"Shader.DrawStage.prepared_invocation":190.431,"Shader.ResolveAbi":169.577,"Shader.ResolveGraphicsAbi":77.550,"Shader.ResolveGraphicsStagesAbi":150.437,"VideoOut.Flip":166.259,"VideoOut.Flip.completion_mutex_wait":0.313,"VideoOut.Flip.config_mutex_wait":0.041,"VideoOut.Flip.frame_limit":0.198,"VideoOut.Flip.notify_game":10.758,"VideoOut.Flip.present":151.740,"VideoOut.Flip.validate":0.489,"VideoOut.Flip.vblank_wait":0.292,"VideoOut.Flip.window_prepare":0.551,"VideoOut.Flip.window_title":1.558,"VideoOut.Readiness":0.817,"VideoOut.Readiness.locks_validate":0.291,"Vulkan.Acquire":75.454,"Vulkan.Acquire.acquire_fence_wait":40.592,"Vulkan.Acquire.acquire_image":33.372,"Vulkan.Acquire.fence_reset":0.848,"Vulkan.Acquire.retired_swapchains":0.478,"Vulkan.Dispatch":24.990,"Vulkan.Dispatch.command_record":8.475,"Vulkan.Dispatch.shader_resources":16.280,"Vulkan.DispatchRecipe":9.006,"Vulkan.DispatchRecipe.command_record":8.888,"Vulkan.DrawFromRecipe":4617.428,"Vulkan.Present":16.152,"Vulkan.Present.command_record_scale":8.915,"Vulkan.Present.pixel_upload":0.763,"Vulkan.Present.queue_submit":6.253,"Vulkan.QueuePresent":42.928,"Vulkan.QueuePresent.queue_present":42.378,"Vulkan.Retire":2.610,"Vulkan.Retire.wait":1.304},"top_phases_ms_per_frame":{"Driver.Packet":66.517,"Driver.Packet.draw":47.227,"Driver.Draw":46.797,"Driver.Draw.device_setup":21.404,"Graphics.Draw":21.368,"Graphics.Draw.draw_and_resource_release":19.029,"Driver.Packet.pipeline_drain":15.703,"Vulkan.DrawFromRecipe":15.547},"owned_draw_counts":{},"graphics_track":{"Graphics.Barrier.dcc-clear":4752,"Graphics.Barrier.dcc-keys":2446,"Graphics.Barrier.dispatch-lead":891,"Graphics.Barrier.dispatch-trail":1188,"Graphics.Barrier.draw":32435,"Graphics.Barrier.fill":4752,"Graphics.Barrier.label-run":15777,"Graphics.Barrier.present-blit":1188,"Graphics.Barrier.staging-in":2079,"Graphics.Barrier.staging-out":891,"Graphics.Barrier.storage-writeback":7363,"Graphics.BarrierMerged.dispatch-lead":297,"Graphics.BarrierMerged.fill":2376,"Graphics.BarrierMerged.staging-in":594,"Graphics.BarrierMerged.staging-out":891,"Graphics.BarrierMerged.storage-writeback":2141,"Graphics.Copy":2376,"Graphics.Copy.bytes":495866448,"Graphics.RenderPass":12474,"Graphics.RenderPass.Close.command":5552,"Graphics.RenderPass.Close.image":2908,"Graphics.RenderPass.Close.key":594,"Graphics.RenderPass.Close.new-batch":3420,"Graphics.RenderPass.Continued":628364},"trace_dropped":true,"trace_dropped_threads":{"queue worker 0x0":{"events_full_after_s":8.104,"events_lost":389056,"totals_full":false}},"trace":"aps5-trace-6ca1d5633b9e-268596.json.gz"} ``` </details> <details><summary><code>tools/trace_digest.py --top 6</code>, run 1 (<code>main</code>)</summary> **seconds 100:20** from present 2144: 230 presents, frame p50 87.2 / p90 91.4 / p99 101.0 / max 103.4 ms, GPU busy 41.6 ms per present AMD Radeon RX 6700 XT, AMD proprietary driver 26.11.2 (AMD proprietary shader compiler), Windows 10.0.22621, 1920x1080, commit c5c9134731cb, dropped: yes ```json {"commit":"c5c9134731cb","dirty":false,"env":{"APS5_PAD_INPUT_FILE":"<path>","APS5_PLAYGO_UNLISTED_CHUNKS":"installed","APS5_TRACE_DIR":"<path>","APS5_TRACE_SECONDS":"100:20"},"gpu":"AMD Radeon RX 6700 XT","driver":"AMD proprietary driver 26.11.2 (AMD proprietary shader compiler)","os":"Windows 10.0.22621","cpu":"AMD Ryzen 9 5950X 16-Core Processor","cpu_threads":32,"memory_mib":65457,"title_id":"PPSA28795","title":"Snoopy & The Great Mystery Club","content_version":"01.000.002","resolution":"1920x1080","window":{"spec":"seconds 100:20","first_present":2144,"ms":20058.295},"presents":230,"frame_ms":{"p50":87.203,"p90":91.364,"p99":101.042,"max":103.419},"gpu_busy_ms_per_present":41.608,"worker_busy_pct":{"queue worker 0x0":98.758},"phase_totals_ms":{"Driver.Completion":0.401,"Driver.Dispatch":160.068,"Driver.Dispatch.capture_resources":0.103,"Driver.Dispatch.decode_key_device_setup":25.686,"Driver.Dispatch.lookup_cache":2.898,"Driver.Dispatch.materialize":0.022,"Driver.Dispatch.prepared_invocation":0.016,"Driver.Draw":15314.529,"Driver.Draw.device_setup":4879.851,"Driver.Draw.draw_enqueued":1263.311,"Driver.Draw.post_compile_prepare":153.861,"Driver.Draw.prepare":996.721,"Driver.Draw.shader_compile_and_link":7388.428,"Driver.EndSubmission":0.19,"Driver.Packet":19808.628,"Driver.Packet.device_lock":66.761,"Driver.Packet.dispatch":162.12,"Driver.Packet.draw":15446.057,"Driver.Packet.execute":259.995,"Driver.Packet.flip_flush":0.362,"Driver.Packet.flush_between_packets":138.498,"Driver.Packet.memory_wait":0.007,"Driver.Packet.pipeline_drain":3450.7,"Driver.Packet.pipeline_prepare":104.935,"Driver.Packet.prepare_memory":96.671,"Driver.Packet.rendering_wait":0.289,"Driver.Present":122.845,"Driver.Present.acquire_image":57.777,"Driver.Present.device_setup":0.126,"Driver.Present.gpu_mutex_wait":4.074,"Driver.Present.inflight_wait":0.604,"Driver.Present.present_display_buffer":21.535,"Driver.Present.queue_present":34.421,"Driver.Present.release_and_callback":0.228,"Driver.Present.render_fence_wait":3.417,"Driver.Present.resize":0.406,"Driver.Present.validate":0.112,"Driver.Suspend":0.03,"GpuMutex.wait.dispatch":0.842,"GpuMutex.wait.draw":1.663,"GpuMutex.wait.end":0.47,"GpuMutex.wait.fill":85.506,"GpuMutex.wait.flush":0.623,"GpuMutex.wait.label":10.064,"GpuMutex.wait.present":3.359,"Graphics.Draw":9799.335,"Graphics.Draw.draw_and_resource_release":8143.19,"Graphics.Draw.index_upload":360.849,"Graphics.Draw.validate":717.638,"Graphics.Draw.vertex_upload":474.228,"Graphics.DrawWithRecipe":75.168,"Graphics.DrawWithRecipe.draw_and_resource_release":60.856,"Graphics.DrawWithRecipe.index_upload":4.213,"Graphics.DrawWithRecipe.validate":3.6,"Graphics.DrawWithRecipe.vertex_upload":5.466,"Recorder.Reap":32.827,"Recorder.Submit":120.633,"Recorder.Sync":3359.83,"Resources.Complete":13.848,"Resources.Prepare":1.755,"Shader.DrawStage":3842.211,"Shader.DrawStage.capture_resources":2141.988,"Shader.DrawStage.materialize":992.223,"Shader.DrawStage.prepared_invocation":653.667,"Shader.ResolveAbi":127.637,"Shader.ResolveGraphicsAbi":52.456,"Shader.ResolveGraphicsStagesAbi":112.796,"VideoOut.Flip":135.142,"VideoOut.Flip.completion_mutex_wait":0.252,"VideoOut.Flip.config_mutex_wait":0.031,"VideoOut.Flip.frame_limit":0.155,"VideoOut.Flip.notify_game":12.902,"VideoOut.Flip.present":119.219,"VideoOut.Flip.validate":0.343,"VideoOut.Flip.vblank_wait":0.223,"VideoOut.Flip.window_prepare":0.418,"VideoOut.Flip.window_title":1.325,"VideoOut.Readiness":0.624,"VideoOut.Readiness.locks_validate":0.238,"Vulkan.Acquire":57.489,"Vulkan.Acquire.acquire_fence_wait":30.657,"Vulkan.Acquire.acquire_image":25.728,"Vulkan.Acquire.fence_reset":0.643,"Vulkan.Acquire.retired_swapchains":0.343,"Vulkan.Dispatch":19.178,"Vulkan.Dispatch.command_record":6.446,"Vulkan.Dispatch.shader_resources":12.553,"Vulkan.DispatchRecipe":6.911,"Vulkan.DispatchRecipe.command_record":6.813,"Vulkan.DrawFromRecipe":76.96,"Vulkan.Present":12.424,"Vulkan.Present.command_record_scale":6.925,"Vulkan.Present.pixel_upload":0.547,"Vulkan.Present.queue_submit":4.78,"Vulkan.QueuePresent":34.002,"Vulkan.QueuePresent.queue_present":33.567,"Vulkan.Retire":3.355,"Vulkan.Retire.wait":2.19},"top_phases_ms_per_frame":{"Driver.Packet":86.124,"Driver.Packet.draw":67.157,"Driver.Draw":66.585,"Graphics.Draw":42.606,"Graphics.Draw.draw_and_resource_release":35.405,"Driver.Draw.shader_compile_and_link":32.124,"Driver.Draw.device_setup":21.217,"Shader.DrawStage":16.705},"owned_draw_counts":{},"graphics_track":{"Graphics.Barrier.dcc-clear":3680,"Graphics.Barrier.dcc-keys":2618,"Graphics.Barrier.dispatch-lead":690,"Graphics.Barrier.dispatch-trail":920,"Graphics.Barrier.draw":25294,"Graphics.Barrier.fill":3680,"Graphics.Barrier.label-run":12910,"Graphics.Barrier.present-blit":920,"Graphics.Barrier.staging-in":1610,"Graphics.Barrier.staging-out":690,"Graphics.Barrier.storage-writeback":5799,"Graphics.BarrierMerged.dispatch-lead":230,"Graphics.BarrierMerged.fill":1840,"Graphics.BarrierMerged.staging-in":460,"Graphics.BarrierMerged.staging-out":690,"Graphics.BarrierMerged.storage-writeback":1561,"Graphics.Copy":1840,"Graphics.Copy.bytes":384004320,"Graphics.RenderPass":9651,"Graphics.RenderPass.Close.command":4353,"Graphics.RenderPass.Close.image":2040,"Graphics.RenderPass.Close.key":451,"Graphics.RenderPass.Close.new-batch":2807,"Graphics.RenderPass.Continued":486621},"trace_dropped":true,"trace_dropped_threads":{"queue worker 0x0":{"events_full_after_s":6.007,"events_lost":614596,"totals_full":false}},"trace":"aps5-trace-c5c9134731cb-259608.json.gz"} ``` **Incomplete trace:** recorded data was lost. Slice-based timings, waits and batch inventories cover retained events only; missing slices are not idle time. Summary statistics are reported separately. - queue worker 0x0: 614596 events lost; buffer full at 6006.7 ms; over the 67 of 230 frames that ended before it: busy 67.6 ms per frame (76 %), wait 0.4, largest Driver.Packet 68.0, Vulkan.Dispatch 0.0 (the thread table divides the retained slices by every frame) **Slowest frames** (largest slices inside each, inclusive) - present 2174: 103.4 ms at 2663 ms: Driver.Packet (queue worker 0x0) 83.4, batch (gpu) 62.5, Driver.Packet.draw (queue worker 0x0) 50.6, Driver.Draw (queue worker 0x0) 50.0 - present 2206: 101.6 ms at 5483 ms: Driver.Packet (queue worker 0x0) 80.5, batch (gpu) 60.9, Driver.Packet.draw (queue worker 0x0) 48.6, Driver.Draw (queue worker 0x0) 48.0 - present 2207: 101.0 ms at 5585 ms: Driver.Packet (queue worker 0x0) 80.9, batch (gpu) 65.7, Driver.Packet.draw (queue worker 0x0) 49.2, Driver.Draw (queue worker 0x0) 48.5 - present 2244: 94.7 ms at 8751 ms: batch (gpu) 60.1, Recorder.Sync (draw committer) 29.2, Graphics.Draw (draw committer) 18.8, Graphics.Draw.draw_and_resource_release (draw committer) 15.3 - present 2153: 93.9 ms at 804 ms: Driver.Packet (queue worker 0x0) 73.9, Driver.Packet.draw (queue worker 0x0) 57.1, Driver.Draw (queue worker 0x0) 56.2, batch (gpu) 40.2 **Persistent spikes** (frame time above the fastest frame that separates it from a longer frame; one entry per stall, not per frame) - present 2174: 103.4 ms at 2663 ms, persistence 28.3 ms - present 2244: 94.7 ms at 8751 ms, persistence 19.6 ms - present 2206: 101.6 ms at 5483 ms, persistence 18.3 ms - present 2363: 93.4 ms at 19077 ms, persistence 17.3 ms - present 2278: 92.3 ms at 11708 ms, persistence 13.4 ms - present 2316: 92.8 ms at 14999 ms, persistence 10.8 ms **Threads** (ms per frame) | thread | busy | wait | untraced | in slices < 20 us | largest | |---|---|---|---|---|---| | queue worker 0x0 | 19.9 (23 %) | 0.1 (0 %) | 67.2 | 37.3 | Driver.Packet 20.0, Vulkan.Dispatch 0.0 | | draw committer | 34.9 (40 %) | 0.0 (0 %) | 52.2 | 50.0 | Graphics.Draw 19.9, Recorder.Sync 14.6 | | presenter | 0.5 (1 %) | 0.2 (0 %) | 86.6 | 0.1 | VideoOut.Flip 0.6, Driver.Present 0.0 | | title | 0.0 (0 %) | 0.0 (0 %) | 87.2 | 0.2 | Shader.ResolveGraphicsStagesAbi 0.0, Shader.ResolveAbi 0.0 | | title | 0.0 (0 %) | 0.0 (0 %) | 87.2 | 0.1 | Shader.ResolveAbi 0.0, Shader.ResolveGraphicsStagesAbi 0.0 | | title | 0.0 (0 %) | 0.0 (0 %) | 87.2 | 0.1 | Shader.ResolveAbi 0.0, Shader.ResolveGraphicsStagesAbi 0.0 | | title | 0.0 (0 %) | 0.0 (0 %) | 87.2 | 0.1 | Shader.ResolveAbi 0.0, Shader.ResolveGraphicsStagesAbi 0.0 | | title | 0.0 (0 %) | 0.0 (0 %) | 87.2 | 0.1 | Shader.ResolveAbi 0.0, Shader.ResolveGraphicsStagesAbi 0.0 | | title | 0.0 (0 %) | 0.0 (0 %) | 87.2 | 0.1 | Shader.ResolveAbi 0.0, Shader.ResolveGraphicsStagesAbi 0.0 | | title | 0.0 (0 %) | 0.0 (0 %) | 87.2 | 0.1 | Shader.ResolveAbi 0.0, Shader.ResolveGraphicsStagesAbi 0.0 | | title | 0.0 (0 %) | 0.0 (0 %) | 87.2 | 0.1 | Shader.ResolveAbi 0.0, Shader.ResolveGraphicsStagesAbi 0.0 | | title | 0.0 (0 %) | 0.0 (0 %) | 87.2 | 0.0 | Shader.ResolveAbi 0.0, Shader.ResolveGraphicsStagesAbi 0.0 | | title | 0.0 (0 %) | 0.0 (0 %) | 87.2 | 0.0 | Shader.ResolveAbi 0.0, Shader.ResolveGraphicsStagesAbi 0.0 | | title | 0.0 (0 %) | 0.0 (0 %) | 87.2 | 0.0 | Shader.ResolveAbi 0.0, Shader.ResolveGraphicsStagesAbi 0.0 | | title | 0.0 (0 %) | 0.0 (0 %) | 87.2 | 0.1 | Shader.ResolveAbi 0.0, Shader.ResolveGraphicsStagesAbi 0.0 | | title | 0.0 (0 %) | 0.0 (0 %) | 87.2 | 0.1 | Shader.ResolveGraphicsStagesAbi 0.0, Shader.ResolveAbi 0.0 | | title | 0.0 (0 %) | 0.0 (0 %) | 87.2 | 0.1 | Shader.ResolveAbi 0.0, Shader.ResolveGraphicsStagesAbi 0.0 | | gpu | 41.6 (48 %) | 0.0 (0 %) | 45.6 | 0.0 | batch 41.6 | **Largest slices** (ms per frame, inclusive, all threads): batch 41.6, Driver.Packet 20.0, Graphics.Draw 19.9, Graphics.Draw.draw_and_resource_release 15.7, Driver.Packet.draw 15.1, Driver.Draw 14.9 **Longest waits** - Driver.Present.gpu_mutex_wait (presenter) 2.5 ms at 1 ms, present 2144 - Driver.Present.render_fence_wait (presenter) 1.6 ms at 4 ms, present 2144 - Vulkan.Acquire.acquire_fence_wait (presenter) 0.2 ms at 18292 ms, present 2354 - Vulkan.Acquire.acquire_fence_wait (presenter) 0.2 ms at 13627 ms, present 2300 - Vulkan.Acquire.acquire_fence_wait (presenter) 0.2 ms at 8240 ms, present 2238 - Vulkan.Acquire.acquire_fence_wait (presenter) 0.2 ms at 3557 ms, present 2184 **Largest GPU batches** (GPU ranges inside, and the CPU slices that recorded each, inclusive) - batch 697: 33.0 ms at 2728 ms, present 2174: GPU no ranges; recorded by Graphics.Draw (draw committer) 4.0, Graphics.Draw.draw_and_resource_release (draw committer) 3.0, Recorder.Reap (draw committer) 0.1, Recorder.Submit (draw committer) 0.0 - batch 1423: 33.0 ms at 5547 ms, present 2206: GPU no ranges; recorded by Graphics.Draw (draw committer) 3.9, Graphics.Draw.draw_and_resource_release (draw committer) 3.0, Recorder.Reap (draw committer) 0.1, Recorder.Submit (draw committer) 0.0 - batch 1446: 32.7 ms at 5648 ms, present 2207: GPU no ranges; recorded by Graphics.Draw (draw committer) 3.9, Graphics.Draw.draw_and_resource_release (draw committer) 3.0, Recorder.Reap (draw committer) 0.1, Recorder.Submit (draw committer) 0.0 - batch 2275: 31.7 ms at 8809 ms, present 2244: GPU no ranges; recorded by Graphics.Draw (draw committer) 3.9, Graphics.Draw.draw_and_resource_release (draw committer) 3.0, Recorder.Reap (draw committer) 0.1, Recorder.Submit (draw committer) 0.0 - batch 605: 19.7 ms at 2371 ms, present 2170: GPU no ranges; recorded by Graphics.Draw (draw committer) 4.5, Graphics.Draw.draw_and_resource_release (draw committer) 3.2, Recorder.Reap (draw committer) 0.1, Recorder.Submit (draw committer) 0.0 </details> <details><summary><code>tools/trace_digest.py --top 6</code>, run 2 (this PR)</summary> **seconds 100:20** from present 2254: 297 presents, frame p50 67.1 / p90 71.3 / p99 74.0 / max 74.6 ms, GPU busy 31.6 ms per present AMD Radeon RX 6700 XT, AMD proprietary driver 26.11.2 (AMD proprietary shader compiler), Windows 10.0.22621, 1920x1080, commit 6ca1d5633b9e, dropped: yes ```json {"commit":"6ca1d5633b9e","dirty":false,"env":{"APS5_PAD_INPUT_FILE":"<path>","APS5_PLAYGO_UNLISTED_CHUNKS":"installed","APS5_TRACE_DIR":"<path>","APS5_TRACE_SECONDS":"100:20"},"gpu":"AMD Radeon RX 6700 XT","driver":"AMD proprietary driver 26.11.2 (AMD proprietary shader compiler)","os":"Windows 10.0.22621","cpu":"AMD Ryzen 9 5950X 16-Core Processor","cpu_threads":32,"memory_mib":65457,"title_id":"PPSA28795","title":"Snoopy & The Great Mystery Club","content_version":"01.000.002","resolution":"1920x1080","window":{"spec":"seconds 100:20","first_present":2254,"ms":20058.019},"presents":297,"frame_ms":{"p50":67.063,"p90":71.287,"p99":74.0,"max":74.631},"gpu_busy_ms_per_present":31.615,"worker_busy_pct":{"queue worker 0x0":98.496},"phase_totals_ms":{"Driver.Completion":0.454,"Driver.Dispatch":159.468,"Driver.Dispatch.capture_resources":0.274,"Driver.Dispatch.decode_key_device_setup":32.591,"Driver.Dispatch.lookup_cache":3.7,"Driver.Dispatch.materialize":0.057,"Driver.Dispatch.prepared_invocation":0.042,"Driver.Draw":13898.723,"Driver.Draw.device_setup":6356.89,"Driver.Draw.draw_enqueued":2116.942,"Driver.Draw.post_compile_prepare":134.784,"Driver.Draw.prepare":1003.337,"Driver.Draw.shader_compile_and_link":3512.897,"Driver.EndSubmission":0.236,"Driver.Packet":19755.691,"Driver.Packet.device_lock":86.182,"Driver.Packet.dispatch":161.917,"Driver.Packet.draw":14026.376,"Driver.Packet.execute":293.291,"Driver.Packet.flip_flush":0.448,"Driver.Packet.flush_between_packets":164.195,"Driver.Packet.memory_wait":0.004,"Driver.Packet.pipeline_drain":4663.766,"Driver.Packet.pipeline_prepare":124.317,"Driver.Packet.prepare_memory":109.154,"Driver.Packet.rendering_wait":0.37,"Driver.Present":160.639,"Driver.Present.acquire_image":75.84,"Driver.Present.device_setup":0.149,"Driver.Present.gpu_mutex_wait":8.847,"Driver.Present.inflight_wait":0.788,"Driver.Present.present_display_buffer":27.707,"Driver.Present.queue_present":43.484,"Driver.Present.release_and_callback":0.291,"Driver.Present.render_fence_wait":2.672,"Driver.Present.resize":0.529,"Driver.Present.validate":0.148,"Driver.Suspend":0.043,"GpuMutex.wait.dispatch":0.249,"GpuMutex.wait.draw":3.146,"GpuMutex.wait.end":0.609,"GpuMutex.wait.fill":64.39,"GpuMutex.wait.flush":0.292,"GpuMutex.wait.label":11.502,"GpuMutex.wait.present":7.929,"Graphics.Draw":6346.418,"Graphics.Draw.draw_and_resource_release":5651.637,"Graphics.Draw.index_upload":142.37,"Graphics.Draw.validate":305.485,"Graphics.Draw.vertex_upload":199.999,"Graphics.DrawWithRecipe":4492.204,"Graphics.DrawWithRecipe.draw_and_resource_release":3628.481,"Graphics.DrawWithRecipe.index_upload":252.543,"Graphics.DrawWithRecipe.validate":219.696,"Graphics.DrawWithRecipe.vertex_upload":330.132,"Recorder.Reap":38.421,"Recorder.Submit":137.931,"Recorder.Sync":4553.971,"Resources.Complete":17.828,"Resources.Prepare":2.185,"Shader.DrawStage":1423.172,"Shader.DrawStage.capture_resources":926.006,"Shader.DrawStage.materialize":292.421,"Shader.DrawStage.prepared_invocation":190.431,"Shader.ResolveAbi":169.577,"Shader.ResolveGraphicsAbi":77.55,"Shader.ResolveGraphicsStagesAbi":150.437,"VideoOut.Flip":166.259,"VideoOut.Flip.completion_mutex_wait":0.313,"VideoOut.Flip.config_mutex_wait":0.041,"VideoOut.Flip.frame_limit":0.198,"VideoOut.Flip.notify_game":10.758,"VideoOut.Flip.present":151.74,"VideoOut.Flip.validate":0.489,"VideoOut.Flip.vblank_wait":0.292,"VideoOut.Flip.window_prepare":0.551,"VideoOut.Flip.window_title":1.558,"VideoOut.Readiness":0.817,"VideoOut.Readiness.locks_validate":0.291,"Vulkan.Acquire":75.454,"Vulkan.Acquire.acquire_fence_wait":40.592,"Vulkan.Acquire.acquire_image":33.372,"Vulkan.Acquire.fence_reset":0.848,"Vulkan.Acquire.retired_swapchains":0.478,"Vulkan.Dispatch":24.99,"Vulkan.Dispatch.command_record":8.475,"Vulkan.Dispatch.shader_resources":16.28,"Vulkan.DispatchRecipe":9.006,"Vulkan.DispatchRecipe.command_record":8.888,"Vulkan.DrawFromRecipe":4617.428,"Vulkan.Present":16.152,"Vulkan.Present.command_record_scale":8.915,"Vulkan.Present.pixel_upload":0.763,"Vulkan.Present.queue_submit":6.253,"Vulkan.QueuePresent":42.928,"Vulkan.QueuePresent.queue_present":42.378,"Vulkan.Retire":2.61,"Vulkan.Retire.wait":1.304},"top_phases_ms_per_frame":{"Driver.Packet":66.517,"Driver.Packet.draw":47.227,"Driver.Draw":46.797,"Driver.Draw.device_setup":21.404,"Graphics.Draw":21.368,"Graphics.Draw.draw_and_resource_release":19.029,"Driver.Packet.pipeline_drain":15.703,"Vulkan.DrawFromRecipe":15.547},"owned_draw_counts":{},"graphics_track":{"Graphics.Barrier.dcc-clear":4752,"Graphics.Barrier.dcc-keys":2446,"Graphics.Barrier.dispatch-lead":891,"Graphics.Barrier.dispatch-trail":1188,"Graphics.Barrier.draw":32435,"Graphics.Barrier.fill":4752,"Graphics.Barrier.label-run":15777,"Graphics.Barrier.present-blit":1188,"Graphics.Barrier.staging-in":2079,"Graphics.Barrier.staging-out":891,"Graphics.Barrier.storage-writeback":7363,"Graphics.BarrierMerged.dispatch-lead":297,"Graphics.BarrierMerged.fill":2376,"Graphics.BarrierMerged.staging-in":594,"Graphics.BarrierMerged.staging-out":891,"Graphics.BarrierMerged.storage-writeback":2141,"Graphics.Copy":2376,"Graphics.Copy.bytes":495866448,"Graphics.RenderPass":12474,"Graphics.RenderPass.Close.command":5552,"Graphics.RenderPass.Close.image":2908,"Graphics.RenderPass.Close.key":594,"Graphics.RenderPass.Close.new-batch":3420,"Graphics.RenderPass.Continued":628364},"trace_dropped":true,"trace_dropped_threads":{"queue worker 0x0":{"events_full_after_s":8.104,"events_lost":389056,"totals_full":false}},"trace":"aps5-trace-6ca1d5633b9e-268596.json.gz"} ``` **Incomplete trace:** recorded data was lost. Slice-based timings, waits and batch inventories cover retained events only; missing slices are not idle time. Summary statistics are reported separately. - queue worker 0x0: 389056 events lost; buffer full at 8103.6 ms; over the 119 of 297 frames that ended before it: busy 51.8 ms per frame (76 %), wait 0.2, largest Driver.Packet 51.9, Driver.Completion 0.0 (the thread table divides the retained slices by every frame) **Slowest frames** (largest slices inside each, inclusive) - present 2427: 74.6 ms at 11672 ms: batch (gpu) 32.3, Graphics.Draw (draw committer) 14.4, Recorder.Sync (draw committer) 13.7, Graphics.Draw.draw_and_resource_release (draw committer) 12.8 - present 2480: 74.4 ms at 15305 ms: batch (gpu) 32.6, Recorder.Sync (draw committer) 15.1, Graphics.Draw (draw committer) 13.0, Graphics.Draw.draw_and_resource_release (draw committer) 11.7 - present 2472: 74.0 ms at 14749 ms: batch (gpu) 32.1, Recorder.Sync (draw committer) 15.0, Graphics.Draw (draw committer) 13.5, Graphics.Draw.draw_and_resource_release (draw committer) 12.2 - present 2476: 74.0 ms at 15027 ms: batch (gpu) 32.5, Recorder.Sync (draw committer) 15.5, Graphics.Draw (draw committer) 13.4, Graphics.Draw.draw_and_resource_release (draw committer) 12.0 - present 2489: 73.9 ms at 15928 ms: batch (gpu) 32.1, Graphics.Draw (draw committer) 15.5, Recorder.Sync (draw committer) 15.2, Graphics.Draw.draw_and_resource_release (draw committer) 13.0 **Persistent spikes** (frame time above the fastest frame that separates it from a longer frame; one entry per stall, not per frame) - present 2427: 74.6 ms at 11672 ms, persistence 10.6 ms - present 2371: 73.0 ms at 7920 ms, persistence 9.0 ms - present 2337: 73.0 ms at 5631 ms, persistence 8.8 ms - present 2480: 74.4 ms at 15305 ms, persistence 8.7 ms - present 2472: 74.0 ms at 14749 ms, persistence 8.3 ms - present 2476: 74.0 ms at 15027 ms, persistence 8.0 ms **Threads** (ms per frame) | thread | busy | wait | untraced | in slices < 20 us | largest | |---|---|---|---|---|---| | queue worker 0x0 | 20.8 (31 %) | 0.1 (0 %) | 46.6 | 29.7 | Driver.Packet 20.9, Driver.Completion 0.0 | | draw committer | 31.8 (47 %) | 0.0 (0 %) | 35.7 | 54.9 | Recorder.Sync 15.3, Graphics.Draw 13.2 | | presenter | 0.4 (1 %) | 0.2 (0 %) | 66.9 | 0.1 | VideoOut.Flip 0.6, Driver.Present 0.0 | | title | 0.0 (0 %) | 0.0 (0 %) | 67.5 | 0.2 | Shader.ResolveGraphicsStagesAbi 0.0, Shader.ResolveAbi 0.0 | | title | 0.0 (0 %) | 0.0 (0 %) | 67.5 | 0.1 | Shader.ResolveAbi 0.0, Shader.ResolveGraphicsStagesAbi 0.0 | | title | 0.0 (0 %) | 0.0 (0 %) | 67.5 | 0.1 | Shader.ResolveAbi 0.0, Shader.ResolveGraphicsStagesAbi 0.0 | | title | 0.0 (0 %) | 0.0 (0 %) | 67.5 | 0.1 | Shader.ResolveAbi 0.0, Shader.ResolveGraphicsAbi 0.0 | | title | 0.0 (0 %) | 0.0 (0 %) | 67.5 | 0.1 | Shader.ResolveAbi 0.0, Shader.ResolveGraphicsStagesAbi 0.0 | | title | 0.0 (0 %) | 0.0 (0 %) | 67.5 | 0.1 | Shader.ResolveAbi 0.0, Shader.ResolveGraphicsStagesAbi 0.0 | | title | 0.0 (0 %) | 0.0 (0 %) | 67.5 | 0.0 | Shader.ResolveAbi 0.0, Shader.ResolveGraphicsStagesAbi 0.0 | | title | 0.0 (0 %) | 0.0 (0 %) | 67.5 | 0.0 | Shader.ResolveAbi 0.0, Shader.ResolveGraphicsStagesAbi 0.0 | | title | 0.0 (0 %) | 0.0 (0 %) | 67.5 | 0.0 | Shader.ResolveAbi 0.0, Shader.ResolveGraphicsStagesAbi 0.0 | | title | 0.0 (0 %) | 0.0 (0 %) | 67.5 | 0.1 | Shader.ResolveAbi 0.0, Shader.ResolveGraphicsStagesAbi 0.0 | | title | 0.0 (0 %) | 0.0 (0 %) | 67.5 | 0.1 | Shader.ResolveAbi 0.0, Shader.ResolveGraphicsStagesAbi 0.0 | | title | 0.0 (0 %) | 0.0 (0 %) | 67.5 | 0.0 | Shader.ResolveAbi 0.0, Shader.ResolveGraphicsAbi 0.0 | | title | 0.0 (0 %) | 0.0 (0 %) | 67.5 | 0.1 | Shader.ResolveAbi 0.0, Shader.ResolveGraphicsAbi 0.0 | | title | 0.0 (0 %) | 0.0 (0 %) | 67.5 | 0.1 | Shader.ResolveAbi 0.0, Shader.ResolveGraphicsAbi 0.0 | | gpu | 31.6 (47 %) | 0.0 (0 %) | 35.9 | 0.0 | batch 31.6 | **Largest slices** (ms per frame, inclusive, all threads): batch 31.6, Driver.Packet 20.9, Recorder.Sync 15.3, Driver.Packet.draw 14.4, Driver.Draw 14.3, Graphics.Draw 13.2 **Longest waits** - Driver.Present.gpu_mutex_wait (presenter) 6.8 ms at 1 ms, present 2254 - Vulkan.Acquire.acquire_fence_wait (presenter) 2.5 ms at 8 ms, present 2254 - Driver.Present.render_fence_wait (presenter) 0.5 ms at 10 ms, present 2254 - GpuMutex.wait.fill (queue worker 0x0) 0.2 ms at 1738 ms, present 2279 - Vulkan.Acquire.acquire_fence_wait (presenter) 0.2 ms at 8613 ms, present 2381 - Vulkan.Acquire.acquire_fence_wait (presenter) 0.2 ms at 12761 ms, present 2443 **Largest GPU batches** (GPU ranges inside, and the CPU slices that recorded each, inclusive) - batch 275: 18.9 ms at 923 ms, present 2267: GPU no ranges; recorded by Graphics.Draw (draw committer) 3.9, Graphics.Draw.draw_and_resource_release (draw committer) 3.0, Recorder.Submit (draw committer) 0.0, Recorder.Reap (draw committer) 0.0 - batch 3997: 18.8 ms at 13155 ms, present 2448: GPU no ranges; recorded by Graphics.Draw (draw committer) 4.1, Graphics.Draw.draw_and_resource_release (draw committer) 3.1, Recorder.Submit (draw committer) 0.0, Graphics.Draw.validate (draw committer) 0.0 - batch 4763: 18.8 ms at 15704 ms, present 2485: GPU no ranges; recorded by Graphics.Draw (draw committer) 4.0, Graphics.Draw.draw_and_resource_release (draw committer) 3.1, Recorder.Submit (draw committer) 0.0, Graphics.Draw.index_upload (draw committer) 0.0 - batch 3956: 18.8 ms at 13011 ms, present 2446: GPU no ranges; recorded by Graphics.Draw (draw committer) 3.7, Graphics.Draw.draw_and_resource_release (draw committer) 3.0, Recorder.Submit (draw committer) 0.0, Graphics.Draw.index_upload (draw committer) 0.0 - batch 4784: 18.8 ms at 15771 ms, present 2486: GPU no ranges; recorded by Graphics.Draw (draw committer) 3.8, Graphics.Draw.draw_and_resource_release (draw committer) 3.0, Recorder.Submit (draw committer) 0.0, Graphics.Draw.index_upload (draw committer) 0.0 </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](https://github.com/boykopovar/AnyPS5/blob/main/docs/dev/CONVENTIONS.md) and the licence notice of code adapted from upstream (see AGENTS.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: #26586 - [x] Unblocks: none - [x] GPUs tested: AMD Radeon RX 6700 XT, AMD 26.11.2, Windows 11 22621 - [x] AI-assisted: yes
MarcZX10 commented 2026-11-25 01:52:04 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-25T01:52:04Z.

Review: COMMENTED


Reviewed — no blocking findings

The inspected changes raise the default draw-cache entry cap to 262,144 while keeping the key and shape sighting tables at their previous size; I found no verified blocking defect.

What I ran

Inspected the prepared diff and targeted source at head 8c0d924948a4f610572d412fbaf39a1304246e48 using the review reader. No build or test commands were run; no merged-preview check was performed.

Results

Check Result Note
Diff and targeted source review passed Six changed files; relevant code paths inspected
Build and tests not run No execution environment used

Findings

Blocking

None verified in the inspected changes.

Non-blocking

None.

Not verified

Build and test execution were not performed. The performance and validation-layer results in the PR description are author-reported, not independently verified. The full text of Draw.cpp and ENVIRONMENT.md was not read; their changed hunks were inspected. The other four changed files were read in full.

To get this to a good state

Nothing is required.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:6050414267 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/26597#pullrequestreview-6050414267). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-11-25T01:52:04Z. **Review:** COMMENTED --- # Reviewed — no blocking findings The inspected changes raise the default draw-cache entry cap to 262,144 while keeping the key and shape sighting tables at their previous size; I found no verified blocking defect. ## What I ran Inspected the prepared diff and targeted source at head `8c0d924948a4f610572d412fbaf39a1304246e48` using the review reader. No build or test commands were run; no merged-preview check was performed. ## Results | Check | Result | Note | |---|---|---| | Diff and targeted source review | passed | Six changed files; relevant code paths inspected | | Build and tests | not run | No execution environment used | ## Findings ### Blocking None verified in the inspected changes. ### Non-blocking None. ## Not verified Build and test execution were not performed. The performance and validation-layer results in the PR description are author-reported, not independently verified. The full text of `Draw.cpp` and `ENVIRONMENT.md` was not read; their changed hunks were inspected. The other four changed files were read in full. ## To get this to a good state Nothing is required.
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!26597
No description provided.