perf(agc): read an indirect draw's records on the CPU when no unfinished batch writes them #18670

Merged
oneandonlydean merged 2 commits from upstream-pr/18670 into main 2026-11-14 04:45:58 +00:00
oneandonlydean commented 2026-11-12 01:26:42 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by oneandonlydean on 2026-11-12T01:26:42Z.


What

An indirect draw whose records no unfinished batch writes now has them read on the CPU and is recorded as plain draws, instead of taking the GPU-side path.

The GPU-side path records the argument barrier outside a render pass, and when a rule fixes the vertex or the instance count it also copies the records to a scratch buffer and patches them there (a copy, a vkCmdUpdateBuffer per record and two more barriers). Nothing of that may sit inside a pass, so every such draw ends the open pass and begins its own. On PPSA21564 that is the whole forced count of the [draws] profile line: 72k to 80k of about 100k passes begun per 10 s, and about 460k of 610k recorded barriers.

The GPU has to read the records only while something still writes them. Recorder::PendingWriteSettled says when that is over: no write over the range in the open batch, and every in-flight batch that writes it has signaled. The records in guest memory are final then, so the draw takes the existing CPU path (the one used for records that are not imported or have a label pending) and continues the open pass. Records a dispatch or an address-based build still writes stay on the GPU-side path as before. A count buffer keeps the GPU-side path together with its records. APS5_NO_SETTLED_INDIRECT_READ=1 restores the previous behaviour; the profile line lists the new case as records settled.

Tested

Linux, RTX 4090 (24 GB), NVIDIA 610.57.04, i9-14900KF, PPSA21564 01.007.000, 3840x2160, -lvl big_hand_pirate_island, no input, 300 s per arm, three paired rounds, each in an exclusive window with a cold shader cache per arm, APS5_PROFILE_DRAW=1 APS5_TRACE_SUMMARY_EVERY=10. Both arms are one build (main 8ee20ce4cf plus this change): arm A sets APS5_NO_SETTLED_INDIRECT_READ=1, arm B is the default. Medians of the last twelve 10 s windows:

per 10 s unless noted A r1 B r1 A r2 B r2 A r3 B r3
render passes begun 110990 26949 99826 29142 102098 29555
of them forced 79950 1601 72300 3524 73450 3328
barriers recorded 664028 209789 614761 226664 610768 224250
indirect draws GPU-side 90989 2489 82079 4530 83753 4348
indirect draws read settled 0 83588 0 87600 0 73893
GPU busy per present 100.3 ms 76.1 ms 100.3 ms 72.9 ms 97.5 ms 75.0 ms
frame p50 260.1 ms 269.3 ms 263.5 ms 264.4 ms 264.0 ms 258.4 ms

GPU time per present falls by about a quarter. The frame time does not move (+3.5%, +0.3%, -2.1%, around the 3% run-to-run spread of this scene): the scene is limited by the per-draw work of the queue 0 worker, not by the GPU, so the gain shows where the GPU is the limit. Dumped frames show the level in both arms of every round; no crash, device loss or abort in any run log.

agc_driver_rect_list_indirect keeps covering the GPU-side path (it sets the switch), and the new agc_driver_settled_indirect_read runs the same draws over settled records and requires the same bytes as the direct draws. The 31 execution tests that touch indirect draws, draw-cache reuse or pass breaks pass on the RTX 4090; the rest of the suite was not run locally.

Not tested: AMD or Intel GPUs, Windows, other titles.

Capture lines for the perf numbers missing label: one run per commit in one exclusive window, same machine and scene as above, shader cache warmed by a run of the same build first, only APS5_TRACE_SECONDS=210:60 set. First line main a6fbf9ce96 (the merge base), second line this head bc68b033d1. GPU busy per present 107.1 ms to 81.0 ms, as in the rounds above. It is one run per commit, so the paired rounds above stay the frame-time evidence (p50 233.6 ms and 219.2 ms here).

