Skip to content

perf(agc): read the compare hook only when one is installed - #26115

Merged
oneandonlydean merged 1 commit into
boykopovar:mainfrom
Meh7an:perf/agc-compare-hook-guard
Nov 24, 2026
Merged

oneandonlydean merged 1 commit into
boykopovar:mainfrom
Meh7an:perf/agc-compare-hook-guard

Conversation

@Meh7an

@Meh7an Meh7an commented Nov 23, 2026 •

Copy link
Copy Markdown
Contributor

What

GuestMemory::CompareMapped read its thread_local test hook (SetCompareMappedHook) once for every run of pages it compared. On Windows the MinGW toolchain compiles a thread_local read to __emutls_get_address, which calls pthread_getspecific and takes a spin lock in winpthread, so each compared region paid that lookup although only tests ever install a hook. On the Sonic Origins S3K menu page finishDraw on the queue worker compares about 8 captured regions per draw through capturedMemoryChanged (33,000 draws a second), and the hook read was 37 of the worker's 7,686 sampler samples in the two main windows (0.48%).

This change adds a process-wide std::atomic<bool> that SetCompareMappedHook sets when a thread installs a non-null hook. The two reads of the hook (the run loop in CompareMapped and the Linux early-out in compareWithoutQuery) check that flag first (a relaxed load) and only then the calling thread's own hook. The hook stays per thread: it runs only for compares on the thread that installed it, a cleared hook does not run, and once any thread has installed one the flag stays set and the read is as before. No switch, no allocation, no other behaviour change.

