perf(agc): answer repeated depth-surface lookups from a per-thread miss memo #26681

Merged
meh7an merged 1 commit from upstream-pr/26681 into main 2026-11-25 07:28:09 +00:00
meh7an commented 2026-11-24 15:06:25 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by meh7an on 2026-11-24T15:06:25Z.


What

RepeatStorageSurface runs once per resident color target of every draw on the committer. It first asks DepthSurfaceStorage whether a depth surface holds the target's address, and on the Sonic Origins S3K menu page (add-ons installed) the answer is almost always no: every call takes surfacesMutex and walks the registry back to front (41 surfaces there), a few dependent pointer loads per entry. In the sampler windows below that call is 0.42 to 0.45% of the committer, and the in-process rotation shows about 340 ns of the 852 ns the rest of the function takes (RepeatStorageSurface, excluding the Refresh it calls).

This PR keeps a per-thread memo of the (device, address) pairs the scan found unclaimed, each with the registry serial (surfacesSerial, which DepthSurfacesSerial() already returns) that was read under surfacesMutex right before the scan. A lookup that finds its pair with the current serial returns null without the lock or the scan. 32 direct-mapped slots of 24 bytes per thread (ThreadScratch, so no emulated TLS), no budget to trim, no new environment variable and no switch.

Why a remembered miss stays correct until the serial moves (read on main 05bbb26cd34):

  • A lookup matches a surface that is active, on the same device, not retired, and whose target.address or target.stencilAddress equals the address. target and context are const members, so a surface never changes address or device.
  • A surface enters the registry in one place, surfaces().push_back in DepthSurfaceViewWithStencilWriteIntent (what DepthSurfaceView calls), under surfacesMutex and right after surfacesSerial.fetch_add.
  • retired goes from true to false in one place, the same function, which bumps the serial first when it was true.
  • active is initialised true and only ever stored false (five store(false) sites); nothing reactivates a surface.
  • Everything else only removes entries or marks them retired (releaseRetired, retire, ClearDepthSurfaces), which can turn a hit into a miss and never a miss into a hit.
  • The serial is read under the mutex before the scan and the memo is filled only there, so a creation racing the scan either happens before the read (the scan sees it) or moves the serial afterwards (the memo entry is stale and is not used). A lookup that reads the serial without the lock behaves as if it had taken the mutex before the creation, as it can today.
  • mip != 0 and baseLevel != 0 return null before the memo, as before; the memo is consulted only for the question the scan answers. Positive answers (a surface was found) are never remembered, so everything after the scan (Storage, the layered views and their side effects) runs as on main.

DepthSurfaceStorageScans() counts the calls that reached the scan; the new test uses it to show that five lookups of one unclaimed address scan once. Its callers (RepeatStorageSurface and cachedStorageTexture) are unchanged.

What it shows. Per call, in one run, RepeatStorageSurface (excluding the Refresh inside it) goes from 852 ns to 512 ns, a saving of 340 ns (40%) that holds in all ten steady windows (table below): the memo hit rate is 98.85%, and at 25,000 calls per second that is about 8.4 ms of committer time per second (0.84%). In the sampler windows DepthSurfaceStorage goes from 0.43% to 0.12% of the committer's samples and RepeatStorageSurface from 3.32% to 3.02%. The frame is flat. The sampler windows read 16.34 FPS on main and 16.11 with the change, the traced runs 16.88 and 16.73 (frame p50 63.9 and 64.3 ms, GPU busy 30.7 ms in both), all inside this scene's run-to-run spread (main alone spans 16.64 to 17.13 in the traced runs). Both threads are close to their limit in this scene (the worker is blocked 18.7 to 20.5% of its samples in DrawPipeline::Enqueue and Drain in these windows, and the committer idled 19% of its samples in the main windows of 2026-11-23), so a committer saving of about 0.3 ms of a 62 ms frame is not expected to show in the frame rate. I am proposing it for removing one lock and one 41-entry walk from every draw, not for a measured frame-rate gain.

Tested

Windows 11 Pro (10.0.26300), NVIDIA GeForce RTX 2080 Ti (driver 610.88), Intel Core i9-9900K. Sonic Origins (PPSA05324) menu on the S3K page with the four add-ons, 3840x2160, default environment. Measured commits: main 05bbb26cd34 and this PR's 3271af07235 (one tree, built one after the other; the main arm's dirty flag is the new test file only, which no module of the game contains).

