perf(agc): run queue-0 REWIND segments from a validated packet table and hand draw lookup and vertex decode to the finishers under APS5_LEAN_FRONT #22434

Open
Nesyth wants to merge 24 commits from upstream-pr/22434 into main
Nesyth commented 2026-11-17 15:38:59 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by Nesyth on 2026-11-17T15:38:59Z.


What

On main the queue-0 worker binds draw-heavy frames: in the main capture below it is busy 92% of the time (worker_busy_pct) while the draw committer is busy 46%, and its largest item is the per-draw preparation. With this change the worker is busy 79% and the finisher takes the moved work (20% -> 36% busy). APS5_LEAN_FRONT (a runtime switch, off by default, read once per segment so APS5_AB can toggle it within one run) gives that worker a leaner front end on the pipelined draw path:

  • A queue-0 submission and the REWIND tails it chains run in a loop from a packet table validated once per segment, instead of nesting each tail inside the previous one. Released tails are kept as one copy each and their register lists are read into flat arrays (RegisterLists), with a cache for static lists; APS5_LEAN_LIST_DIRECT reads every list of a tail directly instead.
  • Draws of a lean segment go to the draw finisher as plain jobs through a lock-free ring; the draw cache lookup and the vertex decode run on the finisher instead of the worker. The finisher retires a slot's job before the slot is reused.
  • Everything execute() does per packet happens in the lean loop as well: flips and flip readying, indirect segments, read points, wait epochs with store ordering, label flushes on the same deadlines, predication, and draws whose compile is pending.
  • APS5_VERIFY_LEAN_FRONT=N runs every N-th item of each kind (segments' switch reads, REWIND tails, register lists, draw jobs) through today's path, which is what executes, and compares the lean answer with it.

With the switch unset nothing changes. It needs the draw finisher, so this PR sits on #15456.

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 02f1afce80: main 14deacc1f3 merged into #15456's head, plus this change.

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.

In-run A/B (APS5_AB=30:APS5_LEAN_FRONT+APS5_LEAN_LIST_DIRECT, 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 +13.91 +- 0.90 presents per 10 s (+11.1%, 5 pairs, the first pair left out: the scene settles).

phase presents per 10 s
A 0 123.20
B 1 135.42
A 2 123.51
B 3 139.13
A 4 123.80
B 5 141.19
A 6 127.22
B 7 139.52
A 8 125.84
B 9 140.37
A 10 125.84
B 11 137.87
A 12 128.17

Captures, main and this PR one after the other in the same session (main at 16:14, this PR at 16:22), the log not redirected, APS5_TRACE_SECONDS=240:60, both with APS5_LEAN_FRONT=1 APS5_LEAN_LIST_DIRECT=1 (main does not read 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 14deacc1f3 13.52 over 295 s 814 73.4 / 77.7 / 85.4 25.8
this PR (02f1afce80) 14.65 over 292 s 879 67.7 / 71.5 / 80.1 24.6

+8.4% FPS between the captures. 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, APS5_VERIFY_LEAN_FRONT=64: every 64th item checked against today's path over 226 s in game (14.68 FPS with the checks on): 5485 segments, 1188802 packets, 213754 draws compared, 0 differences, 0 fatal errors. Register lists were read directly (APS5_LEAN_LIST_DIRECT), so none came from the list cache.

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_DRAW_PIPELINE":"1","APS5_LEAN_FRONT":"1","APS5_LEAN_LIST_DIRECT":"1","APS5_LOG_TIMESTAMPS":"1","APS5_NO_PAD_INPUT":"1","APS5_PAD_INPUT_FILE":"<path>","APS5_PIPELINED_DRAWS":"32","APS5_PIPELINE_DISPATCH":"1","APS5_TRACE_DIR":"<path>","APS5_TRACE_EVENTS":"4194304","APS5_TRACE_SECONDS":"240:60","APS5_TRACE_SUMMARY_EVERY":"10"},"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":4373,"ms":60060.511},"presents":814,"frame_ms":{"p50":73.397,"p90":77.661,"p99":85.445,"max":115.45},"gpu_busy_ms_per_present":25.843,"worker_busy_pct":{"queue worker 0x0":92.107},"phase_totals_ms":{"Driver.Completion":0.488,"Driver.Dispatch":7698.703,"Driver.Dispatch.capture_resources":270.594,"Driver.Dispatch.decode_key_device_setup":102.95,"Driver.Dispatch.lookup_cache":2377.237,"Driver.Dispatch.materialize":48.74,"Driver.Dispatch.prepared_invocation":174.556,"Driver.Draw":34223.412,"Driver.Draw.device_setup":1934.811,"Driver.Draw.draw_enqueued":69.54,"Driver.Draw.draw_handed_off":8640.407,"Driver.Draw.post_compile_prepare":5.172,"Driver.Draw.prepare":23122.066,"Driver.Draw.shader_compile_and_link":228.018,"Driver.DrawFinish":29672.51,"Driver.DrawFinish.draw_enqueued":13632.513,"Driver.DrawFinish.post_compile_prepare":375.503,"Driver.DrawFinish.shader_compile_and_link":15423.129,"Driver.EndSubmission":456.982,"Driver.Packet":52223.804,"Driver.Packet.device_lock":520.289,"Driver.Packet.dispatch":7728.151,"Driver.Packet.draw":34645.0,"Driver.Packet.execute":3260.931,"Driver.Packet.flip_flush":22.978,"Driver.Packet.flush_between_packets":1277.448,"Driver.Packet.memory_wait":16.343,"Driver.Packet.pipeline_drain":1063.016,"Driver.Packet.pipeline_prepare":757.494,"Driver.Packet.prepare_memory":700.34,"Driver.Packet.rendering_wait":0.637,"Driver.Present":4439.479,"Driver.Present.acquire_image":1538.355,"Driver.Present.device_setup":0.442,"Driver.Present.gpu_mutex_wait":19.448,"Driver.Present.inflight_wait":1.732,"Driver.Present.present_display_buffer":99.436,"Driver.Present.queue_present":1428.575,"Driver.Present.release_and_callback":1.105,"Driver.Present.render_fence_wait":1348.445,"Driver.Present.resize":1.27,"Driver.Present.validate":0.201,"Driver.Rewind":2638.361,"Driver.Suspend":0.202,"GpuMutex.wait.dispatch":6.176,"GpuMutex.wait.draw":120.463,"GpuMutex.wait.end":4.314,"GpuMutex.wait.fill":1.625,"GpuMutex.wait.flush":12.27,"GpuMutex.wait.hook":0.138,"GpuMutex.wait.label":26.302,"GpuMutex.wait.other":6.529,"GpuMutex.wait.present":17.301,"Graphics.Draw":34866.323,"Graphics.Draw.draw_and_resource_release":30173.326,"Graphics.Draw.index_upload":1395.718,"Graphics.Draw.validate":1357.534,"Graphics.Draw.vertex_upload":1531.176,"Graphics.DrawWithRecipe":7340.014,"Graphics.DrawWithRecipe.draw_and_resource_release":6556.533,"Graphics.DrawWithRecipe.index_upload":230.962,"Graphics.DrawWithRecipe.validate":147.214,"Graphics.DrawWithRecipe.vertex_upload":345.031,"Recorder.Reap":947.271,"Recorder.Submit":2585.966,"Recorder.Sync":1159.637,"Recorder.WaitSerial":871.191,"Resources.Complete":297.288,"Resources.Prepare":384.888,"Shader.DrawStage":13890.125,"Shader.DrawStage.capture_resources":6959.556,"Shader.DrawStage.materialize":4482.554,"Shader.DrawStage.prepared_invocation":2253.335,"Shader.ResolveGraphicsStagesAbi":15.321,"VideoOut.Flip":4556.56,"VideoOut.Flip.completion_mutex_wait":1.154,"VideoOut.Flip.config_mutex_wait":0.108,"VideoOut.Flip.frame_limit":0.386,"VideoOut.Flip.notify_game":26.531,"VideoOut.Flip.present":4443.502,"VideoOut.Flip.validate":0.799,"VideoOut.Flip.vblank_wait":0.554,"VideoOut.Flip.window_prepare":1.334,"VideoOut.Flip.window_title":81.547,"VideoOut.Readiness":1.507,"VideoOut.Readiness.locks_validate":0.658,"Vulkan.Acquire":1537.428,"Vulkan.Acquire.acquire_fence_wait":1460.814,"Vulkan.Acquire.acquire_image":73.332,"Vulkan.Acquire.fence_reset":1.587,"Vulkan.Acquire.retired_swapchains":1.307,"Vulkan.Dispatch":879.563,"Vulkan.Dispatch.command_record":242.658,"Vulkan.Dispatch.shader_resources":624.963,"Vulkan.DispatchRecipe":284.441,"Vulkan.DispatchRecipe.command_record":282.105,"Vulkan.DrawFromRecipe":7442.816,"Vulkan.Present":48.754,"Vulkan.Present.command_record_scale":19.454,"Vulkan.Present.pixel_upload":15.712,"Vulkan.Present.queue_submit":13.125,"Vulkan.QueuePresent":1427.068,"Vulkan.QueuePresent.queue_present":1425.714,"Vulkan.Retire":1347.805,"Vulkan.Retire.wait":1337.054},"top_phases_ms_per_frame":{"Driver.Packet":64.157,"Graphics.Draw":42.833,"Driver.Packet.draw":42.561,"Driver.Draw":42.044,"Graphics.Draw.draw_and_resource_release":37.068,"Driver.DrawFinish":36.453,"Driver.Draw.prepare":28.405,"Driver.DrawFinish.shader_compile_and_link":18.947},"owned_draw_counts":{},"graphics_track":{"Graphics.Barrier.copy":8337,"Graphics.Barrier.dcc-clear":9768,"Graphics.Barrier.dcc-keys":6512,"Graphics.Barrier.dispatch-lead":23491,"Graphics.Barrier.dispatch-trail":58561,"Graphics.Barrier.draw":414647,"Graphics.Barrier.fill":9816,"Graphics.Barrier.fill-clear":1628,"Graphics.Barrier.indirect-args":5698,"Graphics.Barrier.label-run":331231,"Graphics.Barrier.present-blit":3256,"Graphics.Barrier.shadow-publish":1674,"Graphics.Barrier.staging-in":51079,"Graphics.Barrier.staging-out":23729,"Graphics.Barrier.storage-upload":30526,"Graphics.Barrier.storage-writeback":98994,"Graphics.BarrierMerged.dispatch-lead":46466,"Graphics.BarrierMerged.fill":4876,"Graphics.BarrierMerged.label-run":1009,"Graphics.BarrierMerged.shadow-publish":1674,"Graphics.BarrierMerged.staging-in":20108,"Graphics.BarrierMerged.staging-out":23729,"Graphics.BarrierMerged.storage-writeback":14695,"Graphics.Copy":104160,"Graphics.Copy.bytes":19069716308,"Graphics.RenderPass":182892,"Graphics.RenderPass.Close.command":61703,"Graphics.RenderPass.Close.image":71263,"Graphics.RenderPass.Close.key":13051,"Graphics.RenderPass.Close.label":1009,"Graphics.RenderPass.Close.new-batch":35864,"Graphics.RenderPass.Continued":2450159},"trace_dropped":false,"trace":"aps5-trace-14deacc1f35b-53336.json.gz"}
{"commit":"02f1afce807a","dirty":false,"env":{"APS5_DRAW_PIPELINE":"1","APS5_LEAN_FRONT":"1","APS5_LEAN_LIST_DIRECT":"1","APS5_LOG_TIMESTAMPS":"1","APS5_NO_PAD_INPUT":"1","APS5_PAD_INPUT_FILE":"<path>","APS5_PIPELINED_DRAWS":"32","APS5_PIPELINE_DISPATCH":"1","APS5_TRACE_DIR":"<path>","APS5_TRACE_EVENTS":"4194304","APS5_TRACE_SECONDS":"240:60","APS5_TRACE_SUMMARY_EVERY":"10"},"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":4510,"ms":60062.97},"presents":879,"frame_ms":{"p50":67.737,"p90":71.487,"p99":80.096,"max":93.293},"gpu_busy_ms_per_present":24.635,"worker_busy_pct":{"queue worker 0x0":78.774},"phase_totals_ms":{"Driver.Completion":0.314,"Driver.Dispatch":8272.998,"Driver.Dispatch.capture_resources":262.401,"Driver.Dispatch.decode_key_device_setup":105.358,"Driver.Dispatch.lookup_cache":2670.488,"Driver.Dispatch.materialize":48.325,"Driver.Dispatch.prepared_invocation":243.039,"Driver.Draw":509.814,"Driver.Draw.device_setup":30.096,"Driver.Draw.draw_enqueued":66.263,"Driver.Draw.draw_handed_off":29.746,"Driver.Draw.post_compile_prepare":4.508,"Driver.Draw.prepare":126.906,"Driver.Draw.shader_compile_and_link":224.993,"Driver.DrawFinish":42874.369,"Driver.DrawFinish.draw_enqueued":16489.118,"Driver.DrawFinish.post_compile_prepare":316.63,"Driver.DrawFinish.shader_compile_and_link":25413.534,"Driver.EndSubmission":711.422,"Driver.Packet":45079.613,"Driver.Packet.device_lock":539.711,"Driver.Packet.dispatch":8302.22,"Driver.Packet.draw":24173.93,"Driver.Packet.execute":5247.862,"Driver.Packet.flip_flush":23.653,"Driver.Packet.flush_between_packets":1218.68,"Driver.Packet.memory_wait":15.925,"Driver.Packet.pipeline_drain":1761.328,"Driver.Packet.pipeline_prepare":507.857,"Driver.Packet.prepare_memory":499.269,"Driver.Packet.rendering_wait":0.583,"Driver.Present":5097.943,"Driver.Present.acquire_image":1554.293,"Driver.Present.device_setup":0.312,"Driver.Present.gpu_mutex_wait":21.323,"Driver.Present.inflight_wait":1.852,"Driver.Present.present_display_buffer":95.107,"Driver.Present.queue_present":1489.865,"Driver.Present.release_and_callback":1.146,"Driver.Present.render_fence_wait":1931.84,"Driver.Present.resize":1.279,"Driver.Present.validate":0.375,"Driver.Rewind":1522.543,"Driver.Suspend":0.175,"GpuMutex.wait.dispatch":4.672,"GpuMutex.wait.draw":100.717,"GpuMutex.wait.end":5.805,"GpuMutex.wait.fill":6.613,"GpuMutex.wait.flush":6.527,"GpuMutex.wait.label":19.132,"GpuMutex.wait.other":3.845,"GpuMutex.wait.present":19.378,"Graphics.Draw":39456.584,"Graphics.Draw.draw_and_resource_release":33955.247,"Graphics.Draw.index_upload":1537.506,"Graphics.Draw.validate":1652.904,"Graphics.Draw.vertex_upload":1836.708,"Graphics.DrawWithRecipe":5307.857,"Graphics.DrawWithRecipe.draw_and_resource_release":4717.22,"Graphics.DrawWithRecipe.index_upload":234.001,"Graphics.DrawWithRecipe.validate":100.075,"Graphics.DrawWithRecipe.vertex_upload":219.737,"Recorder.Reap":990.077,"Recorder.Submit":2749.218,"Recorder.Sync":1235.339,"Recorder.WaitSerial":898.078,"Resources.Complete":308.598,"Resources.Prepare":413.165,"Shader.DrawStage":15351.833,"Shader.DrawStage.capture_resources":8087.595,"Shader.DrawStage.materialize":4676.164,"Shader.DrawStage.prepared_invocation":2370.818,"Shader.ResolveGraphicsStagesAbi":16.353,"VideoOut.Flip":5218.541,"VideoOut.Flip.completion_mutex_wait":1.118,"VideoOut.Flip.config_mutex_wait":0.074,"VideoOut.Flip.frame_limit":0.391,"VideoOut.Flip.notify_game":26.321,"VideoOut.Flip.present":5101.592,"VideoOut.Flip.validate":0.859,"VideoOut.Flip.vblank_wait":0.565,"VideoOut.Flip.window_prepare":1.245,"VideoOut.Flip.window_title":85.671,"VideoOut.Readiness":1.665,"VideoOut.Readiness.locks_validate":0.692,"Vulkan.Acquire":1553.403,"Vulkan.Acquire.acquire_fence_wait":1478.446,"Vulkan.Acquire.acquire_image":71.695,"Vulkan.Acquire.fence_reset":1.634,"Vulkan.Acquire.retired_swapchains":1.243,"Vulkan.Dispatch":870.883,"Vulkan.Dispatch.command_record":234.699,"Vulkan.Dispatch.shader_resources":624.801,"Vulkan.DispatchRecipe":307.017,"Vulkan.DispatchRecipe.command_record":304.375,"Vulkan.DrawFromRecipe":5359.841,"Vulkan.GraphicsPipeline":0.285,"Vulkan.GraphicsPipeline.create":0.095,"Vulkan.GraphicsPipeline.modules_and_state":0.188,"Vulkan.GraphicsPipelineLink":0.059,"Vulkan.Present":52.641,"Vulkan.Present.command_record_scale":18.086,"Vulkan.Present.pixel_upload":22.742,"Vulkan.Present.queue_submit":11.438,"Vulkan.QueuePresent":1488.546,"Vulkan.QueuePresent.queue_present":1487.149,"Vulkan.Retire":1931.446,"Vulkan.Retire.wait":1920.342},"top_phases_ms_per_frame":{"Driver.Packet":51.285,"Driver.DrawFinish":48.776,"Graphics.Draw":44.888,"Graphics.Draw.draw_and_resource_release":38.629,"Driver.DrawFinish.shader_compile_and_link":28.912,"Driver.Packet.draw":27.502,"Driver.DrawFinish.draw_enqueued":18.759,"Shader.DrawStage":17.465},"owned_draw_counts":{},"graphics_track":{"Graphics.Barrier.copy":9027,"Graphics.Barrier.dcc-clear":10548,"Graphics.Barrier.dcc-keys":7032,"Graphics.Barrier.dispatch-lead":25683,"Graphics.Barrier.dispatch-trail":63694,"Graphics.Barrier.draw":450024,"Graphics.Barrier.fill":10617,"Graphics.Barrier.fill-clear":1758,"Graphics.Barrier.indirect-args":6153,"Graphics.Barrier.label-run":357793,"Graphics.Barrier.present-blit":3516,"Graphics.Barrier.shadow-publish":1795,"Graphics.Barrier.staging-in":54989,"Graphics.Barrier.staging-out":25566,"Graphics.Barrier.storage-upload":34020,"Graphics.Barrier.storage-writeback":108438,"Graphics.BarrierMerged.dispatch-lead":50317,"Graphics.BarrierMerged.fill":5245,"Graphics.BarrierMerged.label-run":1086,"Graphics.BarrierMerged.shadow-publish":1795,"Graphics.BarrierMerged.staging-in":21709,"Graphics.BarrierMerged.staging-out":25566,"Graphics.BarrierMerged.storage-writeback":15920,"Graphics.Copy":112611,"Graphics.Copy.bytes":20563609036,"Graphics.RenderPass":198392,"Graphics.RenderPass.Close.command":67291,"Graphics.RenderPass.Close.image":76978,"Graphics.RenderPass.Close.key":14427,"Graphics.RenderPass.Close.label":1086,"Graphics.RenderPass.Close.new-batch":38608,"Graphics.RenderPass.Continued":2642747},"trace_dropped":false,"trace":"aps5-trace-02f1afce807a-13012.json.gz"}
  • Every target builds; tools/check_conventions.py passes.
  • 129 of the 130 focused tests pass, including the new _lean_front variants of the graphics, Pm4, submit-progress and runtime-switch tests. agc_driver_target_memo (and its _lean_front twin) fails on #15456's head merged with today's main whatever this switch says: it passes with APS5_NO_DRAW_PIPELINE=1, so it comes from #15456's finisher default meeting #17738's test, not from this change.
  • #18914 touches Submission.cpp and Pm4.cpp for other work; whichever lands second adapts.
trace_digest: main 14deacc1f3

seconds 240:60 from present 4373: 814 presents, frame p50 73.4 / p90 77.7 / p99 85.4 / max 115.5 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 14deacc1f3, dropped: no

{"commit":"14deacc1f35b","dirty":false,"env":{"APS5_DRAW_PIPELINE":"1","APS5_LEAN_FRONT":"1","APS5_LEAN_LIST_DIRECT":"1","APS5_LOG_TIMESTAMPS":"1","APS5_NO_PAD_INPUT":"1","APS5_PAD_INPUT_FILE":"<path>","APS5_PIPELINED_DRAWS":"32","APS5_PIPELINE_DISPATCH":"1","APS5_TRACE_DIR":"<path>","APS5_TRACE_EVENTS":"4194304","APS5_TRACE_SECONDS":"240:60","APS5_TRACE_SUMMARY_EVERY":"10"},"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":4373,"ms":60060.511},"presents":814,"frame_ms":{"p50":73.397,"p90":77.661,"p99":85.445,"max":115.45},"gpu_busy_ms_per_present":25.843,"worker_busy_pct":{"queue worker 0x0":92.107},"phase_totals_ms":{"Driver.Completion":0.488,"Driver.Dispatch":7698.703,"Driver.Dispatch.capture_resources":270.594,"Driver.Dispatch.decode_key_device_setup":102.95,"Driver.Dispatch.lookup_cache":2377.237,"Driver.Dispatch.materialize":48.74,"Driver.Dispatch.prepared_invocation":174.556,"Driver.Draw":34223.412,"Driver.Draw.device_setup":1934.811,"Driver.Draw.draw_enqueued":69.54,"Driver.Draw.draw_handed_off":8640.407,"Driver.Draw.post_compile_prepare":5.172,"Driver.Draw.prepare":23122.066,"Driver.Draw.shader_compile_and_link":228.018,"Driver.DrawFinish":29672.51,"Driver.DrawFinish.draw_enqueued":13632.513,"Driver.DrawFinish.post_compile_prepare":375.503,"Driver.DrawFinish.shader_compile_and_link":15423.129,"Driver.EndSubmission":456.982,"Driver.Packet":52223.804,"Driver.Packet.device_lock":520.289,"Driver.Packet.dispatch":7728.151,"Driver.Packet.draw":34645.0,"Driver.Packet.execute":3260.931,"Driver.Packet.flip_flush":22.978,"Driver.Packet.flush_between_packets":1277.448,"Driver.Packet.memory_wait":16.343,"Driver.Packet.pipeline_drain":1063.016,"Driver.Packet.pipeline_prepare":757.494,"Driver.Packet.prepare_memory":700.34,"Driver.Packet.rendering_wait":0.637,"Driver.Present":4439.479,"Driver.Present.acquire_image":1538.355,"Driver.Present.device_setup":0.442,"Driver.Present.gpu_mutex_wait":19.448,"Driver.Present.inflight_wait":1.732,"Driver.Present.present_display_buffer":99.436,"Driver.Present.queue_present":1428.575,"Driver.Present.release_and_callback":1.105,"Driver.Present.render_fence_wait":1348.445,"Driver.Present.resize":1.27,"Driver.Present.validate":0.201,"Driver.Rewind":2638.361,"Driver.Suspend":0.202,"GpuMutex.wait.dispatch":6.176,"GpuMutex.wait.draw":120.463,"GpuMutex.wait.end":4.314,"GpuMutex.wait.fill":1.625,"GpuMutex.wait.flush":12.27,"GpuMutex.wait.hook":0.138,"GpuMutex.wait.label":26.302,"GpuMutex.wait.other":6.529,"GpuMutex.wait.present":17.301,"Graphics.Draw":34866.323,"Graphics.Draw.draw_and_resource_release":30173.326,"Graphics.Draw.index_upload":1395.718,"Graphics.Draw.validate":1357.534,"Graphics.Draw.vertex_upload":1531.176,"Graphics.DrawWithRecipe":7340.014,"Graphics.DrawWithRecipe.draw_and_resource_release":6556.533,"Graphics.DrawWithRecipe.index_upload":230.962,"Graphics.DrawWithRecipe.validate":147.214,"Graphics.DrawWithRecipe.vertex_upload":345.031,"Recorder.Reap":947.271,"Recorder.Submit":2585.966,"Recorder.Sync":1159.637,"Recorder.WaitSerial":871.191,"Resources.Complete":297.288,"Resources.Prepare":384.888,"Shader.DrawStage":13890.125,"Shader.DrawStage.capture_resources":6959.556,"Shader.DrawStage.materialize":4482.554,"Shader.DrawStage.prepared_invocation":2253.335,"Shader.ResolveGraphicsStagesAbi":15.321,"VideoOut.Flip":4556.56,"VideoOut.Flip.completion_mutex_wait":1.154,"VideoOut.Flip.config_mutex_wait":0.108,"VideoOut.Flip.frame_limit":0.386,"VideoOut.Flip.notify_game":26.531,"VideoOut.Flip.present":4443.502,"VideoOut.Flip.validate":0.799,"VideoOut.Flip.vblank_wait":0.554,"VideoOut.Flip.window_prepare":1.334,"VideoOut.Flip.window_title":81.547,"VideoOut.Readiness":1.507,"VideoOut.Readiness.locks_validate":0.658,"Vulkan.Acquire":1537.428,"Vulkan.Acquire.acquire_fence_wait":1460.814,"Vulkan.Acquire.acquire_image":73.332,"Vulkan.Acquire.fence_reset":1.587,"Vulkan.Acquire.retired_swapchains":1.307,"Vulkan.Dispatch":879.563,"Vulkan.Dispatch.command_record":242.658,"Vulkan.Dispatch.shader_resources":624.963,"Vulkan.DispatchRecipe":284.441,"Vulkan.DispatchRecipe.command_record":282.105,"Vulkan.DrawFromRecipe":7442.816,"Vulkan.Present":48.754,"Vulkan.Present.command_record_scale":19.454,"Vulkan.Present.pixel_upload":15.712,"Vulkan.Present.queue_submit":13.125,"Vulkan.QueuePresent":1427.068,"Vulkan.QueuePresent.queue_present":1425.714,"Vulkan.Retire":1347.805,"Vulkan.Retire.wait":1337.054},"top_phases_ms_per_frame":{"Driver.Packet":64.157,"Graphics.Draw":42.833,"Driver.Packet.draw":42.561,"Driver.Draw":42.044,"Graphics.Draw.draw_and_resource_release":37.068,"Driver.DrawFinish":36.453,"Driver.Draw.prepare":28.405,"Driver.DrawFinish.shader_compile_and_link":18.947},"owned_draw_counts":{},"graphics_track":{"Graphics.Barrier.copy":8337,"Graphics.Barrier.dcc-clear":9768,"Graphics.Barrier.dcc-keys":6512,"Graphics.Barrier.dispatch-lead":23491,"Graphics.Barrier.dispatch-trail":58561,"Graphics.Barrier.draw":414647,"Graphics.Barrier.fill":9816,"Graphics.Barrier.fill-clear":1628,"Graphics.Barrier.indirect-args":5698,"Graphics.Barrier.label-run":331231,"Graphics.Barrier.present-blit":3256,"Graphics.Barrier.shadow-publish":1674,"Graphics.Barrier.staging-in":51079,"Graphics.Barrier.staging-out":23729,"Graphics.Barrier.storage-upload":30526,"Graphics.Barrier.storage-writeback":98994,"Graphics.BarrierMerged.dispatch-lead":46466,"Graphics.BarrierMerged.fill":4876,"Graphics.BarrierMerged.label-run":1009,"Graphics.BarrierMerged.shadow-publish":1674,"Graphics.BarrierMerged.staging-in":20108,"Graphics.BarrierMerged.staging-out":23729,"Graphics.BarrierMerged.storage-writeback":14695,"Graphics.Copy":104160,"Graphics.Copy.bytes":19069716308,"Graphics.RenderPass":182892,"Graphics.RenderPass.Close.command":61703,"Graphics.RenderPass.Close.image":71263,"Graphics.RenderPass.Close.key":13051,"Graphics.RenderPass.Close.label":1009,"Graphics.RenderPass.Close.new-batch":35864,"Graphics.RenderPass.Continued":2450159},"trace_dropped":false,"trace":"aps5-trace-14deacc1f35b-53336.json.gz"}

Slowest frames (largest slices inside each, inclusive)

  • present 5033: 115.5 ms at 48773 ms: Driver.Packet (queue worker 0x0) 63.5, Graphics.Draw (draw committer) 47.2, Graphics.Draw.draw_and_resource_release (draw committer) 43.3, Driver.Packet.draw (queue worker 0x0) 43.0
  • present 4523: 93.3 ms at 11096 ms: Driver.Packet (queue worker 0x0) 45.5, Graphics.Draw (draw committer) 45.0, Graphics.Draw.draw_and_resource_release (draw committer) 41.4, batch (gpu) 30.1
  • present 4610: 92.1 ms at 17560 ms: Driver.Packet (queue worker 0x0) 43.4, Graphics.Draw (draw committer) 40.6, Graphics.Draw.draw_and_resource_release (draw committer) 37.0, Driver.DrawFinish (draw finisher) 33.5
  • present 5107: 92.1 ms at 54229 ms: Driver.Packet (queue worker 0x0) 46.3, Graphics.Draw (draw committer) 32.9, Graphics.Draw.draw_and_resource_release (draw committer) 28.4, Driver.Packet.draw (queue worker 0x0) 27.2
  • present 4848: 89.0 ms at 35084 ms: Driver.Packet (queue worker 0x0) 43.8, Graphics.Draw (draw committer) 38.7, Graphics.Draw.draw_and_resource_release (draw committer) 35.1, Driver.DrawFinish (draw finisher) 31.0

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

  • present 5033: 115.5 ms at 48773 ms, persistence 50.1 ms
  • present 4523: 93.3 ms at 11096 ms, persistence 24.9 ms
  • present 5107: 92.1 ms at 54229 ms, persistence 24.2 ms
  • present 4610: 92.1 ms at 17560 ms, persistence 22.7 ms
  • present 4848: 89.0 ms at 35084 ms, persistence 20.4 ms
  • present 4426: 87.8 ms at 3946 ms, persistence 17.9 ms
  • present 4803: 88.4 ms at 31680 ms, persistence 16.9 ms
  • present 5156: 80.4 ms at 57818 ms, persistence 15.1 ms
  • present 5014: 83.0 ms at 47384 ms, persistence 13.9 ms
  • present 4580: 83.5 ms at 15337 ms, persistence 13.7 ms

Threads (ms per frame)

thread busy wait untraced in slices < 20 us largest
title 0.0 (0 %) 0.0 (0 %) 73.8 0.0 Shader.ResolveGraphicsStagesAbi 0.0
queue worker 0x0 31.4 (43 %) 0.9 (1 %) 41.4 130.4 Driver.Packet 28.8, Driver.Rewind 3.1
title 0.0 (0 %) 0.0 (0 %) 73.8 0.0
draw committer 33.6 (46 %) 0.3 (0 %) 39.8 52.0 Graphics.Draw 25.4, Vulkan.DrawFromRecipe 4.9
draw finisher 14.9 (20 %) 0.0 (0 %) 58.9 79.9 Driver.DrawFinish 14.9
presenter 2.1 (3 %) 3.5 (5 %) 68.2 0.0 VideoOut.Flip 5.6
gpu 25.8 (35 %) 0.0 (0 %) 47.9 0.0 batch 25.8

Largest slices (ms per frame, inclusive, all threads): Driver.Packet 28.8, batch 25.8, Graphics.Draw 25.4, Graphics.Draw.draw_and_resource_release 22.2, Driver.Packet.draw 15.9, Driver.Draw 15.6, Driver.DrawFinish 14.9, Driver.Draw.prepare 9.6, Driver.Packet.dispatch 9.2, Driver.Dispatch 9.2

Longest waits

  • Driver.Present.render_fence_wait (presenter) 4.9 ms at 37437 ms, present 4880
  • GpuMutex.wait.draw (draw committer) 4.2 ms at 17566 ms, present 4610
  • GpuMutex.wait.draw (draw committer) 4.0 ms at 48779 ms, present 5033
  • GpuMutex.wait.other (title) 3.6 ms at 31686 ms, present 4803
  • Driver.Present.render_fence_wait (presenter) 3.4 ms at 38906 ms, present 4900
  • Driver.Present.render_fence_wait (presenter) 3.3 ms at 35683 ms, present 4856
  • Driver.Present.render_fence_wait (presenter) 3.2 ms at 22551 ms, present 4678
  • Vulkan.Acquire.acquire_fence_wait (presenter) 3.0 ms at 31162 ms, present 4796
  • Vulkan.Acquire.acquire_fence_wait (presenter) 2.9 ms at 52892 ms, present 5089
  • Driver.Present.render_fence_wait (presenter) 2.9 ms at 53254 ms, present 5094

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

  • batch 264252: 5.0 ms at 2225 ms, present 4402: 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 276616: 4.8 ms at 11123 ms, present 4523: GPU no ranges; recorded by Graphics.Draw (draw committer) 11.4, Graphics.Draw.draw_and_resource_release (draw committer) 11.1, Resources.Complete (draw committer) 1.8, Resources.Prepare (draw committer) 1.6
  • batch 291754: 4.6 ms at 21965 ms, present 4669: 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 336801: 4.4 ms at 54228 ms, present 5106: 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 337321: 4.3 ms at 54626 ms, present 5111: 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.0
trace_digest: this PR 02f1afce80

seconds 240:60 from present 4510: 879 presents, frame p50 67.7 / p90 71.5 / p99 80.1 / max 93.3 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 02f1afce80, dropped: no

{"commit":"02f1afce807a","dirty":false,"env":{"APS5_DRAW_PIPELINE":"1","APS5_LEAN_FRONT":"1","APS5_LEAN_LIST_DIRECT":"1","APS5_LOG_TIMESTAMPS":"1","APS5_NO_PAD_INPUT":"1","APS5_PAD_INPUT_FILE":"<path>","APS5_PIPELINED_DRAWS":"32","APS5_PIPELINE_DISPATCH":"1","APS5_TRACE_DIR":"<path>","APS5_TRACE_EVENTS":"4194304","APS5_TRACE_SECONDS":"240:60","APS5_TRACE_SUMMARY_EVERY":"10"},"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":4510,"ms":60062.97},"presents":879,"frame_ms":{"p50":67.737,"p90":71.487,"p99":80.096,"max":93.293},"gpu_busy_ms_per_present":24.635,"worker_busy_pct":{"queue worker 0x0":78.774},"phase_totals_ms":{"Driver.Completion":0.314,"Driver.Dispatch":8272.998,"Driver.Dispatch.capture_resources":262.401,"Driver.Dispatch.decode_key_device_setup":105.358,"Driver.Dispatch.lookup_cache":2670.488,"Driver.Dispatch.materialize":48.325,"Driver.Dispatch.prepared_invocation":243.039,"Driver.Draw":509.814,"Driver.Draw.device_setup":30.096,"Driver.Draw.draw_enqueued":66.263,"Driver.Draw.draw_handed_off":29.746,"Driver.Draw.post_compile_prepare":4.508,"Driver.Draw.prepare":126.906,"Driver.Draw.shader_compile_and_link":224.993,"Driver.DrawFinish":42874.369,"Driver.DrawFinish.draw_enqueued":16489.118,"Driver.DrawFinish.post_compile_prepare":316.63,"Driver.DrawFinish.shader_compile_and_link":25413.534,"Driver.EndSubmission":711.422,"Driver.Packet":45079.613,"Driver.Packet.device_lock":539.711,"Driver.Packet.dispatch":8302.22,"Driver.Packet.draw":24173.93,"Driver.Packet.execute":5247.862,"Driver.Packet.flip_flush":23.653,"Driver.Packet.flush_between_packets":1218.68,"Driver.Packet.memory_wait":15.925,"Driver.Packet.pipeline_drain":1761.328,"Driver.Packet.pipeline_prepare":507.857,"Driver.Packet.prepare_memory":499.269,"Driver.Packet.rendering_wait":0.583,"Driver.Present":5097.943,"Driver.Present.acquire_image":1554.293,"Driver.Present.device_setup":0.312,"Driver.Present.gpu_mutex_wait":21.323,"Driver.Present.inflight_wait":1.852,"Driver.Present.present_display_buffer":95.107,"Driver.Present.queue_present":1489.865,"Driver.Present.release_and_callback":1.146,"Driver.Present.render_fence_wait":1931.84,"Driver.Present.resize":1.279,"Driver.Present.validate":0.375,"Driver.Rewind":1522.543,"Driver.Suspend":0.175,"GpuMutex.wait.dispatch":4.672,"GpuMutex.wait.draw":100.717,"GpuMutex.wait.end":5.805,"GpuMutex.wait.fill":6.613,"GpuMutex.wait.flush":6.527,"GpuMutex.wait.label":19.132,"GpuMutex.wait.other":3.845,"GpuMutex.wait.present":19.378,"Graphics.Draw":39456.584,"Graphics.Draw.draw_and_resource_release":33955.247,"Graphics.Draw.index_upload":1537.506,"Graphics.Draw.validate":1652.904,"Graphics.Draw.vertex_upload":1836.708,"Graphics.DrawWithRecipe":5307.857,"Graphics.DrawWithRecipe.draw_and_resource_release":4717.22,"Graphics.DrawWithRecipe.index_upload":234.001,"Graphics.DrawWithRecipe.validate":100.075,"Graphics.DrawWithRecipe.vertex_upload":219.737,"Recorder.Reap":990.077,"Recorder.Submit":2749.218,"Recorder.Sync":1235.339,"Recorder.WaitSerial":898.078,"Resources.Complete":308.598,"Resources.Prepare":413.165,"Shader.DrawStage":15351.833,"Shader.DrawStage.capture_resources":8087.595,"Shader.DrawStage.materialize":4676.164,"Shader.DrawStage.prepared_invocation":2370.818,"Shader.ResolveGraphicsStagesAbi":16.353,"VideoOut.Flip":5218.541,"VideoOut.Flip.completion_mutex_wait":1.118,"VideoOut.Flip.config_mutex_wait":0.074,"VideoOut.Flip.frame_limit":0.391,"VideoOut.Flip.notify_game":26.321,"VideoOut.Flip.present":5101.592,"VideoOut.Flip.validate":0.859,"VideoOut.Flip.vblank_wait":0.565,"VideoOut.Flip.window_prepare":1.245,"VideoOut.Flip.window_title":85.671,"VideoOut.Readiness":1.665,"VideoOut.Readiness.locks_validate":0.692,"Vulkan.Acquire":1553.403,"Vulkan.Acquire.acquire_fence_wait":1478.446,"Vulkan.Acquire.acquire_image":71.695,"Vulkan.Acquire.fence_reset":1.634,"Vulkan.Acquire.retired_swapchains":1.243,"Vulkan.Dispatch":870.883,"Vulkan.Dispatch.command_record":234.699,"Vulkan.Dispatch.shader_resources":624.801,"Vulkan.DispatchRecipe":307.017,"Vulkan.DispatchRecipe.command_record":304.375,"Vulkan.DrawFromRecipe":5359.841,"Vulkan.GraphicsPipeline":0.285,"Vulkan.GraphicsPipeline.create":0.095,"Vulkan.GraphicsPipeline.modules_and_state":0.188,"Vulkan.GraphicsPipelineLink":0.059,"Vulkan.Present":52.641,"Vulkan.Present.command_record_scale":18.086,"Vulkan.Present.pixel_upload":22.742,"Vulkan.Present.queue_submit":11.438,"Vulkan.QueuePresent":1488.546,"Vulkan.QueuePresent.queue_present":1487.149,"Vulkan.Retire":1931.446,"Vulkan.Retire.wait":1920.342},"top_phases_ms_per_frame":{"Driver.Packet":51.285,"Driver.DrawFinish":48.776,"Graphics.Draw":44.888,"Graphics.Draw.draw_and_resource_release":38.629,"Driver.DrawFinish.shader_compile_and_link":28.912,"Driver.Packet.draw":27.502,"Driver.DrawFinish.draw_enqueued":18.759,"Shader.DrawStage":17.465},"owned_draw_counts":{},"graphics_track":{"Graphics.Barrier.copy":9027,"Graphics.Barrier.dcc-clear":10548,"Graphics.Barrier.dcc-keys":7032,"Graphics.Barrier.dispatch-lead":25683,"Graphics.Barrier.dispatch-trail":63694,"Graphics.Barrier.draw":450024,"Graphics.Barrier.fill":10617,"Graphics.Barrier.fill-clear":1758,"Graphics.Barrier.indirect-args":6153,"Graphics.Barrier.label-run":357793,"Graphics.Barrier.present-blit":3516,"Graphics.Barrier.shadow-publish":1795,"Graphics.Barrier.staging-in":54989,"Graphics.Barrier.staging-out":25566,"Graphics.Barrier.storage-upload":34020,"Graphics.Barrier.storage-writeback":108438,"Graphics.BarrierMerged.dispatch-lead":50317,"Graphics.BarrierMerged.fill":5245,"Graphics.BarrierMerged.label-run":1086,"Graphics.BarrierMerged.shadow-publish":1795,"Graphics.BarrierMerged.staging-in":21709,"Graphics.BarrierMerged.staging-out":25566,"Graphics.BarrierMerged.storage-writeback":15920,"Graphics.Copy":112611,"Graphics.Copy.bytes":20563609036,"Graphics.RenderPass":198392,"Graphics.RenderPass.Close.command":67291,"Graphics.RenderPass.Close.image":76978,"Graphics.RenderPass.Close.key":14427,"Graphics.RenderPass.Close.label":1086,"Graphics.RenderPass.Close.new-batch":38608,"Graphics.RenderPass.Continued":2642747},"trace_dropped":false,"trace":"aps5-trace-02f1afce807a-13012.json.gz"}