What it does and does not show. The hook read is gone from the worker: 37 samples (0.48%) on main against 0 with the change (table below). The rest of CompareMapped varies more between two windows of the same arm (52 and 104 samples on main) than between arms, so the arm totals say nothing about this change. The frame is flat within the noise of this scene: eight traced runs read 17.16 to 18.94 FPS on main (mean 18.19) and 17.30 to 18.75 with the change (mean 18.15), and the four pairs read -3.6%, +9.3% (the second pair's main run is the 17.16 one, which dipped to 11.2 and 13.7 FPS early on), -1.8% and -4.1%. In the sampler windows the worker is blocked 19 to 26% in Enqueue and Drain and the committer is 73 to 75% in commitDraw, so the two threads are coupled and neither alone limits the frame; 0.48% of the worker is about 0.3 ms of a 59 ms frame. I am proposing it for removing a lookup that nothing in play needs, not for a measured frame-rate gain.

Overlap. Four open PRs edit lines next to the changed ones in GuestMemory.cpp; none implements the same change, and each keeps the per-run hook read that this guard gates, so the guard applies on top of any of them. #24031 (adds hook reads on its new Windows and Linux paths, CompareMapped and compareWithoutQuery), #22156 (edits the memcmp line directly under the hook read), #20084 (conflicting; the hook read is context in its hunk) and #6188 (conflicting; context only): whichever lands second adjusts a line or two. tools/pr_overlap.py over 2,504 open PRs confirmed #22156 and #24031 and failed closed on 19 conflicting PRs touching GuestMemory.cpp; I read their GuestMemory.cpp patches by hand and only #20084 and #6188 touch the hook or CompareMapped lines. The commit is on main 9e77521f28d; it merges cleanly onto main f5b7e1d1ac8 (47 commits later, none in the file).

Tested

Windows 11 (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 9e77521f28d (the base) and this PR's f88f3e206aa.

Tests. New agc_compare_hook (five modes: no hook installed, hook installed, hook cleared, a hook installed on one thread does not run for another thread's compare, a hook cleared on another thread does not silence this thread's hook) and the focused set around the compare hook, agc_mapped_copy, agc_linked_code_dependencies, agc_driver_guest_memory_lifetime, agc_driver_dispatch_cache_defaults, agc_driver_draw_cache_relocation and agc_driver_pipelined_dispatch: 71 tests, all pass on main and on the change, plain and with VK_LAYER_KHRONOS_validation (ANYPS5_REQUIRE_VULKAN=1, ANYPS5_NO_SHADER_CACHE=1), same machine and GPU. Both validation logs show the layer inserted and no "was not found but was requested" line, and neither logs a VUID-. The five new modes also pass on main: they pin the per-thread hook behaviour the guard has to keep. Four mutants are caught (the flag never set, a guard that ignores the thread's hook, a flag that follows the last install or clear, the guarded call dropped from the compare loop). DispatchCacheDefaults and GuestMemoryLifetime are skipped stubs in a default test build (ANYPS5_AGC_EXECUTION_TESTS); I built them for this run. Not run: Linux and macOS (the compareWithoutQuery branch is covered there only by the new installed mode), other GPUs, the full ctest suite.

Sampler (APS5_SAMPLE_WORKER and APS5_SAMPLE_COMMITTER, one 60 s window per arm, 3,843 samples per thread, both orders; benchmark lease, quiet at start; the change ran as the same diff before it was committed, so its title read main 9e77521f28d3 dirty):

window arm FPS median (min-max) worker CompareMapped samples of them the hook read
1 main 18.26 (0.94-18.49; the 0.94 is the first reading) 52 10
1 change 18.59 (17.56-18.79) 83 0
2 change 18.17 (17.51-18.47) 79 0
2 main 18.17 (17.24-18.36) 104 27

Mean FPS 18.22 (main) and 18.38 (change), inside the spread of one window. Worker blocked in Enqueue plus Drain: 26.1, 22.2, 19.4 and 20.5%; committer commitDraw: 75.2, 75.3, 73.3 and 73.5%.

Traced runs (APS5_TRACE_SECONDS=200:15, same page, both orders, tools/trace_digest.py; runs gt1 and gt2 are the same diff before it was committed, dirty in their summaries, runs pt1 and pt2 the committed build against the base):

Run Arm (commit) FPS presents p50 ms p90 ms p99 ms GPU busy ms
gt1 main (9e77521) 18.94 249 59.5 63.7 71.0 30.3
gt1 change (dirty) 18.26 245 60.7 65.7 69.0 30.8
gt2 change (dirty) 18.75 255 58.4 61.3 68.4 30.3
gt2 main (9e77521) 17.16 234 63.1 68.9 73.9 30.7
pt1 main (9e77521) 18.63 248 60.0 63.6 70.0 30.6
pt1 this PR (f88f3e2) 18.30 237 62.6 68.0 74.8 30.5
pt2 this PR (f88f3e2) 17.30 242 61.9 66.0 69.5 30.5
pt2 main (9e77521) 18.04 243 61.7 65.5 68.5 30.6

Committed build only (pt1, pt2): FPS main 18.34, this PR 17.80 (-2.9%); p50 60.9 and 62.3 ms; p99 69.3 and 72.2 ms. All eight runs: FPS main 18.19, change 18.15 (-0.2%). Main alone spans 17.16 to 18.94, wider than any gap between the arms, and the pair deltas differ in sign, so the traced runs do not show a frame change in either direction. The traces lost events the same way on both arms (buffers full), as in earlier perf PRs on this scene. The traces of the four committed runs are attached: main m414g_traces_main_9e77521f28d3.zip (pt1 and pt2, commit 9e77521) and this PR m414g_traces_pr_f88f3e206aa7.zip (pt1 and pt2, commit f88f3e2). The digests of pair 1 and the summary lines of all four runs follow.

aps5-summary.jsonl lines: main (pt1), this PR (pt1), this PR (pt2), main (pt2)
{"commit":"9e77521f28d3","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":4904,"ms":15009.309},"presents":248,"frame_ms":{"p50":60.022,"p90":63.602,"p99":70.010,"max":75.049},"gpu_busy_ms_per_present":30.642,"worker_busy_pct":{"queue worker 0x0":96.705},"phase_totals_ms":{"Driver.Completion":1.827,"Driver.Dispatch":1068.769,"Driver.Dispatch.capture_resources":16.869,"Driver.Dispatch.decode_key_device_setup":703.695,"Driver.Dispatch.lookup_cache":14.082,"Driver.Dispatch.materialize":3.269,"Driver.Dispatch.prepared_invocation":2.884,"Driver.Draw":10963.888,"Driver.Draw.device_setup":875.468,"Driver.Draw.draw_enqueued":2356.804,"Driver.Draw.post_compile_prepare":189.573,"Driver.Draw.prepare":1354.992,"Driver.Draw.shader_compile_and_link":5934.844,"Driver.EndSubmission":35.344,"Driver.Packet":14477.540,"Driver.Packet.device_lock":174.485,"Driver.Packet.dispatch":1072.700,"Driver.Packet.draw":11185.222,"Driver.Packet.execute":402.497,"Driver.Packet.flip_flush":6.645,"Driver.Packet.flush_between_packets":474.747,"Driver.Packet.memory_wait":0.003,"Driver.Packet.pipeline_drain":233.814,"Driver.Packet.pipeline_prepare":265.629,"Driver.Packet.prepare_memory":258.127,"Driver.Packet.rendering_wait":0.325,"Driver.Present":3244.700,"Driver.Present.acquire_image":3.590,"Driver.Present.device_setup":0.408,"Driver.Present.gpu_mutex_wait":224.345,"Driver.Present.inflight_wait":0.800,"Driver.Present.present_display_buffer":46.379,"Driver.Present.queue_present":47.812,"Driver.Present.release_and_callback":0.666,"Driver.Present.render_fence_wait":2919.870,"Driver.Present.resize":0.539,"Driver.Present.validate":0.101,"Driver.Suspend":0.077,"GpuMutex.wait.dispatch":0.084,"GpuMutex.wait.draw":60.161,"GpuMutex.wait.end":2.509,"GpuMutex.wait.fill":9.647,"GpuMutex.wait.flush":1.407,"GpuMutex.wait.label":5.777,"GpuMutex.wait.other":5.980,"GpuMutex.wait.present":223.518,"GpuMutex.wait.wait":2.357,"Graphics.Draw":9188.595,"Graphics.Draw.draw_and_resource_release":7067.406,"Graphics.Draw.index_upload":449.866,"Graphics.Draw.validate":798.456,"Graphics.Draw.vertex_upload":729.251,"Graphics.DrawWithRecipe":680.447,"Graphics.DrawWithRecipe.draw_and_resource_release":650.081,"Graphics.DrawWithRecipe.index_upload":4.004,"Graphics.DrawWithRecipe.validate":10.143,"Graphics.DrawWithRecipe.vertex_upload":9.989,"Recorder.Reap":124.765,"Recorder.Submit":446.796,"Recorder.WaitSerial":3196.690,"Resources.Complete":75.062,"Resources.Prepare":51.450,"Shader.DrawStage":3920.939,"Shader.DrawStage.capture_resources":1783.163,"Shader.DrawStage.materialize":1052.363,"Shader.DrawStage.prepared_invocation":989.495,"Shader.ResolveAbi":159.394,"Shader.ResolveGraphicsAbi":64.142,"Shader.ResolveGraphicsStagesAbi":154.865,"VideoOut.Flip":3245.741,"VideoOut.Flip.completion_mutex_wait":0.376,"VideoOut.Flip.config_mutex_wait":0.032,"VideoOut.Flip.frame_limit":0.200,"VideoOut.Flip.notify_game":8.488,"VideoOut.Flip.present":3233.412,"VideoOut.Flip.validate":0.326,"VideoOut.Flip.vblank_wait":0.176,"VideoOut.Flip.window_prepare":0.441,"VideoOut.Flip.window_title":2.006,"VideoOut.Readiness":1.653,"VideoOut.Readiness.locks_validate":0.993,"Vulkan.Acquire":3.308,"Vulkan.Acquire.acquire_fence_wait":0.550,"Vulkan.Acquire.acquire_image":1.757,"Vulkan.Acquire.fence_reset":0.664,"Vulkan.Acquire.retired_swapchains":0.160,"Vulkan.Dispatch":175.211,"Vulkan.Dispatch.command_record":55.473,"Vulkan.Dispatch.shader_resources":118.631,"Vulkan.DrawFromRecipe":689.420,"Vulkan.Present":25.284,"Vulkan.Present.command_record_scale":8.345,"Vulkan.Present.pixel_upload":4.176,"Vulkan.Present.queue_submit":12.468,"Vulkan.QueuePresent":46.205,"Vulkan.QueuePresent.queue_present":45.700,"Vulkan.Retire":2918.987,"Vulkan.Retire.wait":2913.941},"top_phases_ms_per_frame":{"Driver.Packet":58.377,"Driver.Packet.draw":45.102,"Driver.Draw":44.209,"Graphics.Draw":37.051,"Graphics.Draw.draw_and_resource_release":28.498,"Driver.Draw.shader_compile_and_link":23.931,"Shader.DrawStage":15.810,"VideoOut.Flip":13.088},"owned_draw_counts":{"OwnedDraw.evicted_other":1233},"graphics_track":{"Graphics.Barrier.copy":992,"Graphics.Barrier.dispatch-lead":1537,"Graphics.Barrier.dispatch-trail":2731,"Graphics.Barrier.draw":40683,"Graphics.Barrier.fill-clear":2480,"Graphics.Barrier.input-mirror":62,"Graphics.Barrier.label-run":42179,"Graphics.Barrier.present-blit":496,"Graphics.Barrier.shadow-publish":2,"Graphics.Barrier.staging-in":2300,"Graphics.Barrier.staging-out":496,"Graphics.Barrier.storage-upload":28282,"Graphics.Barrier.storage-writeback":2571,"Graphics.BarrierMerged.dispatch-lead":1194,"Graphics.BarrierMerged.label-run":8,"Graphics.BarrierMerged.shadow-publish":2,"Graphics.BarrierMerged.staging-in":184,"Graphics.BarrierMerged.staging-out":496,"Graphics.BarrierMerged.storage-writeback":419,"Graphics.Copy":1552,"Graphics.Copy.bytes":17294128,"Graphics.RenderPass":20063,"Graphics.RenderPass.Close.command":7673,"Graphics.RenderPass.Close.image":19,"Graphics.RenderPass.Close.key":1072,"Graphics.RenderPass.Close.label":8,"Graphics.RenderPass.Close.new-batch":11291,"Graphics.RenderPass.Continued":503387},"trace_dropped":true,"trace_dropped_threads":{"queue worker 0x0":{"events_full_after_s":5.846,"events_lost":405708,"totals_full":false},"draw committer":{"events_full_after_s":14.221,"events_lost":14715,"totals_full":false}},"trace":"aps5-trace-9e77521f28d3-4304.json.gz"}
{"commit":"f88f3e206aa7","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":4708,"ms":15012.592},"presents":237,"frame_ms":{"p50":62.587,"p90":67.996,"p99":74.796,"max":78.404},"gpu_busy_ms_per_present":30.479,"worker_busy_pct":{"queue worker 0x0":96.716},"phase_totals_ms":{"Driver.Completion":2.895,"Driver.Dispatch":1066.630,"Driver.Dispatch.capture_resources":16.641,"Driver.Dispatch.decode_key_device_setup":705.596,"Driver.Dispatch.lookup_cache":13.918,"Driver.Dispatch.materialize":3.099,"Driver.Dispatch.prepared_invocation":3.010,"Driver.Draw":10955.772,"Driver.Draw.device_setup":873.792,"Driver.Draw.draw_enqueued":2329.246,"Driver.Draw.post_compile_prepare":186.540,"Driver.Draw.prepare":1343.160,"Driver.Draw.shader_compile_and_link":5973.967,"Driver.EndSubmission":17.725,"Driver.Packet":14498.900,"Driver.Packet.device_lock":169.357,"Driver.Packet.dispatch":1070.505,"Driver.Packet.draw":11188.650,"Driver.Packet.execute":426.018,"Driver.Packet.flip_flush":8.277,"Driver.Packet.flush_between_packets":460.516,"Driver.Packet.memory_wait":0.018,"Driver.Packet.pipeline_drain":233.757,"Driver.Packet.pipeline_prepare":264.475,"Driver.Packet.prepare_memory":242.283,"Driver.Packet.rendering_wait":0.440,"Driver.Present":2863.541,"Driver.Present.acquire_image":3.397,"Driver.Present.device_setup":0.409,"Driver.Present.gpu_mutex_wait":139.248,"Driver.Present.inflight_wait":0.826,"Driver.Present.present_display_buffer":48.008,"Driver.Present.queue_present":46.852,"Driver.Present.release_and_callback":0.656,"Driver.Present.render_fence_wait":2623.051,"Driver.Present.resize":0.821,"Driver.Present.validate":0.065,"Driver.Suspend":0.064,"GpuMutex.wait.dispatch":0.034,"GpuMutex.wait.draw":47.225,"GpuMutex.wait.end":7.994,"GpuMutex.wait.fill":6.350,"GpuMutex.wait.flush":1.250,"GpuMutex.wait.label":7.379,"GpuMutex.wait.other":7.074,"GpuMutex.wait.present":138.285,"GpuMutex.wait.wait":5.842,"Graphics.Draw":9016.462,"Graphics.Draw.draw_and_resource_release":6967.492,"Graphics.Draw.index_upload":442.875,"Graphics.Draw.validate":777.014,"Graphics.Draw.vertex_upload":690.837,"Graphics.DrawWithRecipe":656.057,"Graphics.DrawWithRecipe.draw_and_resource_release":625.049,"Graphics.DrawWithRecipe.index_upload":4.608,"Graphics.DrawWithRecipe.validate":10.585,"Graphics.DrawWithRecipe.vertex_upload":10.168,"Recorder.Reap":121.996,"Recorder.Submit":523.685,"Recorder.WaitSerial":2824.760,"Resources.Complete":72.186,"Resources.Prepare":51.323,"Shader.DrawStage":3938.445,"Shader.DrawStage.capture_resources":1796.713,"Shader.DrawStage.materialize":1056.586,"Shader.DrawStage.prepared_invocation":993.480,"Shader.ResolveAbi":149.559,"Shader.ResolveGraphicsAbi":58.714,"Shader.ResolveGraphicsStagesAbi":144.016,"VideoOut.Flip":2867.934,"VideoOut.Flip.completion_mutex_wait":0.315,"VideoOut.Flip.config_mutex_wait":0.025,"VideoOut.Flip.frame_limit":0.237,"VideoOut.Flip.notify_game":10.723,"VideoOut.Flip.present":2853.448,"VideoOut.Flip.validate":0.335,"VideoOut.Flip.vblank_wait":0.216,"VideoOut.Flip.window_prepare":0.545,"VideoOut.Flip.window_title":1.791,"VideoOut.Readiness":1.313,"VideoOut.Readiness.locks_validate":0.511,"Vulkan.Acquire":3.095,"Vulkan.Acquire.acquire_fence_wait":0.542,"Vulkan.Acquire.acquire_image":1.701,"Vulkan.Acquire.fence_reset":0.650,"Vulkan.Acquire.retired_swapchains":0.126,"Vulkan.Dispatch":172.079,"Vulkan.Dispatch.command_record":55.592,"Vulkan.Dispatch.shader_resources":115.424,"Vulkan.DispatchRecipe":0.695,"Vulkan.DispatchRecipe.command_record":0.694,"Vulkan.DrawFromRecipe":664.892,"Vulkan.Present":25.005,"Vulkan.Present.command_record_scale":9.036,"Vulkan.Present.pixel_upload":3.662,"Vulkan.Present.queue_submit":11.910,"Vulkan.QueuePresent":45.434,"Vulkan.QueuePresent.queue_present":44.936,"Vulkan.Retire":2622.309,"Vulkan.Retire.wait":2616.981},"top_phases_ms_per_frame":{"Driver.Packet":61.177,"Driver.Packet.draw":47.209,"Driver.Draw":46.227,"Graphics.Draw":38.044,"Graphics.Draw.draw_and_resource_release":29.399,"Driver.Draw.shader_compile_and_link":25.207,"Shader.DrawStage":16.618,"VideoOut.Flip":12.101},"owned_draw_counts":{"OwnedDraw.evicted_other":1299},"graphics_track":{"Graphics.Barrier.copy":948,"Graphics.Barrier.dispatch-lead":1460,"Graphics.Barrier.dispatch-trail":2610,"Graphics.Barrier.draw":38974,"Graphics.Barrier.fill-clear":2370,"Graphics.Barrier.label-run":40634,"Graphics.Barrier.present-blit":474,"Graphics.Barrier.shadow-publish":2,"Graphics.Barrier.staging-in":2199,"Graphics.Barrier.staging-out":474,"Graphics.Barrier.storage-upload":27028,"Graphics.Barrier.storage-writeback":2560,"Graphics.BarrierMerged.dispatch-lead":1150,"Graphics.BarrierMerged.label-run":3,"Graphics.BarrierMerged.shadow-publish":2,"Graphics.BarrierMerged.staging-in":175,"Graphics.BarrierMerged.staging-out":474,"Graphics.BarrierMerged.storage-writeback":298,"Graphics.Copy":1424,"Graphics.Copy.bytes":15198432,"Graphics.RenderPass":19136,"Graphics.RenderPass.Close.command":7199,"Graphics.RenderPass.Close.image":13,"Graphics.RenderPass.Close.key":927,"Graphics.RenderPass.Close.label":3,"Graphics.RenderPass.Close.new-batch":10994,"Graphics.RenderPass.Continued":480708},"trace_dropped":true,"trace_dropped_threads":{"queue worker 0x0":{"events_full_after_s":5.779,"events_lost":422998,"totals_full":false},"draw committer":{"events_full_after_s":14.210,"events_lost":15224,"totals_full":false}},"trace":"aps5-trace-f88f3e206aa7-14352.json.gz"}
{"commit":"f88f3e206aa7","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":4398,"ms":15050.086},"presents":242,"frame_ms":{"p50":61.855,"p90":65.965,"p99":69.474,"max":71.036},"gpu_busy_ms_per_present":30.532,"worker_busy_pct":{"queue worker 0x0":96.764},"phase_totals_ms":{"Driver.Completion":1.861,"Driver.Dispatch":1021.364,"Driver.Dispatch.capture_resources":16.880,"Driver.Dispatch.decode_key_device_setup":657.086,"Driver.Dispatch.lookup_cache":13.436,"Driver.Dispatch.materialize":3.117,"Driver.Dispatch.prepared_invocation":2.982,"Driver.Draw":11066.135,"Driver.Draw.device_setup":768.205,"Driver.Draw.draw_enqueued":2589.923,"Driver.Draw.post_compile_prepare":182.469,"Driver.Draw.prepare":1331.876,"Driver.Draw.shader_compile_and_link":5954.423,"Driver.EndSubmission":14.028,"Driver.Packet":14547.085,"Driver.Packet.device_lock":171.071,"Driver.Packet.dispatch":1025.135,"Driver.Packet.draw":11304.194,"Driver.Packet.execute":405.351,"Driver.Packet.flip_flush":6.548,"Driver.Packet.flush_between_packets":469.023,"Driver.Packet.memory_wait":0.005,"Driver.Packet.pipeline_drain":233.860,"Driver.Packet.pipeline_prepare":272.767,"Driver.Packet.prepare_memory":246.922,"Driver.Packet.rendering_wait":0.373,"Driver.Present":3040.924,"Driver.Present.acquire_image":3.342,"Driver.Present.device_setup":0.399,"Driver.Present.gpu_mutex_wait":217.690,"Driver.Present.inflight_wait":0.776,"Driver.Present.present_display_buffer":45.014,"Driver.Present.queue_present":45.501,"Driver.Present.release_and_callback":0.585,"Driver.Present.render_fence_wait":2726.747,"Driver.Present.resize":0.611,"Driver.Present.validate":0.071,"Driver.Suspend":0.051,"GpuMutex.wait.draw":50.605,"GpuMutex.wait.end":1.631,"GpuMutex.wait.fill":11.114,"GpuMutex.wait.flush":0.851,"GpuMutex.wait.label":6.778,"GpuMutex.wait.other":6.614,"GpuMutex.wait.present":216.824,"GpuMutex.wait.wait":3.440,"Graphics.Draw":9515.007,"Graphics.Draw.draw_and_resource_release":7440.622,"Graphics.Draw.index_upload":452.181,"Graphics.Draw.validate":768.863,"Graphics.Draw.vertex_upload":713.880,"Graphics.DrawWithRecipe":546.801,"Graphics.DrawWithRecipe.draw_and_resource_release":530.022,"Graphics.DrawWithRecipe.index_upload":1.249,"Graphics.DrawWithRecipe.validate":6.701,"Graphics.DrawWithRecipe.vertex_upload":4.564,"Recorder.Reap":119.972,"Recorder.Submit":439.918,"Recorder.WaitSerial":2997.707,"Resources.Complete":92.189,"Resources.Prepare":67.895,"Shader.DrawStage":3948.451,"Shader.DrawStage.capture_resources":1829.547,"Shader.DrawStage.materialize":1004.618,"Shader.DrawStage.prepared_invocation":1021.335,"Shader.ResolveAbi":156.662,"Shader.ResolveGraphicsAbi":62.781,"Shader.ResolveGraphicsStagesAbi":150.641,"VideoOut.Flip":3046.786,"VideoOut.Flip.completion_mutex_wait":0.398,"VideoOut.Flip.config_mutex_wait":0.024,"VideoOut.Flip.frame_limit":0.143,"VideoOut.Flip.notify_game":13.191,"VideoOut.Flip.present":3029.658,"VideoOut.Flip.validate":0.285,"VideoOut.Flip.vblank_wait":0.201,"VideoOut.Flip.window_prepare":0.539,"VideoOut.Flip.window_title":1.933,"VideoOut.Readiness":1.083,"VideoOut.Readiness.locks_validate":0.491,"Vulkan.Acquire":3.039,"Vulkan.Acquire.acquire_fence_wait":0.555,"Vulkan.Acquire.acquire_image":1.617,"Vulkan.Acquire.fence_reset":0.611,"Vulkan.Acquire.retired_swapchains":0.148,"Vulkan.Dispatch":169.294,"Vulkan.Dispatch.command_record":53.542,"Vulkan.Dispatch.shader_resources":114.763,"Vulkan.DispatchRecipe":1.199,"Vulkan.DispatchRecipe.command_record":1.195,"Vulkan.DrawFromRecipe":552.809,"Vulkan.Present":24.727,"Vulkan.Present.command_record_scale":8.089,"Vulkan.Present.pixel_upload":4.086,"Vulkan.Present.queue_submit":12.249,"Vulkan.QueuePresent":44.087,"Vulkan.QueuePresent.queue_present":43.708,"Vulkan.Retire":2726.125,"Vulkan.Retire.wait":2721.360},"top_phases_ms_per_frame":{"Driver.Packet":60.112,"Driver.Packet.draw":46.712,"Driver.Draw":45.728,"Graphics.Draw":39.318,"Graphics.Draw.draw_and_resource_release":30.746,"Driver.Draw.shader_compile_and_link":24.605,"Shader.DrawStage":16.316,"VideoOut.Flip":12.590},"owned_draw_counts":{"OwnedDraw.evicted_other":1622},"graphics_track":{"Graphics.Barrier.copy":968,"Graphics.Barrier.dispatch-lead":1358,"Graphics.Barrier.dispatch-trail":2662,"Graphics.Barrier.draw":39819,"Graphics.Barrier.fill-clear":2420,"Graphics.Barrier.input-mirror":61,"Graphics.Barrier.label-run":41125,"Graphics.Barrier.present-blit":484,"Graphics.Barrier.staging-in":2846,"Graphics.Barrier.staging-out":484,"Graphics.Barrier.storage-upload":27588,"Graphics.Barrier.storage-writeback":2516,"Graphics.BarrierMerged.dispatch-lead":1304,"Graphics.BarrierMerged.label-run":6,"Graphics.BarrierMerged.staging-in":542,"Graphics.BarrierMerged.staging-out":484,"Graphics.BarrierMerged.storage-writeback":388,"Graphics.Copy":2239,"Graphics.Copy.bytes":15782824,"Graphics.RenderPass":19595,"Graphics.RenderPass.Close.command":7564,"Graphics.RenderPass.Close.image":18,"Graphics.RenderPass.Close.key":1023,"Graphics.RenderPass.Close.label":6,"Graphics.RenderPass.Close.new-batch":10984,"Graphics.RenderPass.Continued":494755},"trace_dropped":true,"trace_dropped_threads":{"queue worker 0x0":{"events_full_after_s":5.774,"events_lost":410852,"totals_full":false},"draw committer":{"events_full_after_s":14.513,"events_lost":9583,"totals_full":false}},"trace":"aps5-trace-f88f3e206aa7-12336.json.gz"}
{"commit":"9e77521f28d3","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":4536,"ms":15054.222},"presents":243,"frame_ms":{"p50":61.668,"p90":65.456,"p99":68.492,"max":69.578},"gpu_busy_ms_per_present":30.555,"worker_busy_pct":{"queue worker 0x0":96.650},"phase_totals_ms":{"Driver.Completion":2.134,"Driver.Dispatch":1046.414,"Driver.Dispatch.capture_resources":18.269,"Driver.Dispatch.decode_key_device_setup":680.622,"Driver.Dispatch.lookup_cache":13.947,"Driver.Dispatch.materialize":3.079,"Driver.Dispatch.prepared_invocation":3.208,"Driver.Draw":11045.730,"Driver.Draw.device_setup":767.398,"Driver.Draw.draw_enqueued":2424.894,"Driver.Draw.post_compile_prepare":198.121,"Driver.Draw.prepare":1344.777,"Driver.Draw.shader_compile_and_link":6095.484,"Driver.EndSubmission":17.703,"Driver.Packet":14529.987,"Driver.Packet.device_lock":171.433,"Driver.Packet.dispatch":1050.322,"Driver.Packet.draw":11274.838,"Driver.Packet.execute":403.422,"Driver.Packet.flip_flush":6.566,"Driver.Packet.flush_between_packets":475.238,"Driver.Packet.memory_wait":0.002,"Driver.Packet.pipeline_drain":226.150,"Driver.Packet.pipeline_prepare":264.395,"Driver.Packet.prepare_memory":256.187,"Driver.Packet.rendering_wait":0.352,"Driver.Present":3064.099,"Driver.Present.acquire_image":3.386,"Driver.Present.device_setup":0.370,"Driver.Present.gpu_mutex_wait":203.553,"Driver.Present.inflight_wait":0.793,"Driver.Present.present_display_buffer":44.986,"Driver.Present.queue_present":47.350,"Driver.Present.release_and_callback":0.660,"Driver.Present.render_fence_wait":2762.064,"Driver.Present.resize":0.618,"Driver.Present.validate":0.130,"Driver.Suspend":0.051,"GpuMutex.wait.dispatch":0.070,"GpuMutex.wait.draw":47.519,"GpuMutex.wait.end":3.027,"GpuMutex.wait.fill":8.944,"GpuMutex.wait.flush":0.965,"GpuMutex.wait.label":6.599,"GpuMutex.wait.other":8.075,"GpuMutex.wait.present":202.641,"GpuMutex.wait.wait":2.494,"Graphics.Draw":9104.231,"Graphics.Draw.draw_and_resource_release":6989.641,"Graphics.Draw.index_upload":442.655,"Graphics.Draw.validate":779.992,"Graphics.Draw.vertex_upload":744.653,"Graphics.DrawWithRecipe":617.800,"Graphics.DrawWithRecipe.draw_and_resource_release":592.679,"Graphics.DrawWithRecipe.index_upload":3.277,"Graphics.DrawWithRecipe.validate":8.416,"Graphics.DrawWithRecipe.vertex_upload":7.630,"Recorder.Reap":128.406,"Recorder.Submit":440.037,"Recorder.WaitSerial":3020.954,"Resources.Complete":99.406,"Resources.Prepare":49.404,"Shader.DrawStage":4087.803,"Shader.DrawStage.capture_resources":1845.029,"Shader.DrawStage.materialize":1107.820,"Shader.DrawStage.prepared_invocation":1039.526,"Shader.ResolveAbi":152.629,"Shader.ResolveGraphicsAbi":58.882,"Shader.ResolveGraphicsStagesAbi":146.505,"VideoOut.Flip":3069.550,"VideoOut.Flip.completion_mutex_wait":0.404,"VideoOut.Flip.config_mutex_wait":0.023,"VideoOut.Flip.frame_limit":0.181,"VideoOut.Flip.notify_game":14.762,"VideoOut.Flip.present":3051.190,"VideoOut.Flip.validate":0.333,"VideoOut.Flip.vblank_wait":0.196,"VideoOut.Flip.window_prepare":0.405,"VideoOut.Flip.window_title":1.716,"VideoOut.Readiness":1.211,"VideoOut.Readiness.locks_validate":0.627,"Vulkan.Acquire":3.115,"Vulkan.Acquire.acquire_fence_wait":0.574,"Vulkan.Acquire.acquire_image":1.693,"Vulkan.Acquire.fence_reset":0.647,"Vulkan.Acquire.retired_swapchains":0.119,"Vulkan.Dispatch":176.092,"Vulkan.Dispatch.command_record":56.588,"Vulkan.Dispatch.shader_resources":118.436,"Vulkan.DispatchRecipe":0.617,"Vulkan.DispatchRecipe.command_record":0.614,"Vulkan.DrawFromRecipe":625.801,"Vulkan.Present":24.014,"Vulkan.Present.command_record_scale":8.125,"Vulkan.Present.pixel_upload":3.267,"Vulkan.Present.queue_submit":12.128,"Vulkan.QueuePresent":45.701,"Vulkan.QueuePresent.queue_present":45.332,"Vulkan.Retire":2761.387,"Vulkan.Retire.wait":2756.037},"top_phases_ms_per_frame":{"Driver.Packet":59.794,"Driver.Packet.draw":46.399,"Driver.Draw":45.456,"Graphics.Draw":37.466,"Graphics.Draw.draw_and_resource_release":28.764,"Driver.Draw.shader_compile_and_link":25.084,"Shader.DrawStage":16.822,"VideoOut.Flip":12.632},"owned_draw_counts":{"OwnedDraw.evicted_other":1227},"graphics_track":{"Graphics.Barrier.copy":972,"Graphics.Barrier.dispatch-lead":1480,"Graphics.Barrier.dispatch-trail":2676,"Graphics.Barrier.draw":39936,"Graphics.Barrier.fill-clear":2430,"Graphics.Barrier.label-run":41360,"Graphics.Barrier.present-blit":486,"Graphics.Barrier.shadow-publish":2,"Graphics.Barrier.staging-in":2253,"Graphics.Barrier.staging-out":486,"Graphics.Barrier.storage-upload":27712,"Graphics.Barrier.storage-writeback":2554,"Graphics.BarrierMerged.dispatch-lead":1196,"Graphics.BarrierMerged.shadow-publish":2,"Graphics.BarrierMerged.staging-in":181,"Graphics.BarrierMerged.staging-out":486,"Graphics.BarrierMerged.storage-writeback":376,"Graphics.Copy":1460,"Graphics.Copy.bytes":15583200,"Graphics.RenderPass":19658,"Graphics.RenderPass.Close.command":7591,"Graphics.RenderPass.Close.image":16,"Graphics.RenderPass.Close.key":1000,"Graphics.RenderPass.Close.new-batch":11051,"Graphics.RenderPass.Continued":492168},"trace_dropped":true,"trace_dropped_threads":{"queue worker 0x0":{"events_full_after_s":5.758,"events_lost":424353,"totals_full":false},"draw committer":{"events_full_after_s":14.609,"events_lost":7812,"totals_full":false}},"trace":"aps5-trace-9e77521f28d3-10772.json.gz"}
Digest: main, run pt1 (commit 9e77521)