Tests. New RunUnclaimed in tests/execution/DepthStorage.cpp (agc_driver_depth_storage): repeated lookups of an address no surface holds, of the stencil address, of another device's handle, of addresses inside the plane's memory but not at its base; a depth and a stencil surface created after those misses were remembered; 256 other misses followed by a lookup of the real plane (so that the real plane's slot is shared with a miss); a retired surface (three lookups) bound again; ClearDepthSurfaces; and the scan counter (five lookups of one unclaimed address scan once). The focused set around depth surfaces, storage images, refresh, resident targets and multisample depth (248 tests in 65 executables: agc_repeat_storage_guard, agc_driver_depth_*, agc_driver_native_depth_*, agc_driver_multisample_*, agc_driver_storage_*, agc_driver_own_refresh_*, agc_driver_refresh_*, agc_driver_color_memo_*, agc_driver_frame_replay_(multisample|single_sample)_depth, agc_driver_image_table_reuse_(retaken|retired)*, agc_driver_recorder, agc_storage_*, agc_depth_*, agc_recorder_*, agc_multisample_*, agc_import_*, agc_dcc_key*, and the neighbours listed in the regex of the log): 248/248 on main and 248/248 on the change, plain and with ANYPS5_REQUIRE_VULKAN=1 ANYPS5_NO_SHADER_CACHE=1 VK_LOADER_DEBUG=layer VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation from the same machine and GPU (ctest --test-dir build -R <pattern> -V): 849 "Insert instance layer" lines in each validation log, no "was not found but was requested by env var VK_INSTANCE_LAYERS" line, and no VUID- line in either; the result lists are identical (the same four tests skip by design in both). The run on main used the test without the assertions that need DepthSurfaceStorageScans, which main does not have. Mutants: 10 one-line changes of the memo and the serial bumps (the serial, the address or the device dropped from the match, a miss remembered at the next serial, a found surface remembered as a miss, the lookup compared against serial 0, no bump at a creation, no bump when a retired surface is bound again, a miss never remembered, all addresses in one slot); 9 are caught by agc_driver_depth_storage, and the survivor (one shared slot) only costs scans, never a wrong answer. tools/env_reference.py --check and tools/check_conventions.py --base upstream/main pass.

In-process rotation (a separate instrument build, m313_instrumentation.zip: RepeatStorageSurface cycles per call between four bodies on the committer thread in one run, so the machine state cancels; the first two windows are the game loading, windows 3 to 12 are the menu page; times exclude the Refresh inside the function):

window calls per second main body, ns per call memo, ns per call saved memo hits memo misses
1 (warm-up) 179 2803.2 2481.1 322.1 ns (11%) 13323 1535
2 (warm-up) 2441 985.4 628.1 357.3 ns (36%) 20858 931
3 14332 996.4 599.0 397.4 ns (40%) 110199 3572
4 15049 1044.5 655.1 389.4 ns (37%) 113256 3305
5 26490 818.1 482.8 335.3 ns (41%) 199285 2301
6 27699 806.5 495.5 311.0 ns (39%) 208670 1953
7 26981 799.0 478.2 320.8 ns (40%) 202513 1863
8 27011 806.2 481.3 324.9 ns (40%) 202712 1701
9 26532 814.8 500.0 314.8 ns (39%) 199462 1863
10 27273 835.9 468.6 367.3 ns (44%) 205836 1657
11 28037 785.4 467.3 318.1 ns (41%) 211956 1740
12 28420 809.3 489.2 320.1 ns (40%) 214900 1838

Steady windows 3 to 12: main body 852 ns per call (785-1044), memo 512 ns (467-655), 340 ns saved per call (40%), memo hit rate 98.85%, 24782 calls per second, so 8.4 ms per second of committer time (0.84%). The two variants I dropped (a one-entry memo of the described resource, and a check of the front cache entry before findStorageByImage) read 555 and 532 ns, with hit rates of 3% and 1.6%. The instrument's other bodies are not part of this PR.

Sampler (APS5_SAMPLE_WORKER and APS5_SAMPLE_COMMITTER, one 60 s window per arm, both orders, committed builds; benchmark leases, average outside CPU 3.1% over the four windows, every lease quiet at its start):

window arm (commit) FPS median (min-max) committer samples DepthSurfaceStorage RepeatStorageSurface StorageTexture::refresh worker blocked in Enqueue + Drain
r1 main (05bbb26cd3) 16.47 (15.94-17.22) 3819 0.42% (16) 3.40% (130) 4.40% 18.7%
r1 this PR (3271af0723) 16.13 (15.52-16.67) 3803 0.08% (3) 3.08% (117) 4.81% 19.3%
r2 this PR (3271af0723) 16.09 (15.37-16.60) 3807 0.16% (6) 2.97% (113) 3.78% 20.5%
r2 main (05bbb26cd3) 16.21 (15.56-16.52) 3801 0.45% (17) 3.24% (123) 4.16% 19.4%

Means of the two windows per arm: DepthSurfaceStorage 0.43% to 0.12% of the committer, RepeatStorageSurface 3.32% to 3.02%, StorageTexture::refresh 4.28% to 4.30% (untouched), worker blocked 19.0% to 19.9%; reading FPS 16.34 to 16.11.

Traced runs (APS5_TRACE_SECONDS=200:15, same page, both orders, tools/trace_digest.py; benchmark leases, outside CPU 2.8 to 3.2%, all quiet at their start):

run arm (commit) reading median FPS (min-max) presents p50 ms p90 ms p99 ms GPU busy ms per present
t1 main (05bbb26cd3 dirty) 16.64 (16.27-16.92) 226 64.4 73.1 90.7 30.4
t1 this PR (3271af0723) 16.64 (16.49-17.01) 226 64.5 71.3 90.6 30.7
t2 this PR (3271af0723) 16.82 (16.44-17.00) 228 64.2 72.2 88.4 30.7
t2 main (05bbb26cd3 dirty) 17.13 (16.89-17.47) 230 63.4 74.8 89.4 31.0

FPS main 16.88, this PR 16.73 (-0.9%); pair deltas +0.0% and -1.8% (main first in t1, this PR first in t2); frame p50 63.9 and 64.3 ms; GPU busy 30.7 and 30.7 ms per present; main alone spans 16.64 to 17.13. All four traces lost events the same way (the queue worker's buffer fills after about 5 s), so slice timings cover the first seconds only. The summaries and traces are attached as m313_traces_main_t1_05bbb26cd34.zip, m313_traces_main_t2_05bbb26cd34.zip, m313_traces_pr_t1_3271af07235.zip and m313_traces_pr_t2_3271af07235.zip (each zip holds the run's summary line, trace and digest); the instrumentation is m313_instrumentation.zip (the rotation generator, its base edit and the [ab-rss] lines of the run).

aps5-summary.jsonl lines: main (t1), this PR (t1), this PR (t2), main (t2)
{"commit":"05bbb26cd347","dirty":true,"env":{"APS5_TRACE_DIR":"<path>","APS5_TRACE_SECONDS":"200:15"},"gpu":"NVIDIA GeForce RTX 2080 Ti","driver":"NVIDIA 610.88","os":"Windows 10.0.26300","cpu":"Intel(R) Core(TM) i9-9900K CPU @ 3.60GHz","cpu_threads":16,"memory_mib":65468,"title_id":"PPSA05324","title":"Sonic Origins","content_version":"02.002.000","resolution":"3840x2160","window":{"spec":"seconds 200:15","first_present":4501,"ms":15052.111},"presents":226,"frame_ms":{"p50":64.407,"p90":73.121,"p99":90.652,"max":99.575},"gpu_busy_ms_per_present":30.419,"worker_busy_pct":{"queue worker 0x0":96.623},"phase_totals_ms":{"Driver.Completion":2.647,"Driver.Dispatch":1360.705,"Driver.Dispatch.capture_resources":17.647,"Driver.Dispatch.decode_key_device_setup":985.762,"Driver.Dispatch.lookup_cache":14.297,"Driver.Dispatch.materialize":3.416,"Driver.Dispatch.prepared_invocation":2.730,"Driver.Draw":10898.198,"Driver.Draw.device_setup":745.098,"Driver.Draw.draw_enqueued":2275.135,"Driver.Draw.post_compile_prepare":183.804,"Driver.Draw.prepare":1312.296,"Driver.Draw.shader_compile_and_link":6132.346,"Driver.EndSubmission":10.615,"Driver.Packet":14530.466,"Driver.Packet.device_lock":166.251,"Driver.Packet.dispatch":1364.290,"Driver.Packet.draw":11105.734,"Driver.Packet.execute":405.923,"Driver.Packet.flip_flush":6.952,"Driver.Packet.flush_between_packets":472.012,"Driver.Packet.memory_wait":0.016,"Driver.Packet.pipeline_drain":242.000,"Driver.Packet.pipeline_prepare":261.417,"Driver.Packet.prepare_memory":257.364,"Driver.Packet.rendering_wait":0.310,"Driver.Present":2695.665,"Driver.Present.acquire_image":3.175,"Driver.Present.device_setup":0.272,"Driver.Present.gpu_mutex_wait":164.391,"Driver.Present.inflight_wait":0.695,"Driver.Present.present_display_buffer":42.692,"Driver.Present.queue_present":46.420,"Driver.Present.release_and_callback":0.676,"Driver.Present.render_fence_wait":2436.483,"Driver.Present.resize":0.636,"Driver.Present.validate":0.051,"Driver.Suspend":0.054,"GpuMutex.wait.draw":55.332,"GpuMutex.wait.end":7.546,"GpuMutex.wait.fill":6.247,"GpuMutex.wait.flush":0.901,"GpuMutex.wait.label":6.595,"GpuMutex.wait.other":5.844,"GpuMutex.wait.present":163.625,"GpuMutex.wait.wait":6.385,"Graphics.Draw":9120.867,"Graphics.Draw.draw_and_resource_release":6966.656,"Graphics.Draw.index_upload":461.363,"Graphics.Draw.validate":769.154,"Graphics.Draw.vertex_upload":792.861,"Graphics.DrawWithRecipe":741.391,"Graphics.DrawWithRecipe.draw_and_resource_release":695.697,"Graphics.DrawWithRecipe.index_upload":8.353,"Graphics.DrawWithRecipe.validate":13.776,"Graphics.DrawWithRecipe.vertex_upload":15.808,"Recorder.Reap":135.794,"Recorder.Submit":471.717,"Recorder.WaitSerial":2651.169,"Resources.Complete":97.423,"Resources.Prepare":51.115,"Shader.DrawStage":3968.556,"Shader.DrawStage.capture_resources":1759.630,"Shader.DrawStage.materialize":1133.692,"Shader.DrawStage.prepared_invocation":983.739,"Shader.ResolveAbi":144.173,"Shader.ResolveGraphicsAbi":57.702,"Shader.ResolveGraphicsStagesAbi":140.264,"VideoOut.Flip":2709.927,"VideoOut.Flip.completion_mutex_wait":0.398,"VideoOut.Flip.config_mutex_wait":0.029,"VideoOut.Flip.frame_limit":0.205,"VideoOut.Flip.notify_game":22.146,"VideoOut.Flip.present":2683.781,"VideoOut.Flip.validate":0.391,"VideoOut.Flip.vblank_wait":0.168,"VideoOut.Flip.window_prepare":0.447,"VideoOut.Flip.window_title":1.979,"VideoOut.Readiness":1.299,"VideoOut.Readiness.locks_validate":0.660,"Vulkan.Acquire":2.872,"Vulkan.Acquire.acquire_fence_wait":0.508,"Vulkan.Acquire.acquire_image":1.544,"Vulkan.Acquire.fence_reset":0.594,"Vulkan.Acquire.retired_swapchains":0.116,"Vulkan.Dispatch":182.864,"Vulkan.Dispatch.command_record":58.667,"Vulkan.Dispatch.shader_resources":123.221,"Vulkan.DrawFromRecipe":753.204,"Vulkan.Present":22.560,"Vulkan.Present.command_record_scale":7.997,"Vulkan.Present.pixel_upload":3.239,"Vulkan.Present.queue_submit":11.032,"Vulkan.QueuePresent":45.127,"Vulkan.QueuePresent.queue_present":44.710,"Vulkan.Retire":2435.959,"Vulkan.Retire.wait":2431.478},"top_phases_ms_per_frame":{"Driver.Packet":64.294,"Driver.Packet.draw":49.140,"Driver.Draw":48.222,"Graphics.Draw":40.358,"Graphics.Draw.draw_and_resource_release":30.826,"Driver.Draw.shader_compile_and_link":27.134,"Shader.DrawStage":17.560,"VideoOut.Flip":11.991},"owned_draw_counts":{"OwnedDraw.evicted_other":911},"graphics_track":{"Graphics.Barrier.copy":904,"Graphics.Barrier.dispatch-lead":1400,"Graphics.Barrier.dispatch-trail":2486,"Graphics.Barrier.draw":37235,"Graphics.Barrier.fill-clear":2260,"Graphics.Barrier.label-run":38835,"Graphics.Barrier.present-blit":452,"Graphics.Barrier.staging-in":2078,"Graphics.Barrier.staging-out":452,"Graphics.Barrier.storage-upload":25764,"Graphics.Barrier.storage-writeback":2348,"Graphics.BarrierMerged.dispatch-lead":1086,"Graphics.BarrierMerged.staging-in":182,"Graphics.BarrierMerged.staging-out":452,"Graphics.BarrierMerged.storage-writeback":364,"Graphics.Copy":1356,"Graphics.Copy.bytes":14492928,"Graphics.RenderPass":18296,"Graphics.RenderPass.Close.command":6852,"Graphics.RenderPass.Close.image":18,"Graphics.RenderPass.Close.key":846,"Graphics.RenderPass.Close.new-batch":10580,"Graphics.RenderPass.Continued":457208},"trace_dropped":true,"trace_dropped_threads":{"queue worker 0x0":{"events_full_after_s":5.124,"events_lost":493101,"totals_full":false},"draw committer":{"events_full_after_s":14.125,"events_lost":17888,"totals_full":false}},"trace":"aps5-trace-05bbb26cd347-5296.json.gz"}
{"commit":"3271af072354","dirty":false,"env":{"APS5_TRACE_DIR":"<path>","APS5_TRACE_SECONDS":"200:15"},"gpu":"NVIDIA GeForce RTX 2080 Ti","driver":"NVIDIA 610.88","os":"Windows 10.0.26300","cpu":"Intel(R) Core(TM) i9-9900K CPU @ 3.60GHz","cpu_threads":16,"memory_mib":65468,"title_id":"PPSA05324","title":"Sonic Origins","content_version":"02.002.000","resolution":"3840x2160","window":{"spec":"seconds 200:15","first_present":4535,"ms":15010.719},"presents":226,"frame_ms":{"p50":64.481,"p90":71.266,"p99":90.626,"max":91.385},"gpu_busy_ms_per_present":30.711,"worker_busy_pct":{"queue worker 0x0":96.589},"phase_totals_ms":{"Driver.Completion":3.102,"Driver.Dispatch":1339.455,"Driver.Dispatch.capture_resources":17.424,"Driver.Dispatch.decode_key_device_setup":964.971,"Driver.Dispatch.lookup_cache":13.578,"Driver.Dispatch.materialize":3.574,"Driver.Dispatch.prepared_invocation":2.787,"Driver.Draw":10870.823,"Driver.Draw.device_setup":741.392,"Driver.Draw.draw_enqueued":2310.630,"Driver.Draw.post_compile_prepare":180.678,"Driver.Draw.prepare":1292.805,"Driver.Draw.shader_compile_and_link":6108.741,"Driver.EndSubmission":6.856,"Driver.Packet":14488.622,"Driver.Packet.device_lock":163.170,"Driver.Packet.dispatch":1343.299,"Driver.Packet.draw":11089.041,"Driver.Packet.execute":407.624,"Driver.Packet.flip_flush":6.594,"Driver.Packet.flush_between_packets":483.508,"Driver.Packet.memory_wait":0.002,"Driver.Packet.pipeline_drain":229.325,"Driver.Packet.pipeline_prepare":259.912,"Driver.Packet.prepare_memory":241.280,"Driver.Packet.rendering_wait":0.402,"Driver.Present":2690.809,"Driver.Present.acquire_image":3.436,"Driver.Present.device_setup":0.336,"Driver.Present.gpu_mutex_wait":145.531,"Driver.Present.inflight_wait":0.697,"Driver.Present.present_display_buffer":41.694,"Driver.Present.queue_present":45.804,"Driver.Present.release_and_callback":0.772,"Driver.Present.render_fence_wait":2451.615,"Driver.Present.resize":0.574,"Driver.Present.validate":0.127,"Driver.Suspend":0.076,"GpuMutex.wait.dispatch":0.029,"GpuMutex.wait.draw":51.343,"GpuMutex.wait.end":1.260,"GpuMutex.wait.fill":7.705,"GpuMutex.wait.flush":0.837,"GpuMutex.wait.label":5.269,"GpuMutex.wait.other":5.151,"GpuMutex.wait.present":144.825,"GpuMutex.wait.wait":4.298,"Graphics.Draw":9178.411,"Graphics.Draw.draw_and_resource_release":7058.254,"Graphics.Draw.index_upload":470.464,"Graphics.Draw.validate":758.310,"Graphics.Draw.vertex_upload":753.628,"Graphics.DrawWithRecipe":621.690,"Graphics.DrawWithRecipe.draw_and_resource_release":596.967,"Graphics.DrawWithRecipe.index_upload":3.024,"Graphics.DrawWithRecipe.validate":8.774,"Graphics.DrawWithRecipe.vertex_upload":7.647,"Recorder.Reap":123.701,"Recorder.Submit":463.827,"Recorder.WaitSerial":2652.683,"Resources.Complete":78.420,"Resources.Prepare":49.777,"Shader.DrawStage":4045.682,"Shader.DrawStage.capture_resources":1776.074,"Shader.DrawStage.materialize":1145.460,"Shader.DrawStage.prepared_invocation":1033.004,"Shader.ResolveAbi":145.575,"Shader.ResolveGraphicsAbi":56.290,"Shader.ResolveGraphicsStagesAbi":138.838,"VideoOut.Flip":2691.241,"VideoOut.Flip.completion_mutex_wait":0.423,"VideoOut.Flip.config_mutex_wait":0.042,"VideoOut.Flip.frame_limit":0.190,"VideoOut.Flip.notify_game":7.743,"VideoOut.Flip.present":2679.581,"VideoOut.Flip.validate":0.346,"VideoOut.Flip.vblank_wait":0.225,"VideoOut.Flip.window_prepare":0.518,"VideoOut.Flip.window_title":1.794,"VideoOut.Readiness":1.163,"VideoOut.Readiness.locks_validate":0.481,"Vulkan.Acquire":3.185,"Vulkan.Acquire.acquire_fence_wait":0.664,"Vulkan.Acquire.acquire_image":1.732,"Vulkan.Acquire.fence_reset":0.532,"Vulkan.Acquire.retired_swapchains":0.118,"Vulkan.Dispatch":183.648,"Vulkan.Dispatch.command_record":59.157,"Vulkan.Dispatch.shader_resources":123.507,"Vulkan.DrawFromRecipe":629.998,"Vulkan.Present":21.917,"Vulkan.Present.command_record_scale":7.774,"Vulkan.Present.pixel_upload":2.373,"Vulkan.Present.queue_submit":11.461,"Vulkan.QueuePresent":44.664,"Vulkan.QueuePresent.queue_present":44.355,"Vulkan.Retire":2450.968,"Vulkan.Retire.wait":2445.988},"top_phases_ms_per_frame":{"Driver.Packet":64.109,"Driver.Packet.draw":49.067,"Driver.Draw":48.101,"Graphics.Draw":40.612,"Graphics.Draw.draw_and_resource_release":31.231,"Driver.Draw.shader_compile_and_link":27.030,"Shader.DrawStage":17.901,"VideoOut.Flip":11.908},"owned_draw_counts":{"OwnedDraw.evicted_other":1306},"graphics_track":{"Graphics.Barrier.copy":904,"Graphics.Barrier.dispatch-lead":1380,"Graphics.Barrier.dispatch-trail":2489,"Graphics.Barrier.draw":37442,"Graphics.Barrier.fill-clear":2260,"Graphics.Barrier.input-mirror":169,"Graphics.Barrier.label-run":38863,"Graphics.Barrier.present-blit":452,"Graphics.Barrier.shadow-publish":2,"Graphics.Barrier.staging-in":2098,"Graphics.Barrier.staging-out":452,"Graphics.Barrier.storage-upload":25774,"Graphics.Barrier.storage-writeback":2426,"Graphics.BarrierMerged.dispatch-lead":1109,"Graphics.BarrierMerged.shadow-publish":2,"Graphics.BarrierMerged.staging-in":166,"Graphics.BarrierMerged.staging-out":452,"Graphics.BarrierMerged.storage-writeback":299,"Graphics.Copy":1527,"Graphics.Copy.bytes":34989175,"Graphics.RenderPass":18389,"Graphics.RenderPass.Close.command":6950,"Graphics.RenderPass.Close.image":33,"Graphics.RenderPass.Close.key":848,"Graphics.RenderPass.Close.new-batch":10558,"Graphics.RenderPass.Continued":458350},"trace_dropped":true,"trace_dropped_threads":{"queue worker 0x0":{"events_full_after_s":5.323,"events_lost":463710,"totals_full":false},"draw committer":{"events_full_after_s":14.534,"events_lost":8329,"totals_full":false}},"trace":"aps5-trace-3271af072354-36564.json.gz"}
{"commit":"3271af072354","dirty":false,"env":{"APS5_TRACE_DIR":"<path>","APS5_TRACE_SECONDS":"200:15"},"gpu":"NVIDIA GeForce RTX 2080 Ti","driver":"NVIDIA 610.88","os":"Windows 10.0.26300","cpu":"Intel(R) Core(TM) i9-9900K CPU @ 3.60GHz","cpu_threads":16,"memory_mib":65468,"title_id":"PPSA05324","title":"Sonic Origins","content_version":"02.002.000","resolution":"3840x2160","window":{"spec":"seconds 200:15","first_present":4494,"ms":15008.595},"presents":228,"frame_ms":{"p50":64.154,"p90":72.165,"p99":88.412,"max":90.213},"gpu_busy_ms_per_present":30.695,"worker_busy_pct":{"queue worker 0x0":96.549},"phase_totals_ms":{"Driver.Completion":2.820,"Driver.Dispatch":1367.458,"Driver.Dispatch.capture_resources":18.563,"Driver.Dispatch.decode_key_device_setup":988.602,"Driver.Dispatch.lookup_cache":14.541,"Driver.Dispatch.materialize":3.463,"Driver.Dispatch.prepared_invocation":2.912,"Driver.Draw":10855.484,"Driver.Draw.device_setup":740.974,"Driver.Draw.draw_enqueued":2262.936,"Driver.Draw.post_compile_prepare":181.893,"Driver.Draw.prepare":1296.668,"Driver.Draw.shader_compile_and_link":6135.800,"Driver.EndSubmission":9.630,"Driver.Packet":14478.147,"Driver.Packet.device_lock":163.663,"Driver.Packet.dispatch":1371.170,"Driver.Packet.draw":11070.032,"Driver.Packet.execute":405.507,"Driver.Packet.flip_flush":6.830,"Driver.Packet.flush_between_packets":479.550,"Driver.Packet.memory_wait":0.006,"Driver.Packet.pipeline_drain":224.848,"Driver.Packet.pipeline_prepare":260.429,"Driver.Packet.prepare_memory":238.821,"Driver.Packet.rendering_wait":0.409,"Driver.Present":2760.805,"Driver.Present.acquire_image":3.160,"Driver.Present.device_setup":0.331,"Driver.Present.gpu_mutex_wait":138.155,"Driver.Present.inflight_wait":0.710,"Driver.Present.present_display_buffer":42.130,"Driver.Present.queue_present":45.279,"Driver.Present.release_and_callback":0.670,"Driver.Present.render_fence_wait":2529.554,"Driver.Present.resize":0.572,"Driver.Present.validate":0.073,"Driver.Suspend":0.082,"GpuMutex.wait.draw":55.085,"GpuMutex.wait.end":1.616,"GpuMutex.wait.fill":6.944,"GpuMutex.wait.flush":1.887,"GpuMutex.wait.label":5.052,"GpuMutex.wait.other":6.062,"GpuMutex.wait.present":137.318,"GpuMutex.wait.wait":3.273,"Graphics.Draw":8932.196,"Graphics.Draw.draw_and_resource_release":6854.666,"Graphics.Draw.index_upload":447.440,"Graphics.Draw.validate":747.492,"Graphics.Draw.vertex_upload":730.518,"Graphics.DrawWithRecipe":670.258,"Graphics.DrawWithRecipe.draw_and_resource_release":644.509,"Graphics.DrawWithRecipe.index_upload":3.088,"Graphics.DrawWithRecipe.validate":9.125,"Graphics.DrawWithRecipe.vertex_upload":8.024,"Recorder.Reap":136.894,"Recorder.Submit":466.693,"Recorder.WaitSerial":2722.325,"Resources.Complete":107.752,"Resources.Prepare":49.452,"Shader.DrawStage":4057.585,"Shader.DrawStage.capture_resources":1769.443,"Shader.DrawStage.materialize":1148.660,"Shader.DrawStage.prepared_invocation":1046.394,"Shader.ResolveAbi":146.126,"Shader.ResolveGraphicsAbi":56.115,"Shader.ResolveGraphicsStagesAbi":139.637,"VideoOut.Flip":2769.365,"VideoOut.Flip.completion_mutex_wait":0.531,"VideoOut.Flip.config_mutex_wait":0.044,"VideoOut.Flip.frame_limit":0.170,"VideoOut.Flip.notify_game":14.166,"VideoOut.Flip.present":2751.353,"VideoOut.Flip.validate":0.362,"VideoOut.Flip.vblank_wait":0.210,"VideoOut.Flip.window_prepare":0.588,"VideoOut.Flip.window_title":1.587,"VideoOut.Readiness":1.139,"VideoOut.Readiness.locks_validate":0.506,"Vulkan.Acquire":2.887,"Vulkan.Acquire.acquire_fence_wait":0.574,"Vulkan.Acquire.acquire_image":1.547,"Vulkan.Acquire.fence_reset":0.536,"Vulkan.Acquire.retired_swapchains":0.103,"Vulkan.Dispatch":184.109,"Vulkan.Dispatch.command_record":59.091,"Vulkan.Dispatch.shader_resources":123.892,"Vulkan.DispatchRecipe":0.204,"Vulkan.DispatchRecipe.command_record":0.204,"Vulkan.DrawFromRecipe":678.875,"Vulkan.Present":22.355,"Vulkan.Present.command_record_scale":7.993,"Vulkan.Present.pixel_upload":2.798,"Vulkan.Present.queue_submit":11.276,"Vulkan.QueuePresent":44.013,"Vulkan.QueuePresent.queue_present":43.660,"Vulkan.Retire":2528.874,"Vulkan.Retire.wait":2523.097},"top_phases_ms_per_frame":{"Driver.Packet":63.501,"Driver.Packet.draw":48.553,"Driver.Draw":47.612,"Graphics.Draw":39.176,"Graphics.Draw.draw_and_resource_release":30.064,"Driver.Draw.shader_compile_and_link":26.911,"Shader.DrawStage":17.796,"VideoOut.Flip":12.146},"owned_draw_counts":{"OwnedDraw.evicted_other":948},"graphics_track":{"Graphics.Barrier.copy":912,"Graphics.Barrier.dispatch-lead":1395,"Graphics.Barrier.dispatch-trail":2508,"Graphics.Barrier.draw":37405,"Graphics.Barrier.fill-clear":2280,"Graphics.Barrier.label-run":39059,"Graphics.Barrier.present-blit":456,"Graphics.Barrier.staging-in":2116,"Graphics.Barrier.staging-out":456,"Graphics.Barrier.storage-upload":25992,"Graphics.Barrier.storage-writeback":2372,"Graphics.BarrierMerged.dispatch-lead":1113,"Graphics.BarrierMerged.label-run":6,"Graphics.BarrierMerged.staging-in":164,"Graphics.BarrierMerged.staging-out":456,"Graphics.BarrierMerged.storage-writeback":364,"Graphics.Copy":1368,"Graphics.Copy.bytes":14621184,"Graphics.RenderPass":18457,"Graphics.RenderPass.Close.command":6868,"Graphics.RenderPass.Close.image":32,"Graphics.RenderPass.Close.key":951,"Graphics.RenderPass.Close.label":6,"Graphics.RenderPass.Close.new-batch":10600,"Graphics.RenderPass.Continued":461358},"trace_dropped":true,"trace_dropped_threads":{"queue worker 0x0":{"events_full_after_s":5.455,"events_lost":461997,"totals_full":false},"draw committer":{"events_full_after_s":14.537,"events_lost":8212,"totals_full":false}},"trace":"aps5-trace-3271af072354-33760.json.gz"}
{"commit":"05bbb26cd347","dirty":true,"env":{"APS5_TRACE_DIR":"<path>","APS5_TRACE_SECONDS":"200:15"},"gpu":"NVIDIA GeForce RTX 2080 Ti","driver":"NVIDIA 610.88","os":"Windows 10.0.26300","cpu":"Intel(R) Core(TM) i9-9900K CPU @ 3.60GHz","cpu_threads":16,"memory_mib":65468,"title_id":"PPSA05324","title":"Sonic Origins","content_version":"02.002.000","resolution":"3840x2160","window":{"spec":"seconds 200:15","first_present":4582,"ms":15053.136},"presents":230,"frame_ms":{"p50":63.412,"p90":74.799,"p99":89.435,"max":92.017},"gpu_busy_ms_per_present":30.951,"worker_busy_pct":{"queue worker 0x0":96.715},"phase_totals_ms":{"Driver.Completion":2.788,"Driver.Dispatch":1432.386,"Driver.Dispatch.capture_resources":19.026,"Driver.Dispatch.decode_key_device_setup":1050.715,"Driver.Dispatch.lookup_cache":14.552,"Driver.Dispatch.materialize":3.795,"Driver.Dispatch.prepared_invocation":2.885,"Driver.Draw":10813.249,"Driver.Draw.device_setup":732.833,"Driver.Draw.draw_enqueued":2370.367,"Driver.Draw.post_compile_prepare":179.488,"Driver.Draw.prepare":1286.236,"Driver.Draw.shader_compile_and_link":6001.926,"Driver.EndSubmission":9.716,"Driver.Packet":14546.022,"Driver.Packet.device_lock":166.214,"Driver.Packet.dispatch":1436.218,"Driver.Packet.draw":11024.902,"Driver.Packet.execute":404.900,"Driver.Packet.flip_flush":6.883,"Driver.Packet.flush_between_packets":475.684,"Driver.Packet.memory_wait":0.003,"Driver.Packet.pipeline_drain":241.552,"Driver.Packet.pipeline_prepare":262.054,"Driver.Packet.prepare_memory":256.560,"Driver.Packet.rendering_wait":0.394,"Driver.Present":2809.163,"Driver.Present.acquire_image":3.331,"Driver.Present.device_setup":0.294,"Driver.Present.gpu_mutex_wait":169.722,"Driver.Present.inflight_wait":0.717,"Driver.Present.present_display_buffer":45.118,"Driver.Present.queue_present":45.980,"Driver.Present.release_and_callback":0.634,"Driver.Present.render_fence_wait":2542.424,"Driver.Present.resize":0.665,"Driver.Present.validate":0.053,"Driver.Suspend":0.085,"GpuMutex.wait.dispatch":0.059,"GpuMutex.wait.draw":55.452,"GpuMutex.wait.end":2.281,"GpuMutex.wait.fill":8.002,"GpuMutex.wait.flush":0.938,"GpuMutex.wait.label":8.153,"GpuMutex.wait.other":9.288,"GpuMutex.wait.present":168.921,"GpuMutex.wait.wait":2.039,"Graphics.Draw":9306.289,"Graphics.Draw.draw_and_resource_release":7150.621,"Graphics.Draw.index_upload":494.678,"Graphics.Draw.validate":766.903,"Graphics.Draw.vertex_upload":761.266,"Graphics.DrawWithRecipe":701.796,"Graphics.DrawWithRecipe.draw_and_resource_release":668.020,"Graphics.DrawWithRecipe.index_upload":5.125,"Graphics.DrawWithRecipe.validate":11.435,"Graphics.DrawWithRecipe.vertex_upload":10.738,"Recorder.Reap":126.230,"Recorder.Submit":478.245,"Recorder.WaitSerial":2765.751,"Resources.Complete":77.847,"Resources.Prepare":50.646,"Shader.DrawStage":3948.234,"Shader.DrawStage.capture_resources":1783.163,"Shader.DrawStage.materialize":1081.013,"Shader.DrawStage.prepared_invocation":990.615,"Shader.ResolveAbi":147.361,"Shader.ResolveGraphicsAbi":58.575,"Shader.ResolveGraphicsStagesAbi":141.624,"VideoOut.Flip":2816.287,"VideoOut.Flip.completion_mutex_wait":0.461,"VideoOut.Flip.config_mutex_wait":0.027,"VideoOut.Flip.frame_limit":0.147,"VideoOut.Flip.notify_game":15.338,"VideoOut.Flip.present":2797.045,"VideoOut.Flip.validate":0.386,"VideoOut.Flip.vblank_wait":0.165,"VideoOut.Flip.window_prepare":0.487,"VideoOut.Flip.window_title":1.871,"VideoOut.Readiness":1.292,"VideoOut.Readiness.locks_validate":0.709,"Vulkan.Acquire":3.073,"Vulkan.Acquire.acquire_fence_wait":0.523,"Vulkan.Acquire.acquire_image":1.769,"Vulkan.Acquire.fence_reset":0.576,"Vulkan.Acquire.retired_swapchains":0.107,"Vulkan.Dispatch":185.613,"Vulkan.Dispatch.command_record":60.403,"Vulkan.Dispatch.shader_resources":124.194,"Vulkan.DispatchRecipe":1.065,"Vulkan.DispatchRecipe.command_record":1.062,"Vulkan.DrawFromRecipe":711.729,"Vulkan.Present":24.474,"Vulkan.Present.command_record_scale":8.155,"Vulkan.Present.pixel_upload":3.476,"Vulkan.Present.queue_submit":12.493,"Vulkan.QueuePresent":44.626,"Vulkan.QueuePresent.queue_present":44.215,"Vulkan.Retire":2541.652,"Vulkan.Retire.wait":2536.550},"top_phases_ms_per_frame":{"Driver.Packet":63.244,"Driver.Packet.draw":47.934,"Driver.Draw":47.014,"Graphics.Draw":40.462,"Graphics.Draw.draw_and_resource_release":31.090,"Driver.Draw.shader_compile_and_link":26.095,"Shader.DrawStage":17.166,"VideoOut.Flip":12.245},"owned_draw_counts":{"OwnedDraw.evicted_other":839},"graphics_track":{"Graphics.Barrier.copy":920,"Graphics.Barrier.dispatch-lead":1424,"Graphics.Barrier.dispatch-trail":2533,"Graphics.Barrier.draw":37753,"Graphics.Barrier.fill-clear":2300,"Graphics.Barrier.label-run":39598,"Graphics.Barrier.present-blit":460,"Graphics.Barrier.shadow-publish":2,"Graphics.Barrier.staging-in":2129,"Graphics.Barrier.staging-out":460,"Graphics.Barrier.storage-upload":26230,"Graphics.Barrier.storage-writeback":2407,"Graphics.BarrierMerged.dispatch-lead":1109,"Graphics.BarrierMerged.shadow-publish":2,"Graphics.BarrierMerged.staging-in":175,"Graphics.BarrierMerged.staging-out":460,"Graphics.BarrierMerged.storage-writeback":365,"Graphics.Copy":1382,"Graphics.Copy.bytes":14749536,"Graphics.RenderPass":18579,"Graphics.RenderPass.Close.command":6874,"Graphics.RenderPass.Close.image":22,"Graphics.RenderPass.Close.key":866,"Graphics.RenderPass.Close.new-batch":10817,"Graphics.RenderPass.Continued":465610},"trace_dropped":true,"trace_dropped_threads":{"queue worker 0x0":{"events_full_after_s":5.765,"events_lost":431890,"totals_full":false},"draw committer":{"events_full_after_s":14.099,"events_lost":18452,"totals_full":false}},"trace":"aps5-trace-05bbb26cd347-36968.json.gz"}
Digest: main, run t1 (commit 05bbb26cd3)

seconds 200:15 from present 4501: 226 presents, frame p50 64.4 / p90 73.1 / p99 90.7 / max 99.6 ms, GPU busy 30.4 ms per present
NVIDIA GeForce RTX 2080 Ti, NVIDIA 610.88, Windows 10.0.26300, 3840x2160, commit 05bbb26cd3 (dirty), dropped: yes

{"commit":"05bbb26cd347","dirty":true,"env":{"APS5_TRACE_DIR":"<path>","APS5_TRACE_SECONDS":"200:15"},"gpu":"NVIDIA GeForce RTX 2080 Ti","driver":"NVIDIA 610.88","os":"Windows 10.0.26300","cpu":"Intel(R) Core(TM) i9-9900K CPU @ 3.60GHz","cpu_threads":16,"memory_mib":65468,"title_id":"PPSA05324","title":"Sonic Origins","content_version":"02.002.000","resolution":"3840x2160","window":{"spec":"seconds 200:15","first_present":4501,"ms":15052.111},"presents":226,"frame_ms":{"p50":64.407,"p90":73.121,"p99":90.652,"max":99.575},"gpu_busy_ms_per_present":30.419,"worker_busy_pct":{"queue worker 0x0":96.623},"phase_totals_ms":{"Driver.Completion":2.647,"Driver.Dispatch":1360.705,"Driver.Dispatch.capture_resources":17.647,"Driver.Dispatch.decode_key_device_setup":985.762,"Driver.Dispatch.lookup_cache":14.297,"Driver.Dispatch.materialize":3.416,"Driver.Dispatch.prepared_invocation":2.73,"Driver.Draw":10898.198,"Driver.Draw.device_setup":745.098,"Driver.Draw.draw_enqueued":2275.135,"Driver.Draw.post_compile_prepare":183.804,"Driver.Draw.prepare":1312.296,"Driver.Draw.shader_compile_and_link":6132.346,"Driver.EndSubmission":10.615,"Driver.Packet":14530.466,"Driver.Packet.device_lock":166.251,"Driver.Packet.dispatch":1364.29,"Driver.Packet.draw":11105.734,"Driver.Packet.execute":405.923,"Driver.Packet.flip_flush":6.952,"Driver.Packet.flush_between_packets":472.012,"Driver.Packet.memory_wait":0.016,"Driver.Packet.pipeline_drain":242.0,"Driver.Packet.pipeline_prepare":261.417,"Driver.Packet.prepare_memory":257.364,"Driver.Packet.rendering_wait":0.31,"Driver.Present":2695.665,"Driver.Present.acquire_image":3.175,"Driver.Present.device_setup":0.272,"Driver.Present.gpu_mutex_wait":164.391,"Driver.Present.inflight_wait":0.695,"Driver.Present.present_display_buffer":42.692,"Driver.Present.queue_present":46.42,"Driver.Present.release_and_callback":0.676,"Driver.Present.render_fence_wait":2436.483,"Driver.Present.resize":0.636,"Driver.Present.validate":0.051,"Driver.Suspend":0.054,"GpuMutex.wait.draw":55.332,"GpuMutex.wait.end":7.546,"GpuMutex.wait.fill":6.247,"GpuMutex.wait.flush":0.901,"GpuMutex.wait.label":6.595,"GpuMutex.wait.other":5.844,"GpuMutex.wait.present":163.625,"GpuMutex.wait.wait":6.385,"Graphics.Draw":9120.867,"Graphics.Draw.draw_and_resource_release":6966.656,"Graphics.Draw.index_upload":461.363,"Graphics.Draw.validate":769.154,"Graphics.Draw.vertex_upload":792.861,"Graphics.DrawWithRecipe":741.391,"Graphics.DrawWithRecipe.draw_and_resource_release":695.697,"Graphics.DrawWithRecipe.index_upload":8.353,"Graphics.DrawWithRecipe.validate":13.776,"Graphics.DrawWithRecipe.vertex_upload":15.808,"Recorder.Reap":135.794,"Recorder.Submit":471.717,"Recorder.WaitSerial":2651.169,"Resources.Complete":97.423,"Resources.Prepare":51.115,"Shader.DrawStage":3968.556,"Shader.DrawStage.capture_resources":1759.63,"Shader.DrawStage.materialize":1133.692,"Shader.DrawStage.prepared_invocation":983.739,"Shader.ResolveAbi":144.173,"Shader.ResolveGraphicsAbi":57.702,"Shader.ResolveGraphicsStagesAbi":140.264,"VideoOut.Flip":2709.927,"VideoOut.Flip.completion_mutex_wait":0.398,"VideoOut.Flip.config_mutex_wait":0.029,"VideoOut.Flip.frame_limit":0.205,"VideoOut.Flip.notify_game":22.146,"VideoOut.Flip.present":2683.781,"VideoOut.Flip.validate":0.391,"VideoOut.Flip.vblank_wait":0.168,"VideoOut.Flip.window_prepare":0.447,"VideoOut.Flip.window_title":1.979,"VideoOut.Readiness":1.299,"VideoOut.Readiness.locks_validate":0.66,"Vulkan.Acquire":2.872,"Vulkan.Acquire.acquire_fence_wait":0.508,"Vulkan.Acquire.acquire_image":1.544,"Vulkan.Acquire.fence_reset":0.594,"Vulkan.Acquire.retired_swapchains":0.116,"Vulkan.Dispatch":182.864,"Vulkan.Dispatch.command_record":58.667,"Vulkan.Dispatch.shader_resources":123.221,"Vulkan.DrawFromRecipe":753.204,"Vulkan.Present":22.56,"Vulkan.Present.command_record_scale":7.997,"Vulkan.Present.pixel_upload":3.239,"Vulkan.Present.queue_submit":11.032,"Vulkan.QueuePresent":45.127,"Vulkan.QueuePresent.queue_present":44.71,"Vulkan.Retire":2435.959,"Vulkan.Retire.wait":2431.478},"top_phases_ms_per_frame":{"Driver.Packet":64.294,"Driver.Packet.draw":49.14,"Driver.Draw":48.222,"Graphics.Draw":40.358,"Graphics.Draw.draw_and_resource_release":30.826,"Driver.Draw.shader_compile_and_link":27.134,"Shader.DrawStage":17.56,"VideoOut.Flip":11.991},"owned_draw_counts":{"OwnedDraw.evicted_other":911},"graphics_track":{"Graphics.Barrier.copy":904,"Graphics.Barrier.dispatch-lead":1400,"Graphics.Barrier.dispatch-trail":2486,"Graphics.Barrier.draw":37235,"Graphics.Barrier.fill-clear":2260,"Graphics.Barrier.label-run":38835,"Graphics.Barrier.present-blit":452,"Graphics.Barrier.staging-in":2078,"Graphics.Barrier.staging-out":452,"Graphics.Barrier.storage-upload":25764,"Graphics.Barrier.storage-writeback":2348,"Graphics.BarrierMerged.dispatch-lead":1086,"Graphics.BarrierMerged.staging-in":182,"Graphics.BarrierMerged.staging-out":452,"Graphics.BarrierMerged.storage-writeback":364,"Graphics.Copy":1356,"Graphics.Copy.bytes":14492928,"Graphics.RenderPass":18296,"Graphics.RenderPass.Close.command":6852,"Graphics.RenderPass.Close.image":18,"Graphics.RenderPass.Close.key":846,"Graphics.RenderPass.Close.new-batch":10580,"Graphics.RenderPass.Continued":457208},"trace_dropped":true,"trace_dropped_threads":{"queue worker 0x0":{"events_full_after_s":5.124,"events_lost":493101,"totals_full":false},"draw committer":{"events_full_after_s":14.125,"events_lost":17888,"totals_full":false}},"trace":"aps5-trace-05bbb26cd347-5296.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: 493101 events lost; buffer full at 5124.3 ms; over the 75 of 226 frames that ended before it: busy 40.6 ms per frame (60 %), wait 0.0, largest Driver.Packet 40.5, Driver.EndSubmission 0.0 (the thread table divides the retained slices by every frame)
  • draw committer: 17888 events lost; buffer full at 14124.5 ms; over the 211 of 226 frames that ended before it: busy 29.5 ms per frame (44 %), wait 0.4, largest Graphics.Draw 24.7, Vulkan.DrawFromRecipe 2.9 (the thread table divides the retained slices by every frame)

Slowest frames (largest slices inside each, inclusive)

  • present 4530: 99.6 ms at 1950 ms: Driver.Packet (queue worker 0x0) 75.1, Driver.Packet.draw (queue worker 0x0) 67.3, Driver.Draw (queue worker 0x0) 65.9, Graphics.Draw (draw committer) 57.4
  • present 4539: 91.8 ms at 2607 ms: Driver.Packet (queue worker 0x0) 66.0, Driver.Packet.draw (queue worker 0x0) 58.7, Driver.Draw (queue worker 0x0) 57.4, Graphics.Draw (draw committer) 51.3
  • present 4596: 90.7 ms at 6385 ms: Graphics.Draw (draw committer) 51.6, Graphics.Draw.draw_and_resource_release (draw committer) 42.3, batch (gpu) 30.7, VideoOut.Flip (presenter) 12.1
  • present 4643: 87.2 ms at 9489 ms: batch (gpu) 29.6, Graphics.Draw (draw committer) 23.8, Graphics.Draw.draw_and_resource_release (draw committer) 12.8, VideoOut.Flip (presenter) 12.1
  • present 4665: 86.7 ms at 10942 ms: batch (gpu) 30.3, Graphics.Draw (draw committer) 23.1, VideoOut.Flip (presenter) 12.4, VideoOut.Flip.present (presenter) 12.3

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

  • present 4530: 99.6 ms at 1950 ms, persistence 39.8 ms
  • present 4596: 90.7 ms at 6385 ms, persistence 30.9 ms
  • present 4643: 87.2 ms at 9489 ms, persistence 27.4 ms
  • present 4665: 86.7 ms at 10942 ms, persistence 26.2 ms
  • present 4539: 91.8 ms at 2607 ms, persistence 25.8 ms
  • present 4507: 86.1 ms at 385 ms, persistence 25.5 ms
  • present 4691: 85.8 ms at 12696 ms, persistence 24.2 ms
  • present 4655: 85.6 ms at 10284 ms, persistence 23.4 ms
  • present 4683: 85.5 ms at 12150 ms, persistence 23.2 ms
  • present 4573: 84.1 ms at 4857 ms, persistence 22.1 ms

Threads (ms per frame)

thread busy wait untraced in slices < 20 us largest
title 0.0 (0 %) 11.8 (18 %) 54.8 0.4 Shader.ResolveGraphicsStagesAbi 0.0, Shader.ResolveAbi 0.0
queue worker 0x0 13.6 (20 %) 0.0 (0 %) 53.0 44.5 Driver.Packet 13.6, Driver.EndSubmission 0.0
draw committer 27.7 (42 %) 0.3 (0 %) 38.6 40.0 Graphics.Draw 23.2, Vulkan.DrawFromRecipe 2.7
title 0.0 (0 %) 0.0 (0 %) 66.6 0.1 Shader.ResolveAbi 0.0, Shader.ResolveGraphicsAbi 0.0
title 0.0 (0 %) 0.0 (0 %) 66.6 0.1 Shader.ResolveAbi 0.0, Shader.ResolveGraphicsStagesAbi 0.0
title 0.0 (0 %) 0.0 (0 %) 66.6 0.1 Shader.ResolveAbi 0.0, Shader.ResolveGraphicsStagesAbi 0.0
title 0.0 (0 %) 0.0 (0 %) 66.6 0.1 Shader.ResolveAbi 0.0, Shader.ResolveGraphicsStagesAbi 0.0
presenter 0.5 (1 %) 11.5 (17 %) 54.6 0.1 VideoOut.Flip 12.0, Driver.Present 0.1
title 0.0 (0 %) 0.0 (0 %) 66.6 0.1 Shader.ResolveAbi 0.0, Shader.ResolveGraphicsStagesAbi 0.0
title 0.0 (0 %) 0.0 (0 %) 66.6 0.1 Shader.ResolveAbi 0.0, Shader.ResolveGraphicsAbi 0.0
title 0.0 (0 %) 0.0 (0 %) 66.6 0.1 Shader.ResolveAbi 0.0, Shader.ResolveGraphicsAbi 0.0
title 0.0 (0 %) 0.0 (0 %) 66.6 0.1 Shader.ResolveAbi 0.0, Shader.ResolveGraphicsStagesAbi 0.0
title 0.0 (0 %) 0.0 (0 %) 66.6 0.1 Shader.ResolveAbi 0.0, Shader.ResolveGraphicsStagesAbi 0.0
title 0.0 (0 %) 0.0 (0 %) 66.6 0.1 Shader.ResolveAbi 0.0, Shader.ResolveGraphicsStagesAbi 0.0
title 0.0 (0 %) 0.0 (0 %) 66.6 0.1 Shader.ResolveAbi 0.0, Shader.ResolveGraphicsStagesAbi 0.0
title 0.0 (0 %) 0.0 (0 %) 66.6 0.1 Shader.ResolveAbi 0.0, Shader.ResolveGraphicsStagesAbi 0.0
gpu 30.3 (45 %) 0.0 (0 %) 36.3 0.0 batch 30.3

Largest slices (ms per frame, inclusive, all threads): batch 30.3, Graphics.Draw 23.2, Driver.Packet 13.6, Graphics.Draw.draw_and_resource_release 12.9, VideoOut.Flip 12.0, Driver.Present 11.9, VideoOut.Flip.present 11.9, Recorder.WaitSerial 11.7, Driver.Packet.draw 11.0, Driver.Present.render_fence_wait 10.8

Longest waits

  • Recorder.WaitSerial (title) 15.1 ms at 2050 ms, present 4530
  • Driver.Present.render_fence_wait (presenter) 14.6 ms at 2050 ms, present 4531
  • Recorder.WaitSerial (title) 14.0 ms at 2467 ms, present 4536
  • Recorder.WaitSerial (title) 13.8 ms at 6602 ms, present 4598
  • Driver.Present.render_fence_wait (presenter) 13.7 ms at 2467 ms, present 4537
  • Recorder.WaitSerial (title) 13.5 ms at 2191 ms, present 4532
  • Recorder.WaitSerial (title) 13.5 ms at 2325 ms, present 4534
  • Recorder.WaitSerial (title) 13.2 ms at 3828 ms, present 4556
  • Recorder.WaitSerial (title) 13.1 ms at 7780 ms, present 4616
  • Recorder.WaitSerial (title) 13.1 ms at 1742 ms, present 4527

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

  • batch 1993: 5.9 ms at 2046 ms, present 4530: GPU no ranges; recorded by Vulkan.DrawFromRecipe (draw committer) 0.1, Graphics.DrawWithRecipe (draw committer) 0.1, Graphics.DrawWithRecipe.draw_and_resource_release (draw committer) 0.1
  • batch 2198: 5.9 ms at 2254 ms, present 4533: GPU no ranges; recorded by Vulkan.DrawFromRecipe (draw committer) 0.0, Graphics.DrawWithRecipe (draw committer) 0.0, Graphics.DrawWithRecipe.draw_and_resource_release (draw committer) 0.0
  • batch 2267: 5.9 ms at 2322 ms, present 4534: GPU no ranges; recorded by no CPU slices
  • batch 2402: 5.8 ms at 2464 ms, present 4536: GPU no ranges; recorded by Driver.Packet (queue worker 0x0) 4.4, Driver.Packet.draw (queue worker 0x0) 2.2, Driver.Draw (queue worker 0x0) 2.2, Driver.Packet.dispatch (queue worker 0x0) 2.0
  • batch 2337: 5.7 ms at 2393 ms, present 4535: GPU no ranges; recorded by no CPU slices
Digest: this PR, run t1 (commit 3271af0723)

seconds 200:15 from present 4535: 226 presents, frame p50 64.5 / p90 71.3 / p99 90.6 / max 91.4 ms, GPU busy 30.7 ms per present
NVIDIA GeForce RTX 2080 Ti, NVIDIA 610.88, Windows 10.0.26300, 3840x2160, commit 3271af0723, dropped: yes

{"commit":"3271af072354","dirty":false,"env":{"APS5_TRACE_DIR":"<path>","APS5_TRACE_SECONDS":"200:15"},"gpu":"NVIDIA GeForce RTX 2080 Ti","driver":"NVIDIA 610.88","os":"Windows 10.0.26300","cpu":"Intel(R) Core(TM) i9-9900K CPU @ 3.60GHz","cpu_threads":16,"memory_mib":65468,"title_id":"PPSA05324","title":"Sonic Origins","content_version":"02.002.000","resolution":"3840x2160","window":{"spec":"seconds 200:15","first_present":4535,"ms":15010.719},"presents":226,"frame_ms":{"p50":64.481,"p90":71.266,"p99":90.626,"max":91.385},"gpu_busy_ms_per_present":30.711,"worker_busy_pct":{"queue worker 0x0":96.589},"phase_totals_ms":{"Driver.Completion":3.102,"Driver.Dispatch":1339.455,"Driver.Dispatch.capture_resources":17.424,"Driver.Dispatch.decode_key_device_setup":964.971,"Driver.Dispatch.lookup_cache":13.578,"Driver.Dispatch.materialize":3.574,"Driver.Dispatch.prepared_invocation":2.787,"Driver.Draw":10870.823,"Driver.Draw.device_setup":741.392,"Driver.Draw.draw_enqueued":2310.63,"Driver.Draw.post_compile_prepare":180.678,"Driver.Draw.prepare":1292.805,"Driver.Draw.shader_compile_and_link":6108.741,"Driver.EndSubmission":6.856,"Driver.Packet":14488.622,"Driver.Packet.device_lock":163.17,"Driver.Packet.dispatch":1343.299,"Driver.Packet.draw":11089.041,"Driver.Packet.execute":407.624,"Driver.Packet.flip_flush":6.594,"Driver.Packet.flush_between_packets":483.508,"Driver.Packet.memory_wait":0.002,"Driver.Packet.pipeline_drain":229.325,"Driver.Packet.pipeline_prepare":259.912,"Driver.Packet.prepare_memory":241.28,"Driver.Packet.rendering_wait":0.402,"Driver.Present":2690.809,"Driver.Present.acquire_image":3.436,"Driver.Present.device_setup":0.336,"Driver.Present.gpu_mutex_wait":145.531,"Driver.Present.inflight_wait":0.697,"Driver.Present.present_display_buffer":41.694,"Driver.Present.queue_present":45.804,"Driver.Present.release_and_callback":0.772,"Driver.Present.render_fence_wait":2451.615,"Driver.Present.resize":0.574,"Driver.Present.validate":0.127,"Driver.Suspend":0.076,"GpuMutex.wait.dispatch":0.029,"GpuMutex.wait.draw":51.343,"GpuMutex.wait.end":1.26,"GpuMutex.wait.fill":7.705,"GpuMutex.wait.flush":0.837,"GpuMutex.wait.label":5.269,"GpuMutex.wait.other":5.151,"GpuMutex.wait.present":144.825,"GpuMutex.wait.wait":4.298,"Graphics.Draw":9178.411,"Graphics.Draw.draw_and_resource_release":7058.254,"Graphics.Draw.index_upload":470.464,"Graphics.Draw.validate":758.31,"Graphics.Draw.vertex_upload":753.628,"Graphics.DrawWithRecipe":621.69,"Graphics.DrawWithRecipe.draw_and_resource_release":596.967,"Graphics.DrawWithRecipe.index_upload":3.024,"Graphics.DrawWithRecipe.validate":8.774,"Graphics.DrawWithRecipe.vertex_upload":7.647,"Recorder.Reap":123.701,"Recorder.Submit":463.827,"Recorder.WaitSerial":2652.683,"Resources.Complete":78.42,"Resources.Prepare":49.777,"Shader.DrawStage":4045.682,"Shader.DrawStage.capture_resources":1776.074,"Shader.DrawStage.materialize":1145.46,"Shader.DrawStage.prepared_invocation":1033.004,"Shader.ResolveAbi":145.575,"Shader.ResolveGraphicsAbi":56.29,"Shader.ResolveGraphicsStagesAbi":138.838,"VideoOut.Flip":2691.241,"VideoOut.Flip.completion_mutex_wait":0.423,"VideoOut.Flip.config_mutex_wait":0.042,"VideoOut.Flip.frame_limit":0.19,"VideoOut.Flip.notify_game":7.743,"VideoOut.Flip.present":2679.581,"VideoOut.Flip.validate":0.346,"VideoOut.Flip.vblank_wait":0.225,"VideoOut.Flip.window_prepare":0.518,"VideoOut.Flip.window_title":1.794,"VideoOut.Readiness":1.163,"VideoOut.Readiness.locks_validate":0.481,"Vulkan.Acquire":3.185,"Vulkan.Acquire.acquire_fence_wait":0.664,"Vulkan.Acquire.acquire_image":1.732,"Vulkan.Acquire.fence_reset":0.532,"Vulkan.Acquire.retired_swapchains":0.118,"Vulkan.Dispatch":183.648,"Vulkan.Dispatch.command_record":59.157,"Vulkan.Dispatch.shader_resources":123.507,"Vulkan.DrawFromRecipe":629.998,"Vulkan.Present":21.917,"Vulkan.Present.command_record_scale":7.774,"Vulkan.Present.pixel_upload":2.373,"Vulkan.Present.queue_submit":11.461,"Vulkan.QueuePresent":44.664,"Vulkan.QueuePresent.queue_present":44.355,"Vulkan.Retire":2450.968,"Vulkan.Retire.wait":2445.988},"top_phases_ms_per_frame":{"Driver.Packet":64.109,"Driver.Packet.draw":49.067,"Driver.Draw":48.101,"Graphics.Draw":40.612,"Graphics.Draw.draw_and_resource_release":31.231,"Driver.Draw.shader_compile_and_link":27.03,"Shader.DrawStage":17.901,"VideoOut.Flip":11.908},"owned_draw_counts":{"OwnedDraw.evicted_other":1306},"graphics_track":{"Graphics.Barrier.copy":904,"Graphics.Barrier.dispatch-lead":1380,"Graphics.Barrier.dispatch-trail":2489,"Graphics.Barrier.draw":37442,"Graphics.Barrier.fill-clear":2260,"Graphics.Barrier.input-mirror":169,"Graphics.Barrier.label-run":38863,"Graphics.Barrier.present-blit":452,"Graphics.Barrier.shadow-publish":2,"Graphics.Barrier.staging-in":2098,"Graphics.Barrier.staging-out":452,"Graphics.Barrier.storage-upload":25774,"Graphics.Barrier.storage-writeback":2426,"Graphics.BarrierMerged.dispatch-lead":1109,"Graphics.BarrierMerged.shadow-publish":2,"Graphics.BarrierMerged.staging-in":166,"Graphics.BarrierMerged.staging-out":452,"Graphics.BarrierMerged.storage-writeback":299,"Graphics.Copy":1527,"Graphics.Copy.bytes":34989175,"Graphics.RenderPass":18389,"Graphics.RenderPass.Close.command":6950,"Graphics.RenderPass.Close.image":33,"Graphics.RenderPass.Close.key":848,"Graphics.RenderPass.Close.new-batch":10558,"Graphics.RenderPass.Continued":458350},"trace_dropped":true,"trace_dropped_threads":{"queue worker 0x0":{"events_full_after_s":5.323,"events_lost":463710,"totals_full":false},"draw committer":{"events_full_after_s":14.534,"events_lost":8329,"totals_full":false}},"trace":"aps5-trace-3271af072354-36564.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: 463710 events lost; buffer full at 5322.5 ms; over the 80 of 226 frames that ended before it: busy 38.3 ms per frame (58 %), wait 0.0, largest Driver.Packet 38.3, Driver.EndSubmission 0.0 (the thread table divides the retained slices by every frame)
  • draw committer: 8329 events lost; buffer full at 14534.1 ms; over the 218 of 226 frames that ended before it: busy 29.3 ms per frame (44 %), wait 0.3, largest Graphics.Draw 24.8, Vulkan.DrawFromRecipe 2.7 (the thread table divides the retained slices by every frame)

Slowest frames (largest slices inside each, inclusive)

  • present 4716: 91.4 ms at 12039 ms: Graphics.Draw (draw committer) 52.4, Graphics.Draw.draw_and_resource_release (draw committer) 41.5, batch (gpu) 29.3, VideoOut.Flip (presenter) 11.3
  • present 4632: 91.0 ms at 6441 ms: Graphics.Draw (draw committer) 48.1, Graphics.Draw.draw_and_resource_release (draw committer) 38.3, batch (gpu) 29.1, VideoOut.Flip (presenter) 10.8
  • present 4646: 90.6 ms at 7401 ms: Graphics.Draw (draw committer) 50.0, Graphics.Draw.draw_and_resource_release (draw committer) 39.5, batch (gpu) 30.4, VideoOut.Flip (presenter) 11.9
  • present 4639: 89.3 ms at 6923 ms: Graphics.Draw (draw committer) 49.8, Graphics.Draw.draw_and_resource_release (draw committer) 37.8, batch (gpu) 27.8, VideoOut.Flip (presenter) 9.9
  • present 4691: 89.1 ms at 10386 ms: Graphics.Draw (draw committer) 50.5, Graphics.Draw.draw_and_resource_release (draw committer) 40.5, batch (gpu) 29.4, VideoOut.Flip (presenter) 11.5

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

  • present 4716: 91.4 ms at 12039 ms, persistence 31.1 ms
  • present 4632: 91.0 ms at 6441 ms, persistence 30.8 ms
  • present 4646: 90.6 ms at 7401 ms, persistence 28.8 ms
  • present 4691: 89.1 ms at 10386 ms, persistence 28.2 ms
  • present 4561: 89.0 ms at 1739 ms, persistence 27.9 ms
  • present 4639: 89.3 ms at 6923 ms, persistence 27.1 ms
  • present 4549: 87.4 ms at 934 ms, persistence 25.8 ms
  • present 4625: 87.6 ms at 5949 ms, persistence 25.1 ms
  • present 4586: 85.9 ms at 3396 ms, persistence 24.8 ms
  • present 4653: 86.4 ms at 7879 ms, persistence 24.6 ms

Threads (ms per frame)

thread busy wait untraced in slices < 20 us largest
title 0.0 (0 %) 11.8 (18 %) 54.6 0.4 Shader.ResolveGraphicsStagesAbi 0.0, Shader.ResolveAbi 0.0
queue worker 0x0 13.6 (20 %) 0.0 (0 %) 52.8 48.2 Driver.Packet 13.6, Driver.EndSubmission 0.0
draw committer 28.3 (43 %) 0.3 (0 %) 37.8 40.4 Graphics.Draw 24.0, Vulkan.DrawFromRecipe 2.6
title 0.0 (0 %) 0.0 (0 %) 66.4 0.1 Shader.ResolveAbi 0.0, Shader.ResolveGraphicsStagesAbi 0.0
title 0.0 (0 %) 0.0 (0 %) 66.4 0.1 Shader.ResolveGraphicsStagesAbi 0.0, Shader.ResolveAbi 0.0
title 0.0 (0 %) 0.0 (0 %) 66.4 0.1 Shader.ResolveAbi 0.0, Shader.ResolveGraphicsStagesAbi 0.0
title 0.0 (0 %) 0.0 (0 %) 66.4 0.1 Shader.ResolveAbi 0.0, Shader.ResolveGraphicsStagesAbi 0.0
title 0.0 (0 %) 0.0 (0 %) 66.4 0.1 Shader.ResolveAbi 0.0, Shader.ResolveGraphicsStagesAbi 0.0
presenter 0.5 (1 %) 11.5 (17 %) 54.5 0.1 VideoOut.Flip 11.9, Driver.Present 0.1
title 0.0 (0 %) 0.0 (0 %) 66.4 0.1 Shader.ResolveAbi 0.0, Shader.ResolveGraphicsStagesAbi 0.0
title 0.0 (0 %) 0.0 (0 %) 66.4 0.1 Shader.ResolveAbi 0.0, Shader.ResolveGraphicsStagesAbi 0.0
title 0.0 (0 %) 0.0 (0 %) 66.4 0.1 Shader.ResolveAbi 0.0, Shader.ResolveGraphicsStagesAbi 0.0
title 0.0 (0 %) 0.0 (0 %) 66.4 0.1 Shader.ResolveAbi 0.0, Shader.ResolveGraphicsStagesAbi 0.0
title 0.0 (0 %) 0.0 (0 %) 66.4 0.1 Shader.ResolveAbi 0.0, Shader.ResolveGraphicsAbi 0.0
title 0.0 (0 %) 0.0 (0 %) 66.4 0.1 Shader.ResolveAbi 0.0, Shader.ResolveGraphicsStagesAbi 0.0
title 0.0 (0 %) 0.0 (0 %) 66.4 0.1 Shader.ResolveAbi 0.0, Shader.ResolveGraphicsStagesAbi 0.0
gpu 30.7 (46 %) 0.0 (0 %) 35.7 0.0 batch 30.7

Largest slices (ms per frame, inclusive, all threads): batch 30.7, Graphics.Draw 24.0, Graphics.Draw.draw_and_resource_release 13.8, Driver.Packet 13.6, VideoOut.Flip 11.9, Driver.Present 11.9, VideoOut.Flip.present 11.9, Recorder.WaitSerial 11.7, Driver.Present.render_fence_wait 10.8, Vulkan.Retire 10.8

Longest waits

  • Recorder.WaitSerial (title) 15.5 ms at 3206 ms, present 4583
  • Driver.Present.render_fence_wait (presenter) 15.2 ms at 3206 ms, present 4583
  • Recorder.WaitSerial (title) 14.9 ms at 3267 ms, present 4583
  • Recorder.WaitSerial (title) 14.8 ms at 3482 ms, present 4586
  • Driver.Present.render_fence_wait (presenter) 14.5 ms at 3482 ms, present 4587
  • Recorder.WaitSerial (title) 14.5 ms at 3396 ms, present 4585
  • Recorder.WaitSerial (title) 14.4 ms at 3331 ms, present 4584
  • Recorder.WaitSerial (title) 14.2 ms at 3141 ms, present 4581
  • Driver.Present.render_fence_wait (presenter) 13.8 ms at 3141 ms, present 4582
  • Recorder.WaitSerial (title) 13.7 ms at 9419 ms, present 4675

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

  • batch 3177: 5.9 ms at 3137 ms, present 4581: GPU no ranges; recorded by Vulkan.DrawFromRecipe (draw committer) 0.1, Graphics.DrawWithRecipe (draw committer) 0.1, Graphics.DrawWithRecipe.draw_and_resource_release (draw committer) 0.1
  • batch 3107: 5.9 ms at 3066 ms, present 4580: GPU no ranges; recorded by Vulkan.DrawFromRecipe (draw committer) 0.1, Graphics.DrawWithRecipe (draw committer) 0.1, Graphics.DrawWithRecipe.draw_and_resource_release (draw committer) 0.1
  • batch 3451: 5.9 ms at 3392 ms, present 4585: GPU no ranges; recorded by Vulkan.DrawFromRecipe (draw committer) 0.1, Graphics.DrawWithRecipe (draw committer) 0.1, Graphics.DrawWithRecipe.draw_and_resource_release (draw committer) 0.1
  • batch 3314: 5.9 ms at 3264 ms, present 4583: GPU no ranges; recorded by Vulkan.DrawFromRecipe (draw committer) 0.1, Graphics.DrawWithRecipe (draw committer) 0.1, Graphics.DrawWithRecipe.draw_and_resource_release (draw committer) 0.1
  • batch 3383: 5.9 ms at 3327 ms, present 4584: GPU no ranges; recorded by no CPU slices

Overlap. tools/pr_overlap.py --branch perf/agc-repeat-storage-surface over 2,501 open PRs failed closed on 29 PRs that touch DepthSurface.cpp or DepthSurface.hpp but conflict with main themselves. I read the added and removed lines of those and of the other open PRs that touch depth surfaces (37 in all, 2026-11-24) for anything that creates, re-activates or un-retires a surface, or changes a surface's address or device, and for any change to DepthSurfaceStorage's lookup or to RepeatStorageSurface. None changes the lookup. #7256, #24083 and #19557 keep or add the surfacesSerial bump at their new creation paths. #1368 and #1395 (old, conflicting with main for months, #1395 a draft) add surfaces().push_back lines without a bump in the added lines; a creation path added by either has to bump the serial as the existing one does, and I will say so there if they are revived. The other hits are test-only, library-split moves (#24322, #24910, #24917) or unrelated lock sites (#24083, #24927, #25534, #25610, #26034, #20186: they add surfacesMutex users, not entries). Main moved to 6fde67a5eb3 while this was prepared: the branch merges cleanly (git merge-tree), and the commits in between that touch DepthSurface.cpp do not touch the registry fields above.

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: none
  • Unblocks: none
  • GPUs tested: NVIDIA GeForce RTX 2080 Ti, driver 610.88, Windows 11 Pro 10.0.26300
  • AI-assisted: yes
<!-- greyfinch-sync:boykopovar/AnyPS5:issue:5474762503 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/26681). Originally posted by [meh7an](https://github.com/meh7an) on 2026-11-24T15:06:25Z. --- ### What `RepeatStorageSurface` runs once per resident color target of every draw on the committer. It first asks `DepthSurfaceStorage` whether a depth surface holds the target's address, and on the Sonic Origins S3K menu page (add-ons installed) the answer is almost always no: every call takes `surfacesMutex` and walks the registry back to front (41 surfaces there), a few dependent pointer loads per entry. In the sampler windows below that call is 0.42 to 0.45% of the committer, and the in-process rotation shows about 340 ns of the 852 ns the rest of the function takes (`RepeatStorageSurface`, excluding the `Refresh` it calls). This PR keeps a per-thread memo of the (device, address) pairs the scan found unclaimed, each with the registry serial (`surfacesSerial`, which `DepthSurfacesSerial()` already returns) that was read under `surfacesMutex` right before the scan. A lookup that finds its pair with the current serial returns null without the lock or the scan. 32 direct-mapped slots of 24 bytes per thread (`ThreadScratch`, so no emulated TLS), no budget to trim, no new environment variable and no switch. Why a remembered miss stays correct until the serial moves (read on main `05bbb26cd34`): - A lookup matches a surface that is `active`, on the same device, not `retired`, and whose `target.address` or `target.stencilAddress` equals the address. `target` and `context` are `const` members, so a surface never changes address or device. - A surface enters the registry in one place, `surfaces().push_back` in `DepthSurfaceViewWithStencilWriteIntent` (what `DepthSurfaceView` calls), under `surfacesMutex` and right after `surfacesSerial.fetch_add`. - `retired` goes from true to false in one place, the same function, which bumps the serial first when it was true. - `active` is initialised true and only ever stored false (five `store(false)` sites); nothing reactivates a surface. - Everything else only removes entries or marks them retired (`releaseRetired`, `retire`, `ClearDepthSurfaces`), which can turn a hit into a miss and never a miss into a hit. - The serial is read under the mutex before the scan and the memo is filled only there, so a creation racing the scan either happens before the read (the scan sees it) or moves the serial afterwards (the memo entry is stale and is not used). A lookup that reads the serial without the lock behaves as if it had taken the mutex before the creation, as it can today. - `mip != 0` and `baseLevel != 0` return null before the memo, as before; the memo is consulted only for the question the scan answers. Positive answers (a surface was found) are never remembered, so everything after the scan (`Storage`, the layered views and their side effects) runs as on main. `DepthSurfaceStorageScans()` counts the calls that reached the scan; the new test uses it to show that five lookups of one unclaimed address scan once. Its callers (`RepeatStorageSurface` and `cachedStorageTexture`) are unchanged. **What it shows.** Per call, in one run, `RepeatStorageSurface` (excluding the `Refresh` inside it) goes from 852 ns to 512 ns, a saving of 340 ns (40%) that holds in all ten steady windows (table below): the memo hit rate is 98.85%, and at 25,000 calls per second that is about 8.4 ms of committer time per second (0.84%). In the sampler windows `DepthSurfaceStorage` goes from 0.43% to 0.12% of the committer's samples and `RepeatStorageSurface` from 3.32% to 3.02%. **The frame is flat.** The sampler windows read 16.34 FPS on main and 16.11 with the change, the traced runs 16.88 and 16.73 (frame p50 63.9 and 64.3 ms, GPU busy 30.7 ms in both), all inside this scene's run-to-run spread (main alone spans 16.64 to 17.13 in the traced runs). Both threads are close to their limit in this scene (the worker is blocked 18.7 to 20.5% of its samples in `DrawPipeline::Enqueue` and `Drain` in these windows, and the committer idled 19% of its samples in the main windows of 2026-11-23), so a committer saving of about 0.3 ms of a 62 ms frame is not expected to show in the frame rate. I am proposing it for removing one lock and one 41-entry walk from every draw, not for a measured frame-rate gain. ### Tested Windows 11 Pro (10.0.26300), NVIDIA GeForce RTX 2080 Ti (driver 610.88), Intel Core i9-9900K. Sonic Origins (PPSA05324) menu on the S3K page with the four add-ons, 3840x2160, default environment. Measured commits: main `05bbb26cd34` and this PR's `3271af07235` (one tree, built one after the other; the main arm's `dirty` flag is the new test file only, which no module of the game contains). **Tests.** New `RunUnclaimed` in `tests/execution/DepthStorage.cpp` (`agc_driver_depth_storage`): repeated lookups of an address no surface holds, of the stencil address, of another device's handle, of addresses inside the plane's memory but not at its base; a depth and a stencil surface created after those misses were remembered; 256 other misses followed by a lookup of the real plane (so that the real plane's slot is shared with a miss); a retired surface (three lookups) bound again; `ClearDepthSurfaces`; and the scan counter (five lookups of one unclaimed address scan once). The focused set around depth surfaces, storage images, refresh, resident targets and multisample depth (248 tests in 65 executables: `agc_repeat_storage_guard`, `agc_driver_depth_*`, `agc_driver_native_depth_*`, `agc_driver_multisample_*`, `agc_driver_storage_*`, `agc_driver_own_refresh_*`, `agc_driver_refresh_*`, `agc_driver_color_memo_*`, `agc_driver_frame_replay_(multisample|single_sample)_depth`, `agc_driver_image_table_reuse_(retaken|retired)*`, `agc_driver_recorder`, `agc_storage_*`, `agc_depth_*`, `agc_recorder_*`, `agc_multisample_*`, `agc_import_*`, `agc_dcc_key*`, and the neighbours listed in the regex of the log): 248/248 on main and 248/248 on the change, plain and with `ANYPS5_REQUIRE_VULKAN=1 ANYPS5_NO_SHADER_CACHE=1 VK_LOADER_DEBUG=layer VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation` from the same machine and GPU (`ctest --test-dir build -R <pattern> -V`): 849 "Insert instance layer" lines in each validation log, no "was not found but was requested by env var VK_INSTANCE_LAYERS" line, and no `VUID-` line in either; the result lists are identical (the same four tests skip by design in both). The run on main used the test without the assertions that need `DepthSurfaceStorageScans`, which main does not have. Mutants: 10 one-line changes of the memo and the serial bumps (the serial, the address or the device dropped from the match, a miss remembered at the next serial, a found surface remembered as a miss, the lookup compared against serial 0, no bump at a creation, no bump when a retired surface is bound again, a miss never remembered, all addresses in one slot); 9 are caught by `agc_driver_depth_storage`, and the survivor (one shared slot) only costs scans, never a wrong answer. `tools/env_reference.py --check` and `tools/check_conventions.py --base upstream/main` pass. **In-process rotation** (a separate instrument build, `m313_instrumentation.zip`: `RepeatStorageSurface` cycles per call between four bodies on the committer thread in one run, so the machine state cancels; the first two windows are the game loading, windows 3 to 12 are the menu page; times exclude the `Refresh` inside the function): | window | calls per second | main body, ns per call | memo, ns per call | saved | memo hits | memo misses | |---|---|---|---|---|---|---| | 1 (warm-up) | 179 | 2803.2 | 2481.1 | 322.1 ns (11%) | 13323 | 1535 | | 2 (warm-up) | 2441 | 985.4 | 628.1 | 357.3 ns (36%) | 20858 | 931 | | 3 | 14332 | 996.4 | 599.0 | 397.4 ns (40%) | 110199 | 3572 | | 4 | 15049 | 1044.5 | 655.1 | 389.4 ns (37%) | 113256 | 3305 | | 5 | 26490 | 818.1 | 482.8 | 335.3 ns (41%) | 199285 | 2301 | | 6 | 27699 | 806.5 | 495.5 | 311.0 ns (39%) | 208670 | 1953 | | 7 | 26981 | 799.0 | 478.2 | 320.8 ns (40%) | 202513 | 1863 | | 8 | 27011 | 806.2 | 481.3 | 324.9 ns (40%) | 202712 | 1701 | | 9 | 26532 | 814.8 | 500.0 | 314.8 ns (39%) | 199462 | 1863 | | 10 | 27273 | 835.9 | 468.6 | 367.3 ns (44%) | 205836 | 1657 | | 11 | 28037 | 785.4 | 467.3 | 318.1 ns (41%) | 211956 | 1740 | | 12 | 28420 | 809.3 | 489.2 | 320.1 ns (40%) | 214900 | 1838 | Steady windows 3 to 12: main body 852 ns per call (785-1044), memo 512 ns (467-655), 340 ns saved per call (40%), memo hit rate 98.85%, 24782 calls per second, so 8.4 ms per second of committer time (0.84%). The two variants I dropped (a one-entry memo of the described resource, and a check of the front cache entry before `findStorageByImage`) read 555 and 532 ns, with hit rates of 3% and 1.6%. The instrument's other bodies are not part of this PR. **Sampler** (`APS5_SAMPLE_WORKER` and `APS5_SAMPLE_COMMITTER`, one 60 s window per arm, both orders, committed builds; benchmark leases, average outside CPU 3.1% over the four windows, every lease quiet at its start): | window | arm (commit) | FPS median (min-max) | committer samples | `DepthSurfaceStorage` | `RepeatStorageSurface` | `StorageTexture::refresh` | worker blocked in `Enqueue` + `Drain` | |---|---|---|---|---|---|---|---| | r1 | main (05bbb26cd34) | 16.47 (15.94-17.22) | 3819 | 0.42% (16) | 3.40% (130) | 4.40% | 18.7% | | r1 | this PR (3271af07235) | 16.13 (15.52-16.67) | 3803 | 0.08% (3) | 3.08% (117) | 4.81% | 19.3% | | r2 | this PR (3271af07235) | 16.09 (15.37-16.60) | 3807 | 0.16% (6) | 2.97% (113) | 3.78% | 20.5% | | r2 | main (05bbb26cd34) | 16.21 (15.56-16.52) | 3801 | 0.45% (17) | 3.24% (123) | 4.16% | 19.4% | Means of the two windows per arm: `DepthSurfaceStorage` 0.43% to 0.12% of the committer, `RepeatStorageSurface` 3.32% to 3.02%, `StorageTexture::refresh` 4.28% to 4.30% (untouched), worker blocked 19.0% to 19.9%; reading FPS 16.34 to 16.11. **Traced runs** (`APS5_TRACE_SECONDS=200:15`, same page, both orders, `tools/trace_digest.py`; benchmark leases, outside CPU 2.8 to 3.2%, all quiet at their start): | run | arm (commit) | reading median FPS (min-max) | presents | p50 ms | p90 ms | p99 ms | GPU busy ms per present | |---|---|---|---|---|---|---|---| | t1 | main (05bbb26cd347 dirty) | 16.64 (16.27-16.92) | 226 | 64.4 | 73.1 | 90.7 | 30.4 | | t1 | this PR (3271af072354) | 16.64 (16.49-17.01) | 226 | 64.5 | 71.3 | 90.6 | 30.7 | | t2 | this PR (3271af072354) | 16.82 (16.44-17.00) | 228 | 64.2 | 72.2 | 88.4 | 30.7 | | t2 | main (05bbb26cd347 dirty) | 17.13 (16.89-17.47) | 230 | 63.4 | 74.8 | 89.4 | 31.0 | FPS main 16.88, this PR 16.73 (-0.9%); pair deltas +0.0% and -1.8% (main first in t1, this PR first in t2); frame p50 63.9 and 64.3 ms; GPU busy 30.7 and 30.7 ms per present; main alone spans 16.64 to 17.13. All four traces lost events the same way (the queue worker's buffer fills after about 5 s), so slice timings cover the first seconds only. The summaries and traces are attached as [m313_traces_main_t1_05bbb26cd34.zip](https://github.com/user-attachments/files/35347023/m313_traces_main_t1_05bbb26cd34.zip), [m313_traces_main_t2_05bbb26cd34.zip](https://github.com/user-attachments/files/35347029/m313_traces_main_t2_05bbb26cd34.zip), [m313_traces_pr_t1_3271af07235.zip](https://github.com/user-attachments/files/35347041/m313_traces_pr_t1_3271af07235.zip) and [m313_traces_pr_t2_3271af07235.zip](https://github.com/user-attachments/files/35347044/m313_traces_pr_t2_3271af07235.zip) (each zip holds the run's summary line, trace and digest); the instrumentation is [m313_instrumentation.zip](https://github.com/user-attachments/files/35347046/m313_instrumentation.zip) (the rotation generator, its base edit and the `[ab-rss]` lines of the run). <details> <summary>aps5-summary.jsonl lines: main (t1), this PR (t1), this PR (t2), main (t2)</summary> ```json {"commit":"05bbb26cd347","dirty":true,"env":{"APS5_TRACE_DIR":"<path>","APS5_TRACE_SECONDS":"200:15"},"gpu":"NVIDIA GeForce RTX 2080 Ti","driver":"NVIDIA 610.88","os":"Windows 10.0.26300","cpu":"Intel(R) Core(TM) i9-9900K CPU @ 3.60GHz","cpu_threads":16,"memory_mib":65468,"title_id":"PPSA05324","title":"Sonic Origins","content_version":"02.002.000","resolution":"3840x2160","window":{"spec":"seconds 200:15","first_present":4501,"ms":15052.111},"presents":226,"frame_ms":{"p50":64.407,"p90":73.121,"p99":90.652,"max":99.575},"gpu_busy_ms_per_present":30.419,"worker_busy_pct":{"queue worker 0x0":96.623},"phase_totals_ms":{"Driver.Completion":2.647,"Driver.Dispatch":1360.705,"Driver.Dispatch.capture_resources":17.647,"Driver.Dispatch.decode_key_device_setup":985.762,"Driver.Dispatch.lookup_cache":14.297,"Driver.Dispatch.materialize":3.416,"Driver.Dispatch.prepared_invocation":2.730,"Driver.Draw":10898.198,"Driver.Draw.device_setup":745.098,"Driver.Draw.draw_enqueued":2275.135,"Driver.Draw.post_compile_prepare":183.804,"Driver.Draw.prepare":1312.296,"Driver.Draw.shader_compile_and_link":6132.346,"Driver.EndSubmission":10.615,"Driver.Packet":14530.466,"Driver.Packet.device_lock":166.251,"Driver.Packet.dispatch":1364.290,"Driver.Packet.draw":11105.734,"Driver.Packet.execute":405.923,"Driver.Packet.flip_flush":6.952,"Driver.Packet.flush_between_packets":472.012,"Driver.Packet.memory_wait":0.016,"Driver.Packet.pipeline_drain":242.000,"Driver.Packet.pipeline_prepare":261.417,"Driver.Packet.prepare_memory":257.364,"Driver.Packet.rendering_wait":0.310,"Driver.Present":2695.665,"Driver.Present.acquire_image":3.175,"Driver.Present.device_setup":0.272,"Driver.Present.gpu_mutex_wait":164.391,"Driver.Present.inflight_wait":0.695,"Driver.Present.present_display_buffer":42.692,"Driver.Present.queue_present":46.420,"Driver.Present.release_and_callback":0.676,"Driver.Present.render_fence_wait":2436.483,"Driver.Present.resize":0.636,"Driver.Present.validate":0.051,"Driver.Suspend":0.054,"GpuMutex.wait.draw":55.332,"GpuMutex.wait.end":7.546,"GpuMutex.wait.fill":6.247,"GpuMutex.wait.flush":0.901,"GpuMutex.wait.label":6.595,"GpuMutex.wait.other":5.844,"GpuMutex.wait.present":163.625,"GpuMutex.wait.wait":6.385,"Graphics.Draw":9120.867,"Graphics.Draw.draw_and_resource_release":6966.656,"Graphics.Draw.index_upload":461.363,"Graphics.Draw.validate":769.154,"Graphics.Draw.vertex_upload":792.861,"Graphics.DrawWithRecipe":741.391,"Graphics.DrawWithRecipe.draw_and_resource_release":695.697,"Graphics.DrawWithRecipe.index_upload":8.353,"Graphics.DrawWithRecipe.validate":13.776,"Graphics.DrawWithRecipe.vertex_upload":15.808,"Recorder.Reap":135.794,"Recorder.Submit":471.717,"Recorder.WaitSerial":2651.169,"Resources.Complete":97.423,"Resources.Prepare":51.115,"Shader.DrawStage":3968.556,"Shader.DrawStage.capture_resources":1759.630,"Shader.DrawStage.materialize":1133.692,"Shader.DrawStage.prepared_invocation":983.739,"Shader.ResolveAbi":144.173,"Shader.ResolveGraphicsAbi":57.702,"Shader.ResolveGraphicsStagesAbi":140.264,"VideoOut.Flip":2709.927,"VideoOut.Flip.completion_mutex_wait":0.398,"VideoOut.Flip.config_mutex_wait":0.029,"VideoOut.Flip.frame_limit":0.205,"VideoOut.Flip.notify_game":22.146,"VideoOut.Flip.present":2683.781,"VideoOut.Flip.validate":0.391,"VideoOut.Flip.vblank_wait":0.168,"VideoOut.Flip.window_prepare":0.447,"VideoOut.Flip.window_title":1.979,"VideoOut.Readiness":1.299,"VideoOut.Readiness.locks_validate":0.660,"Vulkan.Acquire":2.872,"Vulkan.Acquire.acquire_fence_wait":0.508,"Vulkan.Acquire.acquire_image":1.544,"Vulkan.Acquire.fence_reset":0.594,"Vulkan.Acquire.retired_swapchains":0.116,"Vulkan.Dispatch":182.864,"Vulkan.Dispatch.command_record":58.667,"Vulkan.Dispatch.shader_resources":123.221,"Vulkan.DrawFromRecipe":753.204,"Vulkan.Present":22.560,"Vulkan.Present.command_record_scale":7.997,"Vulkan.Present.pixel_upload":3.239,"Vulkan.Present.queue_submit":11.032,"Vulkan.QueuePresent":45.127,"Vulkan.QueuePresent.queue_present":44.710,"Vulkan.Retire":2435.959,"Vulkan.Retire.wait":2431.478},"top_phases_ms_per_frame":{"Driver.Packet":64.294,"Driver.Packet.draw":49.140,"Driver.Draw":48.222,"Graphics.Draw":40.358,"Graphics.Draw.draw_and_resource_release":30.826,"Driver.Draw.shader_compile_and_link":27.134,"Shader.DrawStage":17.560,"VideoOut.Flip":11.991},"owned_draw_counts":{"OwnedDraw.evicted_other":911},"graphics_track":{"Graphics.Barrier.copy":904,"Graphics.Barrier.dispatch-lead":1400,"Graphics.Barrier.dispatch-trail":2486,"Graphics.Barrier.draw":37235,"Graphics.Barrier.fill-clear":2260,"Graphics.Barrier.label-run":38835,"Graphics.Barrier.present-blit":452,"Graphics.Barrier.staging-in":2078,"Graphics.Barrier.staging-out":452,"Graphics.Barrier.storage-upload":25764,"Graphics.Barrier.storage-writeback":2348,"Graphics.BarrierMerged.dispatch-lead":1086,"Graphics.BarrierMerged.staging-in":182,"Graphics.BarrierMerged.staging-out":452,"Graphics.BarrierMerged.storage-writeback":364,"Graphics.Copy":1356,"Graphics.Copy.bytes":14492928,"Graphics.RenderPass":18296,"Graphics.RenderPass.Close.command":6852,"Graphics.RenderPass.Close.image":18,"Graphics.RenderPass.Close.key":846,"Graphics.RenderPass.Close.new-batch":10580,"Graphics.RenderPass.Continued":457208},"trace_dropped":true,"trace_dropped_threads":{"queue worker 0x0":{"events_full_after_s":5.124,"events_lost":493101,"totals_full":false},"draw committer":{"events_full_after_s":14.125,"events_lost":17888,"totals_full":false}},"trace":"aps5-trace-05bbb26cd347-5296.json.gz"} {"commit":"3271af072354","dirty":false,"env":{"APS5_TRACE_DIR":"<path>","APS5_TRACE_SECONDS":"200:15"},"gpu":"NVIDIA GeForce RTX 2080 Ti","driver":"NVIDIA 610.88","os":"Windows 10.0.26300","cpu":"Intel(R) Core(TM) i9-9900K CPU @ 3.60GHz","cpu_threads":16,"memory_mib":65468,"title_id":"PPSA05324","title":"Sonic Origins","content_version":"02.002.000","resolution":"3840x2160","window":{"spec":"seconds 200:15","first_present":4535,"ms":15010.719},"presents":226,"frame_ms":{"p50":64.481,"p90":71.266,"p99":90.626,"max":91.385},"gpu_busy_ms_per_present":30.711,"worker_busy_pct":{"queue worker 0x0":96.589},"phase_totals_ms":{"Driver.Completion":3.102,"Driver.Dispatch":1339.455,"Driver.Dispatch.capture_resources":17.424,"Driver.Dispatch.decode_key_device_setup":964.971,"Driver.Dispatch.lookup_cache":13.578,"Driver.Dispatch.materialize":3.574,"Driver.Dispatch.prepared_invocation":2.787,"Driver.Draw":10870.823,"Driver.Draw.device_setup":741.392,"Driver.Draw.draw_enqueued":2310.630,"Driver.Draw.post_compile_prepare":180.678,"Driver.Draw.prepare":1292.805,"Driver.Draw.shader_compile_and_link":6108.741,"Driver.EndSubmission":6.856,"Driver.Packet":14488.622,"Driver.Packet.device_lock":163.170,"Driver.Packet.dispatch":1343.299,"Driver.Packet.draw":11089.041,"Driver.Packet.execute":407.624,"Driver.Packet.flip_flush":6.594,"Driver.Packet.flush_between_packets":483.508,"Driver.Packet.memory_wait":0.002,"Driver.Packet.pipeline_drain":229.325,"Driver.Packet.pipeline_prepare":259.912,"Driver.Packet.prepare_memory":241.280,"Driver.Packet.rendering_wait":0.402,"Driver.Present":2690.809,"Driver.Present.acquire_image":3.436,"Driver.Present.device_setup":0.336,"Driver.Present.gpu_mutex_wait":145.531,"Driver.Present.inflight_wait":0.697,"Driver.Present.present_display_buffer":41.694,"Driver.Present.queue_present":45.804,"Driver.Present.release_and_callback":0.772,"Driver.Present.render_fence_wait":2451.615,"Driver.Present.resize":0.574,"Driver.Present.validate":0.127,"Driver.Suspend":0.076,"GpuMutex.wait.dispatch":0.029,"GpuMutex.wait.draw":51.343,"GpuMutex.wait.end":1.260,"GpuMutex.wait.fill":7.705,"GpuMutex.wait.flush":0.837,"GpuMutex.wait.label":5.269,"GpuMutex.wait.other":5.151,"GpuMutex.wait.present":144.825,"GpuMutex.wait.wait":4.298,"Graphics.Draw":9178.411,"Graphics.Draw.draw_and_resource_release":7058.254,"Graphics.Draw.index_upload":470.464,"Graphics.Draw.validate":758.310,"Graphics.Draw.vertex_upload":753.628,"Graphics.DrawWithRecipe":621.690,"Graphics.DrawWithRecipe.draw_and_resource_release":596.967,"Graphics.DrawWithRecipe.index_upload":3.024,"Graphics.DrawWithRecipe.validate":8.774,"Graphics.DrawWithRecipe.vertex_upload":7.647,"Recorder.Reap":123.701,"Recorder.Submit":463.827,"Recorder.WaitSerial":2652.683,"Resources.Complete":78.420,"Resources.Prepare":49.777,"Shader.DrawStage":4045.682,"Shader.DrawStage.capture_resources":1776.074,"Shader.DrawStage.materialize":1145.460,"Shader.DrawStage.prepared_invocation":1033.004,"Shader.ResolveAbi":145.575,"Shader.ResolveGraphicsAbi":56.290,"Shader.ResolveGraphicsStagesAbi":138.838,"VideoOut.Flip":2691.241,"VideoOut.Flip.completion_mutex_wait":0.423,"VideoOut.Flip.config_mutex_wait":0.042,"VideoOut.Flip.frame_limit":0.190,"VideoOut.Flip.notify_game":7.743,"VideoOut.Flip.present":2679.581,"VideoOut.Flip.validate":0.346,"VideoOut.Flip.vblank_wait":0.225,"VideoOut.Flip.window_prepare":0.518,"VideoOut.Flip.window_title":1.794,"VideoOut.Readiness":1.163,"VideoOut.Readiness.locks_validate":0.481,"Vulkan.Acquire":3.185,"Vulkan.Acquire.acquire_fence_wait":0.664,"Vulkan.Acquire.acquire_image":1.732,"Vulkan.Acquire.fence_reset":0.532,"Vulkan.Acquire.retired_swapchains":0.118,"Vulkan.Dispatch":183.648,"Vulkan.Dispatch.command_record":59.157,"Vulkan.Dispatch.shader_resources":123.507,"Vulkan.DrawFromRecipe":629.998,"Vulkan.Present":21.917,"Vulkan.Present.command_record_scale":7.774,"Vulkan.Present.pixel_upload":2.373,"Vulkan.Present.queue_submit":11.461,"Vulkan.QueuePresent":44.664,"Vulkan.QueuePresent.queue_present":44.355,"Vulkan.Retire":2450.968,"Vulkan.Retire.wait":2445.988},"top_phases_ms_per_frame":{"Driver.Packet":64.109,"Driver.Packet.draw":49.067,"Driver.Draw":48.101,"Graphics.Draw":40.612,"Graphics.Draw.draw_and_resource_release":31.231,"Driver.Draw.shader_compile_and_link":27.030,"Shader.DrawStage":17.901,"VideoOut.Flip":11.908},"owned_draw_counts":{"OwnedDraw.evicted_other":1306},"graphics_track":{"Graphics.Barrier.copy":904,"Graphics.Barrier.dispatch-lead":1380,"Graphics.Barrier.dispatch-trail":2489,"Graphics.Barrier.draw":37442,"Graphics.Barrier.fill-clear":2260,"Graphics.Barrier.input-mirror":169,"Graphics.Barrier.label-run":38863,"Graphics.Barrier.present-blit":452,"Graphics.Barrier.shadow-publish":2,"Graphics.Barrier.staging-in":2098,"Graphics.Barrier.staging-out":452,"Graphics.Barrier.storage-upload":25774,"Graphics.Barrier.storage-writeback":2426,"Graphics.BarrierMerged.dispatch-lead":1109,"Graphics.BarrierMerged.shadow-publish":2,"Graphics.BarrierMerged.staging-in":166,"Graphics.BarrierMerged.staging-out":452,"Graphics.BarrierMerged.storage-writeback":299,"Graphics.Copy":1527,"Graphics.Copy.bytes":34989175,"Graphics.RenderPass":18389,"Graphics.RenderPass.Close.command":6950,"Graphics.RenderPass.Close.image":33,"Graphics.RenderPass.Close.key":848,"Graphics.RenderPass.Close.new-batch":10558,"Graphics.RenderPass.Continued":458350},"trace_dropped":true,"trace_dropped_threads":{"queue worker 0x0":{"events_full_after_s":5.323,"events_lost":463710,"totals_full":false},"draw committer":{"events_full_after_s":14.534,"events_lost":8329,"totals_full":false}},"trace":"aps5-trace-3271af072354-36564.json.gz"} {"commit":"3271af072354","dirty":false,"env":{"APS5_TRACE_DIR":"<path>","APS5_TRACE_SECONDS":"200:15"},"gpu":"NVIDIA GeForce RTX 2080 Ti","driver":"NVIDIA 610.88","os":"Windows 10.0.26300","cpu":"Intel(R) Core(TM) i9-9900K CPU @ 3.60GHz","cpu_threads":16,"memory_mib":65468,"title_id":"PPSA05324","title":"Sonic Origins","content_version":"02.002.000","resolution":"3840x2160","window":{"spec":"seconds 200:15","first_present":4494,"ms":15008.595},"presents":228,"frame_ms":{"p50":64.154,"p90":72.165,"p99":88.412,"max":90.213},"gpu_busy_ms_per_present":30.695,"worker_busy_pct":{"queue worker 0x0":96.549},"phase_totals_ms":{"Driver.Completion":2.820,"Driver.Dispatch":1367.458,"Driver.Dispatch.capture_resources":18.563,"Driver.Dispatch.decode_key_device_setup":988.602,"Driver.Dispatch.lookup_cache":14.541,"Driver.Dispatch.materialize":3.463,"Driver.Dispatch.prepared_invocation":2.912,"Driver.Draw":10855.484,"Driver.Draw.device_setup":740.974,"Driver.Draw.draw_enqueued":2262.936,"Driver.Draw.post_compile_prepare":181.893,"Driver.Draw.prepare":1296.668,"Driver.Draw.shader_compile_and_link":6135.800,"Driver.EndSubmission":9.630,"Driver.Packet":14478.147,"Driver.Packet.device_lock":163.663,"Driver.Packet.dispatch":1371.170,"Driver.Packet.draw":11070.032,"Driver.Packet.execute":405.507,"Driver.Packet.flip_flush":6.830,"Driver.Packet.flush_between_packets":479.550,"Driver.Packet.memory_wait":0.006,"Driver.Packet.pipeline_drain":224.848,"Driver.Packet.pipeline_prepare":260.429,"Driver.Packet.prepare_memory":238.821,"Driver.Packet.rendering_wait":0.409,"Driver.Present":2760.805,"Driver.Present.acquire_image":3.160,"Driver.Present.device_setup":0.331,"Driver.Present.gpu_mutex_wait":138.155,"Driver.Present.inflight_wait":0.710,"Driver.Present.present_display_buffer":42.130,"Driver.Present.queue_present":45.279,"Driver.Present.release_and_callback":0.670,"Driver.Present.render_fence_wait":2529.554,"Driver.Present.resize":0.572,"Driver.Present.validate":0.073,"Driver.Suspend":0.082,"GpuMutex.wait.draw":55.085,"GpuMutex.wait.end":1.616,"GpuMutex.wait.fill":6.944,"GpuMutex.wait.flush":1.887,"GpuMutex.wait.label":5.052,"GpuMutex.wait.other":6.062,"GpuMutex.wait.present":137.318,"GpuMutex.wait.wait":3.273,"Graphics.Draw":8932.196,"Graphics.Draw.draw_and_resource_release":6854.666,"Graphics.Draw.index_upload":447.440,"Graphics.Draw.validate":747.492,"Graphics.Draw.vertex_upload":730.518,"Graphics.DrawWithRecipe":670.258,"Graphics.DrawWithRecipe.draw_and_resource_release":644.509,"Graphics.DrawWithRecipe.index_upload":3.088,"Graphics.DrawWithRecipe.validate":9.125,"Graphics.DrawWithRecipe.vertex_upload":8.024,"Recorder.Reap":136.894,"Recorder.Submit":466.693,"Recorder.WaitSerial":2722.325,"Resources.Complete":107.752,"Resources.Prepare":49.452,"Shader.DrawStage":4057.585,"Shader.DrawStage.capture_resources":1769.443,"Shader.DrawStage.materialize":1148.660,"Shader.DrawStage.prepared_invocation":1046.394,"Shader.ResolveAbi":146.126,"Shader.ResolveGraphicsAbi":56.115,"Shader.ResolveGraphicsStagesAbi":139.637,"VideoOut.Flip":2769.365,"VideoOut.Flip.completion_mutex_wait":0.531,"VideoOut.Flip.config_mutex_wait":0.044,"VideoOut.Flip.frame_limit":0.170,"VideoOut.Flip.notify_game":14.166,"VideoOut.Flip.present":2751.353,"VideoOut.Flip.validate":0.362,"VideoOut.Flip.vblank_wait":0.210,"VideoOut.Flip.window_prepare":0.588,"VideoOut.Flip.window_title":1.587,"VideoOut.Readiness":1.139,"VideoOut.Readiness.locks_validate":0.506,"Vulkan.Acquire":2.887,"Vulkan.Acquire.acquire_fence_wait":0.574,"Vulkan.Acquire.acquire_image":1.547,"Vulkan.Acquire.fence_reset":0.536,"Vulkan.Acquire.retired_swapchains":0.103,"Vulkan.Dispatch":184.109,"Vulkan.Dispatch.command_record":59.091,"Vulkan.Dispatch.shader_resources":123.892,"Vulkan.DispatchRecipe":0.204,"Vulkan.DispatchRecipe.command_record":0.204,"Vulkan.DrawFromRecipe":678.875,"Vulkan.Present":22.355,"Vulkan.Present.command_record_scale":7.993,"Vulkan.Present.pixel_upload":2.798,"Vulkan.Present.queue_submit":11.276,"Vulkan.QueuePresent":44.013,"Vulkan.QueuePresent.queue_present":43.660,"Vulkan.Retire":2528.874,"Vulkan.Retire.wait":2523.097},"top_phases_ms_per_frame":{"Driver.Packet":63.501,"Driver.Packet.draw":48.553,"Driver.Draw":47.612,"Graphics.Draw":39.176,"Graphics.Draw.draw_and_resource_release":30.064,"Driver.Draw.shader_compile_and_link":26.911,"Shader.DrawStage":17.796,"VideoOut.Flip":12.146},"owned_draw_counts":{"OwnedDraw.evicted_other":948},"graphics_track":{"Graphics.Barrier.copy":912,"Graphics.Barrier.dispatch-lead":1395,"Graphics.Barrier.dispatch-trail":2508,"Graphics.Barrier.draw":37405,"Graphics.Barrier.fill-clear":2280,"Graphics.Barrier.label-run":39059,"Graphics.Barrier.present-blit":456,"Graphics.Barrier.staging-in":2116,"Graphics.Barrier.staging-out":456,"Graphics.Barrier.storage-upload":25992,"Graphics.Barrier.storage-writeback":2372,"Graphics.BarrierMerged.dispatch-lead":1113,"Graphics.BarrierMerged.label-run":6,"Graphics.BarrierMerged.staging-in":164,"Graphics.BarrierMerged.staging-out":456,"Graphics.BarrierMerged.storage-writeback":364,"Graphics.Copy":1368,"Graphics.Copy.bytes":14621184,"Graphics.RenderPass":18457,"Graphics.RenderPass.Close.command":6868,"Graphics.RenderPass.Close.image":32,"Graphics.RenderPass.Close.key":951,"Graphics.RenderPass.Close.label":6,"Graphics.RenderPass.Close.new-batch":10600,"Graphics.RenderPass.Continued":461358},"trace_dropped":true,"trace_dropped_threads":{"queue worker 0x0":{"events_full_after_s":5.455,"events_lost":461997,"totals_full":false},"draw committer":{"events_full_after_s":14.537,"events_lost":8212,"totals_full":false}},"trace":"aps5-trace-3271af072354-33760.json.gz"} {"commit":"05bbb26cd347","dirty":true,"env":{"APS5_TRACE_DIR":"<path>","APS5_TRACE_SECONDS":"200:15"},"gpu":"NVIDIA GeForce RTX 2080 Ti","driver":"NVIDIA 610.88","os":"Windows 10.0.26300","cpu":"Intel(R) Core(TM) i9-9900K CPU @ 3.60GHz","cpu_threads":16,"memory_mib":65468,"title_id":"PPSA05324","title":"Sonic Origins","content_version":"02.002.000","resolution":"3840x2160","window":{"spec":"seconds 200:15","first_present":4582,"ms":15053.136},"presents":230,"frame_ms":{"p50":63.412,"p90":74.799,"p99":89.435,"max":92.017},"gpu_busy_ms_per_present":30.951,"worker_busy_pct":{"queue worker 0x0":96.715},"phase_totals_ms":{"Driver.Completion":2.788,"Driver.Dispatch":1432.386,"Driver.Dispatch.capture_resources":19.026,"Driver.Dispatch.decode_key_device_setup":1050.715,"Driver.Dispatch.lookup_cache":14.552,"Driver.Dispatch.materialize":3.795,"Driver.Dispatch.prepared_invocation":2.885,"Driver.Draw":10813.249,"Driver.Draw.device_setup":732.833,"Driver.Draw.draw_enqueued":2370.367,"Driver.Draw.post_compile_prepare":179.488,"Driver.Draw.prepare":1286.236,"Driver.Draw.shader_compile_and_link":6001.926,"Driver.EndSubmission":9.716,"Driver.Packet":14546.022,"Driver.Packet.device_lock":166.214,"Driver.Packet.dispatch":1436.218,"Driver.Packet.draw":11024.902,"Driver.Packet.execute":404.900,"Driver.Packet.flip_flush":6.883,"Driver.Packet.flush_between_packets":475.684,"Driver.Packet.memory_wait":0.003,"Driver.Packet.pipeline_drain":241.552,"Driver.Packet.pipeline_prepare":262.054,"Driver.Packet.prepare_memory":256.560,"Driver.Packet.rendering_wait":0.394,"Driver.Present":2809.163,"Driver.Present.acquire_image":3.331,"Driver.Present.device_setup":0.294,"Driver.Present.gpu_mutex_wait":169.722,"Driver.Present.inflight_wait":0.717,"Driver.Present.present_display_buffer":45.118,"Driver.Present.queue_present":45.980,"Driver.Present.release_and_callback":0.634,"Driver.Present.render_fence_wait":2542.424,"Driver.Present.resize":0.665,"Driver.Present.validate":0.053,"Driver.Suspend":0.085,"GpuMutex.wait.dispatch":0.059,"GpuMutex.wait.draw":55.452,"GpuMutex.wait.end":2.281,"GpuMutex.wait.fill":8.002,"GpuMutex.wait.flush":0.938,"GpuMutex.wait.label":8.153,"GpuMutex.wait.other":9.288,"GpuMutex.wait.present":168.921,"GpuMutex.wait.wait":2.039,"Graphics.Draw":9306.289,"Graphics.Draw.draw_and_resource_release":7150.621,"Graphics.Draw.index_upload":494.678,"Graphics.Draw.validate":766.903,"Graphics.Draw.vertex_upload":761.266,"Graphics.DrawWithRecipe":701.796,"Graphics.DrawWithRecipe.draw_and_resource_release":668.020,"Graphics.DrawWithRecipe.index_upload":5.125,"Graphics.DrawWithRecipe.validate":11.435,"Graphics.DrawWithRecipe.vertex_upload":10.738,"Recorder.Reap":126.230,"Recorder.Submit":478.245,"Recorder.WaitSerial":2765.751,"Resources.Complete":77.847,"Resources.Prepare":50.646,"Shader.DrawStage":3948.234,"Shader.DrawStage.capture_resources":1783.163,"Shader.DrawStage.materialize":1081.013,"Shader.DrawStage.prepared_invocation":990.615,"Shader.ResolveAbi":147.361,"Shader.ResolveGraphicsAbi":58.575,"Shader.ResolveGraphicsStagesAbi":141.624,"VideoOut.Flip":2816.287,"VideoOut.Flip.completion_mutex_wait":0.461,"VideoOut.Flip.config_mutex_wait":0.027,"VideoOut.Flip.frame_limit":0.147,"VideoOut.Flip.notify_game":15.338,"VideoOut.Flip.present":2797.045,"VideoOut.Flip.validate":0.386,"VideoOut.Flip.vblank_wait":0.165,"VideoOut.Flip.window_prepare":0.487,"VideoOut.Flip.window_title":1.871,"VideoOut.Readiness":1.292,"VideoOut.Readiness.locks_validate":0.709,"Vulkan.Acquire":3.073,"Vulkan.Acquire.acquire_fence_wait":0.523,"Vulkan.Acquire.acquire_image":1.769,"Vulkan.Acquire.fence_reset":0.576,"Vulkan.Acquire.retired_swapchains":0.107,"Vulkan.Dispatch":185.613,"Vulkan.Dispatch.command_record":60.403,"Vulkan.Dispatch.shader_resources":124.194,"Vulkan.DispatchRecipe":1.065,"Vulkan.DispatchRecipe.command_record":1.062,"Vulkan.DrawFromRecipe":711.729,"Vulkan.Present":24.474,"Vulkan.Present.command_record_scale":8.155,"Vulkan.Present.pixel_upload":3.476,"Vulkan.Present.queue_submit":12.493,"Vulkan.QueuePresent":44.626,"Vulkan.QueuePresent.queue_present":44.215,"Vulkan.Retire":2541.652,"Vulkan.Retire.wait":2536.550},"top_phases_ms_per_frame":{"Driver.Packet":63.244,"Driver.Packet.draw":47.934,"Driver.Draw":47.014,"Graphics.Draw":40.462,"Graphics.Draw.draw_and_resource_release":31.090,"Driver.Draw.shader_compile_and_link":26.095,"Shader.DrawStage":17.166,"VideoOut.Flip":12.245},"owned_draw_counts":{"OwnedDraw.evicted_other":839},"graphics_track":{"Graphics.Barrier.copy":920,"Graphics.Barrier.dispatch-lead":1424,"Graphics.Barrier.dispatch-trail":2533,"Graphics.Barrier.draw":37753,"Graphics.Barrier.fill-clear":2300,"Graphics.Barrier.label-run":39598,"Graphics.Barrier.present-blit":460,"Graphics.Barrier.shadow-publish":2,"Graphics.Barrier.staging-in":2129,"Graphics.Barrier.staging-out":460,"Graphics.Barrier.storage-upload":26230,"Graphics.Barrier.storage-writeback":2407,"Graphics.BarrierMerged.dispatch-lead":1109,"Graphics.BarrierMerged.shadow-publish":2,"Graphics.BarrierMerged.staging-in":175,"Graphics.BarrierMerged.staging-out":460,"Graphics.BarrierMerged.storage-writeback":365,"Graphics.Copy":1382,"Graphics.Copy.bytes":14749536,"Graphics.RenderPass":18579,"Graphics.RenderPass.Close.command":6874,"Graphics.RenderPass.Close.image":22,"Graphics.RenderPass.Close.key":866,"Graphics.RenderPass.Close.new-batch":10817,"Graphics.RenderPass.Continued":465610},"trace_dropped":true,"trace_dropped_threads":{"queue worker 0x0":{"events_full_after_s":5.765,"events_lost":431890,"totals_full":false},"draw committer":{"events_full_after_s":14.099,"events_lost":18452,"totals_full":false}},"trace":"aps5-trace-05bbb26cd347-36968.json.gz"} ``` </details> <details> <summary>Digest: main, run t1 (commit 05bbb26cd347)</summary> **seconds 200:15** from present 4501: 226 presents, frame p50 64.4 / p90 73.1 / p99 90.7 / max 99.6 ms, GPU busy 30.4 ms per present NVIDIA GeForce RTX 2080 Ti, NVIDIA 610.88, Windows 10.0.26300, 3840x2160, commit 05bbb26cd347 (dirty), dropped: yes ```json {"commit":"05bbb26cd347","dirty":true,"env":{"APS5_TRACE_DIR":"<path>","APS5_TRACE_SECONDS":"200:15"},"gpu":"NVIDIA GeForce RTX 2080 Ti","driver":"NVIDIA 610.88","os":"Windows 10.0.26300","cpu":"Intel(R) Core(TM) i9-9900K CPU @ 3.60GHz","cpu_threads":16,"memory_mib":65468,"title_id":"PPSA05324","title":"Sonic Origins","content_version":"02.002.000","resolution":"3840x2160","window":{"spec":"seconds 200:15","first_present":4501,"ms":15052.111},"presents":226,"frame_ms":{"p50":64.407,"p90":73.121,"p99":90.652,"max":99.575},"gpu_busy_ms_per_present":30.419,"worker_busy_pct":{"queue worker 0x0":96.623},"phase_totals_ms":{"Driver.Completion":2.647,"Driver.Dispatch":1360.705,"Driver.Dispatch.capture_resources":17.647,"Driver.Dispatch.decode_key_device_setup":985.762,"Driver.Dispatch.lookup_cache":14.297,"Driver.Dispatch.materialize":3.416,"Driver.Dispatch.prepared_invocation":2.73,"Driver.Draw":10898.198,"Driver.Draw.device_setup":745.098,"Driver.Draw.draw_enqueued":2275.135,"Driver.Draw.post_compile_prepare":183.804,"Driver.Draw.prepare":1312.296,"Driver.Draw.shader_compile_and_link":6132.346,"Driver.EndSubmission":10.615,"Driver.Packet":14530.466,"Driver.Packet.device_lock":166.251,"Driver.Packet.dispatch":1364.29,"Driver.Packet.draw":11105.734,"Driver.Packet.execute":405.923,"Driver.Packet.flip_flush":6.952,"Driver.Packet.flush_between_packets":472.012,"Driver.Packet.memory_wait":0.016,"Driver.Packet.pipeline_drain":242.0,"Driver.Packet.pipeline_prepare":261.417,"Driver.Packet.prepare_memory":257.364,"Driver.Packet.rendering_wait":0.31,"Driver.Present":2695.665,"Driver.Present.acquire_image":3.175,"Driver.Present.device_setup":0.272,"Driver.Present.gpu_mutex_wait":164.391,"Driver.Present.inflight_wait":0.695,"Driver.Present.present_display_buffer":42.692,"Driver.Present.queue_present":46.42,"Driver.Present.release_and_callback":0.676,"Driver.Present.render_fence_wait":2436.483,"Driver.Present.resize":0.636,"Driver.Present.validate":0.051,"Driver.Suspend":0.054,"GpuMutex.wait.draw":55.332,"GpuMutex.wait.end":7.546,"GpuMutex.wait.fill":6.247,"GpuMutex.wait.flush":0.901,"GpuMutex.wait.label":6.595,"GpuMutex.wait.other":5.844,"GpuMutex.wait.present":163.625,"GpuMutex.wait.wait":6.385,"Graphics.Draw":9120.867,"Graphics.Draw.draw_and_resource_release":6966.656,"Graphics.Draw.index_upload":461.363,"Graphics.Draw.validate":769.154,"Graphics.Draw.vertex_upload":792.861,"Graphics.DrawWithRecipe":741.391,"Graphics.DrawWithRecipe.draw_and_resource_release":695.697,"Graphics.DrawWithRecipe.index_upload":8.353,"Graphics.DrawWithRecipe.validate":13.776,"Graphics.DrawWithRecipe.vertex_upload":15.808,"Recorder.Reap":135.794,"Recorder.Submit":471.717,"Recorder.WaitSerial":2651.169,"Resources.Complete":97.423,"Resources.Prepare":51.115,"Shader.DrawStage":3968.556,"Shader.DrawStage.capture_resources":1759.63,"Shader.DrawStage.materialize":1133.692,"Shader.DrawStage.prepared_invocation":983.739,"Shader.ResolveAbi":144.173,"Shader.ResolveGraphicsAbi":57.702,"Shader.ResolveGraphicsStagesAbi":140.264,"VideoOut.Flip":2709.927,"VideoOut.Flip.completion_mutex_wait":0.398,"VideoOut.Flip.config_mutex_wait":0.029,"VideoOut.Flip.frame_limit":0.205,"VideoOut.Flip.notify_game":22.146,"VideoOut.Flip.present":2683.781,"VideoOut.Flip.validate":0.391,"VideoOut.Flip.vblank_wait":0.168,"VideoOut.Flip.window_prepare":0.447,"VideoOut.Flip.window_title":1.979,"VideoOut.Readiness":1.299,"VideoOut.Readiness.locks_validate":0.66,"Vulkan.Acquire":2.872,"Vulkan.Acquire.acquire_fence_wait":0.508,"Vulkan.Acquire.acquire_image":1.544,"Vulkan.Acquire.fence_reset":0.594,"Vulkan.Acquire.retired_swapchains":0.116,"Vulkan.Dispatch":182.864,"Vulkan.Dispatch.command_record":58.667,"Vulkan.Dispatch.shader_resources":123.221,"Vulkan.DrawFromRecipe":753.204,"Vulkan.Present":22.56,"Vulkan.Present.command_record_scale":7.997,"Vulkan.Present.pixel_upload":3.239,"Vulkan.Present.queue_submit":11.032,"Vulkan.QueuePresent":45.127,"Vulkan.QueuePresent.queue_present":44.71,"Vulkan.Retire":2435.959,"Vulkan.Retire.wait":2431.478},"top_phases_ms_per_frame":{"Driver.Packet":64.294,"Driver.Packet.draw":49.14,"Driver.Draw":48.222,"Graphics.Draw":40.358,"Graphics.Draw.draw_and_resource_release":30.826,"Driver.Draw.shader_compile_and_link":27.134,"Shader.DrawStage":17.56,"VideoOut.Flip":11.991},"owned_draw_counts":{"OwnedDraw.evicted_other":911},"graphics_track":{"Graphics.Barrier.copy":904,"Graphics.Barrier.dispatch-lead":1400,"Graphics.Barrier.dispatch-trail":2486,"Graphics.Barrier.draw":37235,"Graphics.Barrier.fill-clear":2260,"Graphics.Barrier.label-run":38835,"Graphics.Barrier.present-blit":452,"Graphics.Barrier.staging-in":2078,"Graphics.Barrier.staging-out":452,"Graphics.Barrier.storage-upload":25764,"Graphics.Barrier.storage-writeback":2348,"Graphics.BarrierMerged.dispatch-lead":1086,"Graphics.BarrierMerged.staging-in":182,"Graphics.BarrierMerged.staging-out":452,"Graphics.BarrierMerged.storage-writeback":364,"Graphics.Copy":1356,"Graphics.Copy.bytes":14492928,"Graphics.RenderPass":18296,"Graphics.RenderPass.Close.command":6852,"Graphics.RenderPass.Close.image":18,"Graphics.RenderPass.Close.key":846,"Graphics.RenderPass.Close.new-batch":10580,"Graphics.RenderPass.Continued":457208},"trace_dropped":true,"trace_dropped_threads":{"queue worker 0x0":{"events_full_after_s":5.124,"events_lost":493101,"totals_full":false},"draw committer":{"events_full_after_s":14.125,"events_lost":17888,"totals_full":false}},"trace":"aps5-trace-05bbb26cd347-5296.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: 493101 events lost; buffer full at 5124.3 ms; over the 75 of 226 frames that ended before it: busy 40.6 ms per frame (60 %), wait 0.0, largest Driver.Packet 40.5, Driver.EndSubmission 0.0 (the thread table divides the retained slices by every frame) - draw committer: 17888 events lost; buffer full at 14124.5 ms; over the 211 of 226 frames that ended before it: busy 29.5 ms per frame (44 %), wait 0.4, largest Graphics.Draw 24.7, Vulkan.DrawFromRecipe 2.9 (the thread table divides the retained slices by every frame) **Slowest frames** (largest slices inside each, inclusive) - present 4530: 99.6 ms at 1950 ms: Driver.Packet (queue worker 0x0) 75.1, Driver.Packet.draw (queue worker 0x0) 67.3, Driver.Draw (queue worker 0x0) 65.9, Graphics.Draw (draw committer) 57.4 - present 4539: 91.8 ms at 2607 ms: Driver.Packet (queue worker 0x0) 66.0, Driver.Packet.draw (queue worker 0x0) 58.7, Driver.Draw (queue worker 0x0) 57.4, Graphics.Draw (draw committer) 51.3 - present 4596: 90.7 ms at 6385 ms: Graphics.Draw (draw committer) 51.6, Graphics.Draw.draw_and_resource_release (draw committer) 42.3, batch (gpu) 30.7, VideoOut.Flip (presenter) 12.1 - present 4643: 87.2 ms at 9489 ms: batch (gpu) 29.6, Graphics.Draw (draw committer) 23.8, Graphics.Draw.draw_and_resource_release (draw committer) 12.8, VideoOut.Flip (presenter) 12.1 - present 4665: 86.7 ms at 10942 ms: batch (gpu) 30.3, Graphics.Draw (draw committer) 23.1, VideoOut.Flip (presenter) 12.4, VideoOut.Flip.present (presenter) 12.3 **Persistent spikes** (frame time above the fastest frame that separates it from a longer frame; one entry per stall, not per frame) - present 4530: 99.6 ms at 1950 ms, persistence 39.8 ms - present 4596: 90.7 ms at 6385 ms, persistence 30.9 ms - present 4643: 87.2 ms at 9489 ms, persistence 27.4 ms - present 4665: 86.7 ms at 10942 ms, persistence 26.2 ms - present 4539: 91.8 ms at 2607 ms, persistence 25.8 ms - present 4507: 86.1 ms at 385 ms, persistence 25.5 ms - present 4691: 85.8 ms at 12696 ms, persistence 24.2 ms - present 4655: 85.6 ms at 10284 ms, persistence 23.4 ms - present 4683: 85.5 ms at 12150 ms, persistence 23.2 ms - present 4573: 84.1 ms at 4857 ms, persistence 22.1 ms **Threads** (ms per frame) | thread | busy | wait | untraced | in slices < 20 us | largest | |---|---|---|---|---|---| | title | 0.0 (0 %) | 11.8 (18 %) | 54.8 | 0.4 | Shader.ResolveGraphicsStagesAbi 0.0, Shader.ResolveAbi 0.0 | | queue worker 0x0 | 13.6 (20 %) | 0.0 (0 %) | 53.0 | 44.5 | Driver.Packet 13.6, Driver.EndSubmission 0.0 | | draw committer | 27.7 (42 %) | 0.3 (0 %) | 38.6 | 40.0 | Graphics.Draw 23.2, Vulkan.DrawFromRecipe 2.7 | | title | 0.0 (0 %) | 0.0 (0 %) | 66.6 | 0.1 | Shader.ResolveAbi 0.0, Shader.ResolveGraphicsAbi 0.0 | | title | 0.0 (0 %) | 0.0 (0 %) | 66.6 | 0.1 | Shader.ResolveAbi 0.0, Shader.ResolveGraphicsStagesAbi 0.0 | | title | 0.0 (0 %) | 0.0 (0 %) | 66.6 | 0.1 | Shader.ResolveAbi 0.0, Shader.ResolveGraphicsStagesAbi 0.0 | | title | 0.0 (0 %) | 0.0 (0 %) | 66.6 | 0.1 | Shader.ResolveAbi 0.0, Shader.ResolveGraphicsStagesAbi 0.0 | | presenter | 0.5 (1 %) | 11.5 (17 %) | 54.6 | 0.1 | VideoOut.Flip 12.0, Driver.Present 0.1 | | title | 0.0 (0 %) | 0.0 (0 %) | 66.6 | 0.1 | Shader.ResolveAbi 0.0, Shader.ResolveGraphicsStagesAbi 0.0 | | title | 0.0 (0 %) | 0.0 (0 %) | 66.6 | 0.1 | Shader.ResolveAbi 0.0, Shader.ResolveGraphicsAbi 0.0 | | title | 0.0 (0 %) | 0.0 (0 %) | 66.6 | 0.1 | Shader.ResolveAbi 0.0, Shader.ResolveGraphicsAbi 0.0 | | title | 0.0 (0 %) | 0.0 (0 %) | 66.6 | 0.1 | Shader.ResolveAbi 0.0, Shader.ResolveGraphicsStagesAbi 0.0 | | title | 0.0 (0 %) | 0.0 (0 %) | 66.6 | 0.1 | Shader.ResolveAbi 0.0, Shader.ResolveGraphicsStagesAbi 0.0 | | title | 0.0 (0 %) | 0.0 (0 %) | 66.6 | 0.1 | Shader.ResolveAbi 0.0, Shader.ResolveGraphicsStagesAbi 0.0 | | title | 0.0 (0 %) | 0.0 (0 %) | 66.6 | 0.1 | Shader.ResolveAbi 0.0, Shader.ResolveGraphicsStagesAbi 0.0 | | title | 0.0 (0 %) | 0.0 (0 %) | 66.6 | 0.1 | Shader.ResolveAbi 0.0, Shader.ResolveGraphicsStagesAbi 0.0 | | gpu | 30.3 (45 %) | 0.0 (0 %) | 36.3 | 0.0 | batch 30.3 | **Largest slices** (ms per frame, inclusive, all threads): batch 30.3, Graphics.Draw 23.2, Driver.Packet 13.6, Graphics.Draw.draw_and_resource_release 12.9, VideoOut.Flip 12.0, Driver.Present 11.9, VideoOut.Flip.present 11.9, Recorder.WaitSerial 11.7, Driver.Packet.draw 11.0, Driver.Present.render_fence_wait 10.8 **Longest waits** - Recorder.WaitSerial (title) 15.1 ms at 2050 ms, present 4530 - Driver.Present.render_fence_wait (presenter) 14.6 ms at 2050 ms, present 4531 - Recorder.WaitSerial (title) 14.0 ms at 2467 ms, present 4536 - Recorder.WaitSerial (title) 13.8 ms at 6602 ms, present 4598 - Driver.Present.render_fence_wait (presenter) 13.7 ms at 2467 ms, present 4537 - Recorder.WaitSerial (title) 13.5 ms at 2191 ms, present 4532 - Recorder.WaitSerial (title) 13.5 ms at 2325 ms, present 4534 - Recorder.WaitSerial (title) 13.2 ms at 3828 ms, present 4556 - Recorder.WaitSerial (title) 13.1 ms at 7780 ms, present 4616 - Recorder.WaitSerial (title) 13.1 ms at 1742 ms, present 4527 **Largest GPU batches** (GPU ranges inside, and the CPU slices that recorded each, inclusive) - batch 1993: 5.9 ms at 2046 ms, present 4530: GPU no ranges; recorded by Vulkan.DrawFromRecipe (draw committer) 0.1, Graphics.DrawWithRecipe (draw committer) 0.1, Graphics.DrawWithRecipe.draw_and_resource_release (draw committer) 0.1 - batch 2198: 5.9 ms at 2254 ms, present 4533: GPU no ranges; recorded by Vulkan.DrawFromRecipe (draw committer) 0.0, Graphics.DrawWithRecipe (draw committer) 0.0, Graphics.DrawWithRecipe.draw_and_resource_release (draw committer) 0.0 - batch 2267: 5.9 ms at 2322 ms, present 4534: GPU no ranges; recorded by no CPU slices - batch 2402: 5.8 ms at 2464 ms, present 4536: GPU no ranges; recorded by Driver.Packet (queue worker 0x0) 4.4, Driver.Packet.draw (queue worker 0x0) 2.2, Driver.Draw (queue worker 0x0) 2.2, Driver.Packet.dispatch (queue worker 0x0) 2.0 - batch 2337: 5.7 ms at 2393 ms, present 4535: GPU no ranges; recorded by no CPU slices </details> <details> <summary>Digest: this PR, run t1 (commit 3271af072354)</summary> **seconds 200:15** from present 4535: 226 presents, frame p50 64.5 / p90 71.3 / p99 90.6 / max 91.4 ms, GPU busy 30.7 ms per present NVIDIA GeForce RTX 2080 Ti, NVIDIA 610.88, Windows 10.0.26300, 3840x2160, commit 3271af072354, dropped: yes ```json {"commit":"3271af072354","dirty":false,"env":{"APS5_TRACE_DIR":"<path>","APS5_TRACE_SECONDS":"200:15"},"gpu":"NVIDIA GeForce RTX 2080 Ti","driver":"NVIDIA 610.88","os":"Windows 10.0.26300","cpu":"Intel(R) Core(TM) i9-9900K CPU @ 3.60GHz","cpu_threads":16,"memory_mib":65468,"title_id":"PPSA05324","title":"Sonic Origins","content_version":"02.002.000","resolution":"3840x2160","window":{"spec":"seconds 200:15","first_present":4535,"ms":15010.719},"presents":226,"frame_ms":{"p50":64.481,"p90":71.266,"p99":90.626,"max":91.385},"gpu_busy_ms_per_present":30.711,"worker_busy_pct":{"queue worker 0x0":96.589},"phase_totals_ms":{"Driver.Completion":3.102,"Driver.Dispatch":1339.455,"Driver.Dispatch.capture_resources":17.424,"Driver.Dispatch.decode_key_device_setup":964.971,"Driver.Dispatch.lookup_cache":13.578,"Driver.Dispatch.materialize":3.574,"Driver.Dispatch.prepared_invocation":2.787,"Driver.Draw":10870.823,"Driver.Draw.device_setup":741.392,"Driver.Draw.draw_enqueued":2310.63,"Driver.Draw.post_compile_prepare":180.678,"Driver.Draw.prepare":1292.805,"Driver.Draw.shader_compile_and_link":6108.741,"Driver.EndSubmission":6.856,"Driver.Packet":14488.622,"Driver.Packet.device_lock":163.17,"Driver.Packet.dispatch":1343.299,"Driver.Packet.draw":11089.041,"Driver.Packet.execute":407.624,"Driver.Packet.flip_flush":6.594,"Driver.Packet.flush_between_packets":483.508,"Driver.Packet.memory_wait":0.002,"Driver.Packet.pipeline_drain":229.325,"Driver.Packet.pipeline_prepare":259.912,"Driver.Packet.prepare_memory":241.28,"Driver.Packet.rendering_wait":0.402,"Driver.Present":2690.809,"Driver.Present.acquire_image":3.436,"Driver.Present.device_setup":0.336,"Driver.Present.gpu_mutex_wait":145.531,"Driver.Present.inflight_wait":0.697,"Driver.Present.present_display_buffer":41.694,"Driver.Present.queue_present":45.804,"Driver.Present.release_and_callback":0.772,"Driver.Present.render_fence_wait":2451.615,"Driver.Present.resize":0.574,"Driver.Present.validate":0.127,"Driver.Suspend":0.076,"GpuMutex.wait.dispatch":0.029,"GpuMutex.wait.draw":51.343,"GpuMutex.wait.end":1.26,"GpuMutex.wait.fill":7.705,"GpuMutex.wait.flush":0.837,"GpuMutex.wait.label":5.269,"GpuMutex.wait.other":5.151,"GpuMutex.wait.present":144.825,"GpuMutex.wait.wait":4.298,"Graphics.Draw":9178.411,"Graphics.Draw.draw_and_resource_release":7058.254,"Graphics.Draw.index_upload":470.464,"Graphics.Draw.validate":758.31,"Graphics.Draw.vertex_upload":753.628,"Graphics.DrawWithRecipe":621.69,"Graphics.DrawWithRecipe.draw_and_resource_release":596.967,"Graphics.DrawWithRecipe.index_upload":3.024,"Graphics.DrawWithRecipe.validate":8.774,"Graphics.DrawWithRecipe.vertex_upload":7.647,"Recorder.Reap":123.701,"Recorder.Submit":463.827,"Recorder.WaitSerial":2652.683,"Resources.Complete":78.42,"Resources.Prepare":49.777,"Shader.DrawStage":4045.682,"Shader.DrawStage.capture_resources":1776.074,"Shader.DrawStage.materialize":1145.46,"Shader.DrawStage.prepared_invocation":1033.004,"Shader.ResolveAbi":145.575,"Shader.ResolveGraphicsAbi":56.29,"Shader.ResolveGraphicsStagesAbi":138.838,"VideoOut.Flip":2691.241,"VideoOut.Flip.completion_mutex_wait":0.423,"VideoOut.Flip.config_mutex_wait":0.042,"VideoOut.Flip.frame_limit":0.19,"VideoOut.Flip.notify_game":7.743,"VideoOut.Flip.present":2679.581,"VideoOut.Flip.validate":0.346,"VideoOut.Flip.vblank_wait":0.225,"VideoOut.Flip.window_prepare":0.518,"VideoOut.Flip.window_title":1.794,"VideoOut.Readiness":1.163,"VideoOut.Readiness.locks_validate":0.481,"Vulkan.Acquire":3.185,"Vulkan.Acquire.acquire_fence_wait":0.664,"Vulkan.Acquire.acquire_image":1.732,"Vulkan.Acquire.fence_reset":0.532,"Vulkan.Acquire.retired_swapchains":0.118,"Vulkan.Dispatch":183.648,"Vulkan.Dispatch.command_record":59.157,"Vulkan.Dispatch.shader_resources":123.507,"Vulkan.DrawFromRecipe":629.998,"Vulkan.Present":21.917,"Vulkan.Present.command_record_scale":7.774,"Vulkan.Present.pixel_upload":2.373,"Vulkan.Present.queue_submit":11.461,"Vulkan.QueuePresent":44.664,"Vulkan.QueuePresent.queue_present":44.355,"Vulkan.Retire":2450.968,"Vulkan.Retire.wait":2445.988},"top_phases_ms_per_frame":{"Driver.Packet":64.109,"Driver.Packet.draw":49.067,"Driver.Draw":48.101,"Graphics.Draw":40.612,"Graphics.Draw.draw_and_resource_release":31.231,"Driver.Draw.shader_compile_and_link":27.03,"Shader.DrawStage":17.901,"VideoOut.Flip":11.908},"owned_draw_counts":{"OwnedDraw.evicted_other":1306},"graphics_track":{"Graphics.Barrier.copy":904,"Graphics.Barrier.dispatch-lead":1380,"Graphics.Barrier.dispatch-trail":2489,"Graphics.Barrier.draw":37442,"Graphics.Barrier.fill-clear":2260,"Graphics.Barrier.input-mirror":169,"Graphics.Barrier.label-run":38863,"Graphics.Barrier.present-blit":452,"Graphics.Barrier.shadow-publish":2,"Graphics.Barrier.staging-in":2098,"Graphics.Barrier.staging-out":452,"Graphics.Barrier.storage-upload":25774,"Graphics.Barrier.storage-writeback":2426,"Graphics.BarrierMerged.dispatch-lead":1109,"Graphics.BarrierMerged.shadow-publish":2,"Graphics.BarrierMerged.staging-in":166,"Graphics.BarrierMerged.staging-out":452,"Graphics.BarrierMerged.storage-writeback":299,"Graphics.Copy":1527,"Graphics.Copy.bytes":34989175,"Graphics.RenderPass":18389,"Graphics.RenderPass.Close.command":6950,"Graphics.RenderPass.Close.image":33,"Graphics.RenderPass.Close.key":848,"Graphics.RenderPass.Close.new-batch":10558,"Graphics.RenderPass.Continued":458350},"trace_dropped":true,"trace_dropped_threads":{"queue worker 0x0":{"events_full_after_s":5.323,"events_lost":463710,"totals_full":false},"draw committer":{"events_full_after_s":14.534,"events_lost":8329,"totals_full":false}},"trace":"aps5-trace-3271af072354-36564.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: 463710 events lost; buffer full at 5322.5 ms; over the 80 of 226 frames that ended before it: busy 38.3 ms per frame (58 %), wait 0.0, largest Driver.Packet 38.3, Driver.EndSubmission 0.0 (the thread table divides the retained slices by every frame) - draw committer: 8329 events lost; buffer full at 14534.1 ms; over the 218 of 226 frames that ended before it: busy 29.3 ms per frame (44 %), wait 0.3, largest Graphics.Draw 24.8, Vulkan.DrawFromRecipe 2.7 (the thread table divides the retained slices by every frame) **Slowest frames** (largest slices inside each, inclusive) - present 4716: 91.4 ms at 12039 ms: Graphics.Draw (draw committer) 52.4, Graphics.Draw.draw_and_resource_release (draw committer) 41.5, batch (gpu) 29.3, VideoOut.Flip (presenter) 11.3 - present 4632: 91.0 ms at 6441 ms: Graphics.Draw (draw committer) 48.1, Graphics.Draw.draw_and_resource_release (draw committer) 38.3, batch (gpu) 29.1, VideoOut.Flip (presenter) 10.8 - present 4646: 90.6 ms at 7401 ms: Graphics.Draw (draw committer) 50.0, Graphics.Draw.draw_and_resource_release (draw committer) 39.5, batch (gpu) 30.4, VideoOut.Flip (presenter) 11.9 - present 4639: 89.3 ms at 6923 ms: Graphics.Draw (draw committer) 49.8, Graphics.Draw.draw_and_resource_release (draw committer) 37.8, batch (gpu) 27.8, VideoOut.Flip (presenter) 9.9 - present 4691: 89.1 ms at 10386 ms: Graphics.Draw (draw committer) 50.5, Graphics.Draw.draw_and_resource_release (draw committer) 40.5, batch (gpu) 29.4, VideoOut.Flip (presenter) 11.5 **Persistent spikes** (frame time above the fastest frame that separates it from a longer frame; one entry per stall, not per frame) - present 4716: 91.4 ms at 12039 ms, persistence 31.1 ms - present 4632: 91.0 ms at 6441 ms, persistence 30.8 ms - present 4646: 90.6 ms at 7401 ms, persistence 28.8 ms - present 4691: 89.1 ms at 10386 ms, persistence 28.2 ms - present 4561: 89.0 ms at 1739 ms, persistence 27.9 ms - present 4639: 89.3 ms at 6923 ms, persistence 27.1 ms - present 4549: 87.4 ms at 934 ms, persistence 25.8 ms - present 4625: 87.6 ms at 5949 ms, persistence 25.1 ms - present 4586: 85.9 ms at 3396 ms, persistence 24.8 ms - present 4653: 86.4 ms at 7879 ms, persistence 24.6 ms **Threads** (ms per frame) | thread | busy | wait | untraced | in slices < 20 us | largest | |---|---|---|---|---|---| | title | 0.0 (0 %) | 11.8 (18 %) | 54.6 | 0.4 | Shader.ResolveGraphicsStagesAbi 0.0, Shader.ResolveAbi 0.0 | | queue worker 0x0 | 13.6 (20 %) | 0.0 (0 %) | 52.8 | 48.2 | Driver.Packet 13.6, Driver.EndSubmission 0.0 | | draw committer | 28.3 (43 %) | 0.3 (0 %) | 37.8 | 40.4 | Graphics.Draw 24.0, Vulkan.DrawFromRecipe 2.6 | | title | 0.0 (0 %) | 0.0 (0 %) | 66.4 | 0.1 | Shader.ResolveAbi 0.0, Shader.ResolveGraphicsStagesAbi 0.0 | | title | 0.0 (0 %) | 0.0 (0 %) | 66.4 | 0.1 | Shader.ResolveGraphicsStagesAbi 0.0, Shader.ResolveAbi 0.0 | | title | 0.0 (0 %) | 0.0 (0 %) | 66.4 | 0.1 | Shader.ResolveAbi 0.0, Shader.ResolveGraphicsStagesAbi 0.0 | | title | 0.0 (0 %) | 0.0 (0 %) | 66.4 | 0.1 | Shader.ResolveAbi 0.0, Shader.ResolveGraphicsStagesAbi 0.0 | | title | 0.0 (0 %) | 0.0 (0 %) | 66.4 | 0.1 | Shader.ResolveAbi 0.0, Shader.ResolveGraphicsStagesAbi 0.0 | | presenter | 0.5 (1 %) | 11.5 (17 %) | 54.5 | 0.1 | VideoOut.Flip 11.9, Driver.Present 0.1 | | title | 0.0 (0 %) | 0.0 (0 %) | 66.4 | 0.1 | Shader.ResolveAbi 0.0, Shader.ResolveGraphicsStagesAbi 0.0 | | title | 0.0 (0 %) | 0.0 (0 %) | 66.4 | 0.1 | Shader.ResolveAbi 0.0, Shader.ResolveGraphicsStagesAbi 0.0 | | title | 0.0 (0 %) | 0.0 (0 %) | 66.4 | 0.1 | Shader.ResolveAbi 0.0, Shader.ResolveGraphicsStagesAbi 0.0 | | title | 0.0 (0 %) | 0.0 (0 %) | 66.4 | 0.1 | Shader.ResolveAbi 0.0, Shader.ResolveGraphicsStagesAbi 0.0 | | title | 0.0 (0 %) | 0.0 (0 %) | 66.4 | 0.1 | Shader.ResolveAbi 0.0, Shader.ResolveGraphicsAbi 0.0 | | title | 0.0 (0 %) | 0.0 (0 %) | 66.4 | 0.1 | Shader.ResolveAbi 0.0, Shader.ResolveGraphicsStagesAbi 0.0 | | title | 0.0 (0 %) | 0.0 (0 %) | 66.4 | 0.1 | Shader.ResolveAbi 0.0, Shader.ResolveGraphicsStagesAbi 0.0 | | gpu | 30.7 (46 %) | 0.0 (0 %) | 35.7 | 0.0 | batch 30.7 | **Largest slices** (ms per frame, inclusive, all threads): batch 30.7, Graphics.Draw 24.0, Graphics.Draw.draw_and_resource_release 13.8, Driver.Packet 13.6, VideoOut.Flip 11.9, Driver.Present 11.9, VideoOut.Flip.present 11.9, Recorder.WaitSerial 11.7, Driver.Present.render_fence_wait 10.8, Vulkan.Retire 10.8 **Longest waits** - Recorder.WaitSerial (title) 15.5 ms at 3206 ms, present 4583 - Driver.Present.render_fence_wait (presenter) 15.2 ms at 3206 ms, present 4583 - Recorder.WaitSerial (title) 14.9 ms at 3267 ms, present 4583 - Recorder.WaitSerial (title) 14.8 ms at 3482 ms, present 4586 - Driver.Present.render_fence_wait (presenter) 14.5 ms at 3482 ms, present 4587 - Recorder.WaitSerial (title) 14.5 ms at 3396 ms, present 4585 - Recorder.WaitSerial (title) 14.4 ms at 3331 ms, present 4584 - Recorder.WaitSerial (title) 14.2 ms at 3141 ms, present 4581 - Driver.Present.render_fence_wait (presenter) 13.8 ms at 3141 ms, present 4582 - Recorder.WaitSerial (title) 13.7 ms at 9419 ms, present 4675 **Largest GPU batches** (GPU ranges inside, and the CPU slices that recorded each, inclusive) - batch 3177: 5.9 ms at 3137 ms, present 4581: GPU no ranges; recorded by Vulkan.DrawFromRecipe (draw committer) 0.1, Graphics.DrawWithRecipe (draw committer) 0.1, Graphics.DrawWithRecipe.draw_and_resource_release (draw committer) 0.1 - batch 3107: 5.9 ms at 3066 ms, present 4580: GPU no ranges; recorded by Vulkan.DrawFromRecipe (draw committer) 0.1, Graphics.DrawWithRecipe (draw committer) 0.1, Graphics.DrawWithRecipe.draw_and_resource_release (draw committer) 0.1 - batch 3451: 5.9 ms at 3392 ms, present 4585: GPU no ranges; recorded by Vulkan.DrawFromRecipe (draw committer) 0.1, Graphics.DrawWithRecipe (draw committer) 0.1, Graphics.DrawWithRecipe.draw_and_resource_release (draw committer) 0.1 - batch 3314: 5.9 ms at 3264 ms, present 4583: GPU no ranges; recorded by Vulkan.DrawFromRecipe (draw committer) 0.1, Graphics.DrawWithRecipe (draw committer) 0.1, Graphics.DrawWithRecipe.draw_and_resource_release (draw committer) 0.1 - batch 3383: 5.9 ms at 3327 ms, present 4584: GPU no ranges; recorded by no CPU slices </details> **Overlap.** `tools/pr_overlap.py --branch perf/agc-repeat-storage-surface` over 2,501 open PRs failed closed on 29 PRs that touch `DepthSurface.cpp` or `DepthSurface.hpp` but conflict with main themselves. I read the added and removed lines of those and of the other open PRs that touch depth surfaces (37 in all, 2026-11-24) for anything that creates, re-activates or un-retires a surface, or changes a surface's address or device, and for any change to `DepthSurfaceStorage`'s lookup or to `RepeatStorageSurface`. None changes the lookup. #7256, #24083 and #19557 keep or add the `surfacesSerial` bump at their new creation paths. #1368 and #1395 (old, conflicting with main for months, #1395 a draft) add `surfaces().push_back` lines without a bump in the added lines; a creation path added by either has to bump the serial as the existing one does, and I will say so there if they are revived. The other hits are test-only, library-split moves (#24322, #24910, #24917) or unrelated lock sites (#24083, #24927, #25534, #25610, #26034, #20186: they add `surfacesMutex` users, not entries). Main moved to `6fde67a5eb3` while this was prepared: the branch merges cleanly (`git merge-tree`), and the commits in between that touch `DepthSurface.cpp` do not touch the registry fields above. ### Checklist <!-- Rules behind each item: https://github.com/boykopovar/AnyPS5/blob/main/CONTRIBUTING.md --> - [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: none - [x] Unblocks: none - [x] GPUs tested: NVIDIA GeForce RTX 2080 Ti, driver 610.88, Windows 11 Pro 10.0.26300 - [x] AI-assisted: yes
MarcZX10 commented 2026-11-25 07:24:10 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-25T07:24:10Z.

Review: APPROVED


Reviewed — looks good

The change at head 3271af07235450d733d6ca75c1aad78213b04e61 adds a per-thread cache for exact depth surface misses; the inspected code and described checks support merging.

What I ran

No tests or builds were run during this review. I read the prepared description, commit summary, manifest, and diff, then used repo_read.py to inspect the changed code and its scratch-slot helper at the pinned head.

Results

Check Result Note
Source review passed All three changed files read
Tests and build not run Results in the description are author-reported
Performance captures not run Results in the description are author-reported

Findings

Blocking

None.

Non-blocking

None.

Sources

Behavior checked in DepthSurface.cpp at the reviewed head, DepthSurface.hpp at the reviewed head, DepthStorage.cpp at the reviewed head, and the existing ThreadScratch.hpp helper. The miss cache matches on device, address, and serial; creation, rebind, and clear paths inspected advance the serial, while the cache only remembers scans that found no surface.

Not verified

No tests, build, runtime behavior, physical-console behavior, or performance captures were independently verified. The author's reported test and performance results in the PR description were not rerun. The only changed files listed in the manifest were read; no files were excluded in the manifest.

To get this to a good state

Nothing is required.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:6053414602 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/26681#pullrequestreview-6053414602). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-11-25T07:24:10Z. **Review:** APPROVED --- # Reviewed — looks good The change at head `3271af07235450d733d6ca75c1aad78213b04e61` adds a per-thread cache for exact depth surface misses; the inspected code and described checks support merging. ## What I ran No tests or builds were run during this review. I read the prepared description, commit summary, manifest, and diff, then used `repo_read.py` to inspect the changed code and its scratch-slot helper at the pinned head. ## Results | Check | Result | Note | |---|---|---| | Source review | passed | All three changed files read | | Tests and build | not run | Results in the description are author-reported | | Performance captures | not run | Results in the description are author-reported | ## Findings ### Blocking None. ### Non-blocking None. ## Sources Behavior checked in [DepthSurface.cpp at the reviewed head](https://github.com/boykopovar/AnyPS5/blob/3271af07235450d733d6ca75c1aad78213b04e61/core/libs/prx/libSceAgcDriver/Graphics/src/DepthSurface.cpp), [DepthSurface.hpp at the reviewed head](https://github.com/boykopovar/AnyPS5/blob/3271af07235450d733d6ca75c1aad78213b04e61/core/libs/prx/libSceAgcDriver/Graphics/include/DepthSurface.hpp), [DepthStorage.cpp at the reviewed head](https://github.com/boykopovar/AnyPS5/blob/3271af07235450d733d6ca75c1aad78213b04e61/core/libs/prx/libSceAgcDriver/tests/execution/DepthStorage.cpp), and the existing [ThreadScratch.hpp helper](https://github.com/boykopovar/AnyPS5/blob/3271af07235450d733d6ca75c1aad78213b04e61/core/libs/prx/libSceAgcDriver/Execution/include/ThreadScratch.hpp). The miss cache matches on device, address, and serial; creation, rebind, and clear paths inspected advance the serial, while the cache only remembers scans that found no surface. ## Not verified No tests, build, runtime behavior, physical-console behavior, or performance captures were independently verified. The author's reported test and performance results in the PR description were not rerun. The only changed files listed in the manifest were read; no files were excluded in the manifest. ## 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!26681
No description provided.