{"commit":"a6fbf9ce9632","dirty":false,"env":{"APS5_TRACE_SECONDS":"210:60"},"gpu":"NVIDIA GeForce RTX 4090","driver":"NVIDIA 610.57.04","os":"Linux 7.2.3-1-cachyos","cpu":"Intel(R) Core(TM) i9-14900KF","cpu_threads":32,"memory_mib":64118,"title_id":"PPSA21564","content_version":"01.007.000","resolution":"3840x2160","window":{"spec":"seconds 210:60","first_present":2461,"ms":60163.308},"presents":255,"frame_ms":{"p50":233.629,"p90":244.556,"p99":385.935,"max":652.123},"gpu_busy_ms_per_present":107.113,"worker_busy_pct":{"queue worker 0x0":98.471,"queue worker 0x48":94.58,"queue worker 0x40":99.709,"queue worker 0x46":0.212},"phase_totals_ms":{"Driver.Completion":17.951,"Driver.Dispatch":4856.47,"Driver.Dispatch.capture_resources":295.08,"Driver.Dispatch.decode_key_device_setup":59.694,"Driver.Dispatch.lookup_cache":60.847,"Driver.Dispatch.materialize":25.611,"Driver.Dispatch.prepared_invocation":21.197,"Driver.Draw":40769.28,"Driver.Draw.device_setup":1828.631,"Driver.Draw.draw_enqueued":14621.109,"Driver.Draw.post_compile_prepare":230.952,"Driver.Draw.prepare":4198.234,"Driver.Draw.shader_compile_and_link":18803.97,"Driver.EndSubmission":203.544,"Driver.Packet":176039.495,"Driver.Packet.device_lock":240.49,"Driver.Packet.dispatch":5935.952,"Driver.Packet.draw":41167.541,"Driver.Packet.execute":1830.961,"Driver.Packet.flip_flush":7.836,"Driver.Packet.flush_between_packets":738.331,"Driver.Packet.memory_wait":113546.235,"Driver.Packet.pipeline_drain":325.209,"Driver.Packet.pipeline_prepare":345.314,"Driver.Packet.prepare_memory":2672.856,"Driver.Packet.rendering_wait":0.238,"Driver.Present":134.292,"Driver.Present.acquire_image":6.038,"Driver.Present.device_setup":0.122,"Driver.Present.gpu_mutex_wait":0.343,"Driver.Present.inflight_wait":0.396,"Driver.Present.present_display_buffer":22.977,"Driver.Present.queue_present":63.722,"Driver.Present.release_and_callback":0.187,"Driver.Present.render_fence_wait":40.088,"Driver.Present.resize":0.243,"Driver.Present.validate":0.062,"Driver.Suspend":0.046,"GpuMutex.wait.dispatch":296.202,"GpuMutex.wait.draw":516.37,"GpuMutex.wait.end":37.57,"GpuMutex.wait.fill":0.57,"GpuMutex.wait.flush":164.155,"GpuMutex.wait.hook":24.02,"GpuMutex.wait.indirect":7.623,"GpuMutex.wait.label":328.785,"GpuMutex.wait.other":0.0,"GpuMutex.wait.present":0.107,"GpuMutex.wait.wait":16.481,"Graphics.Draw":38721.646,"Graphics.Draw.draw_and_resource_release":32381.936,"Graphics.Draw.index_upload":1298.368,"Graphics.Draw.validate":2678.066,"Graphics.Draw.vertex_upload":1940.665,"Graphics.DrawWithRecipe":52.927,"Graphics.DrawWithRecipe.draw_and_resource_release":4.824,"Graphics.DrawWithRecipe.index_upload":0.082,"Graphics.DrawWithRecipe.validate":0.13,"Graphics.DrawWithRecipe.vertex_upload":0.596,"Recorder.Reap":895.674,"Recorder.Submit":2372.1,"Recorder.WaitSerial":1098.519,"Resources.Complete":3577.873,"Resources.Prepare":6029.233,"Shader.DrawStage":13897.972,"Shader.DrawStage.capture_resources":10099.529,"Shader.DrawStage.materialize":2584.204,"Shader.DrawStage.prepared_invocation":1138.901,"Shader.ResolveAbi":40.995,"Shader.ResolveGraphicsAbi":14.571,"Shader.ResolveGraphicsStagesAbi":435.426,"VideoOut.Flip":143.988,"VideoOut.Flip.completion_mutex_wait":0.119,"VideoOut.Flip.config_mutex_wait":0.019,"VideoOut.Flip.frame_limit":0.097,"VideoOut.Flip.notify_game":6.285,"VideoOut.Flip.present":134.398,"VideoOut.Flip.validate":0.194,"VideoOut.Flip.vblank_wait":0.137,"VideoOut.Flip.window_prepare":0.27,"VideoOut.Flip.window_title":2.382,"VideoOut.Readiness":0.363,"VideoOut.Readiness.locks_validate":0.178,"Vulkan.Acquire":5.705,"Vulkan.Acquire.acquire_fence_wait":1.131,"Vulkan.Acquire.acquire_image":3.145,"Vulkan.Acquire.fence_reset":1.242,"Vulkan.Acquire.retired_swapchains":0.12,"Vulkan.Dispatch":1218.907,"Vulkan.Dispatch.command_record":226.99,"Vulkan.Dispatch.shader_resources":986.073,"Vulkan.DispatchRecipe":112.509,"Vulkan.DispatchRecipe.command_record":111.716,"Vulkan.DrawFromRecipe":53.021,"Vulkan.GraphicsPipeline":564.054,"Vulkan.GraphicsPipeline.create":558.912,"Vulkan.GraphicsPipeline.modules_and_state":5.119,"Vulkan.GraphicsPipelineLibrary":557.549,"Vulkan.GraphicsPipelineLink":0.125,"Vulkan.Present":19.448,"Vulkan.Present.command_record_scale":6.322,"Vulkan.Present.pixel_upload":0.44,"Vulkan.Present.queue_submit":12.555,"Vulkan.QueuePresent":63.463,"Vulkan.QueuePresent.queue_present":63.208,"Vulkan.Retire":39.475,"Vulkan.Retire.wait":36.259},"top_phases_ms_per_frame":{"Driver.Packet":690.351,"Driver.Packet.memory_wait":445.279,"Driver.Packet.draw":161.441,"Driver.Draw":159.88,"Graphics.Draw":151.85,"Graphics.Draw.draw_and_resource_release":126.988,"Driver.Draw.shader_compile_and_link":73.741,"Driver.Draw.draw_enqueued":57.338},"owned_draw_counts":{},"trace_dropped":true,"trace_dropped_threads":{"queue worker 0x0":{"events_full_after_s":6.087,"events_lost":2262257,"totals_full":false},"draw committer":{"events_full_after_s":13.833,"events_lost":863956,"totals_full":false}},"trace":"aps5-trace-a6fbf9ce9632-2660090.json.gz"}
{"commit":"bc68b033d183","dirty":false,"env":{"APS5_TRACE_SECONDS":"210:60"},"gpu":"NVIDIA GeForce RTX 4090","driver":"NVIDIA 610.57.04","os":"Linux 7.2.3-1-cachyos","cpu":"Intel(R) Core(TM) i9-14900KF","cpu_threads":32,"memory_mib":64118,"title_id":"PPSA21564","content_version":"01.007.000","resolution":"3840x2160","window":{"spec":"seconds 210:60","first_present":2395,"ms":60020.025},"presents":270,"frame_ms":{"p50":219.218,"p90":227.412,"p99":364.201,"max":479.333},"gpu_busy_ms_per_present":81.034,"worker_busy_pct":{"queue worker 0x0":98.274,"queue worker 0x48":94.499,"queue worker 0x40":99.641,"queue worker 0x46":0.282},"phase_totals_ms":{"Driver.Completion":18.066,"Driver.Dispatch":4572.183,"Driver.Dispatch.capture_resources":292.136,"Driver.Dispatch.decode_key_device_setup":63.399,"Driver.Dispatch.lookup_cache":65.331,"Driver.Dispatch.materialize":26.765,"Driver.Dispatch.prepared_invocation":22.001,"Driver.Draw":40101.708,"Driver.Draw.device_setup":1958.695,"Driver.Draw.draw_enqueued":12929.495,"Driver.Draw.post_compile_prepare":227.877,"Driver.Draw.prepare":4379.575,"Driver.Draw.shader_compile_and_link":19575.325,"Driver.EndSubmission":202.163,"Driver.Packet":175456.663,"Driver.Packet.device_lock":256.637,"Driver.Packet.dispatch":5586.947,"Driver.Packet.draw":40510.893,"Driver.Packet.execute":2372.969,"Driver.Packet.flip_flush":12.684,"Driver.Packet.flush_between_packets":777.686,"Driver.Packet.memory_wait":113336.852,"Driver.Packet.pipeline_drain":367.766,"Driver.Packet.pipeline_prepare":365.804,"Driver.Packet.prepare_memory":2460.165,"Driver.Packet.rendering_wait":0.26,"Driver.Present":142.373,"Driver.Present.acquire_image":6.856,"Driver.Present.device_setup":0.132,"Driver.Present.gpu_mutex_wait":0.469,"Driver.Present.inflight_wait":0.417,"Driver.Present.present_display_buffer":27.86,"Driver.Present.queue_present":66.438,"Driver.Present.release_and_callback":0.168,"Driver.Present.render_fence_wait":39.586,"Driver.Present.resize":0.272,"Driver.Present.validate":0.066,"Driver.Suspend":0.104,"GpuMutex.wait.dispatch":357.906,"GpuMutex.wait.draw":521.397,"GpuMutex.wait.end":43.24,"GpuMutex.wait.fill":2.574,"GpuMutex.wait.flush":73.511,"GpuMutex.wait.hook":22.601,"GpuMutex.wait.indirect":6.439,"GpuMutex.wait.label":337.682,"GpuMutex.wait.present":0.219,"GpuMutex.wait.wait":13.135,"Graphics.Draw":36427.606,"Graphics.Draw.draw_and_resource_release":27936.709,"Graphics.Draw.index_upload":1312.796,"Graphics.Draw.validate":2828.473,"Graphics.Draw.vertex_upload":1766.06,"Graphics.DrawWithRecipe":100.212,"Graphics.DrawWithRecipe.draw_and_resource_release":6.624,"Graphics.DrawWithRecipe.index_upload":0.116,"Graphics.DrawWithRecipe.validate":0.177,"Graphics.DrawWithRecipe.vertex_upload":0.743,"Recorder.Reap":859.693,"Recorder.Submit":2127.073,"Recorder.WaitSerial":1036.048,"Resources.Complete":3265.968,"Resources.Prepare":5318.323,"Shader.DrawStage":14549.375,"Shader.DrawStage.capture_resources":10648.895,"Shader.DrawStage.materialize":2628.658,"Shader.DrawStage.prepared_invocation":1191.946,"Shader.ResolveAbi":48.267,"Shader.ResolveGraphicsAbi":17.135,"Shader.ResolveGraphicsStagesAbi":505.912,"VideoOut.Flip":148.529,"VideoOut.Flip.completion_mutex_wait":0.111,"VideoOut.Flip.config_mutex_wait":0.02,"VideoOut.Flip.frame_limit":0.107,"VideoOut.Flip.notify_game":3.476,"VideoOut.Flip.present":142.22,"VideoOut.Flip.validate":0.226,"VideoOut.Flip.vblank_wait":0.14,"VideoOut.Flip.window_prepare":0.279,"VideoOut.Flip.window_title":1.882,"VideoOut.Readiness":0.394,"VideoOut.Readiness.locks_validate":0.205,"Vulkan.Acquire":6.079,"Vulkan.Acquire.acquire_fence_wait":1.19,"Vulkan.Acquire.acquire_image":3.413,"Vulkan.Acquire.fence_reset":1.359,"Vulkan.Acquire.retired_swapchains":0.07,"Vulkan.Dispatch":1198.176,"Vulkan.Dispatch.command_record":241.336,"Vulkan.Dispatch.shader_resources":950.715,"Vulkan.DispatchRecipe":115.888,"Vulkan.DispatchRecipe.command_record":115.057,"Vulkan.DrawFromRecipe":100.332,"Vulkan.GraphicsPipeline":380.116,"Vulkan.GraphicsPipeline.create":377.56,"Vulkan.GraphicsPipeline.modules_and_state":2.537,"Vulkan.GraphicsPipelineLibrary":377.33,"Vulkan.GraphicsPipelineLink":0.089,"Vulkan.Present":24.209,"Vulkan.Present.command_record_scale":6.944,"Vulkan.Present.pixel_upload":0.463,"Vulkan.Present.queue_submit":16.689,"Vulkan.QueuePresent":66.185,"Vulkan.QueuePresent.queue_present":65.941,"Vulkan.Retire":39.169,"Vulkan.Retire.wait":35.324},"top_phases_ms_per_frame":{"Driver.Packet":649.839,"Driver.Packet.memory_wait":419.766,"Driver.Packet.draw":150.04,"Driver.Draw":148.525,"Graphics.Draw":134.917,"Graphics.Draw.draw_and_resource_release":103.469,"Driver.Draw.shader_compile_and_link":72.501,"Shader.DrawStage":53.887},"owned_draw_counts":{},"trace_dropped":true,"trace_dropped_threads":{"queue worker 0x0":{"events_full_after_s":7.03,"events_lost":2074070,"totals_full":false},"draw committer":{"events_full_after_s":18.886,"events_lost":598353,"totals_full":false}},"trace":"aps5-trace-bc68b033d183-2682686.json.gz"}

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: none
  • Fixes: none
  • Unblocks: none
  • GPUs tested: NVIDIA RTX 4090, driver 610.57.04, Linux
  • AI-assisted: yes