seconds 200:15 from present 4904: 248 presents, frame p50 60.0 / p90 63.6 / p99 70.0 / max 75.0 ms, GPU busy 30.6 ms per present
NVIDIA GeForce RTX 2080 Ti, NVIDIA 610.88, Windows 10.0.26300, 3840x2160, commit 9e77521, dropped: yes

{"commit":"9e77521f28d3","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":4904,"ms":15009.309},"presents":248,"frame_ms":{"p50":60.022,"p90":63.602,"p99":70.01,"max":75.049},"gpu_busy_ms_per_present":30.642,"worker_busy_pct":{"queue worker 0x0":96.705},"phase_totals_ms":{"Driver.Completion":1.827,"Driver.Dispatch":1068.769,"Driver.Dispatch.capture_resources":16.869,"Driver.Dispatch.decode_key_device_setup":703.695,"Driver.Dispatch.lookup_cache":14.082,"Driver.Dispatch.materialize":3.269,"Driver.Dispatch.prepared_invocation":2.884,"Driver.Draw":10963.888,"Driver.Draw.device_setup":875.468,"Driver.Draw.draw_enqueued":2356.804,"Driver.Draw.post_compile_prepare":189.573,"Driver.Draw.prepare":1354.992,"Driver.Draw.shader_compile_and_link":5934.844,"Driver.EndSubmission":35.344,"Driver.Packet":14477.54,"Driver.Packet.device_lock":174.485,"Driver.Packet.dispatch":1072.7,"Driver.Packet.draw":11185.222,"Driver.Packet.execute":402.497,"Driver.Packet.flip_flush":6.645,"Driver.Packet.flush_between_packets":474.747,"Driver.Packet.memory_wait":0.003,"Driver.Packet.pipeline_drain":233.814,"Driver.Packet.pipeline_prepare":265.629,"Driver.Packet.prepare_memory":258.127,"Driver.Packet.rendering_wait":0.325,"Driver.Present":3244.7,"Driver.Present.acquire_image":3.59,"Driver.Present.device_setup":0.408,"Driver.Present.gpu_mutex_wait":224.345,"Driver.Present.inflight_wait":0.8,"Driver.Present.present_display_buffer":46.379,"Driver.Present.queue_present":47.812,"Driver.Present.release_and_callback":0.666,"Driver.Present.render_fence_wait":2919.87,"Driver.Present.resize":0.539,"Driver.Present.validate":0.101,"Driver.Suspend":0.077,"GpuMutex.wait.dispatch":0.084,"GpuMutex.wait.draw":60.161,"GpuMutex.wait.end":2.509,"GpuMutex.wait.fill":9.647,"GpuMutex.wait.flush":1.407,"GpuMutex.wait.label":5.777,"GpuMutex.wait.other":5.98,"GpuMutex.wait.present":223.518,"GpuMutex.wait.wait":2.357,"Graphics.Draw":9188.595,"Graphics.Draw.draw_and_resource_release":7067.406,"Graphics.Draw.index_upload":449.866,"Graphics.Draw.validate":798.456,"Graphics.Draw.vertex_upload":729.251,"Graphics.DrawWithRecipe":680.447,"Graphics.DrawWithRecipe.draw_and_resource_release":650.081,"Graphics.DrawWithRecipe.index_upload":4.004,"Graphics.DrawWithRecipe.validate":10.143,"Graphics.DrawWithRecipe.vertex_upload":9.989,"Recorder.Reap":124.765,"Recorder.Submit":446.796,"Recorder.WaitSerial":3196.69,"Resources.Complete":75.062,"Resources.Prepare":51.45,"Shader.DrawStage":3920.939,"Shader.DrawStage.capture_resources":1783.163,"Shader.DrawStage.materialize":1052.363,"Shader.DrawStage.prepared_invocation":989.495,"Shader.ResolveAbi":159.394,"Shader.ResolveGraphicsAbi":64.142,"Shader.ResolveGraphicsStagesAbi":154.865,"VideoOut.Flip":3245.741,"VideoOut.Flip.completion_mutex_wait":0.376,"VideoOut.Flip.config_mutex_wait":0.032,"VideoOut.Flip.frame_limit":0.2,"VideoOut.Flip.notify_game":8.488,"VideoOut.Flip.present":3233.412,"VideoOut.Flip.validate":0.326,"VideoOut.Flip.vblank_wait":0.176,"VideoOut.Flip.window_prepare":0.441,"VideoOut.Flip.window_title":2.006,"VideoOut.Readiness":1.653,"VideoOut.Readiness.locks_validate":0.993,"Vulkan.Acquire":3.308,"Vulkan.Acquire.acquire_fence_wait":0.55,"Vulkan.Acquire.acquire_image":1.757,"Vulkan.Acquire.fence_reset":0.664,"Vulkan.Acquire.retired_swapchains":0.16,"Vulkan.Dispatch":175.211,"Vulkan.Dispatch.command_record":55.473,"Vulkan.Dispatch.shader_resources":118.631,"Vulkan.DrawFromRecipe":689.42,"Vulkan.Present":25.284,"Vulkan.Present.command_record_scale":8.345,"Vulkan.Present.pixel_upload":4.176,"Vulkan.Present.queue_submit":12.468,"Vulkan.QueuePresent":46.205,"Vulkan.QueuePresent.queue_present":45.7,"Vulkan.Retire":2918.987,"Vulkan.Retire.wait":2913.941},"top_phases_ms_per_frame":{"Driver.Packet":58.377,"Driver.Packet.draw":45.102,"Driver.Draw":44.209,"Graphics.Draw":37.051,"Graphics.Draw.draw_and_resource_release":28.498,"Driver.Draw.shader_compile_and_link":23.931,"Shader.DrawStage":15.81,"VideoOut.Flip":13.088},"owned_draw_counts":{"OwnedDraw.evicted_other":1233},"graphics_track":{"Graphics.Barrier.copy":992,"Graphics.Barrier.dispatch-lead":1537,"Graphics.Barrier.dispatch-trail":2731,"Graphics.Barrier.draw":40683,"Graphics.Barrier.fill-clear":2480,"Graphics.Barrier.input-mirror":62,"Graphics.Barrier.label-run":42179,"Graphics.Barrier.present-blit":496,"Graphics.Barrier.shadow-publish":2,"Graphics.Barrier.staging-in":2300,"Graphics.Barrier.staging-out":496,"Graphics.Barrier.storage-upload":28282,"Graphics.Barrier.storage-writeback":2571,"Graphics.BarrierMerged.dispatch-lead":1194,"Graphics.BarrierMerged.label-run":8,"Graphics.BarrierMerged.shadow-publish":2,"Graphics.BarrierMerged.staging-in":184,"Graphics.BarrierMerged.staging-out":496,"Graphics.BarrierMerged.storage-writeback":419,"Graphics.Copy":1552,"Graphics.Copy.bytes":17294128,"Graphics.RenderPass":20063,"Graphics.RenderPass.Close.command":7673,"Graphics.RenderPass.Close.image":19,"Graphics.RenderPass.Close.key":1072,"Graphics.RenderPass.Close.label":8,"Graphics.RenderPass.Close.new-batch":11291,"Graphics.RenderPass.Continued":503387},"trace_dropped":true,"trace_dropped_threads":{"queue worker 0x0":{"events_full_after_s":5.846,"events_lost":405708,"totals_full":false},"draw committer":{"events_full_after_s":14.221,"events_lost":14715,"totals_full":false}},"trace":"aps5-trace-9e77521f28d3-4304.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: 405708 events lost; buffer full at 5845.7 ms; over the 95 of 248 frames that ended before it: busy 32.0 ms per frame (52 %), wait 0.0, largest Driver.Packet 31.8, Driver.EndSubmission 0.2 (the thread table divides the retained slices by every frame)
  • draw committer: 14715 events lost; buffer full at 14221.0 ms; over the 234 of 248 frames that ended before it: busy 25.1 ms per frame (41 %), wait 0.3, largest Graphics.Draw 21.0, Vulkan.DrawFromRecipe 2.6 (the thread table divides the retained slices by every frame)