Slowest frames (largest slices inside each, inclusive)

  • present 5260: 93.3 ms at 51197 ms: Driver.Packet (queue worker 0x0) 46.4, Driver.DrawFinish (draw finisher) 41.4, Graphics.Draw (draw committer) 30.2, Driver.Packet.draw (queue worker 0x0) 26.7
  • present 4951: 89.4 ms at 30080 ms: Driver.DrawFinish (draw finisher) 42.3, Graphics.Draw (draw committer) 40.1, Graphics.Draw.draw_and_resource_release (draw committer) 36.7, Driver.Packet (queue worker 0x0) 32.9
  • present 4531: 86.9 ms at 1439 ms: Driver.Packet (queue worker 0x0) 48.6, Driver.DrawFinish (draw finisher) 39.8, Driver.Packet.draw (queue worker 0x0) 32.1, Graphics.Draw (draw committer) 25.2
  • present 4896: 86.8 ms at 26284 ms: Driver.DrawFinish (draw finisher) 41.6, Graphics.Draw (draw committer) 40.6, Graphics.Draw.draw_and_resource_release (draw committer) 36.9, Driver.Packet (queue worker 0x0) 34.1
  • present 5268: 85.5 ms at 51768 ms: Driver.Packet (queue worker 0x0) 41.2, Driver.DrawFinish (draw finisher) 38.8, Driver.Packet.draw (queue worker 0x0) 26.1, Graphics.Draw (draw committer) 25.6

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

  • present 5260: 93.3 ms at 51197 ms, persistence 30.2 ms
  • present 4951: 89.4 ms at 30080 ms, persistence 25.6 ms
  • present 4531: 86.9 ms at 1439 ms, persistence 23.8 ms
  • present 4896: 86.8 ms at 26284 ms, persistence 21.5 ms
  • present 5122: 85.1 ms at 41724 ms, persistence 21.0 ms
  • present 5268: 85.5 ms at 51768 ms, persistence 19.1 ms
  • present 4856: 80.1 ms at 23509 ms, persistence 15.7 ms
  • present 4605: 78.8 ms at 6436 ms, persistence 15.6 ms
  • present 5096: 80.5 ms at 39928 ms, persistence 15.5 ms
  • present 4909: 80.5 ms at 27196 ms, persistence 14.7 ms