<!-- greyfinch-sync:boykopovar/AnyPS5:issue:5269603308 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/18670). Originally posted by [oneandonlydean](https://github.com/oneandonlydean) on 2026-11-12T01:26:42Z. --- ### What An indirect draw whose records no unfinished batch writes now has them read on the CPU and is recorded as plain draws, instead of taking the GPU-side path. The GPU-side path records the argument barrier outside a render pass, and when a rule fixes the vertex or the instance count it also copies the records to a scratch buffer and patches them there (a copy, a `vkCmdUpdateBuffer` per record and two more barriers). Nothing of that may sit inside a pass, so every such draw ends the open pass and begins its own. On PPSA21564 that is the whole `forced` count of the `[draws]` profile line: 72k to 80k of about 100k passes begun per 10 s, and about 460k of 610k recorded barriers. The GPU has to read the records only while something still writes them. `Recorder::PendingWriteSettled` says when that is over: no write over the range in the open batch, and every in-flight batch that writes it has signaled. The records in guest memory are final then, so the draw takes the existing CPU path (the one used for records that are not imported or have a label pending) and continues the open pass. Records a dispatch or an address-based build still writes stay on the GPU-side path as before. A count buffer keeps the GPU-side path together with its records. `APS5_NO_SETTLED_INDIRECT_READ=1` restores the previous behaviour; the profile line lists the new case as `records settled`. ### Tested Linux, RTX 4090 (24 GB), NVIDIA 610.57.04, i9-14900KF, PPSA21564 01.007.000, 3840x2160, `-lvl big_hand_pirate_island`, no input, 300 s per arm, three paired rounds, each in an exclusive window with a cold shader cache per arm, `APS5_PROFILE_DRAW=1 APS5_TRACE_SUMMARY_EVERY=10`. Both arms are one build (`main` 8ee20ce4cf plus this change): arm A sets `APS5_NO_SETTLED_INDIRECT_READ=1`, arm B is the default. Medians of the last twelve 10 s windows: | per 10 s unless noted | A r1 | B r1 | A r2 | B r2 | A r3 | B r3 | |---|---|---|---|---|---|---| | render passes begun | 110990 | 26949 | 99826 | 29142 | 102098 | 29555 | | of them forced | 79950 | 1601 | 72300 | 3524 | 73450 | 3328 | | barriers recorded | 664028 | 209789 | 614761 | 226664 | 610768 | 224250 | | indirect draws GPU-side | 90989 | 2489 | 82079 | 4530 | 83753 | 4348 | | indirect draws read settled | 0 | 83588 | 0 | 87600 | 0 | 73893 | | GPU busy per present | 100.3 ms | 76.1 ms | 100.3 ms | 72.9 ms | 97.5 ms | 75.0 ms | | frame p50 | 260.1 ms | 269.3 ms | 263.5 ms | 264.4 ms | 264.0 ms | 258.4 ms | GPU time per present falls by about a quarter. The frame time does not move (+3.5%, +0.3%, -2.1%, around the 3% run-to-run spread of this scene): the scene is limited by the per-draw work of the queue 0 worker, not by the GPU, so the gain shows where the GPU is the limit. Dumped frames show the level in both arms of every round; no crash, device loss or abort in any run log. `agc_driver_rect_list_indirect` keeps covering the GPU-side path (it sets the switch), and the new `agc_driver_settled_indirect_read` runs the same draws over settled records and requires the same bytes as the direct draws. The 31 execution tests that touch indirect draws, draw-cache reuse or pass breaks pass on the RTX 4090; the rest of the suite was not run locally. Not tested: AMD or Intel GPUs, Windows, other titles. Capture lines for the `perf numbers missing` label: one run per commit in one exclusive window, same machine and scene as above, shader cache warmed by a run of the same build first, only `APS5_TRACE_SECONDS=210:60` set. First line `main` a6fbf9ce96 (the merge base), second line this head bc68b033d1. GPU busy per present 107.1 ms to 81.0 ms, as in the rounds above. It is one run per commit, so the paired rounds above stay the frame-time evidence (p50 233.6 ms and 219.2 ms here). ``` {"commit":"a6fbf9ce9632","dirty":false,"env":{"APS5_TRACE_SECONDS":"210:60"},"gpu":"NVIDIA GeForce RTX 4090","driver":"NVIDIA 610.57.04","os":"Linux 7.2.3-1-cachyos","cpu":"Intel(R) Core(TM) i9-14900KF","cpu_threads":32,"memory_mib":64118,"title_id":"PPSA21564","content_version":"01.007.000","resolution":"3840x2160","window":{"spec":"seconds 210:60","first_present":2461,"ms":60163.308},"presents":255,"frame_ms":{"p50":233.629,"p90":244.556,"p99":385.935,"max":652.123},"gpu_busy_ms_per_present":107.113,"worker_busy_pct":{"queue worker 0x0":98.471,"queue worker 0x48":94.58,"queue worker 0x40":99.709,"queue worker 0x46":0.212},"phase_totals_ms":{"Driver.Completion":17.951,"Driver.Dispatch":4856.47,"Driver.Dispatch.capture_resources":295.08,"Driver.Dispatch.decode_key_device_setup":59.694,"Driver.Dispatch.lookup_cache":60.847,"Driver.Dispatch.materialize":25.611,"Driver.Dispatch.prepared_invocation":21.197,"Driver.Draw":40769.28,"Driver.Draw.device_setup":1828.631,"Driver.Draw.draw_enqueued":14621.109,"Driver.Draw.post_compile_prepare":230.952,"Driver.Draw.prepare":4198.234,"Driver.Draw.shader_compile_and_link":18803.97,"Driver.EndSubmission":203.544,"Driver.Packet":176039.495,"Driver.Packet.device_lock":240.49,"Driver.Packet.dispatch":5935.952,"Driver.Packet.draw":41167.541,"Driver.Packet.execute":1830.961,"Driver.Packet.flip_flush":7.836,"Driver.Packet.flush_between_packets":738.331,"Driver.Packet.memory_wait":113546.235,"Driver.Packet.pipeline_drain":325.209,"Driver.Packet.pipeline_prepare":345.314,"Driver.Packet.prepare_memory":2672.856,"Driver.Packet.rendering_wait":0.238,"Driver.Present":134.292,"Driver.Present.acquire_image":6.038,"Driver.Present.device_setup":0.122,"Driver.Present.gpu_mutex_wait":0.343,"Driver.Present.inflight_wait":0.396,"Driver.Present.present_display_buffer":22.977,"Driver.Present.queue_present":63.722,"Driver.Present.release_and_callback":0.187,"Driver.Present.render_fence_wait":40.088,"Driver.Present.resize":0.243,"Driver.Present.validate":0.062,"Driver.Suspend":0.046,"GpuMutex.wait.dispatch":296.202,"GpuMutex.wait.draw":516.37,"GpuMutex.wait.end":37.57,"GpuMutex.wait.fill":0.57,"GpuMutex.wait.flush":164.155,"GpuMutex.wait.hook":24.02,"GpuMutex.wait.indirect":7.623,"GpuMutex.wait.label":328.785,"GpuMutex.wait.other":0.0,"GpuMutex.wait.present":0.107,"GpuMutex.wait.wait":16.481,"Graphics.Draw":38721.646,"Graphics.Draw.draw_and_resource_release":32381.936,"Graphics.Draw.index_upload":1298.368,"Graphics.Draw.validate":2678.066,"Graphics.Draw.vertex_upload":1940.665,"Graphics.DrawWithRecipe":52.927,"Graphics.DrawWithRecipe.draw_and_resource_release":4.824,"Graphics.DrawWithRecipe.index_upload":0.082,"Graphics.DrawWithRecipe.validate":0.13,"Graphics.DrawWithRecipe.vertex_upload":0.596,"Recorder.Reap":895.674,"Recorder.Submit":2372.1,"Recorder.WaitSerial":1098.519,"Resources.Complete":3577.873,"Resources.Prepare":6029.233,"Shader.DrawStage":13897.972,"Shader.DrawStage.capture_resources":10099.529,"Shader.DrawStage.materialize":2584.204,"Shader.DrawStage.prepared_invocation":1138.901,"Shader.ResolveAbi":40.995,"Shader.ResolveGraphicsAbi":14.571,"Shader.ResolveGraphicsStagesAbi":435.426,"VideoOut.Flip":143.988,"VideoOut.Flip.completion_mutex_wait":0.119,"VideoOut.Flip.config_mutex_wait":0.019,"VideoOut.Flip.frame_limit":0.097,"VideoOut.Flip.notify_game":6.285,"VideoOut.Flip.present":134.398,"VideoOut.Flip.validate":0.194,"VideoOut.Flip.vblank_wait":0.137,"VideoOut.Flip.window_prepare":0.27,"VideoOut.Flip.window_title":2.382,"VideoOut.Readiness":0.363,"VideoOut.Readiness.locks_validate":0.178,"Vulkan.Acquire":5.705,"Vulkan.Acquire.acquire_fence_wait":1.131,"Vulkan.Acquire.acquire_image":3.145,"Vulkan.Acquire.fence_reset":1.242,"Vulkan.Acquire.retired_swapchains":0.12,"Vulkan.Dispatch":1218.907,"Vulkan.Dispatch.command_record":226.99,"Vulkan.Dispatch.shader_resources":986.073,"Vulkan.DispatchRecipe":112.509,"Vulkan.DispatchRecipe.command_record":111.716,"Vulkan.DrawFromRecipe":53.021,"Vulkan.GraphicsPipeline":564.054,"Vulkan.GraphicsPipeline.create":558.912,"Vulkan.GraphicsPipeline.modules_and_state":5.119,"Vulkan.GraphicsPipelineLibrary":557.549,"Vulkan.GraphicsPipelineLink":0.125,"Vulkan.Present":19.448,"Vulkan.Present.command_record_scale":6.322,"Vulkan.Present.pixel_upload":0.44,"Vulkan.Present.queue_submit":12.555,"Vulkan.QueuePresent":63.463,"Vulkan.QueuePresent.queue_present":63.208,"Vulkan.Retire":39.475,"Vulkan.Retire.wait":36.259},"top_phases_ms_per_frame":{"Driver.Packet":690.351,"Driver.Packet.memory_wait":445.279,"Driver.Packet.draw":161.441,"Driver.Draw":159.88,"Graphics.Draw":151.85,"Graphics.Draw.draw_and_resource_release":126.988,"Driver.Draw.shader_compile_and_link":73.741,"Driver.Draw.draw_enqueued":57.338},"owned_draw_counts":{},"trace_dropped":true,"trace_dropped_threads":{"queue worker 0x0":{"events_full_after_s":6.087,"events_lost":2262257,"totals_full":false},"draw committer":{"events_full_after_s":13.833,"events_lost":863956,"totals_full":false}},"trace":"aps5-trace-a6fbf9ce9632-2660090.json.gz"} ``` ``` {"commit":"bc68b033d183","dirty":false,"env":{"APS5_TRACE_SECONDS":"210:60"},"gpu":"NVIDIA GeForce RTX 4090","driver":"NVIDIA 610.57.04","os":"Linux 7.2.3-1-cachyos","cpu":"Intel(R) Core(TM) i9-14900KF","cpu_threads":32,"memory_mib":64118,"title_id":"PPSA21564","content_version":"01.007.000","resolution":"3840x2160","window":{"spec":"seconds 210:60","first_present":2395,"ms":60020.025},"presents":270,"frame_ms":{"p50":219.218,"p90":227.412,"p99":364.201,"max":479.333},"gpu_busy_ms_per_present":81.034,"worker_busy_pct":{"queue worker 0x0":98.274,"queue worker 0x48":94.499,"queue worker 0x40":99.641,"queue worker 0x46":0.282},"phase_totals_ms":{"Driver.Completion":18.066,"Driver.Dispatch":4572.183,"Driver.Dispatch.capture_resources":292.136,"Driver.Dispatch.decode_key_device_setup":63.399,"Driver.Dispatch.lookup_cache":65.331,"Driver.Dispatch.materialize":26.765,"Driver.Dispatch.prepared_invocation":22.001,"Driver.Draw":40101.708,"Driver.Draw.device_setup":1958.695,"Driver.Draw.draw_enqueued":12929.495,"Driver.Draw.post_compile_prepare":227.877,"Driver.Draw.prepare":4379.575,"Driver.Draw.shader_compile_and_link":19575.325,"Driver.EndSubmission":202.163,"Driver.Packet":175456.663,"Driver.Packet.device_lock":256.637,"Driver.Packet.dispatch":5586.947,"Driver.Packet.draw":40510.893,"Driver.Packet.execute":2372.969,"Driver.Packet.flip_flush":12.684,"Driver.Packet.flush_between_packets":777.686,"Driver.Packet.memory_wait":113336.852,"Driver.Packet.pipeline_drain":367.766,"Driver.Packet.pipeline_prepare":365.804,"Driver.Packet.prepare_memory":2460.165,"Driver.Packet.rendering_wait":0.26,"Driver.Present":142.373,"Driver.Present.acquire_image":6.856,"Driver.Present.device_setup":0.132,"Driver.Present.gpu_mutex_wait":0.469,"Driver.Present.inflight_wait":0.417,"Driver.Present.present_display_buffer":27.86,"Driver.Present.queue_present":66.438,"Driver.Present.release_and_callback":0.168,"Driver.Present.render_fence_wait":39.586,"Driver.Present.resize":0.272,"Driver.Present.validate":0.066,"Driver.Suspend":0.104,"GpuMutex.wait.dispatch":357.906,"GpuMutex.wait.draw":521.397,"GpuMutex.wait.end":43.24,"GpuMutex.wait.fill":2.574,"GpuMutex.wait.flush":73.511,"GpuMutex.wait.hook":22.601,"GpuMutex.wait.indirect":6.439,"GpuMutex.wait.label":337.682,"GpuMutex.wait.present":0.219,"GpuMutex.wait.wait":13.135,"Graphics.Draw":36427.606,"Graphics.Draw.draw_and_resource_release":27936.709,"Graphics.Draw.index_upload":1312.796,"Graphics.Draw.validate":2828.473,"Graphics.Draw.vertex_upload":1766.06,"Graphics.DrawWithRecipe":100.212,"Graphics.DrawWithRecipe.draw_and_resource_release":6.624,"Graphics.DrawWithRecipe.index_upload":0.116,"Graphics.DrawWithRecipe.validate":0.177,"Graphics.DrawWithRecipe.vertex_upload":0.743,"Recorder.Reap":859.693,"Recorder.Submit":2127.073,"Recorder.WaitSerial":1036.048,"Resources.Complete":3265.968,"Resources.Prepare":5318.323,"Shader.DrawStage":14549.375,"Shader.DrawStage.capture_resources":10648.895,"Shader.DrawStage.materialize":2628.658,"Shader.DrawStage.prepared_invocation":1191.946,"Shader.ResolveAbi":48.267,"Shader.ResolveGraphicsAbi":17.135,"Shader.ResolveGraphicsStagesAbi":505.912,"VideoOut.Flip":148.529,"VideoOut.Flip.completion_mutex_wait":0.111,"VideoOut.Flip.config_mutex_wait":0.02,"VideoOut.Flip.frame_limit":0.107,"VideoOut.Flip.notify_game":3.476,"VideoOut.Flip.present":142.22,"VideoOut.Flip.validate":0.226,"VideoOut.Flip.vblank_wait":0.14,"VideoOut.Flip.window_prepare":0.279,"VideoOut.Flip.window_title":1.882,"VideoOut.Readiness":0.394,"VideoOut.Readiness.locks_validate":0.205,"Vulkan.Acquire":6.079,"Vulkan.Acquire.acquire_fence_wait":1.19,"Vulkan.Acquire.acquire_image":3.413,"Vulkan.Acquire.fence_reset":1.359,"Vulkan.Acquire.retired_swapchains":0.07,"Vulkan.Dispatch":1198.176,"Vulkan.Dispatch.command_record":241.336,"Vulkan.Dispatch.shader_resources":950.715,"Vulkan.DispatchRecipe":115.888,"Vulkan.DispatchRecipe.command_record":115.057,"Vulkan.DrawFromRecipe":100.332,"Vulkan.GraphicsPipeline":380.116,"Vulkan.GraphicsPipeline.create":377.56,"Vulkan.GraphicsPipeline.modules_and_state":2.537,"Vulkan.GraphicsPipelineLibrary":377.33,"Vulkan.GraphicsPipelineLink":0.089,"Vulkan.Present":24.209,"Vulkan.Present.command_record_scale":6.944,"Vulkan.Present.pixel_upload":0.463,"Vulkan.Present.queue_submit":16.689,"Vulkan.QueuePresent":66.185,"Vulkan.QueuePresent.queue_present":65.941,"Vulkan.Retire":39.169,"Vulkan.Retire.wait":35.324},"top_phases_ms_per_frame":{"Driver.Packet":649.839,"Driver.Packet.memory_wait":419.766,"Driver.Packet.draw":150.04,"Driver.Draw":148.525,"Graphics.Draw":134.917,"Graphics.Draw.draw_and_resource_release":103.469,"Driver.Draw.shader_compile_and_link":72.501,"Shader.DrawStage":53.887},"owned_draw_counts":{},"trace_dropped":true,"trace_dropped_threads":{"queue worker 0x0":{"events_full_after_s":7.03,"events_lost":2074070,"totals_full":false},"draw committer":{"events_full_after_s":18.886,"events_lost":598353,"totals_full":false}},"trace":"aps5-trace-bc68b033d183-2682686.json.gz"} ``` ### 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: none - [x] Fixes: none - [x] Unblocks: none - [x] GPUs tested: NVIDIA RTX 4090, driver 610.57.04, Linux - [x] AI-assisted: yes
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!18670
No description provided.