Slowest frames (largest slices inside each, inclusive)

  • present 5119: 75.0 ms at 13033 ms: batch (gpu) 30.6, Graphics.Draw (draw committer) 24.4, VideoOut.Flip (presenter) 13.3, VideoOut.Flip.present (presenter) 13.2
  • present 4967: 71.7 ms at 3827 ms: Driver.Packet (queue worker 0x0) 52.1, Driver.Packet.draw (queue worker 0x0) 44.9, Driver.Draw (queue worker 0x0) 43.4, batch (gpu) 31.1
  • present 5085: 70.0 ms at 10947 ms: batch (gpu) 31.1, Graphics.Draw (draw committer) 20.8, VideoOut.Flip (presenter) 13.3, VideoOut.Flip.present (presenter) 13.2
  • present 4986: 68.8 ms at 5014 ms: Driver.Packet (queue worker 0x0) 40.7, Driver.Packet.draw (queue worker 0x0) 34.0, Driver.Draw (queue worker 0x0) 32.9, batch (gpu) 29.7
  • present 4954: 68.2 ms at 3027 ms: Driver.Packet (queue worker 0x0) 42.3, Driver.Packet.draw (queue worker 0x0) 35.5, Driver.Draw (queue worker 0x0) 34.1, batch (gpu) 28.8

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

  • present 5119: 75.0 ms at 13033 ms, persistence 18.9 ms
  • present 4967: 71.7 ms at 3827 ms, persistence 15.6 ms
  • present 5085: 70.0 ms at 10947 ms, persistence 12.4 ms
  • present 4937: 68.2 ms at 1995 ms, persistence 11.4 ms
  • present 5019: 67.3 ms at 6994 ms, persistence 10.8 ms
  • present 4986: 68.8 ms at 5014 ms, persistence 10.0 ms
  • present 5003: 66.7 ms at 6046 ms, persistence 9.9 ms
  • present 4954: 68.2 ms at 3027 ms, persistence 9.5 ms
  • present 5135: 66.0 ms at 13994 ms, persistence 9.3 ms
  • present 4993: 65.9 ms at 5446 ms, persistence 9.2 ms

