Skip to content

perf(agc): commit draws from records resolved on the finisher, with the finisher's job slimmed, under APS5_DIRECT_DRAWS - #22647

Open
Nesyth wants to merge 32 commits into
boykopovar:mainfrom
Nesyth:perf/agc-direct-draws
Open

Nesyth wants to merge 32 commits into
boykopovar:mainfrom
Nesyth:perf/agc-direct-draws

Conversation

@Nesyth

@Nesyth Nesyth commented Nov 18, 2026 •

Copy link
Copy Markdown
Contributor

What

With the lean front (#22434) the queue-0 worker hands a draw to the draw finisher, but the draw committer still prepares every draw on the thread that holds the GPU lock: the template proof, the resolve of each stage's resources, the buffers and the vertex and index inputs, and the render targets. This PR lets the finisher resolve a draw to a record that the committer commits directly, and makes the finisher's job cheap enough for that move to pay. Moved alone, the work measured -0.5% on main: the single finisher became the busy stage. With the finisher's job slimmed in the same PR, the in-run A/B below gives +6.6% over #22434.

Four commits, every switch a RuntimeSwitch that is off by default and that APS5_AB can toggle within one run:

  1. Direct draws (APS5_DIRECT_DRAWS): a lean draw the worker marks direct is resolved on the finisher from a per-thread prepared invocation cache, a walk of each stage's resources that records the words it read, and a store of shared stage results; the committer commits it from that record. APS5_DIRECT_RETRY resolves a walk again (at most twice) when its reads were not settled. APS5_DIRECT_PASS_TARGETS keeps the targets another record's draw refreshed in the open pass when nothing they depend on moved. APS5_DIRECT_BUFFERS and APS5_DIRECT_INPUTS prepare the draw's buffers and its index and vertex inputs on the finisher.
  2. Settle checks and lock-free reads: APS5_PRECISE_SETTLE settles a range under a newer 64 KiB block stamp by its page and store stamps; APS5_FAST_SETTLE gives the settle checks their short ways; APS5_MERGED_SETTLE tests more than two copied buffer ranges once, sorted and merged; APS5_UNLOCKED_STAMPS, APS5_WRITE_SNAPSHOT_FRONTS and APS5_PENDING_FRONTS read the tracker stamps, the published pending-write snapshot and the pending storage list without their locks (the fronts serve every existing caller, including the flush hook and the committer's checks); APS5_IMPORT_SNAPSHOTS answers host import lookups from a per-thread snapshot of the import set.
  3. Preparation: APS5_LEAN_PREPARE refreshes a per-thread copy of the shape's decode in place; APS5_INVOCATION_SLOTS_WIDE gives each finisher 16,384 invocation slots instead of 1,024; APS5_PREPARED_CAPACITY reserves the prepared lists at their exact sizes; APS5_BUFFER_BLOB_APPEND lays a draw's buffer blob out first, reserves it at its exact size and fills it by appending.
  4. Stage memo (APS5_STAGE_MEMO): a direct draw's stage resolve is reused when its content repeats under moved table pointers (the user words the walk read are equal and the words that may move are only addresses), from a store shared by the finishers; APS5_STAGE_MEMO_ADMIT_THIRD stores a content at its third sighting; APS5_STAGE_MEMO_FRONT gives each finisher a lock-free front of the store.

Every step keeps today's output, and each has a verify mode that runs today's path (which is what executes) and compares: APS5_VERIFY_DIRECT_DRAWS, APS5_VERIFY_DIRECT_BUFFERS, APS5_VERIFY_DIRECT_INPUTS, APS5_VERIFY_DRAW_RECORDS, APS5_VERIFY_STAGE_MEMO, APS5_VERIFY_UNLOCKED_STAMPS, APS5_VERIFY_WRITE_SNAPSHOT_FRONTS, APS5_VERIFY_PENDING_FRONTS and APS5_VERIFY_IMPORT_SNAPSHOTS.

With every switch unset the output is unchanged. A few pieces run in both arms because they are shared plumbing: the stamp words are read and written through std::atomic_ref, the recorder stores one word per published snapshot and the pending list one per flushing change, and the lean-prepare commit's allocation trims (fixed arrays for at most eight registered views, two reserves, and running noteDrawWriters only when a stage may write a guest buffer) are not behind its switch. The stage memo adds two analysis functions to the shader recompiler (TraceSideForwards, SrtTape::AddressForwards); they change no emitted shader, but they move the shader cache version, so the first boot after this change recompiles.

#22025 also moves draw planning to the finisher (PreparedDraw) and changes Graphics::Draw's parameters; whichever of the two lands second adapts.

Tested

Windows 11 Pro 26300, Radeon RX 7900 XTX (AMD Software 26.10.1), Ryzen 7 7800X3D, Release, MinGW-w64 GCC 15.2. This head is ff4fc7a: main 14deacc with #15456 and #22434 (02f1afc), plus these four commits.

PPSA04264 (v01.011.001), Performance graphics mode, a story save in the city (about 3,000 draws and 95 compute dispatches per frame), the player standing still, warm caches; every run sets APS5_DRAW_PIPELINE=1 APS5_PIPELINED_DRAWS=32 APS5_PIPELINE_DISPATCH=1 APS5_LEAN_FRONT=1 APS5_LEAN_LIST_DIRECT=1.

In-run A/B, the nineteen switches of this PR toggled together over the lean front (APS5_AB=30: with all of them, phases of 30 s from 260 s after the first present; each B phase against its neighbouring A phases, the first pair left out while the scene settles): gain +8.78 +- 0.75 presents per 10 s (+6.6%, 5 pairs, the first pair left out: the scene settles).

phase presents per 10 s
B 1 143.09
A 2 134.61
B 3 138.85
A 4 129.23
B 5 142.93
A 6 133.83
B 7 140.90
A 8 131.91
B 9 141.20
A 10 133.79
B 11 143.23
A 12 134.27

Captures, main and this PR one after the other in the same session (main at 00:37, this PR at 00:45), the log not redirected, APS5_TRACE_SECONDS=240:60, both with the lean front's two switches and this PR's nineteen set (APS5_DIRECT_DRAWS=1 APS5_DIRECT_RETRY=1 APS5_DIRECT_PASS_TARGETS=1 APS5_DIRECT_BUFFERS=1 APS5_DIRECT_INPUTS=1 APS5_PRECISE_SETTLE=1 APS5_FAST_SETTLE=1 APS5_MERGED_SETTLE=1 APS5_UNLOCKED_STAMPS=1 APS5_WRITE_SNAPSHOT_FRONTS=1 APS5_PENDING_FRONTS=1 APS5_IMPORT_SNAPSHOTS=1 APS5_LEAN_PREPARE=1 APS5_INVOCATION_SLOTS_WIDE=1 APS5_PREPARED_CAPACITY=1 APS5_BUFFER_BLOB_APPEND=1 APS5_STAGE_MEMO=1 APS5_STAGE_MEMO_ADMIT_THIRD=1 APS5_STAGE_MEMO_FRONT=1; main reads none of them, they are set in both arms so both summary lines carry the same environment):

build FPS in game presents in the 60 s window frame p50 / p90 / p99 ms GPU busy ms per present
main 14deacc 13.95 over 292 s 836 71.3 / 75.6 / 90.2 25.8
this PR (ff4fc7a) 15.49 over 291 s 932 64.1 / 67.9 / 80.5 24.6

+11.0% FPS between the captures (this includes #22434). The main arm runs without #15456's finisher default but with APS5_DRAW_PIPELINE=1, so both arms run the finisher.

Verify boot of this head, every switch on and every verify mode at 64: 283 s in game at 15.1 FPS, 0 fatal, 0 device lost; 98% of the draws took the direct path. The last report of each verify: direct draws 7,662 checked, buffers 6,413 (merged settles 3,754), inputs 6,650 (exact capacities 6,650), stage memo 12,151, draw records about 7,600 answers and 6,700 commits, lean front about 7,700 draws (these per 10 s window); unlocked stamps 236,603, write-snapshot fronts 3,505,574, pending fronts 2,233,114, import snapshots 226,965 (these since the start): 0 differing. One [stage-memo-verify] the shared stage differs line came in the first minutes (same variant, same read ranges and values, another shared key): the shared key holds the variant's learned buffer substitutes (BufferSubstituteTable::LearnedSlots), which flip once from unlearned to learned, so a memo entry stored before a slot was learned keeps the general stage while a fresh resolve after it gets the specialized one. Both are valid compiles of the same program for these reads; making the entry carry the learned count would remove the line and needs a recompiler change, which I left for a follow-up.

On this machine main shows the frame's top half mirrored into its bottom half (the viewport control default of #16053, #20835; #20827 fixes it); both arms carry it.

Traces, both captured on the same machine in one session: main 14deacc1f3, this PR. Summary lines and tools/trace_digest.py output below.

{"commit":"14deacc1f35b","dirty":false,"env":{"APS5_BUFFER_BLOB_APPEND":"1","APS5_DIRECT_BUFFERS":"1","APS5_DIRECT_DRAWS":"1","APS5_DIRECT_INPUTS":"1","APS5_DIRECT_PASS_TARGETS":"1","APS5_DIRECT_RETRY":"1","APS5_DRAW_PIPELINE":"1","APS5_FAST_SETTLE":"1","APS5_IMPORT_SNAPSHOTS":"1","APS5_INVOCATION_SLOTS_WIDE":"1","APS5_LEAN_FRONT":"1","APS5_LEAN_LIST_DIRECT":"1","APS5_LEAN_PREPARE":"1","APS5_LOG_TIMESTAMPS":"1","APS5_MERGED_SETTLE":"1","APS5_NO_PAD_INPUT":"1","APS5_PAD_INPUT_FILE":"<path>","APS5_PENDING_FRONTS":"1","APS5_PIPELINED_DRAWS":"32","APS5_PIPELINE_DISPATCH":"1","APS5_PRECISE_SETTLE":"1","APS5_PREPARED_CAPACITY":"1","APS5_STAGE_MEMO":"1","APS5_STAGE_MEMO_ADMIT_THIRD":"1","APS5_STAGE_MEMO_FRONT":"1","APS5_TRACE_DIR":"<path>","APS5_TRACE_EVENTS":"4194304","APS5_TRACE_SECONDS":"240:60","APS5_TRACE_SUMMARY_EVERY":"10","APS5_UNLOCKED_STAMPS":"1","APS5_WRITE_SNAPSHOT_FRONTS":"1"},"gpu":"AMD Radeon RX 7900 XTX","driver":"AMD proprietary driver 26.10.1 (LLPC)","os":"Windows 10.0.26300","cpu":"AMD Ryzen 7 7800X3D 8-Core Processor","cpu_threads":16,"memory_mib":31860,"title_id":"PPSA04264","title":"<withheld>","content_version":"01.011.001","resolution":"3840x2160","window":{"spec":"seconds 240:60","first_present":4369,"ms":60073.459},"presents":836,"frame_ms":{"p50":71.264,"p90":75.599,"p99":90.151,"max":116.637},"gpu_busy_ms_per_present":25.763,"worker_busy_pct":{"queue worker 0x0":92.721},"phase_totals_ms":{"Driver.Completion":0.432,"Driver.Dispatch":7841.558,"Driver.Dispatch.capture_resources":250.211,"Driver.Dispatch.decode_key_device_setup":93.788,"Driver.Dispatch.lookup_cache":2557.055,"Driver.Dispatch.materialize":42.542,"Driver.Dispatch.prepared_invocation":125.353,"Driver.Draw":34926.338,"Driver.Draw.device_setup":1747.295,"Driver.Draw.draw_enqueued":59.62,"Driver.Draw.draw_handed_off":8001.622,"Driver.Draw.post_compile_prepare":4.834,"Driver.Draw.prepare":24693.362,"Driver.Draw.shader_compile_and_link":211.371,"Driver.DrawFinish":30910.16,"Driver.DrawFinish.draw_enqueued":14226.096,"Driver.DrawFinish.post_compile_prepare":384.435,"Driver.DrawFinish.shader_compile_and_link":16054.221,"Driver.EndSubmission":669.278,"Driver.Packet":52621.407,"Driver.Packet.device_lock":511.252,"Driver.Packet.dispatch":7867.921,"Driver.Packet.draw":35325.375,"Driver.Packet.execute":3241.409,"Driver.Packet.flip_flush":23.569,"Driver.Packet.flush_between_packets":1154.627,"Driver.Packet.memory_wait":16.021,"Driver.Packet.pipeline_drain":994.137,"Driver.Packet.pipeline_prepare":704.146,"Driver.Packet.prepare_memory":647.43,"Driver.Packet.rendering_wait":0.517,"Driver.Present":4520.401,"Driver.Present.acquire_image":1340.821,"Driver.Present.device_setup":0.351,"Driver.Present.gpu_mutex_wait":18.823,"Driver.Present.inflight_wait":1.816,"Driver.Present.present_display_buffer":85.879,"Driver.Present.queue_present":1390.445,"Driver.Present.release_and_callback":1.171,"Driver.Present.render_fence_wait":1679.187,"Driver.Present.resize":1.202,"Driver.Present.validate":0.244,"Driver.Rewind":2409.196,"Driver.Suspend":0.177,"GpuMutex.wait.dispatch":6.638,"GpuMutex.wait.draw":97.698,"GpuMutex.wait.end":3.343,"GpuMutex.wait.fill":1.486,"GpuMutex.wait.flush":7.927,"GpuMutex.wait.hook":0.01,"GpuMutex.wait.label":18.466,"GpuMutex.wait.other":3.358,"GpuMutex.wait.present":16.872,"Graphics.Draw":36548.666,"Graphics.Draw.draw_and_resource_release":31631.075,"Graphics.Draw.index_upload":1462.507,"Graphics.Draw.validate":1443.778,"Graphics.Draw.vertex_upload":1603.033,"Graphics.DrawWithRecipe":6539.02,"Graphics.DrawWithRecipe.draw_and_resource_release":5840.408,"Graphics.DrawWithRecipe.index_upload":206.14,"Graphics.DrawWithRecipe.validate":129.804,"Graphics.DrawWithRecipe.vertex_upload":308.962,"Recorder.Reap":943.151,"Recorder.Submit":2629.763,"Recorder.Sync":1336.804,"Recorder.WaitSerial":870.674,"Resources.Complete":292.8,"Resources.Prepare":380.295,"Shader.DrawStage":14447.142,"Shader.DrawStage.capture_resources":7185.491,"Shader.DrawStage.materialize":4634.935,"Shader.DrawStage.prepared_invocation":2439.416,"Shader.ResolveGraphicsStagesAbi":15.538,"VideoOut.Flip":4625.417,"VideoOut.Flip.completion_mutex_wait":1.051,"VideoOut.Flip.config_mutex_wait":0.081,"VideoOut.Flip.frame_limit":0.365,"VideoOut.Flip.notify_game":22.89,"VideoOut.Flip.present":4523.973,"VideoOut.Flip.validate":0.833,"VideoOut.Flip.vblank_wait":0.525,"VideoOut.Flip.window_prepare":1.101,"VideoOut.Flip.window_title":74.017,"VideoOut.Readiness":1.51,"VideoOut.Readiness.locks_validate":0.669,"Vulkan.Acquire":1339.995,"Vulkan.Acquire.acquire_fence_wait":1269.195,"Vulkan.Acquire.acquire_image":67.612,"Vulkan.Acquire.fence_reset":1.599,"Vulkan.Acquire.retired_swapchains":1.206,"Vulkan.Dispatch":823.791,"Vulkan.Dispatch.command_record":222.6,"Vulkan.Dispatch.shader_resources":591.088,"Vulkan.DispatchRecipe":287.259,"Vulkan.DispatchRecipe.command_record":284.877,"Vulkan.DrawFromRecipe":6628.971,"Vulkan.Present":43.334,"Vulkan.Present.command_record_scale":17.822,"Vulkan.Present.pixel_upload":12.591,"Vulkan.Present.queue_submit":12.572,"Vulkan.QueuePresent":1389.154,"Vulkan.QueuePresent.queue_present":1387.783,"Vulkan.Retire":1678.861,"Vulkan.Retire.wait":1669.994},"top_phases_ms_per_frame":{"Driver.Packet":62.944,"Graphics.Draw":43.718,"Driver.Packet.draw":42.255,"Driver.Draw":41.778,"Graphics.Draw.draw_and_resource_release":37.836,"Driver.DrawFinish":36.974,"Driver.Draw.prepare":29.538,"Driver.DrawFinish.shader_compile_and_link":19.204},"owned_draw_counts":{},"graphics_track":{"Graphics.Barrier.copy":8247,"Graphics.Barrier.dcc-clear":8360,"Graphics.Barrier.dcc-keys":6688,"Graphics.Barrier.dispatch-lead":23999,"Graphics.Barrier.dispatch-trail":59767,"Graphics.Barrier.draw":424733,"Graphics.Barrier.fill":10064,"Graphics.Barrier.fill-clear":1672,"Graphics.Barrier.indirect-args":5852,"Graphics.Barrier.label-run":339681,"Graphics.Barrier.present-blit":3344,"Graphics.Barrier.shadow-publish":1704,"Graphics.Barrier.staging-in":52478,"Graphics.Barrier.staging-out":24483,"Graphics.Barrier.storage-upload":30568,"Graphics.Barrier.storage-writeback":100111,"Graphics.BarrierMerged.dispatch-lead":47472,"Graphics.BarrierMerged.fill":5016,"Graphics.BarrierMerged.label-run":970,"Graphics.BarrierMerged.shadow-publish":1704,"Graphics.BarrierMerged.staging-in":20971,"Graphics.BarrierMerged.staging-out":24483,"Graphics.BarrierMerged.storage-writeback":15061,"Graphics.Copy":107418,"Graphics.Copy.bytes":19656045192,"Graphics.RenderPass":186738,"Graphics.RenderPass.Close.command":62434,"Graphics.RenderPass.Close.image":73598,"Graphics.RenderPass.Close.key":13113,"Graphics.RenderPass.Close.label":970,"Graphics.RenderPass.Close.new-batch":36621,"Graphics.RenderPass.Continued":2503949},"trace_dropped":false,"trace":"aps5-trace-14deacc1f35b-61008.json.gz"}
{"commit":"ff4fc7af5d65","dirty":false,"env":{"APS5_BUFFER_BLOB_APPEND":"1","APS5_DIRECT_BUFFERS":"1","APS5_DIRECT_DRAWS":"1","APS5_DIRECT_INPUTS":"1","APS5_DIRECT_PASS_TARGETS":"1","APS5_DIRECT_RETRY":"1","APS5_DRAW_PIPELINE":"1","APS5_FAST_SETTLE":"1","APS5_IMPORT_SNAPSHOTS":"1","APS5_INVOCATION_SLOTS_WIDE":"1","APS5_LEAN_FRONT":"1","APS5_LEAN_LIST_DIRECT":"1","APS5_LEAN_PREPARE":"1","APS5_LOG_TIMESTAMPS":"1","APS5_MERGED_SETTLE":"1","APS5_NO_PAD_INPUT":"1","APS5_PAD_INPUT_FILE":"<path>","APS5_PENDING_FRONTS":"1","APS5_PIPELINED_DRAWS":"32","APS5_PIPELINE_DISPATCH":"1","APS5_PRECISE_SETTLE":"1","APS5_PREPARED_CAPACITY":"1","APS5_STAGE_MEMO":"1","APS5_STAGE_MEMO_ADMIT_THIRD":"1","APS5_STAGE_MEMO_FRONT":"1","APS5_TRACE_DIR":"<path>","APS5_TRACE_EVENTS":"4194304","APS5_TRACE_SECONDS":"240:60","APS5_TRACE_SUMMARY_EVERY":"10","APS5_UNLOCKED_STAMPS":"1","APS5_WRITE_SNAPSHOT_FRONTS":"1"},"gpu":"AMD Radeon RX 7900 XTX","driver":"AMD proprietary driver 26.10.1 (LLPC)","os":"Windows 10.0.26300","cpu":"AMD Ryzen 7 7800X3D 8-Core Processor","cpu_threads":16,"memory_mib":31860,"title_id":"PPSA04264","title":"<withheld>","content_version":"01.011.001","resolution":"3840x2160","window":{"spec":"seconds 240:60","first_present":4692,"ms":60063.237},"presents":932,"frame_ms":{"p50":64.095,"p90":67.91,"p99":80.515,"max":123.999},"gpu_busy_ms_per_present":24.636,"worker_busy_pct":{"queue worker 0x0":84.085},"phase_totals_ms":{"Driver.Completion":0.332,"Driver.Dispatch":8520.644,"Driver.Dispatch.capture_resources":282.87,"Driver.Dispatch.decode_key_device_setup":110.127,"Driver.Dispatch.lookup_cache":2588.623,"Driver.Dispatch.materialize":50.286,"Driver.Dispatch.prepared_invocation":189.728,"Driver.Draw":12886.831,"Driver.Draw.device_setup":676.318,"Driver.Draw.draw_enqueued":54.436,"Driver.Draw.draw_handed_off":2816.913,"Driver.Draw.post_compile_prepare":5.68,"Driver.Draw.prepare":8960.789,"Driver.Draw.shader_compile_and_link":278.499,"Driver.DrawFinish":14843.285,"Driver.DrawFinish.draw_enqueued":5564.403,"Driver.DrawFinish.post_compile_prepare":181.223,"Driver.DrawFinish.shader_compile_and_link":8990.395,"Driver.EndSubmission":579.849,"Driver.Packet":48323.313,"Driver.Packet.device_lock":567.237,"Driver.Packet.dispatch":8552.936,"Driver.Packet.draw":27763.136,"Driver.Packet.execute":4965.324,"Driver.Packet.flip_flush":26.456,"Driver.Packet.flush_between_packets":1143.981,"Driver.Packet.memory_wait":15.631,"Driver.Packet.pipeline_drain":1302.364,"Driver.Packet.pipeline_prepare":519.178,"Driver.Packet.prepare_memory":508.208,"Driver.Packet.rendering_wait":0.716,"Driver.Present":5733.255,"Driver.Present.acquire_image":1695.858,"Driver.Present.device_setup":0.362,"Driver.Present.gpu_mutex_wait":20.854,"Driver.Present.inflight_wait":1.967,"Driver.Present.present_display_buffer":106.692,"Driver.Present.queue_present":1602.88,"Driver.Present.release_and_callback":1.297,"Driver.Present.render_fence_wait":2301.147,"Driver.Present.resize":1.349,"Driver.Present.validate":0.29,"Driver.Rewind":1600.347,"Driver.Suspend":0.168,"GpuMutex.wait.dispatch":5.88,"GpuMutex.wait.draw":166.261,"GpuMutex.wait.end":1.473,"GpuMutex.wait.fill":2.231,"GpuMutex.wait.flush":8.21,"GpuMutex.wait.label":18.137,"GpuMutex.wait.other":3.126,"GpuMutex.wait.present":18.61,"Graphics.Draw":20918.888,"Graphics.Draw.draw_and_resource_release":18060.849,"Graphics.Draw.index_upload":798.763,"Graphics.Draw.validate":926.659,"Graphics.Draw.vertex_upload":898.997,"Graphics.DrawWithRecipe":96.827,"Graphics.DrawWithRecipe.draw_and_resource_release":87.5,"Graphics.DrawWithRecipe.index_upload":1.853,"Graphics.DrawWithRecipe.validate":1.909,"Graphics.DrawWithRecipe.vertex_upload":4.304,"Graphics.DrawWithRecord":22398.211,"Graphics.DrawWithRecord.draw_and_resource_release":21001.327,"Graphics.DrawWithRecord.index_upload":309.137,"Graphics.DrawWithRecord.validate":328.685,"Graphics.DrawWithRecord.vertex_upload":417.357,"Recorder.Reap":1019.838,"Recorder.Submit":2870.963,"Recorder.Sync":1249.476,"Recorder.WaitSerial":934.56,"Resources.Complete":331.445,"Resources.Prepare":430.459,"Shader.DrawStage":8637.394,"Shader.DrawStage.capture_resources":4851.742,"Shader.DrawStage.materialize":2286.657,"Shader.DrawStage.prepared_invocation":1387.202,"Shader.ResolveGraphicsStagesAbi":16.848,"VideoOut.Flip":5852.295,"VideoOut.Flip.completion_mutex_wait":1.324,"VideoOut.Flip.config_mutex_wait":0.096,"VideoOut.Flip.frame_limit":0.355,"VideoOut.Flip.notify_game":23.216,"VideoOut.Flip.present":5737.114,"VideoOut.Flip.validate":0.907,"VideoOut.Flip.vblank_wait":0.616,"VideoOut.Flip.window_prepare":1.28,"VideoOut.Flip.window_title":86.609,"VideoOut.Readiness":1.684,"VideoOut.Readiness.locks_validate":0.789,"Vulkan.Acquire":1694.995,"Vulkan.Acquire.acquire_fence_wait":1615.16,"Vulkan.Acquire.acquire_image":76.264,"Vulkan.Acquire.fence_reset":1.7,"Vulkan.Acquire.retired_swapchains":1.468,"Vulkan.Dispatch":939.415,"Vulkan.Dispatch.command_record":254.106,"Vulkan.Dispatch.shader_resources":674.503,"Vulkan.DispatchRecipe":320.606,"Vulkan.DispatchRecipe.command_record":318.146,"Vulkan.DrawFromRecipe":98.523,"Vulkan.DrawFromRecord":22765.059,"Vulkan.GraphicsPipeline":0.361,"Vulkan.GraphicsPipeline.create":0.158,"Vulkan.GraphicsPipeline.modules_and_state":0.202,"Vulkan.GraphicsPipelineLibrary":0.106,"Vulkan.GraphicsPipelineLink":0.03,"Vulkan.Present":57.756,"Vulkan.Present.command_record_scale":19.531,"Vulkan.Present.pixel_upload":26.295,"Vulkan.Present.queue_submit":11.515,"Vulkan.QueuePresent":1601.22,"Vulkan.QueuePresent.queue_present":1599.562,"Vulkan.Retire":2300.634,"Vulkan.Retire.wait":2289.579},"top_phases_ms_per_frame":{"Driver.Packet":51.849,"Driver.Packet.draw":29.789,"Vulkan.DrawFromRecord":24.426,"Graphics.DrawWithRecord":24.032,"Graphics.DrawWithRecord.draw_and_resource_release":22.534,"Graphics.Draw":22.445,"Graphics.Draw.draw_and_resource_release":19.379,"Driver.DrawFinish":15.926},"owned_draw_counts":{},"graphics_track":{"Graphics.Barrier.copy":8976,"Graphics.Barrier.dcc-clear":11184,"Graphics.Barrier.dcc-keys":7456,"Graphics.Barrier.dispatch-lead":26903,"Graphics.Barrier.dispatch-trail":66395,"Graphics.Barrier.draw":476881,"Graphics.Barrier.fill":11241,"Graphics.Barrier.fill-clear":1864,"Graphics.Barrier.indirect-args":6524,"Graphics.Barrier.label-run":377734,"Graphics.Barrier.present-blit":3728,"Graphics.Barrier.shadow-publish":1904,"Graphics.Barrier.staging-in":58525,"Graphics.Barrier.staging-out":27185,"Graphics.Barrier.storage-upload":35861,"Graphics.Barrier.storage-writeback":110736,"Graphics.BarrierMerged.dispatch-lead":52540,"Graphics.BarrierMerged.fill":5591,"Graphics.BarrierMerged.label-run":1079,"Graphics.BarrierMerged.shadow-publish":1904,"Graphics.BarrierMerged.staging-in":23030,"Graphics.BarrierMerged.staging-out":27185,"Graphics.BarrierMerged.storage-writeback":16871,"Graphics.Copy":119522,"Graphics.Copy.bytes":21843198472,"Graphics.RenderPass":209831,"Graphics.RenderPass.Close.command":70201,"Graphics.RenderPass.Close.image":82299,"Graphics.RenderPass.Close.key":14602,"Graphics.RenderPass.Close.label":1079,"Graphics.RenderPass.Close.new-batch":41647,"Graphics.RenderPass.Continued":2802438},"trace_dropped":false,"trace":"aps5-trace-ff4fc7af5d65-33268.json.gz"}
trace_digest: main 14deacc

seconds 240:60 from present 4369: 836 presents, frame p50 71.3 / p90 75.6 / p99 90.2 / max 116.6 ms, GPU busy 25.8 ms per present
AMD Radeon RX 7900 XTX, AMD proprietary driver 26.10.1 (LLPC), Windows 10.0.26300, 3840x2160, commit 14deacc, dropped: no

{"commit":"14deacc1f35b","dirty":false,"env":{"APS5_BUFFER_BLOB_APPEND":"1","APS5_DIRECT_BUFFERS":"1","APS5_DIRECT_DRAWS":"1","APS5_DIRECT_INPUTS":"1","APS5_DIRECT_PASS_TARGETS":"1","APS5_DIRECT_RETRY":"1","APS5_DRAW_PIPELINE":"1","APS5_FAST_SETTLE":"1","APS5_IMPORT_SNAPSHOTS":"1","APS5_INVOCATION_SLOTS_WIDE":"1","APS5_LEAN_FRONT":"1","APS5_LEAN_LIST_DIRECT":"1","APS5_LEAN_PREPARE":"1","APS5_LOG_TIMESTAMPS":"1","APS5_MERGED_SETTLE":"1","APS5_NO_PAD_INPUT":"1","APS5_PAD_INPUT_FILE":"<path>","APS5_PENDING_FRONTS":"1","APS5_PIPELINED_DRAWS":"32","APS5_PIPELINE_DISPATCH":"1","APS5_PRECISE_SETTLE":"1","APS5_PREPARED_CAPACITY":"1","APS5_STAGE_MEMO":"1","APS5_STAGE_MEMO_ADMIT_THIRD":"1","APS5_STAGE_MEMO_FRONT":"1","APS5_TRACE_DIR":"<path>","APS5_TRACE_EVENTS":"4194304","APS5_TRACE_SECONDS":"240:60","APS5_TRACE_SUMMARY_EVERY":"10","APS5_UNLOCKED_STAMPS":"1","APS5_WRITE_SNAPSHOT_FRONTS":"1"},"gpu":"AMD Radeon RX 7900 XTX","driver":"AMD proprietary driver 26.10.1 (LLPC)","os":"Windows 10.0.26300","cpu":"AMD Ryzen 7 7800X3D 8-Core Processor","cpu_threads":16,"memory_mib":31860,"title_id":"PPSA04264","title":"<withheld>","content_version":"01.011.001","resolution":"3840x2160","window":{"spec":"seconds 240:60","first_present":4369,"ms":60073.459},"presents":836,"frame_ms":{"p50":71.264,"p90":75.599,"p99":90.151,"max":116.637},"gpu_busy_ms_per_present":25.763,"worker_busy_pct":{"queue worker 0x0":92.721},"phase_totals_ms":{"Driver.Completion":0.432,"Driver.Dispatch":7841.558,"Driver.Dispatch.capture_resources":250.211,"Driver.Dispatch.decode_key_device_setup":93.788,"Driver.Dispatch.lookup_cache":2557.055,"Driver.Dispatch.materialize":42.542,"Driver.Dispatch.prepared_invocation":125.353,"Driver.Draw":34926.338,"Driver.Draw.device_setup":1747.295,"Driver.Draw.draw_enqueued":59.62,"Driver.Draw.draw_handed_off":8001.622,"Driver.Draw.post_compile_prepare":4.834,"Driver.Draw.prepare":24693.362,"Driver.Draw.shader_compile_and_link":211.371,"Driver.DrawFinish":30910.16,"Driver.DrawFinish.draw_enqueued":14226.096,"Driver.DrawFinish.post_compile_prepare":384.435,"Driver.DrawFinish.shader_compile_and_link":16054.221,"Driver.EndSubmission":669.278,"Driver.Packet":52621.407,"Driver.Packet.device_lock":511.252,"Driver.Packet.dispatch":7867.921,"Driver.Packet.draw":35325.375,"Driver.Packet.execute":3241.409,"Driver.Packet.flip_flush":23.569,"Driver.Packet.flush_between_packets":1154.627,"Driver.Packet.memory_wait":16.021,"Driver.Packet.pipeline_drain":994.137,"Driver.Packet.pipeline_prepare":704.146,"Driver.Packet.prepare_memory":647.43,"Driver.Packet.rendering_wait":0.517,"Driver.Present":4520.401,"Driver.Present.acquire_image":1340.821,"Driver.Present.device_setup":0.351,"Driver.Present.gpu_mutex_wait":18.823,"Driver.Present.inflight_wait":1.816,"Driver.Present.present_display_buffer":85.879,"Driver.Present.queue_present":1390.445,"Driver.Present.release_and_callback":1.171,"Driver.Present.render_fence_wait":1679.187,"Driver.Present.resize":1.202,"Driver.Present.validate":0.244,"Driver.Rewind":2409.196,"Driver.Suspend":0.177,"GpuMutex.wait.dispatch":6.638,"GpuMutex.wait.draw":97.698,"GpuMutex.wait.end":3.343,"GpuMutex.wait.fill":1.486,"GpuMutex.wait.flush":7.927,"GpuMutex.wait.hook":0.01,"GpuMutex.wait.label":18.466,"GpuMutex.wait.other":3.358,"GpuMutex.wait.present":16.872,"Graphics.Draw":36548.666,"Graphics.Draw.draw_and_resource_release":31631.075,"Graphics.Draw.index_upload":1462.507,"Graphics.Draw.validate":1443.778,"Graphics.Draw.vertex_upload":1603.033,"Graphics.DrawWithRecipe":6539.02,"Graphics.DrawWithRecipe.draw_and_resource_release":5840.408,"Graphics.DrawWithRecipe.index_upload":206.14,"Graphics.DrawWithRecipe.validate":129.804,"Graphics.DrawWithRecipe.vertex_upload":308.962,"Recorder.Reap":943.151,"Recorder.Submit":2629.763,"Recorder.Sync":1336.804,"Recorder.WaitSerial":870.674,"Resources.Complete":292.8,"Resources.Prepare":380.295,"Shader.DrawStage":14447.142,"Shader.DrawStage.capture_resources":7185.491,"Shader.DrawStage.materialize":4634.935,"Shader.DrawStage.prepared_invocation":2439.416,"Shader.ResolveGraphicsStagesAbi":15.538,"VideoOut.Flip":4625.417,"VideoOut.Flip.completion_mutex_wait":1.051,"VideoOut.Flip.config_mutex_wait":0.081,"VideoOut.Flip.frame_limit":0.365,"VideoOut.Flip.notify_game":22.89,"VideoOut.Flip.present":4523.973,"VideoOut.Flip.validate":0.833,"VideoOut.Flip.vblank_wait":0.525,"VideoOut.Flip.window_prepare":1.101,"VideoOut.Flip.window_title":74.017,"VideoOut.Readiness":1.51,"VideoOut.Readiness.locks_validate":0.669,"Vulkan.Acquire":1339.995,"Vulkan.Acquire.acquire_fence_wait":1269.195,"Vulkan.Acquire.acquire_image":67.612,"Vulkan.Acquire.fence_reset":1.599,"Vulkan.Acquire.retired_swapchains":1.206,"Vulkan.Dispatch":823.791,"Vulkan.Dispatch.command_record":222.6,"Vulkan.Dispatch.shader_resources":591.088,"Vulkan.DispatchRecipe":287.259,"Vulkan.DispatchRecipe.command_record":284.877,"Vulkan.DrawFromRecipe":6628.971,"Vulkan.Present":43.334,"Vulkan.Present.command_record_scale":17.822,"Vulkan.Present.pixel_upload":12.591,"Vulkan.Present.queue_submit":12.572,"Vulkan.QueuePresent":1389.154,"Vulkan.QueuePresent.queue_present":1387.783,"Vulkan.Retire":1678.861,"Vulkan.Retire.wait":1669.994},"top_phases_ms_per_frame":{"Driver.Packet":62.944,"Graphics.Draw":43.718,"Driver.Packet.draw":42.255,"Driver.Draw":41.778,"Graphics.Draw.draw_and_resource_release":37.836,"Driver.DrawFinish":36.974,"Driver.Draw.prepare":29.538,"Driver.DrawFinish.shader_compile_and_link":19.204},"owned_draw_counts":{},"graphics_track":{"Graphics.Barrier.copy":8247,"Graphics.Barrier.dcc-clear":8360,"Graphics.Barrier.dcc-keys":6688,"Graphics.Barrier.dispatch-lead":23999,"Graphics.Barrier.dispatch-trail":59767,"Graphics.Barrier.draw":424733,"Graphics.Barrier.fill":10064,"Graphics.Barrier.fill-clear":1672,"Graphics.Barrier.indirect-args":5852,"Graphics.Barrier.label-run":339681,"Graphics.Barrier.present-blit":3344,"Graphics.Barrier.shadow-publish":1704,"Graphics.Barrier.staging-in":52478,"Graphics.Barrier.staging-out":24483,"Graphics.Barrier.storage-upload":30568,"Graphics.Barrier.storage-writeback":100111,"Graphics.BarrierMerged.dispatch-lead":47472,"Graphics.BarrierMerged.fill":5016,"Graphics.BarrierMerged.label-run":970,"Graphics.BarrierMerged.shadow-publish":1704,"Graphics.BarrierMerged.staging-in":20971,"Graphics.BarrierMerged.staging-out":24483,"Graphics.BarrierMerged.storage-writeback":15061,"Graphics.Copy":107418,"Graphics.Copy.bytes":19656045192,"Graphics.RenderPass":186738,"Graphics.RenderPass.Close.command":62434,"Graphics.RenderPass.Close.image":73598,"Graphics.RenderPass.Close.key":13113,"Graphics.RenderPass.Close.label":970,"Graphics.RenderPass.Close.new-batch":36621,"Graphics.RenderPass.Continued":2503949},"trace_dropped":false,"trace":"aps5-trace-14deacc1f35b-61008.json.gz"}

Slowest frames (largest slices inside each, inclusive)

  • present 5169: 116.6 ms at 57351 ms: Driver.Packet (queue worker 0x0) 68.8, Driver.Packet.draw (queue worker 0x0) 54.8, Driver.Draw (queue worker 0x0) 54.5, Driver.DrawFinish (draw finisher) 51.5
  • present 5173: 113.4 ms at 57693 ms: Driver.Packet (queue worker 0x0) 67.9, Driver.Packet.draw (queue worker 0x0) 54.5, Driver.Draw (queue worker 0x0) 54.3, Driver.DrawFinish (draw finisher) 53.9
  • present 5084: 109.1 ms at 51054 ms: Driver.Packet (queue worker 0x0) 67.4, Driver.Packet.draw (queue worker 0x0) 52.3, Driver.Draw (queue worker 0x0) 52.1, Driver.DrawFinish (draw finisher) 51.4
  • present 5088: 108.0 ms at 51382 ms: Driver.Packet (queue worker 0x0) 64.4, Driver.Packet.draw (queue worker 0x0) 52.3, Driver.Draw (queue worker 0x0) 52.0, Driver.DrawFinish (draw finisher) 51.2
  • present 4827: 97.0 ms at 32494 ms: Driver.Packet (queue worker 0x0) 52.3, Driver.Packet.draw (queue worker 0x0) 38.9, Driver.Draw (queue worker 0x0) 38.7, Driver.DrawFinish (draw finisher) 37.7

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

  • present 5169: 116.6 ms at 57351 ms, persistence 52.2 ms
  • present 5173: 113.4 ms at 57693 ms, persistence 42.1 ms
  • present 5084: 109.1 ms at 51054 ms, persistence 40.3 ms
  • present 5088: 108.0 ms at 51382 ms, persistence 36.9 ms
  • present 4595: 95.2 ms at 16197 ms, persistence 30.8 ms
  • present 4827: 97.0 ms at 32494 ms, persistence 30.2 ms
  • present 4898: 95.8 ms at 37740 ms, persistence 28.5 ms
  • present 5097: 91.0 ms at 52061 ms, persistence 21.8 ms
  • present 5110: 90.2 ms at 53029 ms, persistence 20.1 ms
  • present 4503: 85.8 ms at 9593 ms, persistence 18.9 ms

Threads (ms per frame)

thread busy wait untraced in slices < 20 us largest
title 0.0 (0 %) 0.0 (0 %) 71.9 0.0 Shader.ResolveGraphicsStagesAbi 0.0
queue worker 0x0 31.3 (44 %) 0.9 (1 %) 39.6 126.0 Driver.Packet 28.9, Driver.Rewind 2.7
draw finisher 15.4 (21 %) 0.0 (0 %) 56.4 79.9 Driver.DrawFinish 15.4
draw committer 33.4 (46 %) 0.3 (0 %) 38.2 51.2 Graphics.Draw 25.9, Vulkan.DrawFromRecipe 4.3
title 0.0 (0 %) 0.0 (0 %) 71.9 0.0
presenter 2.0 (3 %) 3.5 (5 %) 66.3 0.1 VideoOut.Flip 5.5
gpu 25.8 (36 %) 0.0 (0 %) 46.1 0.0 batch 25.8

Largest slices (ms per frame, inclusive, all threads): Driver.Packet 28.9, Graphics.Draw 25.9, batch 25.8, Graphics.Draw.draw_and_resource_release 22.6, Driver.Packet.draw 16.3, Driver.Draw 16.0, Driver.DrawFinish 15.4, Driver.Draw.prepare 10.7, Driver.Packet.dispatch 9.1, Driver.Dispatch 9.1

Longest waits

  • GpuMutex.wait.draw (draw committer) 3.9 ms at 16202 ms, present 4595
  • Driver.Present.render_fence_wait (presenter) 3.8 ms at 32002 ms, present 4820
  • Driver.Present.render_fence_wait (presenter) 3.8 ms at 57811 ms, present 5174
  • Driver.Present.render_fence_wait (presenter) 3.5 ms at 30892 ms, present 4804
  • Driver.Present.render_fence_wait (presenter) 3.5 ms at 25867 ms, present 4732
  • Driver.Present.render_fence_wait (presenter) 3.4 ms at 4075 ms, present 4426
  • Driver.Present.render_fence_wait (presenter) 3.4 ms at 25730 ms, present 4730
  • Driver.Present.render_fence_wait (presenter) 3.4 ms at 29920 ms, present 4790
  • Driver.Present.render_fence_wait (presenter) 3.3 ms at 10561 ms, present 4516
  • Driver.Present.render_fence_wait (presenter) 3.3 ms at 21961 ms, present 4676

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

  • batch 334557: 4.6 ms at 52154 ms, present 5098: GPU no ranges; recorded by Graphics.Draw (draw committer) 0.4, Graphics.Draw.draw_and_resource_release (draw committer) 0.4, Recorder.Submit (draw committer) 0.0
  • batch 303171: 4.5 ms at 30126 ms, present 4792: GPU no ranges; recorded by Graphics.Draw (draw committer) 0.3, Graphics.Draw.draw_and_resource_release (draw committer) 0.2, Recorder.Submit (draw committer) 0.0
  • batch 293759: 4.5 ms at 23702 ms, present 4701: GPU no ranges; recorded by Graphics.Draw (draw committer) 0.3, Graphics.Draw.draw_and_resource_release (draw committer) 0.2, Recorder.Submit (draw committer) 0.0
  • batch 287535: 4.5 ms at 19435 ms, present 4639: GPU no ranges; recorded by Graphics.Draw (draw committer) 0.3, Graphics.Draw.draw_and_resource_release (draw committer) 0.2, Recorder.Submit (draw committer) 0.0
  • batch 299161: 4.3 ms at 27394 ms, present 4754: GPU no ranges; recorded by Graphics.Draw (draw committer) 0.3, Graphics.Draw.draw_and_resource_release (draw committer) 0.3, Recorder.Submit (draw committer) 0.1
trace_digest: this PR ff4fc7a

seconds 240:60 from present 4692: 932 presents, frame p50 64.1 / p90 67.9 / p99 80.5 / max 124.0 ms, GPU busy 24.6 ms per present
AMD Radeon RX 7900 XTX, AMD proprietary driver 26.10.1 (LLPC), Windows 10.0.26300, 3840x2160, commit ff4fc7a, dropped: no

{"commit":"ff4fc7af5d65","dirty":false,"env":{"APS5_BUFFER_BLOB_APPEND":"1","APS5_DIRECT_BUFFERS":"1","APS5_DIRECT_DRAWS":"1","APS5_DIRECT_INPUTS":"1","APS5_DIRECT_PASS_TARGETS":"1","APS5_DIRECT_RETRY":"1","APS5_DRAW_PIPELINE":"1","APS5_FAST_SETTLE":"1","APS5_IMPORT_SNAPSHOTS":"1","APS5_INVOCATION_SLOTS_WIDE":"1","APS5_LEAN_FRONT":"1","APS5_LEAN_LIST_DIRECT":"1","APS5_LEAN_PREPARE":"1","APS5_LOG_TIMESTAMPS":"1","APS5_MERGED_SETTLE":"1","APS5_NO_PAD_INPUT":"1","APS5_PAD_INPUT_FILE":"<path>","APS5_PENDING_FRONTS":"1","APS5_PIPELINED_DRAWS":"32","APS5_PIPELINE_DISPATCH":"1","APS5_PRECISE_SETTLE":"1","APS5_PREPARED_CAPACITY":"1","APS5_STAGE_MEMO":"1","APS5_STAGE_MEMO_ADMIT_THIRD":"1","APS5_STAGE_MEMO_FRONT":"1","APS5_TRACE_DIR":"<path>","APS5_TRACE_EVENTS":"4194304","APS5_TRACE_SECONDS":"240:60","APS5_TRACE_SUMMARY_EVERY":"10","APS5_UNLOCKED_STAMPS":"1","APS5_WRITE_SNAPSHOT_FRONTS":"1"},"gpu":"AMD Radeon RX 7900 XTX","driver":"AMD proprietary driver 26.10.1 (LLPC)","os":"Windows 10.0.26300","cpu":"AMD Ryzen 7 7800X3D 8-Core Processor","cpu_threads":16,"memory_mib":31860,"title_id":"PPSA04264","title":"<withheld>","content_version":"01.011.001","resolution":"3840x2160","window":{"spec":"seconds 240:60","first_present":4692,"ms":60063.237},"presents":932,"frame_ms":{"p50":64.095,"p90":67.91,"p99":80.515,"max":123.999},"gpu_busy_ms_per_present":24.636,"worker_busy_pct":{"queue worker 0x0":84.085},"phase_totals_ms":{"Driver.Completion":0.332,"Driver.Dispatch":8520.644,"Driver.Dispatch.capture_resources":282.87,"Driver.Dispatch.decode_key_device_setup":110.127,"Driver.Dispatch.lookup_cache":2588.623,"Driver.Dispatch.materialize":50.286,"Driver.Dispatch.prepared_invocation":189.728,"Driver.Draw":12886.831,"Driver.Draw.device_setup":676.318,"Driver.Draw.draw_enqueued":54.436,"Driver.Draw.draw_handed_off":2816.913,"Driver.Draw.post_compile_prepare":5.68,"Driver.Draw.prepare":8960.789,"Driver.Draw.shader_compile_and_link":278.499,"Driver.DrawFinish":14843.285,"Driver.DrawFinish.draw_enqueued":5564.403,"Driver.DrawFinish.post_compile_prepare":181.223,"Driver.DrawFinish.shader_compile_and_link":8990.395,"Driver.EndSubmission":579.849,"Driver.Packet":48323.313,"Driver.Packet.device_lock":567.237,"Driver.Packet.dispatch":8552.936,"Driver.Packet.draw":27763.136,"Driver.Packet.execute":4965.324,"Driver.Packet.flip_flush":26.456,"Driver.Packet.flush_between_packets":1143.981,"Driver.Packet.memory_wait":15.631,"Driver.Packet.pipeline_drain":1302.364,"Driver.Packet.pipeline_prepare":519.178,"Driver.Packet.prepare_memory":508.208,"Driver.Packet.rendering_wait":0.716,"Driver.Present":5733.255,"Driver.Present.acquire_image":1695.858,"Driver.Present.device_setup":0.362,"Driver.Present.gpu_mutex_wait":20.854,"Driver.Present.inflight_wait":1.967,"Driver.Present.present_display_buffer":106.692,"Driver.Present.queue_present":1602.88,"Driver.Present.release_and_callback":1.297,"Driver.Present.render_fence_wait":2301.147,"Driver.Present.resize":1.349,"Driver.Present.validate":0.29,"Driver.Rewind":1600.347,"Driver.Suspend":0.168,"GpuMutex.wait.dispatch":5.88,"GpuMutex.wait.draw":166.261,"GpuMutex.wait.end":1.473,"GpuMutex.wait.fill":2.231,"GpuMutex.wait.flush":8.21,"GpuMutex.wait.label":18.137,"GpuMutex.wait.other":3.126,"GpuMutex.wait.present":18.61,"Graphics.Draw":20918.888,"Graphics.Draw.draw_and_resource_release":18060.849,"Graphics.Draw.index_upload":798.763,"Graphics.Draw.validate":926.659,"Graphics.Draw.vertex_upload":898.997,"Graphics.DrawWithRecipe":96.827,"Graphics.DrawWithRecipe.draw_and_resource_release":87.5,"Graphics.DrawWithRecipe.index_upload":1.853,"Graphics.DrawWithRecipe.validate":1.909,"Graphics.DrawWithRecipe.vertex_upload":4.304,"Graphics.DrawWithRecord":22398.211,"Graphics.DrawWithRecord.draw_and_resource_release":21001.327,"Graphics.DrawWithRecord.index_upload":309.137,"Graphics.DrawWithRecord.validate":328.685,"Graphics.DrawWithRecord.vertex_upload":417.357,"Recorder.Reap":1019.838,"Recorder.Submit":2870.963,"Recorder.Sync":1249.476,"Recorder.WaitSerial":934.56,"Resources.Complete":331.445,"Resources.Prepare":430.459,"Shader.DrawStage":8637.394,"Shader.DrawStage.capture_resources":4851.742,"Shader.DrawStage.materialize":2286.657,"Shader.DrawStage.prepared_invocation":1387.202,"Shader.ResolveGraphicsStagesAbi":16.848,"VideoOut.Flip":5852.295,"VideoOut.Flip.completion_mutex_wait":1.324,"VideoOut.Flip.config_mutex_wait":0.096,"VideoOut.Flip.frame_limit":0.355,"VideoOut.Flip.notify_game":23.216,"VideoOut.Flip.present":5737.114,"VideoOut.Flip.validate":0.907,"VideoOut.Flip.vblank_wait":0.616,"VideoOut.Flip.window_prepare":1.28,"VideoOut.Flip.window_title":86.609,"VideoOut.Readiness":1.684,"VideoOut.Readiness.locks_validate":0.789,"Vulkan.Acquire":1694.995,"Vulkan.Acquire.acquire_fence_wait":1615.16,"Vulkan.Acquire.acquire_image":76.264,"Vulkan.Acquire.fence_reset":1.7,"Vulkan.Acquire.retired_swapchains":1.468,"Vulkan.Dispatch":939.415,"Vulkan.Dispatch.command_record":254.106,"Vulkan.Dispatch.shader_resources":674.503,"Vulkan.DispatchRecipe":320.606,"Vulkan.DispatchRecipe.command_record":318.146,"Vulkan.DrawFromRecipe":98.523,"Vulkan.DrawFromRecord":22765.059,"Vulkan.GraphicsPipeline":0.361,"Vulkan.GraphicsPipeline.create":0.158,"Vulkan.GraphicsPipeline.modules_and_state":0.202,"Vulkan.GraphicsPipelineLibrary":0.106,"Vulkan.GraphicsPipelineLink":0.03,"Vulkan.Present":57.756,"Vulkan.Present.command_record_scale":19.531,"Vulkan.Present.pixel_upload":26.295,"Vulkan.Present.queue_submit":11.515,"Vulkan.QueuePresent":1601.22,"Vulkan.QueuePresent.queue_present":1599.562,"Vulkan.Retire":2300.634,"Vulkan.Retire.wait":2289.579},"top_phases_ms_per_frame":{"Driver.Packet":51.849,"Driver.Packet.draw":29.789,"Vulkan.DrawFromRecord":24.426,"Graphics.DrawWithRecord":24.032,"Graphics.DrawWithRecord.draw_and_resource_release":22.534,"Graphics.Draw":22.445,"Graphics.Draw.draw_and_resource_release":19.379,"Driver.DrawFinish":15.926},"owned_draw_counts":{},"graphics_track":{"Graphics.Barrier.copy":8976,"Graphics.Barrier.dcc-clear":11184,"Graphics.Barrier.dcc-keys":7456,"Graphics.Barrier.dispatch-lead":26903,"Graphics.Barrier.dispatch-trail":66395,"Graphics.Barrier.draw":476881,"Graphics.Barrier.fill":11241,"Graphics.Barrier.fill-clear":1864,"Graphics.Barrier.indirect-args":6524,"Graphics.Barrier.label-run":377734,"Graphics.Barrier.present-blit":3728,"Graphics.Barrier.shadow-publish":1904,"Graphics.Barrier.staging-in":58525,"Graphics.Barrier.staging-out":27185,"Graphics.Barrier.storage-upload":35861,"Graphics.Barrier.storage-writeback":110736,"Graphics.BarrierMerged.dispatch-lead":52540,"Graphics.BarrierMerged.fill":5591,"Graphics.BarrierMerged.label-run":1079,"Graphics.BarrierMerged.shadow-publish":1904,"Graphics.BarrierMerged.staging-in":23030,"Graphics.BarrierMerged.staging-out":27185,"Graphics.BarrierMerged.storage-writeback":16871,"Graphics.Copy":119522,"Graphics.Copy.bytes":21843198472,"Graphics.RenderPass":209831,"Graphics.RenderPass.Close.command":70201,"Graphics.RenderPass.Close.image":82299,"Graphics.RenderPass.Close.key":14602,"Graphics.RenderPass.Close.label":1079,"Graphics.RenderPass.Close.new-batch":41647,"Graphics.RenderPass.Continued":2802438},"trace_dropped":false,"trace":"aps5-trace-ff4fc7af5d65-33268.json.gz"}

Slowest frames (largest slices inside each, inclusive)

  • present 5579: 124.0 ms at 57067 ms: Driver.Packet (queue worker 0x0) 87.4, Driver.Packet.draw (queue worker 0x0) 73.6, batch (gpu) 27.9, Graphics.Draw (draw committer) 17.1
  • present 5575: 105.3 ms at 56758 ms: Driver.Packet (queue worker 0x0) 66.0, Driver.Packet.draw (queue worker 0x0) 50.7, batch (gpu) 25.5, Vulkan.DrawFromRecord (draw committer) 17.0
  • present 4701: 85.5 ms at 584 ms: Driver.Packet (queue worker 0x0) 48.1, Driver.Packet.draw (queue worker 0x0) 35.1, batch (gpu) 23.9, Vulkan.DrawFromRecord (draw committer) 22.6
  • present 5259: 84.8 ms at 36261 ms: Driver.Packet (queue worker 0x0) 50.6, Driver.Packet.draw (queue worker 0x0) 36.9, batch (gpu) 24.3, Vulkan.DrawFromRecord (draw committer) 20.8
  • present 5322: 84.7 ms at 40299 ms: Driver.Packet (queue worker 0x0) 35.3, batch (gpu) 25.2, Graphics.Draw (draw committer) 23.7, Graphics.Draw.draw_and_resource_release (draw committer) 22.2

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

  • present 5579: 124.0 ms at 57067 ms, persistence 67.4 ms
  • present 5575: 105.3 ms at 56758 ms, persistence 37.9 ms
  • present 4701: 85.5 ms at 584 ms, persistence 28.9 ms
  • present 5259: 84.8 ms at 36261 ms, persistence 27.3 ms
  • present 5322: 84.7 ms at 40299 ms, persistence 26.7 ms
  • present 5173: 81.1 ms at 30719 ms, persistence 23.0 ms
  • present 5387: 81.6 ms at 44511 ms, persistence 22.6 ms
  • present 4985: 79.9 ms at 18675 ms, persistence 22.3 ms
  • present 5530: 80.5 ms at 53752 ms, persistence 22.0 ms
  • present 5558: 80.9 ms at 55624 ms, persistence 21.3 ms

Threads (ms per frame)

thread busy wait untraced in slices < 20 us largest
title 0.0 (0 %) 0.0 (0 %) 64.4 0.0 Shader.ResolveGraphicsStagesAbi 0.0
queue worker 0x0 29.9 (46 %) 0.8 (1 %) 33.7 60.2 Driver.Packet 28.8, Driver.Rewind 1.4
draw committer 31.0 (48 %) 0.4 (1 %) 33.0 50.4 Vulkan.DrawFromRecord 15.0, Graphics.Draw 12.9
draw finisher 7.0 (11 %) 0.0 (0 %) 57.5 36.7 Driver.DrawFinish 7.0
title 0.0 (0 %) 0.0 (0 %) 64.4 0.0
presenter 2.1 (3 %) 4.2 (7 %) 58.2 0.1 VideoOut.Flip 6.3
gpu 24.6 (38 %) 0.0 (0 %) 39.8 0.0 batch 24.6

Largest slices (ms per frame, inclusive, all threads): Driver.Packet 28.8, batch 24.6, Vulkan.DrawFromRecord 15.0, Graphics.DrawWithRecord 14.9, Driver.Packet.draw 14.5, Graphics.DrawWithRecord.draw_and_resource_release 14.1, Graphics.Draw 12.9, Graphics.Draw.draw_and_resource_release 11.0, Driver.Packet.dispatch 8.7, Driver.Dispatch 8.7

Longest waits

  • Driver.Present.render_fence_wait (presenter) 4.6 ms at 43233 ms, present 5367
  • Driver.Present.render_fence_wait (presenter) 4.3 ms at 41247 ms, present 5336
  • Driver.Present.render_fence_wait (presenter) 4.3 ms at 43932 ms, present 5378
  • Driver.Present.render_fence_wait (presenter) 4.2 ms at 40050 ms, present 5318
  • Driver.Present.render_fence_wait (presenter) 4.1 ms at 48754 ms, present 5452
  • Driver.Present.render_fence_wait (presenter) 4.1 ms at 20126 ms, present 5007
  • Driver.Present.render_fence_wait (presenter) 4.0 ms at 54090 ms, present 5535
  • Driver.Present.render_fence_wait (presenter) 4.0 ms at 47906 ms, present 5439
  • Driver.Present.render_fence_wait (presenter) 4.0 ms at 39726 ms, present 5313
  • Driver.Present.render_fence_wait (presenter) 4.0 ms at 2138 ms, present 4726

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

  • batch 371393: 5.2 ms at 50807 ms, present 5483: GPU no ranges; recorded by Vulkan.DrawFromRecord (draw committer) 0.3, Graphics.DrawWithRecord (draw committer) 0.3, Graphics.DrawWithRecord.draw_and_resource_release (draw committer) 0.3, Recorder.Submit (draw committer) 0.1
  • batch 324947: 4.9 ms at 21903 ms, present 5034: GPU no ranges; recorded by Vulkan.DrawFromRecord (draw committer) 0.3, Graphics.DrawWithRecord (draw committer) 0.3, Graphics.DrawWithRecord.draw_and_resource_release (draw committer) 0.3, Recorder.Submit (draw committer) 0.1
  • batch 372533: 4.9 ms at 51523 ms, present 5494: GPU no ranges; recorded by Vulkan.DrawFromRecord (draw committer) 0.3, Graphics.DrawWithRecord (draw committer) 0.3, Graphics.DrawWithRecord.draw_and_resource_release (draw committer) 0.3, Graphics.Draw (draw committer) 0.0
  • batch 367482: 4.8 ms at 48358 ms, present 5445: GPU no ranges; recorded by Vulkan.DrawFromRecord (draw committer) 0.3, Graphics.DrawWithRecord (draw committer) 0.3, Graphics.DrawWithRecord.draw_and_resource_release (draw committer) 0.2, Recorder.Submit (draw committer) 0.0
  • batch 299549: 4.7 ms at 6116 ms, present 4788: GPU no ranges; recorded by Vulkan.DrawFromRecord (draw committer) 0.3, Graphics.DrawWithRecord (draw committer) 0.3, Graphics.DrawWithRecord.draw_and_resource_release (draw committer) 0.2, Recorder.Submit (draw committer) 0.1

Main merged (2026-11-18): main ed1a01d merged as 85c9eed through #22434's merge. Main's #22079 made DrawPipeline::Watch move-only and WrittenSince take it by reference, so the merge commit adapts the direct path's settle helper to it (the watch is emplaced, not assigned). Every target builds, 167 of 170 focused tests pass (agc_driver_target_memo_lean_front as above; the two agc_shader_memory tests did not run here), tools/check_conventions.py passes. A verify boot of 85c9eed with every switch on and every verify mode at 64: 283 s in game at 15.9 FPS, 0 fatal, 0 differing in every verify, and three of the known shared stage differs lines explained above. The A/B and captures above are from ff4fc7a.

Checklist

Nesyth and others added 19 commits November 3, 2026 21:59
Conflict in docs/dev/ENVIRONMENT.md: keep this branch's APS5_VERIFY_DRAW_PIPELINE wording (the pipeline is on unless APS5_NO_DRAW_PIPELINE is set) and add main's APS5_VERIFY_DRAW_PLAN row.
The finisher redo restarts the draw without a draw-cache lookup, so no queued-store miss is counted there; the assertion now applies only when the finisher is off.
# Conflicts:
#	core/libs/prx/libSceAgcDriver/Execution/src/Driver/Draw/Draw.cpp
#	core/libs/prx/libSceAgcDriver/Execution/src/Driver/Draw/DrawPipeline.cpp
#	core/libs/prx/libSceAgcDriver/tests/cmake/agc_driver_draw_recapture_on_change_tests.cmake
#	core/libs/prx/libSceAgcDriver/tests/cmake/agc_driver_draw_unsupported_buffer_type_tests.cmake
#	docs/dev/ARCHITECTURE.md
The recapture test now runs on the default draw finisher again, next to the APS5_NO_DRAW_PIPELINE twin, and the pass attachment memo row names the new opt-out switch.
…and hand draw lookup and vertex decode to the finishers under APS5_LEAN_FRONT
…heir pass targets held and their buffers and inputs prepared there, under APS5_DIRECT_DRAWS
…ed ranges and snapshot and pending fronts, under APS5_PRECISE_SETTLE and APS5_FAST_SETTLE
…exact capacities, an appended buffer blob and wider invocation slots, under APS5_LEAN_PREPARE
…ts, admitted at the third sighting, with a per-thread front, under APS5_STAGE_MEMO
# Conflicts:
#	core/libs/prx/libSceAgcDriver/tests/Pm4.cpp
@github-actions github-actions Bot added build shader core/shader docs agc libSceAgc* and removed needs rebase Conflicts with main, rebase needed labels Nov 18, 2026
@EagleBearerYS

Copy link
Copy Markdown
Contributor

@Nesyth this overlaps with #15941, which marks the depth reads a draw's index and vertex buffers make as reuses: RequireNoMultisampleTarget takes a cause, the two calls in prepareDrawInputs (Graphics/src/Draw.cpp) pass DepthReadCause::Reuse, and a reuse publication of a multisample depth owner takes the guest's undecided bytes instead of throwing.

This was referenced Dec 2, 2026

@ligmaSec ligmaSec left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

The published captures and verify boot are for ff4fc7af5d. The current head ba1819c4c1 also brings in a newer lean front and conflicts with main a9cbd48cb in the draw, submission, and resource preparation paths. Please refresh the validation-enabled comparison for the rebased head and include a same-scene pair of trace digests with the same lean-front and finisher code in both arms. The existing main-to-branch pair includes the lean-front change, so the two-build comparison cannot isolate the direct-draw gain. The in-run switch comparison measures the combined effect of this PR's switches on the earlier branch.

AI-assisted: yes.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agc libSceAgc* build docs needs rebase Conflicts with main, rebase needed perf Performance change shader core/shader

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants