Repository navigation
perf(agc): read-trap drawn linear targets at a label on macOS instead of storing them - #21972
Conversation
|
Traces: aps5-trace-0c782f74d2d0-92661.json.gz |
|
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.
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.
|
kurexw
left a comment
There was a problem hiding this comment.
Tested on an Apple M4 (MacBook Air, macOS 27.2, MoltenVK 1.4.2 and the validation layer from the LunarG SDK 1.4.363.1, x86-64 build under Rosetta).
Base: main at a72186d plus #22056 and #22074, two build fixes that main currently needs on macOS.
This is a regression check only. I didn't reproduce the SuperTuxKart timings, because I don't run titles on this machine.
I ran ctest -R 'present_upscale|linear_target|frame_(replay|capture)|label' (65 tests, including all 15 linear_target/linear_readback tests) 3 times on each side with ANYPS5_REQUIRE_VULKAN=1 ANYPS5_NO_SHADER_CACHE=1 VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation VK_LOADER_DEBUG=layer:
- Every
linear_targettest passes 3/3 with this PR, includingagc_driver_linear_target_completion_stores. The loader inserts the layer, there are 0VUID-lines and nowas not found but was requested. - Every other test has the same result on both sides, except
agc_driver_label_after_import_copy, a known timing flake on this machine. It failed 2 of 3 runs on the base and 3 of 3 with this PR. My earlier interleaved runs of that test onmainfailed between 1 and 5 times in 20, so 3 runs can't show a difference. VUID totals are identical (18 on each side, none in tests this PR touches).
So I see no regression on the M4.
MarcZX10
left a comment
There was a problem hiding this comment.
Reviewed — looks good
The change is scoped to macOS label and interrupt stores, and the inspected implementation and test changes support merging.
What I ran
Reviewed head 4936d27e31b729da7e6a7553377fd5342918271b. No commands or tests were run in this review environment. The author reports macOS test and performance runs in the PR description; those results were not independently verified.
Results
| Check | Result | Note |
|---|---|---|
| Source review | passed | Changed lines and relevant trap resolution inspected |
| Automated tests | not run | Author-reported results only |
| Negative control | not run | Not run in this environment |
Negative control
Not run. No assertion or test change was made during this review.
Findings
Blocking
None.
Non-blocking
None.
Sources
Not verified
The PR description's macOS runtime, validation-layer, suite, and performance results were not rerun. Linux and Windows behavior was not tested. Read the description, commits, manifest, diff, README, the changed lines in Texture.hpp, Texture.cpp, LinearTargetCompletionStores.cpp, and the debt fragment. Texture.cpp was not included in the review folder; its changed lines were read through the repository reader. No changed files were excluded from inspection.
To get this to a good state
Nothing is required.
|
Regression check of head Setup: Apple M5 Max (40-core GPU), macOS 27.0.1 (26A434), Apple clang 21.0.0, x86-64 Release under Rosetta 2. I used two ICDs: the LunarG Vulkan SDK 1.4.363.0 MoltenVK 1.4.2 ICD, and a local MoltenVK build (upstream
Broad set, No regressions on this GPU. AI-assisted: yes (Claude Code) |
|
Windows runs on AMD and on NVIDIA (second section); I found neither in the description or in the comments. Head Setup: Windows 11 25H2 (build 26200), AMD Radeon 760M integrated graphics (
NVIDIA run, same machine. Head Setup: Windows 11 25H2 (build 26200), NVIDIA GeForce RTX 3050 6 GB (
AI-assisted: yes (build and runs scripted with an AI assistant, on the hardware above). |
What
On macOS,
StoreReadbackBeforeLabelalready read-traps a pending linear or small storage image at a label instead of storing it (#13499). Drawn resident linear color targets (#9685) skip that path:StoreDrawnLinearstores every dirty one at each label and end-of-pipe interrupt, whether the CPU reads it or not.SuperTuxKart (PPSA69421) hits this in a race. Its GL library waits on labels many times per frame, and each label stores the drawn linear targets. A
[storage]profile showed about 3.4 GB of label write-backs per 10 s, and in the trace the GPU was busy 64 to 69 ms per frame.At a label or an interrupt-only
RELEASE_MEMof the graphics queue,StoreDrawnLinearnow read-traps a dirty linear target instead, under the conditions the readback path uses:HostImportCovers)Otherwise it is stored as before. The first CPU access to its pages stores it through the existing
ResolveLabelTrappath.The host-import condition follows #20183: there, a trapped image without a host import let the faulting read through before the image's bytes reached guest memory. In a SuperTuxKart race, every target this change trapped (68026) had a host import.
The shared-page, direct-memory and trap checks move into
StorageTexture::trapReadsAtLabel, which both paths call. The readback path is unchanged.Flips, drains and device waits still store the targets, as do Linux, Windows and
APS5_NO_LABEL_READ_TRAP=1. A debt fragment adds the new case to the "Label read traps" entry oflibSceAgcDriver.linear_target_completion_storesnow checks, on macOS with traps on, that the target is trapped rather than stored at the label. It then checks that the first CPU read stores it, and that every pixel read back has the drawn value.Tested
MacBook Air M4, macOS 27.0.1, x86-64 Release under Rosetta 2, MoltenVK 1.4.2 (Vulkan SDK 1.4.363.1). The branch is on
main78880af3f7; the measurements below were taken on earliermaincommits, as noted. The macOS build needs #17425 and #11049, and SuperTuxKart draws nothing on macOS without #20845, so every run below has those three merged locally. The A/B rounds and test runs below were on the earliermain426bd39867; the performance capture is ond3074de315.SuperTuxKart (PPSA69421) race, 4 rounds. Same scripted input each run, with the two builds alternated.
mainThe values are frame p50. GPU busy went from 57 to 69 ms per present to 45 to 49 ms. Storage write-back barriers went from 18 to 6 per present. The race draws the same.
Syobon Action (PPSA47402) level 1, 3 rounds each, alternated: frame p50 36 / 45 / 35 ms before and 49 / 36 / 35 ms after. The noise is the same in both builds, with no change. Level 1 draws the same.
Full
agc_driver_*suite (1317 tests), before and after: no new failures. 27 fail before and 25 after on this Mac; all 25 also fail before. The two that only failed before,image_table(timeout) andscratch_pool, look intermittent.linear_target_completion_storesunder the Khronos validation layer 1.4.363 (VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation VK_LOADER_DEBUG=layer ANYPS5_NO_SHADER_CACHE=1 ANYPS5_REQUIRE_VULKAN=1), on themainbuild and on this change: the layer is inserted, the test passes, and there are noVUID-messages in either log.ctest -R 'agc_driver.*(label|linear_target|readback|storage)'(103 tests), twice: the same 6 tests fail as before this change (label_after_import_copy,label_ordered_flush,label_ordered_flush_unimported,unregistered_label_behind_write_back,unregistered_label_on_gpu,native_color_readback). fix(agc): read-trap a pending image at a label only when it is host imported #20183 addresses thelabel_ordered_flushpair.linear_target_completion_storespasses with traps on and withAPS5_NO_LABEL_READ_TRAP=1. It skips underAPS5_NO_HOST_IMPORT=1, so the unimported case is covered only by the host-import condition.Not tested on Linux or Windows; the change is inside
#if defined(__APPLE__). Only two titles were checked. A title that reads its drawn linear targets on the CPU after every label would take the trap fault on each read instead of the eager store.Related open PRs:
StoreReadbackBeforeLabel, which moves intotrapReadsAtLabelhere. Whichever is merged second needs a rebase.StoreReadbackBeforeLabel, next to the lines this change edits.Performance capture
SuperTuxKart (PPSA69421) race, captured with
APS5_TRACE_SECONDS=40:20on the MacBook Air M4 above, with the same scripted input in both runs. Both builds are clean commits:0c782f74d2ismaind3074de315with fix(libcurl): build the curl backend for the macOS target architecture #17425, build(audio): link one SDL copy on macOS #11049 and revert: start the color masks and viewport control at their reset values (#16053) #20845 merged.451c385f23merges this branch into it.The shader and pipeline caches were warm from earlier runs.
mainSummary lines:
{"commit":"0c782f74d2d0","dirty":false,"env":{"APS5_PAD_INPUT_FILE":"<path>","APS5_TRACE_SECONDS":"40:20"},"gpu":"Apple M4","driver":"MoltenVK 1.4.2","os":"Darwin 27.0.0","cpu":"VirtualApple @ 2.50GHz","cpu_threads":10,"memory_mib":16384,"title_id":"PPSA69421","title":"SuperTuxKart","content_version":"00.001.000","resolution":"1920x1080","window":{"spec":"seconds 40:20","first_present":306,"ms":20014.246},"presents":140,"frame_ms":{"p50":147.465,"p90":151.719,"p99":158.981,"max":181.840},"gpu_busy_ms_per_present":66.772,"worker_busy_pct":{"queue worker 0x0":3.627},"phase_totals_ms":{"Driver.Completion":1.306,"Driver.Draw":574.912,"Driver.Draw.device_setup":25.318,"Driver.Draw.draw_enqueued":161.195,"Driver.Draw.post_compile_prepare":14.244,"Driver.Draw.prepare":39.710,"Driver.Draw.shader_compile_and_link":324.093,"Driver.EndSubmission":4.117,"Driver.Packet":720.438,"Driver.Packet.device_lock":7.037,"Driver.Packet.draw":578.914,"Driver.Packet.execute":68.124,"Driver.Packet.flip_flush":0.199,"Driver.Packet.flush_between_packets":11.234,"Driver.Packet.pipeline_drain":10.061,"Driver.Packet.pipeline_prepare":11.550,"Driver.Packet.prepare_memory":10.379,"Driver.Present":198.544,"Driver.Present.acquire_image":2.711,"Driver.Present.device_setup":0.083,"Driver.Present.gpu_mutex_wait":0.150,"Driver.Present.inflight_wait":0.309,"Driver.Present.present_display_buffer":15.869,"Driver.Present.queue_present":1.811,"Driver.Present.release_and_callback":0.149,"Driver.Present.render_fence_wait":174.626,"Driver.Present.resize":2.733,"Driver.Present.validate":0.016,"Driver.Suspend":0.031,"Graphics.Draw":764.416,"Graphics.Draw.draw_and_resource_release":685.073,"Graphics.Draw.index_upload":45.370,"Graphics.Draw.validate":24.227,"Graphics.Draw.vertex_upload":2.819,"Graphics.DrawWithRecipe":323.211,"Graphics.DrawWithRecipe.draw_and_resource_release":302.953,"Graphics.DrawWithRecipe.index_upload":13.498,"Graphics.DrawWithRecipe.validate":3.495,"Graphics.DrawWithRecipe.vertex_upload":1.545,"Recorder.Reap":25.320,"Recorder.Submit":1304.804,"Recorder.Sync":419.944,"Resources.Complete":3.341,"Resources.Prepare":4.264,"Shader.DrawStage":181.230,"Shader.DrawStage.capture_resources":121.154,"Shader.DrawStage.materialize":31.984,"Shader.DrawStage.prepared_invocation":26.495,"VideoOut.Flip":313.831,"VideoOut.Flip.completion_mutex_wait":0.224,"VideoOut.Flip.config_mutex_wait":0.007,"VideoOut.Flip.frame_limit":0.062,"VideoOut.Flip.notify_game":1.254,"VideoOut.Flip.present":197.608,"VideoOut.Flip.validate":0.094,"VideoOut.Flip.vblank_wait":0.133,"VideoOut.Flip.window_prepare":3.431,"VideoOut.Flip.window_title":110.980,"VideoOut.Readiness":0.264,"VideoOut.Readiness.locks_validate":0.130,"Vulkan.Acquire":2.609,"Vulkan.Acquire.acquire_fence_wait":0.090,"Vulkan.Acquire.acquire_image":2.280,"Vulkan.Acquire.fence_reset":0.137,"Vulkan.Acquire.retired_swapchains":0.060,"Vulkan.DrawFromRecipe":325.426,"Vulkan.Present":14.829,"Vulkan.Present.command_record_scale":4.378,"Vulkan.Present.pixel_upload":0.271,"Vulkan.Present.queue_submit":10.062,"Vulkan.QueuePresent":1.670,"Vulkan.QueuePresent.queue_present":1.580,"Vulkan.Retire":174.591,"Vulkan.Retire.wait":172.045},"top_phases_ms_per_frame":{"Recorder.Submit":9.320,"Graphics.Draw":5.460,"Driver.Packet":5.146,"Graphics.Draw.draw_and_resource_release":4.893,"Driver.Packet.draw":4.135,"Driver.Draw":4.107,"Recorder.Sync":3.000,"Vulkan.DrawFromRecipe":2.324},"owned_draw_counts":{},"graphics_track":{"Graphics.Barrier.draw":14566,"Graphics.Barrier.label-run":18779,"Graphics.Barrier.present-blit":280,"Graphics.Barrier.storage-upload":1688,"Graphics.Barrier.storage-writeback":2520,"Graphics.RenderPass":7423,"Graphics.RenderPass.Close.command":420,"Graphics.RenderPass.Close.image":420,"Graphics.RenderPass.Close.new-batch":6583,"Graphics.RenderPass.Continued":11668},"trace_dropped":false,"trace":"aps5-trace-0c782f74d2d0-92661.json.gz"} {"commit":"451c385f23f8","dirty":false,"env":{"APS5_PAD_INPUT_FILE":"<path>","APS5_TRACE_SECONDS":"40:20"},"gpu":"Apple M4","driver":"MoltenVK 1.4.2","os":"Darwin 27.0.0","cpu":"VirtualApple @ 2.50GHz","cpu_threads":10,"memory_mib":16384,"title_id":"PPSA69421","title":"SuperTuxKart","content_version":"00.001.000","resolution":"1920x1080","window":{"spec":"seconds 40:20","first_present":280,"ms":20084.628},"presents":148,"frame_ms":{"p50":131.916,"p90":153.772,"p99":160.939,"max":161.185},"gpu_busy_ms_per_present":47.019,"worker_busy_pct":{"queue worker 0x0":6.399},"phase_totals_ms":{"Driver.Completion":1.355,"Driver.Draw":654.261,"Driver.Draw.device_setup":27.629,"Driver.Draw.draw_enqueued":182.558,"Driver.Draw.post_compile_prepare":15.185,"Driver.Draw.prepare":40.225,"Driver.Draw.shader_compile_and_link":377.247,"Driver.EndSubmission":5.010,"Driver.Packet":1278.918,"Driver.Packet.device_lock":7.980,"Driver.Packet.draw":658.657,"Driver.Packet.execute":75.721,"Driver.Packet.flip_flush":460.444,"Driver.Packet.flush_between_packets":12.475,"Driver.Packet.pipeline_drain":10.896,"Driver.Packet.pipeline_prepare":12.960,"Driver.Packet.prepare_memory":11.552,"Driver.Present":299.758,"Driver.Present.acquire_image":2.960,"Driver.Present.device_setup":0.088,"Driver.Present.gpu_mutex_wait":0.170,"Driver.Present.inflight_wait":0.379,"Driver.Present.present_display_buffer":18.075,"Driver.Present.queue_present":1.949,"Driver.Present.release_and_callback":0.135,"Driver.Present.render_fence_wait":272.979,"Driver.Present.resize":2.946,"Driver.Present.validate":0.019,"Driver.Suspend":0.033,"Graphics.Draw":1021.382,"Graphics.Draw.draw_and_resource_release":926.449,"Graphics.Draw.index_upload":53.026,"Graphics.Draw.validate":30.271,"Graphics.Draw.vertex_upload":3.418,"Graphics.DrawWithRecipe":231.618,"Graphics.DrawWithRecipe.draw_and_resource_release":213.827,"Graphics.DrawWithRecipe.index_upload":12.651,"Graphics.DrawWithRecipe.validate":2.658,"Graphics.DrawWithRecipe.vertex_upload":1.132,"Recorder.Reap":34.977,"Recorder.Submit":1406.444,"Recorder.Sync":445.040,"Resources.Complete":3.658,"Resources.Prepare":4.457,"Shader.DrawStage":220.010,"Shader.DrawStage.capture_resources":146.425,"Shader.DrawStage.materialize":39.880,"Shader.DrawStage.prepared_invocation":31.745,"VideoOut.Flip":440.246,"VideoOut.Flip.completion_mutex_wait":0.215,"VideoOut.Flip.config_mutex_wait":0.012,"VideoOut.Flip.frame_limit":0.079,"VideoOut.Flip.notify_game":1.466,"VideoOut.Flip.present":298.521,"VideoOut.Flip.validate":0.127,"VideoOut.Flip.vblank_wait":0.151,"VideoOut.Flip.window_prepare":3.992,"VideoOut.Flip.window_title":135.648,"VideoOut.Readiness":0.287,"VideoOut.Readiness.locks_validate":0.155,"Vulkan.Acquire":2.858,"Vulkan.Acquire.acquire_fence_wait":0.108,"Vulkan.Acquire.acquire_image":2.495,"Vulkan.Acquire.fence_reset":0.143,"Vulkan.Acquire.retired_swapchains":0.067,"Vulkan.DrawFromRecipe":233.501,"Vulkan.Present":16.952,"Vulkan.Present.command_record_scale":4.416,"Vulkan.Present.pixel_upload":0.304,"Vulkan.Present.queue_submit":12.093,"Vulkan.QueuePresent":1.802,"Vulkan.QueuePresent.queue_present":1.711,"Vulkan.Retire":272.958,"Vulkan.Retire.wait":270.320},"top_phases_ms_per_frame":{"Recorder.Submit":9.503,"Driver.Packet":8.641,"Graphics.Draw":6.901,"Graphics.Draw.draw_and_resource_release":6.260,"Driver.Packet.draw":4.450,"Driver.Draw":4.421,"Driver.Packet.flip_flush":3.111,"Recorder.Sync":3.007},"owned_draw_counts":{},"graphics_track":{"Graphics.Barrier.draw":18942,"Graphics.Barrier.label-run":25171,"Graphics.Barrier.present-blit":296,"Graphics.Barrier.storage-upload":1784,"Graphics.Barrier.storage-writeback":888,"Graphics.RenderPass":9619,"Graphics.RenderPass.Close.image":444,"Graphics.RenderPass.Close.new-batch":9175,"Graphics.RenderPass.Continued":11719},"trace_dropped":false,"trace":"aps5-trace-451c385f23f8-1092.json.gz"}The two traces are attached in a comment below.
tools/trace_digest.pyonmainseconds 40:20 from present 306: 140 presents, frame p50 147.5 / p90 151.7 / p99 159.0 / max 181.8 ms, GPU busy 66.8 ms per present
Apple M4, MoltenVK 1.4.2, Darwin 27.0.0, 1920x1080, commit 0c782f74d2d0, dropped: no
{"commit":"0c782f74d2d0","dirty":false,"env":{"APS5_PAD_INPUT_FILE":"<path>","APS5_TRACE_SECONDS":"40:20"},"gpu":"Apple M4","driver":"MoltenVK 1.4.2","os":"Darwin 27.0.0","cpu":"VirtualApple @ 2.50GHz","cpu_threads":10,"memory_mib":16384,"title_id":"PPSA69421","title":"SuperTuxKart","content_version":"00.001.000","resolution":"1920x1080","window":{"spec":"seconds 40:20","first_present":306,"ms":20014.246},"presents":140,"frame_ms":{"p50":147.465,"p90":151.719,"p99":158.981,"max":181.84},"gpu_busy_ms_per_present":66.772,"worker_busy_pct":{"queue worker 0x0":3.627},"phase_totals_ms":{"Driver.Completion":1.306,"Driver.Draw":574.912,"Driver.Draw.device_setup":25.318,"Driver.Draw.draw_enqueued":161.195,"Driver.Draw.post_compile_prepare":14.244,"Driver.Draw.prepare":39.71,"Driver.Draw.shader_compile_and_link":324.093,"Driver.EndSubmission":4.117,"Driver.Packet":720.438,"Driver.Packet.device_lock":7.037,"Driver.Packet.draw":578.914,"Driver.Packet.execute":68.124,"Driver.Packet.flip_flush":0.199,"Driver.Packet.flush_between_packets":11.234,"Driver.Packet.pipeline_drain":10.061,"Driver.Packet.pipeline_prepare":11.55,"Driver.Packet.prepare_memory":10.379,"Driver.Present":198.544,"Driver.Present.acquire_image":2.711,"Driver.Present.device_setup":0.083,"Driver.Present.gpu_mutex_wait":0.15,"Driver.Present.inflight_wait":0.309,"Driver.Present.present_display_buffer":15.869,"Driver.Present.queue_present":1.811,"Driver.Present.release_and_callback":0.149,"Driver.Present.render_fence_wait":174.626,"Driver.Present.resize":2.733,"Driver.Present.validate":0.016,"Driver.Suspend":0.031,"Graphics.Draw":764.416,"Graphics.Draw.draw_and_resource_release":685.073,"Graphics.Draw.index_upload":45.37,"Graphics.Draw.validate":24.227,"Graphics.Draw.vertex_upload":2.819,"Graphics.DrawWithRecipe":323.211,"Graphics.DrawWithRecipe.draw_and_resource_release":302.953,"Graphics.DrawWithRecipe.index_upload":13.498,"Graphics.DrawWithRecipe.validate":3.495,"Graphics.DrawWithRecipe.vertex_upload":1.545,"Recorder.Reap":25.32,"Recorder.Submit":1304.804,"Recorder.Sync":419.944,"Resources.Complete":3.341,"Resources.Prepare":4.264,"Shader.DrawStage":181.23,"Shader.DrawStage.capture_resources":121.154,"Shader.DrawStage.materialize":31.984,"Shader.DrawStage.prepared_invocation":26.495,"VideoOut.Flip":313.831,"VideoOut.Flip.completion_mutex_wait":0.224,"VideoOut.Flip.config_mutex_wait":0.007,"VideoOut.Flip.frame_limit":0.062,"VideoOut.Flip.notify_game":1.254,"VideoOut.Flip.present":197.608,"VideoOut.Flip.validate":0.094,"VideoOut.Flip.vblank_wait":0.133,"VideoOut.Flip.window_prepare":3.431,"VideoOut.Flip.window_title":110.98,"VideoOut.Readiness":0.264,"VideoOut.Readiness.locks_validate":0.13,"Vulkan.Acquire":2.609,"Vulkan.Acquire.acquire_fence_wait":0.09,"Vulkan.Acquire.acquire_image":2.28,"Vulkan.Acquire.fence_reset":0.137,"Vulkan.Acquire.retired_swapchains":0.06,"Vulkan.DrawFromRecipe":325.426,"Vulkan.Present":14.829,"Vulkan.Present.command_record_scale":4.378,"Vulkan.Present.pixel_upload":0.271,"Vulkan.Present.queue_submit":10.062,"Vulkan.QueuePresent":1.67,"Vulkan.QueuePresent.queue_present":1.58,"Vulkan.Retire":174.591,"Vulkan.Retire.wait":172.045},"top_phases_ms_per_frame":{"Recorder.Submit":9.32,"Graphics.Draw":5.46,"Driver.Packet":5.146,"Graphics.Draw.draw_and_resource_release":4.893,"Driver.Packet.draw":4.135,"Driver.Draw":4.107,"Recorder.Sync":3.0,"Vulkan.DrawFromRecipe":2.324},"owned_draw_counts":{},"graphics_track":{"Graphics.Barrier.draw":14566,"Graphics.Barrier.label-run":18779,"Graphics.Barrier.present-blit":280,"Graphics.Barrier.storage-upload":1688,"Graphics.Barrier.storage-writeback":2520,"Graphics.RenderPass":7423,"Graphics.RenderPass.Close.command":420,"Graphics.RenderPass.Close.image":420,"Graphics.RenderPass.Close.new-batch":6583,"Graphics.RenderPass.Continued":11668},"trace_dropped":false,"trace":"aps5-trace-0c782f74d2d0-92661.json.gz"}Slowest frames (largest slices inside each, inclusive)
Persistent spikes (frame time above the fastest frame that separates it from a longer frame; one entry per stall, not per frame)
Threads (ms per frame)
Largest slices (ms per frame, inclusive, all threads): Driver.WorkerWait 137.3, Driver.WorkerWait.idle_and_completion_poll 137.3, batch 66.8, Recorder.Submit 9.3, Graphics.Draw 5.4, Graphics.Draw.draw_and_resource_release 4.8, Driver.Packet 3.7, Driver.Packet.draw 3.6, Driver.Draw 3.6, Recorder.Sync 3.0
Longest waits
Largest GPU batches (GPU ranges inside, and the CPU slices that recorded each, inclusive)
tools/trace_digest.pyon this changeseconds 40:20 from present 280: 148 presents, frame p50 131.9 / p90 153.8 / p99 160.9 / max 161.2 ms, GPU busy 47.0 ms per present
Apple M4, MoltenVK 1.4.2, Darwin 27.0.0, 1920x1080, commit 451c385f23f8, dropped: no
{"commit":"451c385f23f8","dirty":false,"env":{"APS5_PAD_INPUT_FILE":"<path>","APS5_TRACE_SECONDS":"40:20"},"gpu":"Apple M4","driver":"MoltenVK 1.4.2","os":"Darwin 27.0.0","cpu":"VirtualApple @ 2.50GHz","cpu_threads":10,"memory_mib":16384,"title_id":"PPSA69421","title":"SuperTuxKart","content_version":"00.001.000","resolution":"1920x1080","window":{"spec":"seconds 40:20","first_present":280,"ms":20084.628},"presents":148,"frame_ms":{"p50":131.916,"p90":153.772,"p99":160.939,"max":161.185},"gpu_busy_ms_per_present":47.019,"worker_busy_pct":{"queue worker 0x0":6.399},"phase_totals_ms":{"Driver.Completion":1.355,"Driver.Draw":654.261,"Driver.Draw.device_setup":27.629,"Driver.Draw.draw_enqueued":182.558,"Driver.Draw.post_compile_prepare":15.185,"Driver.Draw.prepare":40.225,"Driver.Draw.shader_compile_and_link":377.247,"Driver.EndSubmission":5.01,"Driver.Packet":1278.918,"Driver.Packet.device_lock":7.98,"Driver.Packet.draw":658.657,"Driver.Packet.execute":75.721,"Driver.Packet.flip_flush":460.444,"Driver.Packet.flush_between_packets":12.475,"Driver.Packet.pipeline_drain":10.896,"Driver.Packet.pipeline_prepare":12.96,"Driver.Packet.prepare_memory":11.552,"Driver.Present":299.758,"Driver.Present.acquire_image":2.96,"Driver.Present.device_setup":0.088,"Driver.Present.gpu_mutex_wait":0.17,"Driver.Present.inflight_wait":0.379,"Driver.Present.present_display_buffer":18.075,"Driver.Present.queue_present":1.949,"Driver.Present.release_and_callback":0.135,"Driver.Present.render_fence_wait":272.979,"Driver.Present.resize":2.946,"Driver.Present.validate":0.019,"Driver.Suspend":0.033,"Graphics.Draw":1021.382,"Graphics.Draw.draw_and_resource_release":926.449,"Graphics.Draw.index_upload":53.026,"Graphics.Draw.validate":30.271,"Graphics.Draw.vertex_upload":3.418,"Graphics.DrawWithRecipe":231.618,"Graphics.DrawWithRecipe.draw_and_resource_release":213.827,"Graphics.DrawWithRecipe.index_upload":12.651,"Graphics.DrawWithRecipe.validate":2.658,"Graphics.DrawWithRecipe.vertex_upload":1.132,"Recorder.Reap":34.977,"Recorder.Submit":1406.444,"Recorder.Sync":445.04,"Resources.Complete":3.658,"Resources.Prepare":4.457,"Shader.DrawStage":220.01,"Shader.DrawStage.capture_resources":146.425,"Shader.DrawStage.materialize":39.88,"Shader.DrawStage.prepared_invocation":31.745,"VideoOut.Flip":440.246,"VideoOut.Flip.completion_mutex_wait":0.215,"VideoOut.Flip.config_mutex_wait":0.012,"VideoOut.Flip.frame_limit":0.079,"VideoOut.Flip.notify_game":1.466,"VideoOut.Flip.present":298.521,"VideoOut.Flip.validate":0.127,"VideoOut.Flip.vblank_wait":0.151,"VideoOut.Flip.window_prepare":3.992,"VideoOut.Flip.window_title":135.648,"VideoOut.Readiness":0.287,"VideoOut.Readiness.locks_validate":0.155,"Vulkan.Acquire":2.858,"Vulkan.Acquire.acquire_fence_wait":0.108,"Vulkan.Acquire.acquire_image":2.495,"Vulkan.Acquire.fence_reset":0.143,"Vulkan.Acquire.retired_swapchains":0.067,"Vulkan.DrawFromRecipe":233.501,"Vulkan.Present":16.952,"Vulkan.Present.command_record_scale":4.416,"Vulkan.Present.pixel_upload":0.304,"Vulkan.Present.queue_submit":12.093,"Vulkan.QueuePresent":1.802,"Vulkan.QueuePresent.queue_present":1.711,"Vulkan.Retire":272.958,"Vulkan.Retire.wait":270.32},"top_phases_ms_per_frame":{"Recorder.Submit":9.503,"Driver.Packet":8.641,"Graphics.Draw":6.901,"Graphics.Draw.draw_and_resource_release":6.26,"Driver.Packet.draw":4.45,"Driver.Draw":4.421,"Driver.Packet.flip_flush":3.111,"Recorder.Sync":3.007},"owned_draw_counts":{},"graphics_track":{"Graphics.Barrier.draw":18942,"Graphics.Barrier.label-run":25171,"Graphics.Barrier.present-blit":296,"Graphics.Barrier.storage-upload":1784,"Graphics.Barrier.storage-writeback":888,"Graphics.RenderPass":9619,"Graphics.RenderPass.Close.image":444,"Graphics.RenderPass.Close.new-batch":9175,"Graphics.RenderPass.Continued":11719},"trace_dropped":false,"trace":"aps5-trace-451c385f23f8-1092.json.gz"}Slowest frames (largest slices inside each, inclusive)
Persistent spikes (frame time above the fastest frame that separates it from a longer frame; one entry per stall, not per frame)
Threads (ms per frame)
Largest slices (ms per frame, inclusive, all threads): Driver.WorkerWait 126.5, Driver.WorkerWait.idle_and_completion_poll 126.5, batch 47.0, Recorder.Submit 9.5, Driver.Packet 7.1, Graphics.Draw 6.9, Graphics.Draw.draw_and_resource_release 6.2, Driver.Packet.draw 4.0, Driver.Draw 3.9, Driver.Packet.flip_flush 3.1
Longest waits
Largest GPU batches (GPU ranges inside, and the CPU slices that recorded each, inclusive)
Checklist
main; no other open PR implements the same functionsNotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file.mdfiles or images added to the repository (attach them to this PR)