Threads (ms per frame)

thread busy wait untraced in slices < 20 us largest
title 0.0 (0 %) 12.9 (21 %) 47.6 0.4 Shader.ResolveGraphicsStagesAbi 0.0, Shader.ResolveAbi 0.0
queue worker 0x0 12.3 (20 %) 0.0 (0 %) 48.2 52.5 Driver.Packet 12.3, Driver.EndSubmission 0.1
draw committer 23.7 (39 %) 0.3 (1 %) 36.5 40.7 Graphics.Draw 19.9, Vulkan.DrawFromRecipe 2.4
title 0.0 (0 %) 0.0 (0 %) 60.5 0.1 Shader.ResolveAbi 0.0, Shader.ResolveGraphicsStagesAbi 0.0
title 0.0 (0 %) 0.0 (0 %) 60.5 0.1 Shader.ResolveAbi 0.0, Shader.ResolveGraphicsStagesAbi 0.0
title 0.0 (0 %) 0.0 (0 %) 60.5 0.1 Shader.ResolveAbi 0.0, Shader.ResolveGraphicsStagesAbi 0.0
title 0.0 (0 %) 0.0 (0 %) 60.5 0.1 Shader.ResolveAbi 0.0, Shader.ResolveGraphicsStagesAbi 0.0
title 0.0 (0 %) 0.0 (0 %) 60.5 0.1 Shader.ResolveAbi 0.0, Shader.ResolveGraphicsStagesAbi 0.0
title 0.0 (0 %) 0.0 (0 %) 60.5 0.1 Shader.ResolveAbi 0.0, Shader.ResolveGraphicsAbi 0.0
presenter 0.5 (1 %) 12.7 (21 %) 47.4 0.1 VideoOut.Flip 13.1, Driver.Present 0.0
title 0.0 (0 %) 0.0 (0 %) 60.5 0.1 Shader.ResolveAbi 0.0, Shader.ResolveGraphicsStagesAbi 0.0
title 0.0 (0 %) 0.0 (0 %) 60.5 0.1 Shader.ResolveAbi 0.0, Shader.ResolveGraphicsStagesAbi 0.0
title 0.0 (0 %) 0.0 (0 %) 60.5 0.1 Shader.ResolveAbi 0.0, Shader.ResolveGraphicsAbi 0.0
title 0.0 (0 %) 0.0 (0 %) 60.5 0.1 Shader.ResolveAbi 0.0, Shader.ResolveGraphicsStagesAbi 0.0
title 0.0 (0 %) 0.0 (0 %) 60.5 0.1 Shader.ResolveAbi 0.0, Shader.ResolveGraphicsAbi 0.0
title 0.0 (0 %) 0.0 (0 %) 60.5 0.1 Shader.ResolveAbi 0.0, Shader.ResolveGraphicsAbi 0.0
gpu 30.6 (51 %) 0.0 (0 %) 29.9 0.0 batch 30.6