Threads (ms per frame)

thread busy wait untraced in slices < 20 us largest
title 0.0 (0 %) 0.0 (0 %) 68.3 0.0 Shader.ResolveGraphicsStagesAbi 0.0
queue worker 0x0 27.8 (41 %) 0.8 (1 %) 39.7 52.3 Driver.Packet 26.6, Driver.Rewind 1.4
draw committer 33.3 (49 %) 0.4 (1 %) 34.6 48.0 Graphics.Draw 25.4, Vulkan.DrawFromRecipe 4.7
draw finisher 24.4 (36 %) 0.0 (0 %) 43.9 89.2 Driver.DrawFinish 24.4
title 0.0 (0 %) 0.0 (0 %) 68.3 0.0
presenter 2.0 (3 %) 3.9 (6 %) 62.4 0.1 VideoOut.Flip 5.9
gpu 24.6 (36 %) 0.0 (0 %) 43.7 0.0 batch 24.6

Largest slices (ms per frame, inclusive, all threads): Driver.Packet 26.6, Graphics.Draw 25.4, batch 24.6, Driver.DrawFinish 24.4, Graphics.Draw.draw_and_resource_release 22.0, Driver.Packet.draw 11.1, Driver.DrawFinish.draw_enqueued 9.7, Driver.Packet.dispatch 9.1, Driver.Dispatch 9.0, Driver.DrawFinish.shader_compile_and_link 5.9