Largest slices (ms per frame, inclusive, all threads): batch 30.6, Graphics.Draw 19.9, VideoOut.Flip 13.1, Driver.Present 13.1, VideoOut.Flip.present 13.0, Recorder.WaitSerial 12.9, Driver.Packet 12.3, Driver.Present.render_fence_wait 11.8, Vulkan.Retire 11.8, Vulkan.Retire.wait 11.7

Longest waits

  • Recorder.WaitSerial (title) 14.7 ms at 14235 ms, present 5138
  • Recorder.WaitSerial (title) 14.7 ms at 2243 ms, present 4940
  • Recorder.WaitSerial (title) 14.6 ms at 13287 ms, present 5122
  • Recorder.WaitSerial (title) 14.5 ms at 10110 ms, present 5070
  • Recorder.WaitSerial (title) 14.5 ms at 7593 ms, present 5028
  • Recorder.WaitSerial (title) 14.5 ms at 10824 ms, present 5082
  • Recorder.WaitSerial (title) 14.5 ms at 13994 ms, present 5134
  • Recorder.WaitSerial (title) 14.4 ms at 189 ms, present 4906
  • Recorder.WaitSerial (title) 14.3 ms at 11205 ms, present 5088
  • Recorder.WaitSerial (title) 14.3 ms at 1155 ms, present 4922

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

  • batch 831: 5.7 ms at 785 ms, present 4916: 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 6746: 5.6 ms at 6226 ms, present 5005: GPU no ranges; recorded by no CPU slices
  • batch 1492: 5.5 ms at 1394 ms, present 4926: 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 11951: 5.4 ms at 10944 ms, present 5084: 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 11296: 5.4 ms at 10344 ms, present 5074: 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
Digest: this PR, run pt1 (commit f88f3e2)

seconds 200:15 from present 4708: 237 presents, frame p50 62.6 / p90 68.0 / p99 74.8 / max 78.4 ms, GPU busy 30.5 ms per present
NVIDIA GeForce RTX 2080 Ti, NVIDIA 610.88, Windows 10.0.26300, 3840x2160, commit f88f3e2, dropped: yes

{"commit":"f88f3e206aa7","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":4708,"ms":15012.592},"presents":237,"frame_ms":{"p50":62.587,"p90":67.996,"p99":74.796,"max":78.404},"gpu_busy_ms_per_present":30.479,"worker_busy_pct":{"queue worker 0x0":96.716},"phase_totals_ms":{"Driver.Completion":2.895,"Driver.Dispatch":1066.63,"Driver.Dispatch.capture_resources":16.641,"Driver.Dispatch.decode_key_device_setup":705.596,"Driver.Dispatch.lookup_cache":13.918,"Driver.Dispatch.materialize":3.099,"Driver.Dispatch.prepared_invocation":3.01,"Driver.Draw":10955.772,"Driver.Draw.device_setup":873.792,"Driver.Draw.draw_enqueued":2329.246,"Driver.Draw.post_compile_prepare":186.54,"Driver.Draw.prepare":1343.16,"Driver.Draw.shader_compile_and_link":5973.967,"Driver.EndSubmission":17.725,"Driver.Packet":14498.9,"Driver.Packet.device_lock":169.357,"Driver.Packet.dispatch":1070.505,"Driver.Packet.draw":11188.65,"Driver.Packet.execute":426.018,"Driver.Packet.flip_flush":8.277,"Driver.Packet.flush_between_packets":460.516,"Driver.Packet.memory_wait":0.018,"Driver.Packet.pipeline_drain":233.757,"Driver.Packet.pipeline_prepare":264.475,"Driver.Packet.prepare_memory":242.283,"Driver.Packet.rendering_wait":0.44,"Driver.Present":2863.541,"Driver.Present.acquire_image":3.397,"Driver.Present.device_setup":0.409,"Driver.Present.gpu_mutex_wait":139.248,"Driver.Present.inflight_wait":0.826,"Driver.Present.present_display_buffer":48.008,"Driver.Present.queue_present":46.852,"Driver.Present.release_and_callback":0.656,"Driver.Present.render_fence_wait":2623.051,"Driver.Present.resize":0.821,"Driver.Present.validate":0.065,"Driver.Suspend":0.064,"GpuMutex.wait.dispatch":0.034,"GpuMutex.wait.draw":47.225,"GpuMutex.wait.end":7.994,"GpuMutex.wait.fill":6.35,"GpuMutex.wait.flush":1.25,"GpuMutex.wait.label":7.379,"GpuMutex.wait.other":7.074,"GpuMutex.wait.present":138.285,"GpuMutex.wait.wait":5.842,"Graphics.Draw":9016.462,"Graphics.Draw.draw_and_resource_release":6967.492,"Graphics.Draw.index_upload":442.875,"Graphics.Draw.validate":777.014,"Graphics.Draw.vertex_upload":690.837,"Graphics.DrawWithRecipe":656.057,"Graphics.DrawWithRecipe.draw_and_resource_release":625.049,"Graphics.DrawWithRecipe.index_upload":4.608,"Graphics.DrawWithRecipe.validate":10.585,"Graphics.DrawWithRecipe.vertex_upload":10.168,"Recorder.Reap":121.996,"Recorder.Submit":523.685,"Recorder.WaitSerial":2824.76,"Resources.Complete":72.186,"Resources.Prepare":51.323,"Shader.DrawStage":3938.445,"Shader.DrawStage.capture_resources":1796.713,"Shader.DrawStage.materialize":1056.586,"Shader.DrawStage.prepared_invocation":993.48,"Shader.ResolveAbi":149.559,"Shader.ResolveGraphicsAbi":58.714,"Shader.ResolveGraphicsStagesAbi":144.016,"VideoOut.Flip":2867.934,"VideoOut.Flip.completion_mutex_wait":0.315,"VideoOut.Flip.config_mutex_wait":0.025,"VideoOut.Flip.frame_limit":0.237,"VideoOut.Flip.notify_game":10.723,"VideoOut.Flip.present":2853.448,"VideoOut.Flip.validate":0.335,"VideoOut.Flip.vblank_wait":0.216,"VideoOut.Flip.window_prepare":0.545,"VideoOut.Flip.window_title":1.791,"VideoOut.Readiness":1.313,"VideoOut.Readiness.locks_validate":0.511,"Vulkan.Acquire":3.095,"Vulkan.Acquire.acquire_fence_wait":0.542,"Vulkan.Acquire.acquire_image":1.701,"Vulkan.Acquire.fence_reset":0.65,"Vulkan.Acquire.retired_swapchains":0.126,"Vulkan.Dispatch":172.079,"Vulkan.Dispatch.command_record":55.592,"Vulkan.Dispatch.shader_resources":115.424,"Vulkan.DispatchRecipe":0.695,"Vulkan.DispatchRecipe.command_record":0.694,"Vulkan.DrawFromRecipe":664.892,"Vulkan.Present":25.005,"Vulkan.Present.command_record_scale":9.036,"Vulkan.Present.pixel_upload":3.662,"Vulkan.Present.queue_submit":11.91,"Vulkan.QueuePresent":45.434,"Vulkan.QueuePresent.queue_present":44.936,"Vulkan.Retire":2622.309,"Vulkan.Retire.wait":2616.981},"top_phases_ms_per_frame":{"Driver.Packet":61.177,"Driver.Packet.draw":47.209,"Driver.Draw":46.227,"Graphics.Draw":38.044,"Graphics.Draw.draw_and_resource_release":29.399,"Driver.Draw.shader_compile_and_link":25.207,"Shader.DrawStage":16.618,"VideoOut.Flip":12.101},"owned_draw_counts":{"OwnedDraw.evicted_other":1299},"graphics_track":{"Graphics.Barrier.copy":948,"Graphics.Barrier.dispatch-lead":1460,"Graphics.Barrier.dispatch-trail":2610,"Graphics.Barrier.draw":38974,"Graphics.Barrier.fill-clear":2370,"Graphics.Barrier.label-run":40634,"Graphics.Barrier.present-blit":474,"Graphics.Barrier.shadow-publish":2,"Graphics.Barrier.staging-in":2199,"Graphics.Barrier.staging-out":474,"Graphics.Barrier.storage-upload":27028,"Graphics.Barrier.storage-writeback":2560,"Graphics.BarrierMerged.dispatch-lead":1150,"Graphics.BarrierMerged.label-run":3,"Graphics.BarrierMerged.shadow-publish":2,"Graphics.BarrierMerged.staging-in":175,"Graphics.BarrierMerged.staging-out":474,"Graphics.BarrierMerged.storage-writeback":298,"Graphics.Copy":1424,"Graphics.Copy.bytes":15198432,"Graphics.RenderPass":19136,"Graphics.RenderPass.Close.command":7199,"Graphics.RenderPass.Close.image":13,"Graphics.RenderPass.Close.key":927,"Graphics.RenderPass.Close.label":3,"Graphics.RenderPass.Close.new-batch":10994,"Graphics.RenderPass.Continued":480708},"trace_dropped":true,"trace_dropped_threads":{"queue worker 0x0":{"events_full_after_s":5.779,"events_lost":422998,"totals_full":false},"draw committer":{"events_full_after_s":14.21,"events_lost":15224,"totals_full":false}},"trace":"aps5-trace-f88f3e206aa7-14352.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: 422998 events lost; buffer full at 5778.8 ms; over the 92 of 237 frames that ended before it: busy 33.1 ms per frame (53 %), wait 0.0, largest Driver.Packet 33.1, Driver.EndSubmission 0.0 (the thread table divides the retained slices by every frame)
  • draw committer: 15224 events lost; buffer full at 14209.7 ms; over the 224 of 237 frames that ended before it: busy 26.7 ms per frame (42 %), wait 0.3, largest Graphics.Draw 21.9, Vulkan.DrawFromRecipe 2.6 (the thread table divides the retained slices by every frame)

Slowest frames (largest slices inside each, inclusive)

  • present 4892: 78.4 ms at 11582 ms: batch (gpu) 33.7, Graphics.Draw (draw committer) 33.0, Graphics.Draw.draw_and_resource_release (draw committer) 21.2, VideoOut.Flip (presenter) 12.7
  • present 4771: 75.0 ms at 3889 ms: Driver.Packet (queue worker 0x0) 45.5, batch (gpu) 39.4, Graphics.Draw (draw committer) 34.9, Driver.Packet.draw (queue worker 0x0) 27.6
  • present 4868: 74.8 ms at 10036 ms: batch (gpu) 31.0, Graphics.Draw (draw committer) 22.6, VideoOut.Flip (presenter) 12.9, VideoOut.Flip.present (presenter) 12.9
  • present 4934: 74.7 ms at 14297 ms: batch (gpu) 29.6, VideoOut.Flip (presenter) 12.0, VideoOut.Flip.present (presenter) 12.0, Driver.Present (presenter) 12.0
  • present 4943: 73.9 ms at 14876 ms: batch (gpu) 28.1, VideoOut.Flip (presenter) 9.9, VideoOut.Flip.present (presenter) 9.9, Driver.Present (presenter) 9.9

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

  • present 4892: 78.4 ms at 11582 ms, persistence 21.2 ms
  • present 4771: 75.0 ms at 3889 ms, persistence 15.7 ms
  • present 4934: 74.7 ms at 14297 ms, persistence 15.0 ms
  • present 4868: 74.8 ms at 10036 ms, persistence 14.8 ms
  • present 4720: 70.6 ms at 728 ms, persistence 13.4 ms
  • present 4943: 73.9 ms at 14876 ms, persistence 13.4 ms
  • present 4925: 73.5 ms at 13709 ms, persistence 11.8 ms
  • present 4901: 72.7 ms at 12163 ms, persistence 11.7 ms
  • present 4754: 70.8 ms at 2821 ms, persistence 11.3 ms
  • present 4819: 70.8 ms at 6922 ms, persistence 10.8 ms

Threads (ms per frame)

thread busy wait untraced in slices < 20 us largest
title 0.0 (0 %) 11.9 (19 %) 51.4 0.4 Shader.ResolveGraphicsStagesAbi 0.0, Shader.ResolveAbi 0.0
queue worker 0x0 13.0 (21 %) 0.0 (0 %) 50.3 53.1 Driver.Packet 13.0, Driver.EndSubmission 0.0
draw committer 25.3 (40 %) 0.3 (0 %) 37.8 40.2 Graphics.Draw 20.8, Vulkan.DrawFromRecipe 2.4
title 0.0 (0 %) 0.0 (0 %) 63.3 0.1 Shader.ResolveAbi 0.0, Shader.ResolveGraphicsStagesAbi 0.0
title 0.0 (0 %) 0.0 (0 %) 63.3 0.1 Shader.ResolveAbi 0.0, Shader.ResolveGraphicsStagesAbi 0.0
title 0.0 (0 %) 0.0 (0 %) 63.3 0.1 Shader.ResolveAbi 0.0, Shader.ResolveGraphicsStagesAbi 0.0
title 0.0 (0 %) 0.0 (0 %) 63.3 0.1 Shader.ResolveAbi 0.0, Shader.ResolveGraphicsStagesAbi 0.0
title 0.0 (0 %) 0.0 (0 %) 63.3 0.1 Shader.ResolveAbi 0.0, Shader.ResolveGraphicsStagesAbi 0.0
presenter 0.5 (1 %) 11.7 (18 %) 51.2 0.1 VideoOut.Flip 12.1, Driver.Present 0.0
title 0.0 (0 %) 0.0 (0 %) 63.3 0.1 Shader.ResolveAbi 0.0, Shader.ResolveGraphicsStagesAbi 0.0
title 0.0 (0 %) 0.0 (0 %) 63.3 0.1 Shader.ResolveAbi 0.0, Shader.ResolveGraphicsStagesAbi 0.0
title 0.0 (0 %) 0.0 (0 %) 63.3 0.1 Shader.ResolveAbi 0.0, Shader.ResolveGraphicsAbi 0.0
title 0.0 (0 %) 0.0 (0 %) 63.3 0.1 Shader.ResolveAbi 0.0, Shader.ResolveGraphicsAbi 0.0
title 0.0 (0 %) 0.0 (0 %) 63.3 0.1 Shader.ResolveGraphicsStagesAbi 0.0, Shader.ResolveAbi 0.0
title 0.0 (0 %) 0.0 (0 %) 63.3 0.1 Shader.ResolveAbi 0.0, Shader.ResolveGraphicsAbi 0.0
title 0.0 (0 %) 0.0 (0 %) 63.3 0.1 Shader.ResolveGraphicsStagesAbi 0.0, Shader.ResolveAbi 0.0
gpu 30.5 (48 %) 0.0 (0 %) 32.9 0.0 batch 30.5

Largest slices (ms per frame, inclusive, all threads): batch 30.5, Graphics.Draw 20.8, Driver.Packet 13.0, VideoOut.Flip 12.1, Driver.Present 12.1, VideoOut.Flip.present 12.0, Recorder.WaitSerial 11.9, Driver.Present.render_fence_wait 11.1, Vulkan.Retire 11.1, Vulkan.Retire.wait 11.0

Longest waits

  • Recorder.WaitSerial (title) 13.6 ms at 3316 ms, present 4762
  • Recorder.WaitSerial (title) 13.5 ms at 5470 ms, present 4795
  • Recorder.WaitSerial (title) 13.5 ms at 11789 ms, present 4894
  • Recorder.WaitSerial (title) 13.4 ms at 8139 ms, present 4837
  • Recorder.WaitSerial (title) 13.4 ms at 7621 ms, present 4829
  • Recorder.WaitSerial (title) 13.3 ms at 367 ms, present 4713
  • Recorder.WaitSerial (title) 13.3 ms at 4463 ms, present 4779
  • Recorder.WaitSerial (title) 13.3 ms at 10110 ms, present 4868
  • Recorder.WaitSerial (title) 13.2 ms at 7561 ms, present 4828
  • Recorder.WaitSerial (title) 13.2 ms at 1108 ms, present 4725

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

  • batch 10842: 5.8 ms at 10106 ms, present 4868: GPU no ranges; recorded by no CPU slices
  • batch 11494: 5.6 ms at 10729 ms, present 4878: GPU no ranges; recorded by Graphics.Draw (draw committer) 0.3, Graphics.Draw.draw_and_resource_release (draw committer) 0.3, Graphics.Draw.vertex_upload (draw committer) 0.0, Recorder.Submit (draw committer) 0.0
  • batch 1428: 5.6 ms at 1328 ms, present 4729: GPU no ranges; recorded by Graphics.Draw (draw committer) 0.7, Graphics.Draw.draw_and_resource_release (draw committer) 0.5, Recorder.Submit (draw committer) 0.0
  • batch 1562: 5.5 ms at 1449 ms, present 4731: GPU no ranges; recorded by Graphics.Draw (draw committer) 0.7, Graphics.Draw.draw_and_resource_release (draw committer) 0.5, Recorder.Submit (draw committer) 0.0
  • batch 3922: 5.5 ms at 3607 ms, present 4766: GPU no ranges; recorded by Graphics.Draw (draw committer) 0.8, Graphics.Draw.draw_and_resource_release (draw committer) 0.6, Recorder.Submit (draw committer) 0.0