Longest waits

  • Driver.Present.render_fence_wait (presenter) 3.8 ms at 18909 ms, present 4789
  • GpuMutex.wait.draw (draw committer) 3.7 ms at 26289 ms, present 4896
  • Driver.Present.render_fence_wait (presenter) 3.7 ms at 44260 ms, present 5159
  • Driver.Present.render_fence_wait (presenter) 3.7 ms at 53500 ms, present 5293
  • Driver.Present.render_fence_wait (presenter) 3.6 ms at 15823 ms, present 4743
  • Driver.Present.render_fence_wait (presenter) 3.6 ms at 1988 ms, present 4539
  • Driver.Present.render_fence_wait (presenter) 3.6 ms at 14479 ms, present 4723
  • Driver.Present.render_fence_wait (presenter) 3.6 ms at 28045 ms, present 4921
  • Driver.Present.render_fence_wait (presenter) 3.6 ms at 40419 ms, present 5103
  • Driver.Present.render_fence_wait (presenter) 3.5 ms at 3894 ms, present 4567

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

  • batch 345539: 4.3 ms at 44869 ms, present 5167: 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 283888: 4.2 ms at 4026 ms, present 4568: 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.0
  • batch 288448: 4.1 ms at 6990 ms, present 4612: 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.0
  • batch 304462: 4.1 ms at 17553 ms, present 4768: 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 314955: 4.1 ms at 24553 ms, present 4870: 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

Main merged (2026-11-18): main ed1a01d035 merged as e0fcc58ccb (one conflict, the Pm4 test table: this PR's rewind tests beside main's order-signal). Every target builds, 127 of 128 focused tests pass (the same agc_driver_target_memo_lean_front as above), tools/check_conventions.py passes. The measurements above are from 02f1afce80.

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
  • 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: #15456
  • Fixes: none
  • Unblocks: none
  • GPUs tested: AMD Radeon RX 7900 XTX, AMD Software 26.10.1 (32.0.32015.7029), Windows 11 Pro 26300
  • AI-assisted: yes
<!-- greyfinch-sync:boykopovar/AnyPS5:issue:5359943981 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/22434). Originally posted by [Nesyth](https://github.com/Nesyth) on 2026-11-17T15:38:59Z. --- ### What On `main` the queue-0 worker binds draw-heavy frames: in the `main` capture below it is busy 92% of the time (`worker_busy_pct`) while the draw committer is busy 46%, and its largest item is the per-draw preparation. With this change the worker is busy 79% and the finisher takes the moved work (20% -> 36% busy). `APS5_LEAN_FRONT` (a runtime switch, off by default, read once per segment so `APS5_AB` can toggle it within one run) gives that worker a leaner front end on the pipelined draw path: - A queue-0 submission and the REWIND tails it chains run in a loop from a packet table validated once per segment, instead of nesting each tail inside the previous one. Released tails are kept as one copy each and their register lists are read into flat arrays (`RegisterLists`), with a cache for static lists; `APS5_LEAN_LIST_DIRECT` reads every list of a tail directly instead. - Draws of a lean segment go to the draw finisher as plain jobs through a lock-free ring; the draw cache lookup and the vertex decode run on the finisher instead of the worker. The finisher retires a slot's job before the slot is reused. - Everything `execute()` does per packet happens in the lean loop as well: flips and flip readying, indirect segments, read points, wait epochs with store ordering, label flushes on the same deadlines, predication, and draws whose compile is pending. - `APS5_VERIFY_LEAN_FRONT=N` runs every N-th item of each kind (segments' switch reads, REWIND tails, register lists, draw jobs) through today's path, which is what executes, and compares the lean answer with it. With the switch unset nothing changes. It needs the draw finisher, so this PR sits on #15456. ### 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 02f1afce80: `main` 14deacc1f3 merged into #15456's head, plus this change. 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`. **In-run A/B** (`APS5_AB=30:APS5_LEAN_FRONT+APS5_LEAN_LIST_DIRECT`, 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 +13.91 +- 0.90 presents per 10 s (+11.1%, 5 pairs, the first pair left out: the scene settles). | phase | presents per 10 s | |---|---| | A 0 | 123.20 | | B 1 | 135.42 | | A 2 | 123.51 | | B 3 | 139.13 | | A 4 | 123.80 | | B 5 | 141.19 | | A 6 | 127.22 | | B 7 | 139.52 | | A 8 | 125.84 | | B 9 | 140.37 | | A 10 | 125.84 | | B 11 | 137.87 | | A 12 | 128.17 | **Captures**, `main` and this PR one after the other in the same session (`main` at 16:14, this PR at 16:22), the log not redirected, `APS5_TRACE_SECONDS=240:60`, both with `APS5_LEAN_FRONT=1` `APS5_LEAN_LIST_DIRECT=1` (`main` does not read 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` 14deacc1f3 | 13.52 over 295 s | 814 | 73.4 / 77.7 / 85.4 | 25.8 | | this PR (02f1afce80) | 14.65 over 292 s | 879 | 67.7 / 71.5 / 80.1 | 24.6 | +8.4% FPS between the captures. 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, `APS5_VERIFY_LEAN_FRONT=64`: every 64th item checked against today's path over 226 s in game (14.68 FPS with the checks on): 5485 segments, 1188802 packets, 213754 draws compared, **0 differences**, 0 fatal errors. Register lists were read directly (APS5_LEAN_LIST_DIRECT), so none came from the list cache. 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](https://github.com/Nesyth/AnyPS5/releases/download/perf-traces/aps5-trace-14deacc1f35b-53336.json.gz), [this PR](https://github.com/Nesyth/AnyPS5/releases/download/perf-traces/aps5-trace-02f1afce807a-13012.json.gz). Summary lines and `tools/trace_digest.py` output below. ```json {"commit":"14deacc1f35b","dirty":false,"env":{"APS5_DRAW_PIPELINE":"1","APS5_LEAN_FRONT":"1","APS5_LEAN_LIST_DIRECT":"1","APS5_LOG_TIMESTAMPS":"1","APS5_NO_PAD_INPUT":"1","APS5_PAD_INPUT_FILE":"<path>","APS5_PIPELINED_DRAWS":"32","APS5_PIPELINE_DISPATCH":"1","APS5_TRACE_DIR":"<path>","APS5_TRACE_EVENTS":"4194304","APS5_TRACE_SECONDS":"240:60","APS5_TRACE_SUMMARY_EVERY":"10"},"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":4373,"ms":60060.511},"presents":814,"frame_ms":{"p50":73.397,"p90":77.661,"p99":85.445,"max":115.45},"gpu_busy_ms_per_present":25.843,"worker_busy_pct":{"queue worker 0x0":92.107},"phase_totals_ms":{"Driver.Completion":0.488,"Driver.Dispatch":7698.703,"Driver.Dispatch.capture_resources":270.594,"Driver.Dispatch.decode_key_device_setup":102.95,"Driver.Dispatch.lookup_cache":2377.237,"Driver.Dispatch.materialize":48.74,"Driver.Dispatch.prepared_invocation":174.556,"Driver.Draw":34223.412,"Driver.Draw.device_setup":1934.811,"Driver.Draw.draw_enqueued":69.54,"Driver.Draw.draw_handed_off":8640.407,"Driver.Draw.post_compile_prepare":5.172,"Driver.Draw.prepare":23122.066,"Driver.Draw.shader_compile_and_link":228.018,"Driver.DrawFinish":29672.51,"Driver.DrawFinish.draw_enqueued":13632.513,"Driver.DrawFinish.post_compile_prepare":375.503,"Driver.DrawFinish.shader_compile_and_link":15423.129,"Driver.EndSubmission":456.982,"Driver.Packet":52223.804,"Driver.Packet.device_lock":520.289,"Driver.Packet.dispatch":7728.151,"Driver.Packet.draw":34645.0,"Driver.Packet.execute":3260.931,"Driver.Packet.flip_flush":22.978,"Driver.Packet.flush_between_packets":1277.448,"Driver.Packet.memory_wait":16.343,"Driver.Packet.pipeline_drain":1063.016,"Driver.Packet.pipeline_prepare":757.494,"Driver.Packet.prepare_memory":700.34,"Driver.Packet.rendering_wait":0.637,"Driver.Present":4439.479,"Driver.Present.acquire_image":1538.355,"Driver.Present.device_setup":0.442,"Driver.Present.gpu_mutex_wait":19.448,"Driver.Present.inflight_wait":1.732,"Driver.Present.present_display_buffer":99.436,"Driver.Present.queue_present":1428.575,"Driver.Present.release_and_callback":1.105,"Driver.Present.render_fence_wait":1348.445,"Driver.Present.resize":1.27,"Driver.Present.validate":0.201,"Driver.Rewind":2638.361,"Driver.Suspend":0.202,"GpuMutex.wait.dispatch":6.176,"GpuMutex.wait.draw":120.463,"GpuMutex.wait.end":4.314,"GpuMutex.wait.fill":1.625,"GpuMutex.wait.flush":12.27,"GpuMutex.wait.hook":0.138,"GpuMutex.wait.label":26.302,"GpuMutex.wait.other":6.529,"GpuMutex.wait.present":17.301,"Graphics.Draw":34866.323,"Graphics.Draw.draw_and_resource_release":30173.326,"Graphics.Draw.index_upload":1395.718,"Graphics.Draw.validate":1357.534,"Graphics.Draw.vertex_upload":1531.176,"Graphics.DrawWithRecipe":7340.014,"Graphics.DrawWithRecipe.draw_and_resource_release":6556.533,"Graphics.DrawWithRecipe.index_upload":230.962,"Graphics.DrawWithRecipe.validate":147.214,"Graphics.DrawWithRecipe.vertex_upload":345.031,"Recorder.Reap":947.271,"Recorder.Submit":2585.966,"Recorder.Sync":1159.637,"Recorder.WaitSerial":871.191,"Resources.Complete":297.288,"Resources.Prepare":384.888,"Shader.DrawStage":13890.125,"Shader.DrawStage.capture_resources":6959.556,"Shader.DrawStage.materialize":4482.554,"Shader.DrawStage.prepared_invocation":2253.335,"Shader.ResolveGraphicsStagesAbi":15.321,"VideoOut.Flip":4556.56,"VideoOut.Flip.completion_mutex_wait":1.154,"VideoOut.Flip.config_mutex_wait":0.108,"VideoOut.Flip.frame_limit":0.386,"VideoOut.Flip.notify_game":26.531,"VideoOut.Flip.present":4443.502,"VideoOut.Flip.validate":0.799,"VideoOut.Flip.vblank_wait":0.554,"VideoOut.Flip.window_prepare":1.334,"VideoOut.Flip.window_title":81.547,"VideoOut.Readiness":1.507,"VideoOut.Readiness.locks_validate":0.658,"Vulkan.Acquire":1537.428,"Vulkan.Acquire.acquire_fence_wait":1460.814,"Vulkan.Acquire.acquire_image":73.332,"Vulkan.Acquire.fence_reset":1.587,"Vulkan.Acquire.retired_swapchains":1.307,"Vulkan.Dispatch":879.563,"Vulkan.Dispatch.command_record":242.658,"Vulkan.Dispatch.shader_resources":624.963,"Vulkan.DispatchRecipe":284.441,"Vulkan.DispatchRecipe.command_record":282.105,"Vulkan.DrawFromRecipe":7442.816,"Vulkan.Present":48.754,"Vulkan.Present.command_record_scale":19.454,"Vulkan.Present.pixel_upload":15.712,"Vulkan.Present.queue_submit":13.125,"Vulkan.QueuePresent":1427.068,"Vulkan.QueuePresent.queue_present":1425.714,"Vulkan.Retire":1347.805,"Vulkan.Retire.wait":1337.054},"top_phases_ms_per_frame":{"Driver.Packet":64.157,"Graphics.Draw":42.833,"Driver.Packet.draw":42.561,"Driver.Draw":42.044,"Graphics.Draw.draw_and_resource_release":37.068,"Driver.DrawFinish":36.453,"Driver.Draw.prepare":28.405,"Driver.DrawFinish.shader_compile_and_link":18.947},"owned_draw_counts":{},"graphics_track":{"Graphics.Barrier.copy":8337,"Graphics.Barrier.dcc-clear":9768,"Graphics.Barrier.dcc-keys":6512,"Graphics.Barrier.dispatch-lead":23491,"Graphics.Barrier.dispatch-trail":58561,"Graphics.Barrier.draw":414647,"Graphics.Barrier.fill":9816,"Graphics.Barrier.fill-clear":1628,"Graphics.Barrier.indirect-args":5698,"Graphics.Barrier.label-run":331231,"Graphics.Barrier.present-blit":3256,"Graphics.Barrier.shadow-publish":1674,"Graphics.Barrier.staging-in":51079,"Graphics.Barrier.staging-out":23729,"Graphics.Barrier.storage-upload":30526,"Graphics.Barrier.storage-writeback":98994,"Graphics.BarrierMerged.dispatch-lead":46466,"Graphics.BarrierMerged.fill":4876,"Graphics.BarrierMerged.label-run":1009,"Graphics.BarrierMerged.shadow-publish":1674,"Graphics.BarrierMerged.staging-in":20108,"Graphics.BarrierMerged.staging-out":23729,"Graphics.BarrierMerged.storage-writeback":14695,"Graphics.Copy":104160,"Graphics.Copy.bytes":19069716308,"Graphics.RenderPass":182892,"Graphics.RenderPass.Close.command":61703,"Graphics.RenderPass.Close.image":71263,"Graphics.RenderPass.Close.key":13051,"Graphics.RenderPass.Close.label":1009,"Graphics.RenderPass.Close.new-batch":35864,"Graphics.RenderPass.Continued":2450159},"trace_dropped":false,"trace":"aps5-trace-14deacc1f35b-53336.json.gz"} {"commit":"02f1afce807a","dirty":false,"env":{"APS5_DRAW_PIPELINE":"1","APS5_LEAN_FRONT":"1","APS5_LEAN_LIST_DIRECT":"1","APS5_LOG_TIMESTAMPS":"1","APS5_NO_PAD_INPUT":"1","APS5_PAD_INPUT_FILE":"<path>","APS5_PIPELINED_DRAWS":"32","APS5_PIPELINE_DISPATCH":"1","APS5_TRACE_DIR":"<path>","APS5_TRACE_EVENTS":"4194304","APS5_TRACE_SECONDS":"240:60","APS5_TRACE_SUMMARY_EVERY":"10"},"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":4510,"ms":60062.97},"presents":879,"frame_ms":{"p50":67.737,"p90":71.487,"p99":80.096,"max":93.293},"gpu_busy_ms_per_present":24.635,"worker_busy_pct":{"queue worker 0x0":78.774},"phase_totals_ms":{"Driver.Completion":0.314,"Driver.Dispatch":8272.998,"Driver.Dispatch.capture_resources":262.401,"Driver.Dispatch.decode_key_device_setup":105.358,"Driver.Dispatch.lookup_cache":2670.488,"Driver.Dispatch.materialize":48.325,"Driver.Dispatch.prepared_invocation":243.039,"Driver.Draw":509.814,"Driver.Draw.device_setup":30.096,"Driver.Draw.draw_enqueued":66.263,"Driver.Draw.draw_handed_off":29.746,"Driver.Draw.post_compile_prepare":4.508,"Driver.Draw.prepare":126.906,"Driver.Draw.shader_compile_and_link":224.993,"Driver.DrawFinish":42874.369,"Driver.DrawFinish.draw_enqueued":16489.118,"Driver.DrawFinish.post_compile_prepare":316.63,"Driver.DrawFinish.shader_compile_and_link":25413.534,"Driver.EndSubmission":711.422,"Driver.Packet":45079.613,"Driver.Packet.device_lock":539.711,"Driver.Packet.dispatch":8302.22,"Driver.Packet.draw":24173.93,"Driver.Packet.execute":5247.862,"Driver.Packet.flip_flush":23.653,"Driver.Packet.flush_between_packets":1218.68,"Driver.Packet.memory_wait":15.925,"Driver.Packet.pipeline_drain":1761.328,"Driver.Packet.pipeline_prepare":507.857,"Driver.Packet.prepare_memory":499.269,"Driver.Packet.rendering_wait":0.583,"Driver.Present":5097.943,"Driver.Present.acquire_image":1554.293,"Driver.Present.device_setup":0.312,"Driver.Present.gpu_mutex_wait":21.323,"Driver.Present.inflight_wait":1.852,"Driver.Present.present_display_buffer":95.107,"Driver.Present.queue_present":1489.865,"Driver.Present.release_and_callback":1.146,"Driver.Present.render_fence_wait":1931.84,"Driver.Present.resize":1.279,"Driver.Present.validate":0.375,"Driver.Rewind":1522.543,"Driver.Suspend":0.175,"GpuMutex.wait.dispatch":4.672,"GpuMutex.wait.draw":100.717,"GpuMutex.wait.end":5.805,"GpuMutex.wait.fill":6.613,"GpuMutex.wait.flush":6.527,"GpuMutex.wait.label":19.132,"GpuMutex.wait.other":3.845,"GpuMutex.wait.present":19.378,"Graphics.Draw":39456.584,"Graphics.Draw.draw_and_resource_release":33955.247,"Graphics.Draw.index_upload":1537.506,"Graphics.Draw.validate":1652.904,"Graphics.Draw.vertex_upload":1836.708,"Graphics.DrawWithRecipe":5307.857,"Graphics.DrawWithRecipe.draw_and_resource_release":4717.22,"Graphics.DrawWithRecipe.index_upload":234.001,"Graphics.DrawWithRecipe.validate":100.075,"Graphics.DrawWithRecipe.vertex_upload":219.737,"Recorder.Reap":990.077,"Recorder.Submit":2749.218,"Recorder.Sync":1235.339,"Recorder.WaitSerial":898.078,"Resources.Complete":308.598,"Resources.Prepare":413.165,"Shader.DrawStage":15351.833,"Shader.DrawStage.capture_resources":8087.595,"Shader.DrawStage.materialize":4676.164,"Shader.DrawStage.prepared_invocation":2370.818,"Shader.ResolveGraphicsStagesAbi":16.353,"VideoOut.Flip":5218.541,"VideoOut.Flip.completion_mutex_wait":1.118,"VideoOut.Flip.config_mutex_wait":0.074,"VideoOut.Flip.frame_limit":0.391,"VideoOut.Flip.notify_game":26.321,"VideoOut.Flip.present":5101.592,"VideoOut.Flip.validate":0.859,"VideoOut.Flip.vblank_wait":0.565,"VideoOut.Flip.window_prepare":1.245,"VideoOut.Flip.window_title":85.671,"VideoOut.Readiness":1.665,"VideoOut.Readiness.locks_validate":0.692,"Vulkan.Acquire":1553.403,"Vulkan.Acquire.acquire_fence_wait":1478.446,"Vulkan.Acquire.acquire_image":71.695,"Vulkan.Acquire.fence_reset":1.634,"Vulkan.Acquire.retired_swapchains":1.243,"Vulkan.Dispatch":870.883,"Vulkan.Dispatch.command_record":234.699,"Vulkan.Dispatch.shader_resources":624.801,"Vulkan.DispatchRecipe":307.017,"Vulkan.DispatchRecipe.command_record":304.375,"Vulkan.DrawFromRecipe":5359.841,"Vulkan.GraphicsPipeline":0.285,"Vulkan.GraphicsPipeline.create":0.095,"Vulkan.GraphicsPipeline.modules_and_state":0.188,"Vulkan.GraphicsPipelineLink":0.059,"Vulkan.Present":52.641,"Vulkan.Present.command_record_scale":18.086,"Vulkan.Present.pixel_upload":22.742,"Vulkan.Present.queue_submit":11.438,"Vulkan.QueuePresent":1488.546,"Vulkan.QueuePresent.queue_present":1487.149,"Vulkan.Retire":1931.446,"Vulkan.Retire.wait":1920.342},"top_phases_ms_per_frame":{"Driver.Packet":51.285,"Driver.DrawFinish":48.776,"Graphics.Draw":44.888,"Graphics.Draw.draw_and_resource_release":38.629,"Driver.DrawFinish.shader_compile_and_link":28.912,"Driver.Packet.draw":27.502,"Driver.DrawFinish.draw_enqueued":18.759,"Shader.DrawStage":17.465},"owned_draw_counts":{},"graphics_track":{"Graphics.Barrier.copy":9027,"Graphics.Barrier.dcc-clear":10548,"Graphics.Barrier.dcc-keys":7032,"Graphics.Barrier.dispatch-lead":25683,"Graphics.Barrier.dispatch-trail":63694,"Graphics.Barrier.draw":450024,"Graphics.Barrier.fill":10617,"Graphics.Barrier.fill-clear":1758,"Graphics.Barrier.indirect-args":6153,"Graphics.Barrier.label-run":357793,"Graphics.Barrier.present-blit":3516,"Graphics.Barrier.shadow-publish":1795,"Graphics.Barrier.staging-in":54989,"Graphics.Barrier.staging-out":25566,"Graphics.Barrier.storage-upload":34020,"Graphics.Barrier.storage-writeback":108438,"Graphics.BarrierMerged.dispatch-lead":50317,"Graphics.BarrierMerged.fill":5245,"Graphics.BarrierMerged.label-run":1086,"Graphics.BarrierMerged.shadow-publish":1795,"Graphics.BarrierMerged.staging-in":21709,"Graphics.BarrierMerged.staging-out":25566,"Graphics.BarrierMerged.storage-writeback":15920,"Graphics.Copy":112611,"Graphics.Copy.bytes":20563609036,"Graphics.RenderPass":198392,"Graphics.RenderPass.Close.command":67291,"Graphics.RenderPass.Close.image":76978,"Graphics.RenderPass.Close.key":14427,"Graphics.RenderPass.Close.label":1086,"Graphics.RenderPass.Close.new-batch":38608,"Graphics.RenderPass.Continued":2642747},"trace_dropped":false,"trace":"aps5-trace-02f1afce807a-13012.json.gz"} ``` - Every target builds; `tools/check_conventions.py` passes. - 129 of the 130 focused tests pass, including the new `_lean_front` variants of the graphics, Pm4, submit-progress and runtime-switch tests. `agc_driver_target_memo` (and its `_lean_front` twin) fails on #15456's head merged with today's `main` whatever this switch says: it passes with `APS5_NO_DRAW_PIPELINE=1`, so it comes from #15456's finisher default meeting #17738's test, not from this change. - #18914 touches `Submission.cpp` and `Pm4.cpp` for other work; whichever lands second adapts. <details> <summary>trace_digest: main 14deacc1f3</summary> **seconds 240:60** from present 4373: 814 presents, frame p50 73.4 / p90 77.7 / p99 85.4 / max 115.5 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 14deacc1f35b, dropped: no ```json {"commit":"14deacc1f35b","dirty":false,"env":{"APS5_DRAW_PIPELINE":"1","APS5_LEAN_FRONT":"1","APS5_LEAN_LIST_DIRECT":"1","APS5_LOG_TIMESTAMPS":"1","APS5_NO_PAD_INPUT":"1","APS5_PAD_INPUT_FILE":"<path>","APS5_PIPELINED_DRAWS":"32","APS5_PIPELINE_DISPATCH":"1","APS5_TRACE_DIR":"<path>","APS5_TRACE_EVENTS":"4194304","APS5_TRACE_SECONDS":"240:60","APS5_TRACE_SUMMARY_EVERY":"10"},"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":4373,"ms":60060.511},"presents":814,"frame_ms":{"p50":73.397,"p90":77.661,"p99":85.445,"max":115.45},"gpu_busy_ms_per_present":25.843,"worker_busy_pct":{"queue worker 0x0":92.107},"phase_totals_ms":{"Driver.Completion":0.488,"Driver.Dispatch":7698.703,"Driver.Dispatch.capture_resources":270.594,"Driver.Dispatch.decode_key_device_setup":102.95,"Driver.Dispatch.lookup_cache":2377.237,"Driver.Dispatch.materialize":48.74,"Driver.Dispatch.prepared_invocation":174.556,"Driver.Draw":34223.412,"Driver.Draw.device_setup":1934.811,"Driver.Draw.draw_enqueued":69.54,"Driver.Draw.draw_handed_off":8640.407,"Driver.Draw.post_compile_prepare":5.172,"Driver.Draw.prepare":23122.066,"Driver.Draw.shader_compile_and_link":228.018,"Driver.DrawFinish":29672.51,"Driver.DrawFinish.draw_enqueued":13632.513,"Driver.DrawFinish.post_compile_prepare":375.503,"Driver.DrawFinish.shader_compile_and_link":15423.129,"Driver.EndSubmission":456.982,"Driver.Packet":52223.804,"Driver.Packet.device_lock":520.289,"Driver.Packet.dispatch":7728.151,"Driver.Packet.draw":34645.0,"Driver.Packet.execute":3260.931,"Driver.Packet.flip_flush":22.978,"Driver.Packet.flush_between_packets":1277.448,"Driver.Packet.memory_wait":16.343,"Driver.Packet.pipeline_drain":1063.016,"Driver.Packet.pipeline_prepare":757.494,"Driver.Packet.prepare_memory":700.34,"Driver.Packet.rendering_wait":0.637,"Driver.Present":4439.479,"Driver.Present.acquire_image":1538.355,"Driver.Present.device_setup":0.442,"Driver.Present.gpu_mutex_wait":19.448,"Driver.Present.inflight_wait":1.732,"Driver.Present.present_display_buffer":99.436,"Driver.Present.queue_present":1428.575,"Driver.Present.release_and_callback":1.105,"Driver.Present.render_fence_wait":1348.445,"Driver.Present.resize":1.27,"Driver.Present.validate":0.201,"Driver.Rewind":2638.361,"Driver.Suspend":0.202,"GpuMutex.wait.dispatch":6.176,"GpuMutex.wait.draw":120.463,"GpuMutex.wait.end":4.314,"GpuMutex.wait.fill":1.625,"GpuMutex.wait.flush":12.27,"GpuMutex.wait.hook":0.138,"GpuMutex.wait.label":26.302,"GpuMutex.wait.other":6.529,"GpuMutex.wait.present":17.301,"Graphics.Draw":34866.323,"Graphics.Draw.draw_and_resource_release":30173.326,"Graphics.Draw.index_upload":1395.718,"Graphics.Draw.validate":1357.534,"Graphics.Draw.vertex_upload":1531.176,"Graphics.DrawWithRecipe":7340.014,"Graphics.DrawWithRecipe.draw_and_resource_release":6556.533,"Graphics.DrawWithRecipe.index_upload":230.962,"Graphics.DrawWithRecipe.validate":147.214,"Graphics.DrawWithRecipe.vertex_upload":345.031,"Recorder.Reap":947.271,"Recorder.Submit":2585.966,"Recorder.Sync":1159.637,"Recorder.WaitSerial":871.191,"Resources.Complete":297.288,"Resources.Prepare":384.888,"Shader.DrawStage":13890.125,"Shader.DrawStage.capture_resources":6959.556,"Shader.DrawStage.materialize":4482.554,"Shader.DrawStage.prepared_invocation":2253.335,"Shader.ResolveGraphicsStagesAbi":15.321,"VideoOut.Flip":4556.56,"VideoOut.Flip.completion_mutex_wait":1.154,"VideoOut.Flip.config_mutex_wait":0.108,"VideoOut.Flip.frame_limit":0.386,"VideoOut.Flip.notify_game":26.531,"VideoOut.Flip.present":4443.502,"VideoOut.Flip.validate":0.799,"VideoOut.Flip.vblank_wait":0.554,"VideoOut.Flip.window_prepare":1.334,"VideoOut.Flip.window_title":81.547,"VideoOut.Readiness":1.507,"VideoOut.Readiness.locks_validate":0.658,"Vulkan.Acquire":1537.428,"Vulkan.Acquire.acquire_fence_wait":1460.814,"Vulkan.Acquire.acquire_image":73.332,"Vulkan.Acquire.fence_reset":1.587,"Vulkan.Acquire.retired_swapchains":1.307,"Vulkan.Dispatch":879.563,"Vulkan.Dispatch.command_record":242.658,"Vulkan.Dispatch.shader_resources":624.963,"Vulkan.DispatchRecipe":284.441,"Vulkan.DispatchRecipe.command_record":282.105,"Vulkan.DrawFromRecipe":7442.816,"Vulkan.Present":48.754,"Vulkan.Present.command_record_scale":19.454,"Vulkan.Present.pixel_upload":15.712,"Vulkan.Present.queue_submit":13.125,"Vulkan.QueuePresent":1427.068,"Vulkan.QueuePresent.queue_present":1425.714,"Vulkan.Retire":1347.805,"Vulkan.Retire.wait":1337.054},"top_phases_ms_per_frame":{"Driver.Packet":64.157,"Graphics.Draw":42.833,"Driver.Packet.draw":42.561,"Driver.Draw":42.044,"Graphics.Draw.draw_and_resource_release":37.068,"Driver.DrawFinish":36.453,"Driver.Draw.prepare":28.405,"Driver.DrawFinish.shader_compile_and_link":18.947},"owned_draw_counts":{},"graphics_track":{"Graphics.Barrier.copy":8337,"Graphics.Barrier.dcc-clear":9768,"Graphics.Barrier.dcc-keys":6512,"Graphics.Barrier.dispatch-lead":23491,"Graphics.Barrier.dispatch-trail":58561,"Graphics.Barrier.draw":414647,"Graphics.Barrier.fill":9816,"Graphics.Barrier.fill-clear":1628,"Graphics.Barrier.indirect-args":5698,"Graphics.Barrier.label-run":331231,"Graphics.Barrier.present-blit":3256,"Graphics.Barrier.shadow-publish":1674,"Graphics.Barrier.staging-in":51079,"Graphics.Barrier.staging-out":23729,"Graphics.Barrier.storage-upload":30526,"Graphics.Barrier.storage-writeback":98994,"Graphics.BarrierMerged.dispatch-lead":46466,"Graphics.BarrierMerged.fill":4876,"Graphics.BarrierMerged.label-run":1009,"Graphics.BarrierMerged.shadow-publish":1674,"Graphics.BarrierMerged.staging-in":20108,"Graphics.BarrierMerged.staging-out":23729,"Graphics.BarrierMerged.storage-writeback":14695,"Graphics.Copy":104160,"Graphics.Copy.bytes":19069716308,"Graphics.RenderPass":182892,"Graphics.RenderPass.Close.command":61703,"Graphics.RenderPass.Close.image":71263,"Graphics.RenderPass.Close.key":13051,"Graphics.RenderPass.Close.label":1009,"Graphics.RenderPass.Close.new-batch":35864,"Graphics.RenderPass.Continued":2450159},"trace_dropped":false,"trace":"aps5-trace-14deacc1f35b-53336.json.gz"} ``` **Slowest frames** (largest slices inside each, inclusive) - present 5033: 115.5 ms at 48773 ms: Driver.Packet (queue worker 0x0) 63.5, Graphics.Draw (draw committer) 47.2, Graphics.Draw.draw_and_resource_release (draw committer) 43.3, Driver.Packet.draw (queue worker 0x0) 43.0 - present 4523: 93.3 ms at 11096 ms: Driver.Packet (queue worker 0x0) 45.5, Graphics.Draw (draw committer) 45.0, Graphics.Draw.draw_and_resource_release (draw committer) 41.4, batch (gpu) 30.1 - present 4610: 92.1 ms at 17560 ms: Driver.Packet (queue worker 0x0) 43.4, Graphics.Draw (draw committer) 40.6, Graphics.Draw.draw_and_resource_release (draw committer) 37.0, Driver.DrawFinish (draw finisher) 33.5 - present 5107: 92.1 ms at 54229 ms: Driver.Packet (queue worker 0x0) 46.3, Graphics.Draw (draw committer) 32.9, Graphics.Draw.draw_and_resource_release (draw committer) 28.4, Driver.Packet.draw (queue worker 0x0) 27.2 - present 4848: 89.0 ms at 35084 ms: Driver.Packet (queue worker 0x0) 43.8, Graphics.Draw (draw committer) 38.7, Graphics.Draw.draw_and_resource_release (draw committer) 35.1, Driver.DrawFinish (draw finisher) 31.0 **Persistent spikes** (frame time above the fastest frame that separates it from a longer frame; one entry per stall, not per frame) - present 5033: 115.5 ms at 48773 ms, persistence 50.1 ms - present 4523: 93.3 ms at 11096 ms, persistence 24.9 ms - present 5107: 92.1 ms at 54229 ms, persistence 24.2 ms - present 4610: 92.1 ms at 17560 ms, persistence 22.7 ms - present 4848: 89.0 ms at 35084 ms, persistence 20.4 ms - present 4426: 87.8 ms at 3946 ms, persistence 17.9 ms - present 4803: 88.4 ms at 31680 ms, persistence 16.9 ms - present 5156: 80.4 ms at 57818 ms, persistence 15.1 ms - present 5014: 83.0 ms at 47384 ms, persistence 13.9 ms - present 4580: 83.5 ms at 15337 ms, persistence 13.7 ms **Threads** (ms per frame) | thread | busy | wait | untraced | in slices < 20 us | largest | |---|---|---|---|---|---| | title | 0.0 (0 %) | 0.0 (0 %) | 73.8 | 0.0 | Shader.ResolveGraphicsStagesAbi 0.0 | | queue worker 0x0 | 31.4 (43 %) | 0.9 (1 %) | 41.4 | 130.4 | Driver.Packet 28.8, Driver.Rewind 3.1 | | title | 0.0 (0 %) | 0.0 (0 %) | 73.8 | 0.0 | | | draw committer | 33.6 (46 %) | 0.3 (0 %) | 39.8 | 52.0 | Graphics.Draw 25.4, Vulkan.DrawFromRecipe 4.9 | | draw finisher | 14.9 (20 %) | 0.0 (0 %) | 58.9 | 79.9 | Driver.DrawFinish 14.9 | | presenter | 2.1 (3 %) | 3.5 (5 %) | 68.2 | 0.0 | VideoOut.Flip 5.6 | | gpu | 25.8 (35 %) | 0.0 (0 %) | 47.9 | 0.0 | batch 25.8 | **Largest slices** (ms per frame, inclusive, all threads): Driver.Packet 28.8, batch 25.8, Graphics.Draw 25.4, Graphics.Draw.draw_and_resource_release 22.2, Driver.Packet.draw 15.9, Driver.Draw 15.6, Driver.DrawFinish 14.9, Driver.Draw.prepare 9.6, Driver.Packet.dispatch 9.2, Driver.Dispatch 9.2 **Longest waits** - Driver.Present.render_fence_wait (presenter) 4.9 ms at 37437 ms, present 4880 - GpuMutex.wait.draw (draw committer) 4.2 ms at 17566 ms, present 4610 - GpuMutex.wait.draw (draw committer) 4.0 ms at 48779 ms, present 5033 - GpuMutex.wait.other (title) 3.6 ms at 31686 ms, present 4803 - Driver.Present.render_fence_wait (presenter) 3.4 ms at 38906 ms, present 4900 - Driver.Present.render_fence_wait (presenter) 3.3 ms at 35683 ms, present 4856 - Driver.Present.render_fence_wait (presenter) 3.2 ms at 22551 ms, present 4678 - Vulkan.Acquire.acquire_fence_wait (presenter) 3.0 ms at 31162 ms, present 4796 - Vulkan.Acquire.acquire_fence_wait (presenter) 2.9 ms at 52892 ms, present 5089 - Driver.Present.render_fence_wait (presenter) 2.9 ms at 53254 ms, present 5094 **Largest GPU batches** (GPU ranges inside, and the CPU slices that recorded each, inclusive) - batch 264252: 5.0 ms at 2225 ms, present 4402: 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 276616: 4.8 ms at 11123 ms, present 4523: GPU no ranges; recorded by Graphics.Draw (draw committer) 11.4, Graphics.Draw.draw_and_resource_release (draw committer) 11.1, Resources.Complete (draw committer) 1.8, Resources.Prepare (draw committer) 1.6 - batch 291754: 4.6 ms at 21965 ms, present 4669: 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 336801: 4.4 ms at 54228 ms, present 5106: 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 337321: 4.3 ms at 54626 ms, present 5111: 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.0 </details> <details> <summary>trace_digest: this PR 02f1afce80</summary> **seconds 240:60** from present 4510: 879 presents, frame p50 67.7 / p90 71.5 / p99 80.1 / max 93.3 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 02f1afce807a, dropped: no ```json {"commit":"02f1afce807a","dirty":false,"env":{"APS5_DRAW_PIPELINE":"1","APS5_LEAN_FRONT":"1","APS5_LEAN_LIST_DIRECT":"1","APS5_LOG_TIMESTAMPS":"1","APS5_NO_PAD_INPUT":"1","APS5_PAD_INPUT_FILE":"<path>","APS5_PIPELINED_DRAWS":"32","APS5_PIPELINE_DISPATCH":"1","APS5_TRACE_DIR":"<path>","APS5_TRACE_EVENTS":"4194304","APS5_TRACE_SECONDS":"240:60","APS5_TRACE_SUMMARY_EVERY":"10"},"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":4510,"ms":60062.97},"presents":879,"frame_ms":{"p50":67.737,"p90":71.487,"p99":80.096,"max":93.293},"gpu_busy_ms_per_present":24.635,"worker_busy_pct":{"queue worker 0x0":78.774},"phase_totals_ms":{"Driver.Completion":0.314,"Driver.Dispatch":8272.998,"Driver.Dispatch.capture_resources":262.401,"Driver.Dispatch.decode_key_device_setup":105.358,"Driver.Dispatch.lookup_cache":2670.488,"Driver.Dispatch.materialize":48.325,"Driver.Dispatch.prepared_invocation":243.039,"Driver.Draw":509.814,"Driver.Draw.device_setup":30.096,"Driver.Draw.draw_enqueued":66.263,"Driver.Draw.draw_handed_off":29.746,"Driver.Draw.post_compile_prepare":4.508,"Driver.Draw.prepare":126.906,"Driver.Draw.shader_compile_and_link":224.993,"Driver.DrawFinish":42874.369,"Driver.DrawFinish.draw_enqueued":16489.118,"Driver.DrawFinish.post_compile_prepare":316.63,"Driver.DrawFinish.shader_compile_and_link":25413.534,"Driver.EndSubmission":711.422,"Driver.Packet":45079.613,"Driver.Packet.device_lock":539.711,"Driver.Packet.dispatch":8302.22,"Driver.Packet.draw":24173.93,"Driver.Packet.execute":5247.862,"Driver.Packet.flip_flush":23.653,"Driver.Packet.flush_between_packets":1218.68,"Driver.Packet.memory_wait":15.925,"Driver.Packet.pipeline_drain":1761.328,"Driver.Packet.pipeline_prepare":507.857,"Driver.Packet.prepare_memory":499.269,"Driver.Packet.rendering_wait":0.583,"Driver.Present":5097.943,"Driver.Present.acquire_image":1554.293,"Driver.Present.device_setup":0.312,"Driver.Present.gpu_mutex_wait":21.323,"Driver.Present.inflight_wait":1.852,"Driver.Present.present_display_buffer":95.107,"Driver.Present.queue_present":1489.865,"Driver.Present.release_and_callback":1.146,"Driver.Present.render_fence_wait":1931.84,"Driver.Present.resize":1.279,"Driver.Present.validate":0.375,"Driver.Rewind":1522.543,"Driver.Suspend":0.175,"GpuMutex.wait.dispatch":4.672,"GpuMutex.wait.draw":100.717,"GpuMutex.wait.end":5.805,"GpuMutex.wait.fill":6.613,"GpuMutex.wait.flush":6.527,"GpuMutex.wait.label":19.132,"GpuMutex.wait.other":3.845,"GpuMutex.wait.present":19.378,"Graphics.Draw":39456.584,"Graphics.Draw.draw_and_resource_release":33955.247,"Graphics.Draw.index_upload":1537.506,"Graphics.Draw.validate":1652.904,"Graphics.Draw.vertex_upload":1836.708,"Graphics.DrawWithRecipe":5307.857,"Graphics.DrawWithRecipe.draw_and_resource_release":4717.22,"Graphics.DrawWithRecipe.index_upload":234.001,"Graphics.DrawWithRecipe.validate":100.075,"Graphics.DrawWithRecipe.vertex_upload":219.737,"Recorder.Reap":990.077,"Recorder.Submit":2749.218,"Recorder.Sync":1235.339,"Recorder.WaitSerial":898.078,"Resources.Complete":308.598,"Resources.Prepare":413.165,"Shader.DrawStage":15351.833,"Shader.DrawStage.capture_resources":8087.595,"Shader.DrawStage.materialize":4676.164,"Shader.DrawStage.prepared_invocation":2370.818,"Shader.ResolveGraphicsStagesAbi":16.353,"VideoOut.Flip":5218.541,"VideoOut.Flip.completion_mutex_wait":1.118,"VideoOut.Flip.config_mutex_wait":0.074,"VideoOut.Flip.frame_limit":0.391,"VideoOut.Flip.notify_game":26.321,"VideoOut.Flip.present":5101.592,"VideoOut.Flip.validate":0.859,"VideoOut.Flip.vblank_wait":0.565,"VideoOut.Flip.window_prepare":1.245,"VideoOut.Flip.window_title":85.671,"VideoOut.Readiness":1.665,"VideoOut.Readiness.locks_validate":0.692,"Vulkan.Acquire":1553.403,"Vulkan.Acquire.acquire_fence_wait":1478.446,"Vulkan.Acquire.acquire_image":71.695,"Vulkan.Acquire.fence_reset":1.634,"Vulkan.Acquire.retired_swapchains":1.243,"Vulkan.Dispatch":870.883,"Vulkan.Dispatch.command_record":234.699,"Vulkan.Dispatch.shader_resources":624.801,"Vulkan.DispatchRecipe":307.017,"Vulkan.DispatchRecipe.command_record":304.375,"Vulkan.DrawFromRecipe":5359.841,"Vulkan.GraphicsPipeline":0.285,"Vulkan.GraphicsPipeline.create":0.095,"Vulkan.GraphicsPipeline.modules_and_state":0.188,"Vulkan.GraphicsPipelineLink":0.059,"Vulkan.Present":52.641,"Vulkan.Present.command_record_scale":18.086,"Vulkan.Present.pixel_upload":22.742,"Vulkan.Present.queue_submit":11.438,"Vulkan.QueuePresent":1488.546,"Vulkan.QueuePresent.queue_present":1487.149,"Vulkan.Retire":1931.446,"Vulkan.Retire.wait":1920.342},"top_phases_ms_per_frame":{"Driver.Packet":51.285,"Driver.DrawFinish":48.776,"Graphics.Draw":44.888,"Graphics.Draw.draw_and_resource_release":38.629,"Driver.DrawFinish.shader_compile_and_link":28.912,"Driver.Packet.draw":27.502,"Driver.DrawFinish.draw_enqueued":18.759,"Shader.DrawStage":17.465},"owned_draw_counts":{},"graphics_track":{"Graphics.Barrier.copy":9027,"Graphics.Barrier.dcc-clear":10548,"Graphics.Barrier.dcc-keys":7032,"Graphics.Barrier.dispatch-lead":25683,"Graphics.Barrier.dispatch-trail":63694,"Graphics.Barrier.draw":450024,"Graphics.Barrier.fill":10617,"Graphics.Barrier.fill-clear":1758,"Graphics.Barrier.indirect-args":6153,"Graphics.Barrier.label-run":357793,"Graphics.Barrier.present-blit":3516,"Graphics.Barrier.shadow-publish":1795,"Graphics.Barrier.staging-in":54989,"Graphics.Barrier.staging-out":25566,"Graphics.Barrier.storage-upload":34020,"Graphics.Barrier.storage-writeback":108438,"Graphics.BarrierMerged.dispatch-lead":50317,"Graphics.BarrierMerged.fill":5245,"Graphics.BarrierMerged.label-run":1086,"Graphics.BarrierMerged.shadow-publish":1795,"Graphics.BarrierMerged.staging-in":21709,"Graphics.BarrierMerged.staging-out":25566,"Graphics.BarrierMerged.storage-writeback":15920,"Graphics.Copy":112611,"Graphics.Copy.bytes":20563609036,"Graphics.RenderPass":198392,"Graphics.RenderPass.Close.command":67291,"Graphics.RenderPass.Close.image":76978,"Graphics.RenderPass.Close.key":14427,"Graphics.RenderPass.Close.label":1086,"Graphics.RenderPass.Close.new-batch":38608,"Graphics.RenderPass.Continued":2642747},"trace_dropped":false,"trace":"aps5-trace-02f1afce807a-13012.json.gz"} ``` **Slowest frames** (largest slices inside each, inclusive) - present 5260: 93.3 ms at 51197 ms: Driver.Packet (queue worker 0x0) 46.4, Driver.DrawFinish (draw finisher) 41.4, Graphics.Draw (draw committer) 30.2, Driver.Packet.draw (queue worker 0x0) 26.7 - present 4951: 89.4 ms at 30080 ms: Driver.DrawFinish (draw finisher) 42.3, Graphics.Draw (draw committer) 40.1, Graphics.Draw.draw_and_resource_release (draw committer) 36.7, Driver.Packet (queue worker 0x0) 32.9 - present 4531: 86.9 ms at 1439 ms: Driver.Packet (queue worker 0x0) 48.6, Driver.DrawFinish (draw finisher) 39.8, Driver.Packet.draw (queue worker 0x0) 32.1, Graphics.Draw (draw committer) 25.2 - present 4896: 86.8 ms at 26284 ms: Driver.DrawFinish (draw finisher) 41.6, Graphics.Draw (draw committer) 40.6, Graphics.Draw.draw_and_resource_release (draw committer) 36.9, Driver.Packet (queue worker 0x0) 34.1 - present 5268: 85.5 ms at 51768 ms: Driver.Packet (queue worker 0x0) 41.2, Driver.DrawFinish (draw finisher) 38.8, Driver.Packet.draw (queue worker 0x0) 26.1, Graphics.Draw (draw committer) 25.6 **Persistent spikes** (frame time above the fastest frame that separates it from a longer frame; one entry per stall, not per frame) - present 5260: 93.3 ms at 51197 ms, persistence 30.2 ms - present 4951: 89.4 ms at 30080 ms, persistence 25.6 ms - present 4531: 86.9 ms at 1439 ms, persistence 23.8 ms - present 4896: 86.8 ms at 26284 ms, persistence 21.5 ms - present 5122: 85.1 ms at 41724 ms, persistence 21.0 ms - present 5268: 85.5 ms at 51768 ms, persistence 19.1 ms - present 4856: 80.1 ms at 23509 ms, persistence 15.7 ms - present 4605: 78.8 ms at 6436 ms, persistence 15.6 ms - present 5096: 80.5 ms at 39928 ms, persistence 15.5 ms - present 4909: 80.5 ms at 27196 ms, persistence 14.7 ms **Threads** (ms per frame) | thread | busy | wait | untraced | in slices < 20 us | largest | |---|---|---|---|---|---| | title | 0.0 (0 %) | 0.0 (0 %) | 68.3 | 0.0 | Shader.ResolveGraphicsStagesAbi 0.0 | | queue worker 0x0 | 27.8 (41 %) | 0.8 (1 %) | 39.7 | 52.3 | Driver.Packet 26.6, Driver.Rewind 1.4 | | draw committer | 33.3 (49 %) | 0.4 (1 %) | 34.6 | 48.0 | Graphics.Draw 25.4, Vulkan.DrawFromRecipe 4.7 | | draw finisher | 24.4 (36 %) | 0.0 (0 %) | 43.9 | 89.2 | Driver.DrawFinish 24.4 | | title | 0.0 (0 %) | 0.0 (0 %) | 68.3 | 0.0 | | | presenter | 2.0 (3 %) | 3.9 (6 %) | 62.4 | 0.1 | VideoOut.Flip 5.9 | | gpu | 24.6 (36 %) | 0.0 (0 %) | 43.7 | 0.0 | batch 24.6 | **Largest slices** (ms per frame, inclusive, all threads): Driver.Packet 26.6, Graphics.Draw 25.4, batch 24.6, Driver.DrawFinish 24.4, Graphics.Draw.draw_and_resource_release 22.0, Driver.Packet.draw 11.1, Driver.DrawFinish.draw_enqueued 9.7, Driver.Packet.dispatch 9.1, Driver.Dispatch 9.0, Driver.DrawFinish.shader_compile_and_link 5.9 **Longest waits** - Driver.Present.render_fence_wait (presenter) 3.8 ms at 18909 ms, present 4789 - GpuMutex.wait.draw (draw committer) 3.7 ms at 26289 ms, present 4896 - Driver.Present.render_fence_wait (presenter) 3.7 ms at 44260 ms, present 5159 - Driver.Present.render_fence_wait (presenter) 3.7 ms at 53500 ms, present 5293 - Driver.Present.render_fence_wait (presenter) 3.6 ms at 15823 ms, present 4743 - Driver.Present.render_fence_wait (presenter) 3.6 ms at 1988 ms, present 4539 - Driver.Present.render_fence_wait (presenter) 3.6 ms at 14479 ms, present 4723 - Driver.Present.render_fence_wait (presenter) 3.6 ms at 28045 ms, present 4921 - Driver.Present.render_fence_wait (presenter) 3.6 ms at 40419 ms, present 5103 - Driver.Present.render_fence_wait (presenter) 3.5 ms at 3894 ms, present 4567 **Largest GPU batches** (GPU ranges inside, and the CPU slices that recorded each, inclusive) - batch 345539: 4.3 ms at 44869 ms, present 5167: 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 283888: 4.2 ms at 4026 ms, present 4568: 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.0 - batch 288448: 4.1 ms at 6990 ms, present 4612: 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.0 - batch 304462: 4.1 ms at 17553 ms, present 4768: 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 314955: 4.1 ms at 24553 ms, present 4870: 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 </details> **Main merged (2026-11-18):** `main` ed1a01d035 merged as e0fcc58ccb (one conflict, the Pm4 test table: this PR's rewind tests beside main's `order-signal`). Every target builds, 127 of 128 focused tests pass (the same `agc_driver_target_memo_lean_front` as above), `tools/check_conventions.py` passes. The measurements above are from 02f1afce80. ### Checklist - [x] Based on current `main`; no other open PR implements the same functions - [x] One topic per PR; follow-ups go in a new PR - [x] No comments in code except [technical debt](https://github.com/boykopovar/AnyPS5/blob/main/docs/dev/CONVENTIONS.md) - [x] Unimplemented paths throw (`NotImplemented_nid_no_patch`); silent stubs are listed under Silent stubs in their library's [technical debt](https://github.com/boykopovar/AnyPS5/tree/main/docs/dev/debt) file - [x] No notes, investigation `.md` files or images added to the repository (attach them to this PR) - [x] New third-party code is a submodule built from source - [x] Generic behaviour, not specific to one title - [x] Depends on: #15456 - [x] Fixes: none - [x] Unblocks: none - [x] GPUs tested: AMD Radeon RX 7900 XTX, AMD Software 26.10.1 (32.0.32015.7029), Windows 11 Pro 26300 - [x] AI-assisted: yes
MarcZX10 commented 2026-11-18 01:01:00 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-18T01:01:00Z.

Review: COMMENTED


Reviewed — no blocking findings

The inspected execution paths show no verified blocking defect, but this review is incomplete and does not justify approval.

What I ran

  • Reviewed head e0fcc58ccbc7b0730381d14776990b16c5510f8a; no commands or tests were run.
  • Read the prepared description, commit list, manifest, diff excerpts, and selected source files through repo_read.py.

Results

Check Result Note
Targeted code review not run Partial review only
Tests not run Test results in the description are author-reported
Build and conventions not run Not independently verified

Findings

Blocking

None in the code inspected.

Non-blocking

None.

Not verified

This was a partial review of the broad change. I read core/libs/prx/libSceAgc/CMakeLists.txt, core/libs/prx/libSceAgc/Patch/src/Rewind.cpp, core/libs/prx/libSceAgc/tests/RewindPatch.cpp, core/libs/prx/libSceAgcDriver/CMakeLists.txt excerpts, and selected portions of SegmentLoop.cpp, LeanFront.cpp, LeanDraw.cpp, RegisterLists.cpp, RewindKick.cpp, Submission.cpp, and LeanTails.cpp. I did not read every changed file or every changed hunk. docs/dev/debt/libSceAgcDriver.md was excluded from the review folder because it was too large. Builds, tests, performance captures, and physical-console behavior were not independently verified.

To get this to a good state

Nothing is required. The optional point is to complete review of the remaining changed files before treating this as a merge recommendation.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5949236695 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/22434#pullrequestreview-5949236695). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-11-18T01:01:00Z. **Review:** COMMENTED --- # Reviewed — no blocking findings The inspected execution paths show no verified blocking defect, but this review is incomplete and does not justify approval. ## What I ran - Reviewed head `e0fcc58ccbc7b0730381d14776990b16c5510f8a`; no commands or tests were run. - Read the prepared description, commit list, manifest, diff excerpts, and selected source files through `repo_read.py`. ## Results | Check | Result | Note | |---|---|---| | Targeted code review | not run | Partial review only | | Tests | not run | Test results in the description are author-reported | | Build and conventions | not run | Not independently verified | ## Findings ### Blocking None in the code inspected. ### Non-blocking None. ## Not verified This was a partial review of the broad change. I read `core/libs/prx/libSceAgc/CMakeLists.txt`, `core/libs/prx/libSceAgc/Patch/src/Rewind.cpp`, `core/libs/prx/libSceAgc/tests/RewindPatch.cpp`, `core/libs/prx/libSceAgcDriver/CMakeLists.txt` excerpts, and selected portions of `SegmentLoop.cpp`, `LeanFront.cpp`, `LeanDraw.cpp`, `RegisterLists.cpp`, `RewindKick.cpp`, `Submission.cpp`, and `LeanTails.cpp`. I did not read every changed file or every changed hunk. `docs/dev/debt/libSceAgcDriver.md` was excluded from the review folder because it was too large. Builds, tests, performance captures, and physical-console behavior were not independently verified. ## To get this to a good state Nothing is required. The optional point is to complete review of the remaining changed files before treating this as a merge recommendation.
MarcZX10 commented 2026-11-21 13:36:22 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-21T13:36:22Z.

Review: COMMENTED


Reviewed — comments

The change adds a queue-0 packet loop and finisher draw path; this review is incomplete because I inspected only selected implementation files and did not run checks.

What I ran

No build or tests were run. I read the prepared description, commit list, manifest, diff, and targeted code at head b0041a72bfc2c801a7c7f281f821e34ab5180f68 using repo_read.py.

Results

Check Result Note
Targeted code inspection passed Selected implementation paths read
Build and tests not run No checks run in this review

Findings

Blocking

None identified in the inspected code.

Non-blocking

No specific code change is requested from this partial inspection.

Not verified

The review folder lists 64 changed repository files. I read selected sections of SegmentLoop.cpp, LeanDraw.cpp, LeanFront.cpp, LeanTails.cpp, and RewindKick.cpp, plus the prepared description, commits, manifest, and diff. I did not read every changed file, including the full contents of the large implementation files, or verify the performance and test claims in the description. The manifest lists docs/dev/debt/libSceAgcDriver.md and docs/user/USAGE.md as excluded from the review folder; these files were not read. No build, test suite, negative control, or physical-console behavior was verified.

To get this to a good state

Nothing is required. Optional: complete a full inspection of the changed files and run the relevant checks before making a merge decision.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:6005543107 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/22434#pullrequestreview-6005543107). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-11-21T13:36:22Z. **Review:** COMMENTED --- # Reviewed — comments The change adds a queue-0 packet loop and finisher draw path; this review is incomplete because I inspected only selected implementation files and did not run checks. ## What I ran No build or tests were run. I read the prepared description, commit list, manifest, diff, and targeted code at head `b0041a72bfc2c801a7c7f281f821e34ab5180f68` using `repo_read.py`. ## Results | Check | Result | Note | |---|---|---| | Targeted code inspection | passed | Selected implementation paths read | | Build and tests | not run | No checks run in this review | ## Findings ### Blocking None identified in the inspected code. ### Non-blocking No specific code change is requested from this partial inspection. ## Not verified The review folder lists 64 changed repository files. I read selected sections of `SegmentLoop.cpp`, `LeanDraw.cpp`, `LeanFront.cpp`, `LeanTails.cpp`, and `RewindKick.cpp`, plus the prepared description, commits, manifest, and diff. I did not read every changed file, including the full contents of the large implementation files, or verify the performance and test claims in the description. The manifest lists `docs/dev/debt/libSceAgcDriver.md` and `docs/user/USAGE.md` as excluded from the review folder; these files were not read. No build, test suite, negative control, or physical-console behavior was verified. ## To get this to a good state Nothing is required. Optional: complete a full inspection of the changed files and run the relevant checks before making a merge decision.
ligmaSec commented 2026-12-03 22:09:51 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by ligmaSec on 2026-12-03T22:09:51Z.

Review: COMMENTED


The head still conflicts with main a1b75b0947 in the submission, rewind and draw-finisher paths. Please rebase the validated packet table and the finisher handoff together. The key controls are retaining the taken tail when guest bytes change and preserving the fallback packet path when the table cannot prove a segment. Same-machine trace summaries should identify the exact rebased main and candidate if the busy-time changes are retained as a claim. Paired execution is pending the merge resolution.

AI-assisted: yes.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:6179478836 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/22434#pullrequestreview-6179478836). Originally posted by [ligmaSec](https://github.com/ligmaSec) on 2026-12-03T22:09:51Z. **Review:** COMMENTED --- The head still conflicts with `main` `a1b75b0947` in the submission, rewind and draw-finisher paths. Please rebase the validated packet table and the finisher handoff together. The key controls are retaining the taken tail when guest bytes change and preserving the fallback packet path when the table cannot prove a segment. Same-machine trace summaries should identify the exact rebased main and candidate if the busy-time changes are retained as a claim. Paired execution is pending the merge resolution. AI-assisted: yes.
This pull request cannot be merged automatically due to conflicts.
Merge manually to resolve the conflicts.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin 'upstream-pr/22434:upstream-pr/22434'
git switch 'upstream-pr/22434'

Merge

Merge the changes and update on Forgejo.

Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.

git switch 'main'
git merge --no-ff 'upstream-pr/22434'
git switch 'upstream-pr/22434'
git rebase 'main'
git switch 'main'
git merge --ff-only 'upstream-pr/22434'
git switch 'upstream-pr/22434'
git rebase 'main'
git switch 'main'
git merge --no-ff 'upstream-pr/22434'
git switch 'main'
git merge --squash 'upstream-pr/22434'
git switch 'main'
git merge --ff-only 'upstream-pr/22434'
git switch 'main'
git merge 'upstream-pr/22434'
git push origin 'main'
Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
boykopovar/AnyPS5!22434
No description provided.