Checklist

  • Based on current main; no other open PR implements the same functions
  • One topic per PR; follow-ups go in a new PR
  • No comments in code except technical debt and the licence notice of code adapted from upstream (see AGENTS.md)
  • Unimplemented paths throw (NotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file
  • No notes, investigation .md files or images added to the repository (attach them to this PR)
  • New third-party code is a submodule built from source
  • Generic behaviour, not specific to one title
  • Depends on: none
  • Fixes: none
  • Unblocks: none
  • GPUs tested: NVIDIA GeForce RTX 2080 Ti, driver 610.88, Windows 11 10.0.26300
  • AI-assisted: yes

@MarcZX10 MarcZX10 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed — looks good

Nothing blocks this change; the points below are optional.

What I ran

Reviewed head f88f3e206aa7655b5661b21d526bff9d34f0ed0f and inspected the changed implementation and test registration. I ran no commands or tests.

Results

Check Result Note
Changed code review passed All three changed files read
Tests not run No local test execution
Build not run No local build

Findings

Blocking

None.

Non-blocking

None.

Not verified

The author reports Windows test and performance runs, but I did not run or independently verify them. Linux and macOS behavior, other GPUs, and the full test suite were not verified. Read: GuestMemory.cpp, CompareHook.cpp, agc_compare_hook_tests.cmake, description.md, commits.md, manifest.json, and diff.patch. files.json was not present in the prepared review folder; the listing showed all three changed files as included, and no excluded changed files.

To get this to a good state

Nothing is required.

@Helldiverr

Copy link
Copy Markdown
Contributor

Head f88f3e206a merged onto main 7482424113: no defect found. The focused tests pass 3/3 with the Khronos validation layer loaded and no VUID-. The AGENTS.md speed evidence is present, and the PR claims no frame-rate gain.

Code.

  • GuestMemory.cpp:3973 (merge 6ef2729e31) adds a process-wide std::atomic<bool> compareMappedHookInstalled. compareMappedHookArmed() (:3975) reads it before the thread-local hook pointer.
  • SetCompareMappedHook (:3981) sets the flag before it stores a non-null hook. Both readers check compareMappedHookArmed(): compareWithoutQuery at :3989 and the per-run call in CompareMapped at :4021.
  • Relaxed ordering is enough here:
    • The hook is thread_local, so the thread that installs it always sees its own store to the flag.
    • Other threads read their own null pointer, whatever flag value they see.
    • Once set, the flag stays set, so a cleared hook falls back to the old pointer check. That matches main.
  • Only tests install the hook (LinkedCodeDependencies.cpp), so in a title the flag is always false.
  • No code comments, no debt change, no title-specific path. check_conventions.py --base 7482424113 and debt_fold.py --check pass on the merge.

Speed evidence. Present, as AGENTS.md requires.

  • The PR has tools/trace_digest.py summaries of main 9e77521f28 and of f88f3e206a, from the same machine (RTX 2080 Ti, i9-9900K) and the same scene (Sonic Origins, S3K menu), with the traces attached.
  • The author claims no frame-rate change: FPS is flat within noise.
  • The claimed effect is the hook read leaving the sampler profile: 37 samples (0.48 % of the worker) on main, 0 with the change.

Existing runs.

  • MarcZX10 approved f88f3e2 with no findings. He did not post a run.
  • No other review or comment reports a run. This run adds the first GPU run on AMD and a direct per-call measurement on a second machine.

Probe.

  • I made a local, uncommitted change that adds a bench mode to tests/CompareHook.cpp. With no hook installed it calls CompareMapped 5,000,000 times on a single 256-byte run and prints the time per call.
  • I built it once on main with GuestMemory.cpp from 7482424113, and once on the merge. I ran the two binaries alternately, 5 times each.
round main ns per call head ns per call
1 20.16 11.01
2 21.10 10.78
3 20.85 10.83
4 20.88 12.91
5 20.53 11.43
  • Mean: 20.70 ns on main, 11.39 ns on head, so about 9.3 ns saved per call. On this MinGW build thread_local goes through emutls, so the old pointer read is a function call.
  • This is a standalone microbenchmark. It is not a frame measurement and does not replace the author's trace digests.

Negative control.

  • I applied the new test files alone onto main. All 5 agc_compare_hook_* tests pass there (CPU).
  • So the tests do not detect the change. They pin the hook behaviour it must keep, which is what the description says.

GPU.

ANYPS5_REQUIRE_VULKAN=1 ANYPS5_NO_SHADER_CACHE=1 VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation VK_LOADER_DEBUG=layer ctest --test-dir build -R "^(agc_driver_draw_cache_relocation|agc_driver_guest_memory_lifetime|agc_driver_pipelined_dispatch|agc_mapped_copy_hooks|agc_compare_hook_.*)$" -V
run draw_cache_relocation guest_memory_lifetime pipelined_dispatch mapped_copy_hooks (CPU) compare_hook ×5 (CPU)
main Passed 1.29 s Passed 0.94 s Passed 1.71 s Passed 0.01 s not on main
head 1 Passed 0.52 s Passed 0.22 s Passed 1.09 s Passed 0.01 s 5 Passed, 0.01 s each
head 2 Passed 0.46 s Passed 0.21 s Passed 1.02 s Passed 0.01 s 5 Passed, 0.01 s each
head 3 Passed 0.46 s Passed 0.20 s Passed 0.91 s Passed 0.01 s 5 Passed, 0.01 s each
  • (CPU) marks tests that create no Vulkan device. They show the change keeps hook behaviour, not GPU behaviour.
  • No test skipped. The main run was the first after a rebuild, so its times are not comparable with the head times.

Validation.

  • Each log has 6 Insert instance layer "VK_LAYER_KHRONOS_validation" lines.
  • was not found but was requested by env var VK_INSTANCE_LAYERS appears in none of them.
  • VUID- lines: 0 in every log, on main and head.

Host:

  • GPU: AMD Radeon AI PRO R9700 (gfx1201, 1002:7551), driver 32.0.31044.16, Vulkan 1.4.349
  • Validation layer: Khronos 1.4.363 (LunarG SDK)
  • CPU: Ryzen 9 9950X3D
  • OS: Windows 11 Pro 26300
  • Toolchain: WinLibs GCC 15.2, Release
  • Commits measured: main 7482424113; head 6ef2729e31 (f88f3e206a merged onto 7482424113)

AI-assisted: yes

@github-actions

github-actions Bot commented Nov 23, 2026 •

Copy link
Copy Markdown

Other open pull requests touch the same code. Merging one will break the other, or both implement the same thing. If this one builds on them, list them in Depends on.

Pull request Conflicting files (lines on main) Same exports Same new files
PR 22156 core/libs/prx/libSceAgcDriver/Execution/src/GuestMemory.cpp L4014-4015
PR 24031 core/libs/prx/libSceAgcDriver/Execution/src/GuestMemory.cpp L3979-4002

Some comparisons could not be completed because a pull request conflicts with the base branch. Review these shared files manually before concluding that there is no overlap.

Pull request Shared files not compared
PR 4448 core/libs/prx/libSceAgcDriver/Execution/src/GuestMemory.cpp
PR 6186 core/libs/prx/libSceAgcDriver/Execution/src/GuestMemory.cpp
PR 6188 core/libs/prx/libSceAgcDriver/Execution/src/GuestMemory.cpp
PR 6192 core/libs/prx/libSceAgcDriver/Execution/src/GuestMemory.cpp
PR 6209 core/libs/prx/libSceAgcDriver/Execution/src/GuestMemory.cpp
PR 7642 core/libs/prx/libSceAgcDriver/Execution/src/GuestMemory.cpp
PR 9508 core/libs/prx/libSceAgcDriver/Execution/src/GuestMemory.cpp
PR 10193 core/libs/prx/libSceAgcDriver/Execution/src/GuestMemory.cpp
PR 12792 core/libs/prx/libSceAgcDriver/Execution/src/GuestMemory.cpp
PR 12840 core/libs/prx/libSceAgcDriver/Execution/src/GuestMemory.cpp
PR 13928 core/libs/prx/libSceAgcDriver/Execution/src/GuestMemory.cpp
PR 13929 core/libs/prx/libSceAgcDriver/Execution/src/GuestMemory.cpp
PR 14473 core/libs/prx/libSceAgcDriver/Execution/src/GuestMemory.cpp
PR 15136 core/libs/prx/libSceAgcDriver/Execution/src/GuestMemory.cpp
PR 20041 core/libs/prx/libSceAgcDriver/Execution/src/GuestMemory.cpp
PR 20084 core/libs/prx/libSceAgcDriver/Execution/src/GuestMemory.cpp
PR 20315 core/libs/prx/libSceAgcDriver/Execution/src/GuestMemory.cpp
PR 21155 core/libs/prx/libSceAgcDriver/Execution/src/GuestMemory.cpp
PR 22062 core/libs/prx/libSceAgcDriver/Execution/src/GuestMemory.cpp
PR 22306 core/libs/prx/libSceAgcDriver/Execution/src/GuestMemory.cpp
PR 22434 core/libs/prx/libSceAgcDriver/Execution/src/GuestMemory.cpp
PR 22647 core/libs/prx/libSceAgcDriver/Execution/src/GuestMemory.cpp

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

Labels

agc libSceAgc* build perf Performance change

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants