perf(agc): bind small, rarely read draw inputs in place where they are copied #20368

Merged
talha-devp merged 1 commit from upstream-pr/20368 into main 2026-11-17 03:18:37 +00:00
talha-devp commented 2026-11-15 02:55:11 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by talha-devp on 2026-11-15T02:55:11Z.


What

NVIDIA's Windows driver reads a host import of guest memory far slower than a buffer it allocated, so since 4a6069481f every draw input is copied there (DrawInputsInPlaceUsable). A copy costs the draw committer a write collect, a buffer and a read, whatever its size. A sprite-heavy title pays that for every draw: Hades II (PPSA36082) draws about 1,170 times per frame in combat and is CPU-bound at about 26 FPS with 4 ms of GPU time per frame. In a committer sample of that scene, CopyDrawInput was 15 % of the thread (GetWriteWatch collects and Buffer creation).

Where draw inputs are copied, this binds in place the ones the draw barely uses:

  • a vertex range whose draw fetches at most 1024 bytes from its lowest vertex, and an index range of at most 1024 bytes,
  • when the draw reads it at most 512 times (index count times instances, InPlaceDrawInputMaxReads).

Indirect draws keep copying, since their counts are not known when the inputs are bound. APS5_DRAW_INPUTS_IN_PLACE_BELOW sets the size, and 0 copies them all. APS5_DRAW_INPUTS_IN_PLACE=1 and APS5_NO_DRAW_INPUTS_IN_PLACE=1 keep their meaning.

Since #20578, a vertex range under a pending GPU write is also bound in place there (APS5_NO_BEHIND_INPUTS_IN_PLACE). The two add up: a small, rarely read range is bound in place whether or not a write is pending, and a larger vertex range only when one is. Each switch turns off only its own part.

Why the fetched span. Hades' vertex ranges are 64 KiB to over 16 MiB, because a ring buffer's base reaches up to the highest vertex, while each draw fetches a few vertices. The range size would exclude all of them.

Why the read limit. Reads, not bytes, are what cost the GPU on that driver. Astroneer (PPSA27623, CPU-bound at about 10 FPS) warm run, GPU ms per frame:

Draw inputs GPU ms/frame
all copied (main) 41.2
all in place (APS5_DRAW_INPUTS_IN_PLACE=1) 110.1
fetched ≤ 1024 bytes, no read limit 68.3
fetched ≤ 1024 bytes, read ≤ 512 times (this PR) 41.5

These rows come from local diagnostic builds of the same machine and scene. About half of Astroneer's small inputs are read more than 512 times; none of Hades' is.

Changes:

  • DrawInputsInPlaceBelow (driver default)
  • Context::drawInputsInPlaceBelow
  • the fetched and reads arguments of InPlaceDrawInput
  • the per-driver check in agc_draw_inputs_in_place_driver
  • the copied-branch cases in agc_draw_inputs_copied: whole range, more fetched than the size, unknown reads, one read over the limit, and at the limit
  • ARCHITECTURE.md and an ENVIRONMENT.md row

Tested

Windows 10 22H2 (19045), RTX 4060 (NVIDIA 621.14), Ryzen 5 5600, MSYS2 UCRT64 GCC 16.2.0, Release.

Arms. Measured as 53e90579f9 (this change on main 2f6d40f29b) against fbad8a40d0 (that main). Both have #20310 merged, which records and replays controller input; the Hades II scene is a replay of one recorded session. The branch was then rebased onto 3ae84d01bd. Its conflicts were lines main added next to this change, a restartTable line beside the index-input call in prepareDrawInputs and a hostPointerImport field beside the new VulkanDevice state, and both sides are kept in each. See the GPU tests below.

Hades II, combat (one replay each, 160 s, the same recording). Windows from 40 s.

  • Committer and worker are µs per draw: APS5_PROFILE_DRAW [draw] pipelined and worker_busy_pct.
  • Replays follow recorded times, so the scenes match closely, not frame for frame.
10 s window from 40 s 50 s 60 s 70 s 80 s median
main FPS 25.6 29.8 26.6 28.7 25.5 26.6
this PR FPS 30.7 38.1 35.4 34.6 39.8 35.4
main committer 36.9 28.0 27.6 25.9 25.8 27.6
this PR committer 22.9 17.5 18.0 18.1 17.4 18.0
main worker 48.9 31.2 30.8 28.9 29.2 30.8
this PR worker 35.0 23.5 23.7 23.8 22.9 23.7
main GPU ms/frame 4.35 3.60 4.05 3.84 4.19
this PR GPU ms/frame 4.27 3.52 3.79 3.90 3.75

tools/trace_digest.py of the 55–65 s window. The traces' buffers filled, so their slice inventories are partial; the summary statistics are complete.

  • main: 306 presents, frame p50 33.4 / p90 38.3 / p99 74.4 / max 144.8 ms, GPU busy 3.8 ms per present
  • this PR: 379 presents, frame p50 26.4 / p90 30.9 / p99 35.7 / max 127.8 ms, GPU busy 3.6 ms per present

Astroneer, after the intro (two pairs, cold then warm run of 120 s each, the second pair in reverse order). Warm run medians from 30 s:

Pair main FPS / GPU ms this PR FPS / GPU ms
1 (main first) 11.68 / 41.2 11.06 / 41.5
2 (this PR first) 11.32 / 40.2 11.41 / 41.2

The FPS gap of pair 1 is not repeated by pair 2. The GPU time stays within about 1 ms. trace_digest of the 70–80 s window, pair 2:

  • main: 91 presents, frame p50 98.9 / p90 110.0 / p99 957.9 / max 957.9 ms, GPU busy 40.2 ms per present
  • this PR: 93 presents, frame p50 97.2 / p90 106.9 / p99 969.3 / max 969.3 ms, GPU busy 40.9 ms per present
  • Both have the same hitch of about 960 ms in that window.
Summary lines (Hades main, Hades PR, Astroneer pair 2 PR, Astroneer pair 2 main)

APS5_DIAG_PAD_REPLAY in env is set by my local wrapper; nothing in these builds reads it.

{"commit":"fbad8a40d087","dirty":false,"env":{"APS5_DIAG_PAD_REPLAY":"<path>","APS5_DUMP_FRAMES":"100000","APS5_DUMP_FRAMES_EVERY":"30","APS5_DUMP_SCALE":"8","APS5_NO_PAD_INPUT":"1","APS5_PAD_REPLAY":"<path>","APS5_PROFILE_DRAW":"1","APS5_TRACE_DIR":"<path>","APS5_TRACE_DRAW_CACHE":"1","APS5_TRACE_SECONDS":"55:10","APS5_TRACE_SUMMARY_EVERY":"10"},"gpu":"NVIDIA GeForce RTX 4060","driver":"NVIDIA 621.14","os":"Windows 10.0.19045","cpu":"AMD Ryzen 5 5600 6-Core Processor","cpu_threads":12,"memory_mib":32678,"title_id":"PPSA36082","title":"Hades II","content_version":"01.006.000","resolution":"1920x1080","window":{"spec":"seconds 55:10","first_present":4078,"ms":10027.299},"presents":306,"frame_ms":{"p50":33.405,"p90":38.338,"p99":74.355,"max":144.824},"gpu_busy_ms_per_present":3.801,"worker_busy_pct":{"queue worker 0x0":93.673},"phase_totals_ms":{"Driver.Completion":2.186,"Driver.Dispatch":83.309,"Driver.Dispatch.decode_key_device_setup":1.424,"Driver.Dispatch.lookup_cache":1.007,"Driver.Draw":6895.287,"Driver.Draw.device_setup":404.984,"Driver.Draw.draw_enqueued":1253.262,"Driver.Draw.post_compile_prepare":49.991,"Driver.Draw.prepare":743.562,"Driver.Draw.shader_compile_and_link":3969.582,"Driver.EndSubmission":8.184,"Driver.Packet":9382.434,"Driver.Packet.device_lock":67.811,"Driver.Packet.dispatch":1291.012,"Driver.Packet.draw":7017.058,"Driver.Packet.execute":257.962,"Driver.Packet.flip_flush":28.623,"Driver.Packet.flush_between_packets":232.43,"Driver.Packet.memory_wait":0.023,"Driver.Packet.pipeline_drain":88.589,"Driver.Packet.pipeline_prepare":100.868,"Driver.Packet.prepare_memory":178.81,"Driver.Packet.rendering_wait":0.475,"Driver.Present":491.732,"Driver.Present.acquire_image":5.061,"Driver.Present.device_setup":0.184,"Driver.Present.gpu_mutex_wait":35.111,"Driver.Present.inflight_wait":0.99,"Driver.Present.present_display_buffer":301.452,"Driver.Present.queue_present":138.879,"Driver.Present.release_and_callback":0.576,"Driver.Present.render_fence_wait":8.286,"Driver.Present.resize":0.725,"Driver.Present.validate":0.103,"Driver.Suspend":0.07,"GpuMutex.wait.draw":69.193,"GpuMutex.wait.end":1.263,"GpuMutex.wait.fill":21.889,"GpuMutex.wait.flush":0.072,"GpuMutex.wait.hook":128.705,"GpuMutex.wait.label":0.92,"GpuMutex.wait.present":34.244,"GpuMutex.wait.wait":392.878,"Graphics.Draw":7272.495,"Graphics.Draw.draw_and_resource_release":4131.761,"Graphics.Draw.index_upload":932.113,"Graphics.Draw.validate":424.743,"Graphics.Draw.vertex_upload":1679.779,"Graphics.DrawWithRecipe":111.144,"Graphics.DrawWithRecipe.draw_and_resource_release":59.238,"Graphics.DrawWithRecipe.index_upload":15.086,"Graphics.DrawWithRecipe.validate":4.604,"Graphics.DrawWithRecipe.vertex_upload":30.756,"Graphics.Submit":0.482,"Graphics.Submit.command_end":0.03,"Graphics.Submit.queue_submit":0.45,"Graphics.Wait":42.078,"Graphics.Wait.fence_wait":42.064,"Recorder.Reap":81.357,"Recorder.Submit":265.328,"Recorder.WaitSerial":55.999,"Resources.Complete":55.877,"Resources.Prepare":20.689,"Shader.DrawStage":2822.651,"Shader.DrawStage.capture_resources":1789.844,"Shader.DrawStage.materialize":463.135,"Shader.DrawStage.prepared_invocation":522.662,"Shader.PrepareArtifact":13.506,"Shader.ResolveAbi":7.81,"Shader.ResolveGraphicsAbi":4.323,"Shader.ResolveGraphicsStagesAbi":15.886,"VideoOut.Flip":540.387,"VideoOut.Flip.completion_mutex_wait":0.791,"VideoOut.Flip.config_mutex_wait":0.047,"VideoOut.Flip.frame_limit":0.225,"VideoOut.Flip.notify_game":17.696,"VideoOut.Flip.present":493.273,"VideoOut.Flip.validate":0.455,"VideoOut.Flip.vblank_wait":0.291,"VideoOut.Flip.window_prepare":0.575,"VideoOut.Flip.window_title":26.615,"VideoOut.Readiness":0.896,"VideoOut.Readiness.locks_validate":0.338,"Vulkan.Acquire":4.677,"Vulkan.Acquire.acquire_fence_wait":0.688,"Vulkan.Acquire.acquire_image":2.974,"Vulkan.Acquire.fence_reset":0.705,"Vulkan.Acquire.retired_swapchains":0.187,"Vulkan.DispatchRecipe":12.772,"Vulkan.DispatchRecipe.command_record":12.52,"Vulkan.DrawFromRecipe":112.72,"Vulkan.GraphicsPipeline":215.473,"Vulkan.GraphicsPipeline.create":144.262,"Vulkan.GraphicsPipeline.modules_and_state":1.143,"Vulkan.GraphicsPipelineLibrary":214.17,"Vulkan.GraphicsPipelineLink":0.053,"Vulkan.GraphicsPipelinePrebuild":70.459,"Vulkan.Present":67.525,"Vulkan.Present.command_record_scale":15.652,"Vulkan.Present.pixel_upload":33.453,"Vulkan.Present.queue_submit":18.089,"Vulkan.QueuePresent":136.703,"Vulkan.QueuePresent.queue_present":136.067,"Vulkan.Retire":8.186,"Vulkan.Retire.dump":0.432,"Vulkan.Retire.wait":5.501},"top_phases_ms_per_frame":{"Driver.Packet":30.662,"Graphics.Draw":23.766,"Driver.Packet.draw":22.932,"Driver.Draw":22.534,"Graphics.Draw.draw_and_resource_release":13.502,"Driver.Draw.shader_compile_and_link":12.972,"Shader.DrawStage":9.224,"Shader.DrawStage.capture_resources":5.849},"owned_draw_counts":{"OwnedDraw.evicted_other":172986},"graphics_track":{"Graphics.Barrier.dispatch-trail":306,"Graphics.Barrier.draw":40449,"Graphics.Barrier.fill":1497,"Graphics.Barrier.fill-clear":10190,"Graphics.Barrier.label-run":14161,"Graphics.Barrier.present-blit":1224,"Graphics.Barrier.shadow-publish":7,"Graphics.Barrier.staging-in":918,"Graphics.Barrier.staging-out":306,"Graphics.Barrier.storage-upload":1692,"Graphics.Barrier.storage-writeback":1792,"Graphics.BarrierMerged.dispatch-lead":306,"Graphics.BarrierMerged.fill":245,"Graphics.BarrierMerged.label-run":3797,"Graphics.BarrierMerged.shadow-publish":1,"Graphics.BarrierMerged.staging-out":306,"Graphics.BarrierMerged.storage-writeback":287,"Graphics.Copy":659,"Graphics.Copy.bytes":522256384,"Graphics.RenderPass":16467,"Graphics.RenderPass.Close.command":6790,"Graphics.RenderPass.Close.image":1493,"Graphics.RenderPass.Close.key":616,"Graphics.RenderPass.Close.label":3797,"Graphics.RenderPass.Close.new-batch":3771,"Graphics.RenderPass.Continued":230031},"trace_dropped":true,"trace_dropped_threads":{"queue worker 0x0":{"events_full_after_s":4.187,"events_lost":391681,"totals_full":false}},"trace":"aps5-trace-fbad8a40d087-22308.json.gz"}
{"commit":"53e90579f98e","dirty":false,"env":{"APS5_DIAG_PAD_REPLAY":"<path>","APS5_DUMP_FRAMES":"100000","APS5_DUMP_FRAMES_EVERY":"30","APS5_DUMP_SCALE":"8","APS5_NO_PAD_INPUT":"1","APS5_PAD_REPLAY":"<path>","APS5_PROFILE_DRAW":"1","APS5_TRACE_DIR":"<path>","APS5_TRACE_DRAW_CACHE":"1","APS5_TRACE_SECONDS":"55:10","APS5_TRACE_SUMMARY_EVERY":"10"},"gpu":"NVIDIA GeForce RTX 4060","driver":"NVIDIA 621.14","os":"Windows 10.0.19045","cpu":"AMD Ryzen 5 5600 6-Core Processor","cpu_threads":12,"memory_mib":32678,"title_id":"PPSA36082","title":"Hades II","content_version":"01.006.000","resolution":"1920x1080","window":{"spec":"seconds 55:10","first_present":4398,"ms":10008.501},"presents":379,"frame_ms":{"p50":26.398,"p90":30.949,"p99":35.669,"max":127.834},"gpu_busy_ms_per_present":3.63,"worker_busy_pct":{"queue worker 0x0":93.479},"phase_totals_ms":{"Driver.Completion":5.158,"Driver.Dispatch":63.157,"Driver.Dispatch.decode_key_device_setup":1.413,"Driver.Dispatch.lookup_cache":0.982,"Driver.Draw":7416.101,"Driver.Draw.device_setup":458.961,"Driver.Draw.draw_enqueued":1173.238,"Driver.Draw.post_compile_prepare":56.185,"Driver.Draw.prepare":825.874,"Driver.Draw.shader_compile_and_link":4405.623,"Driver.EndSubmission":3.197,"Driver.Packet":9347.357,"Driver.Packet.device_lock":82.045,"Driver.Packet.dispatch":627.258,"Driver.Packet.draw":7551.133,"Driver.Packet.execute":278.38,"Driver.Packet.flip_flush":14.088,"Driver.Packet.flush_between_packets":262.471,"Driver.Packet.memory_wait":0.022,"Driver.Packet.pipeline_drain":109.911,"Driver.Packet.pipeline_prepare":110.497,"Driver.Packet.prepare_memory":198.346,"Driver.Packet.rendering_wait":0.487,"Driver.Present":418.3,"Driver.Present.acquire_image":6.025,"Driver.Present.device_setup":0.209,"Driver.Present.gpu_mutex_wait":20.433,"Driver.Present.inflight_wait":1.275,"Driver.Present.present_display_buffer":227.153,"Driver.Present.queue_present":151.076,"Driver.Present.release_and_callback":0.636,"Driver.Present.render_fence_wait":10.281,"Driver.Present.resize":0.68,"Driver.Present.validate":0.121,"Driver.Suspend":0.089,"GpuMutex.wait.draw":66.599,"GpuMutex.wait.end":0.051,"GpuMutex.wait.fill":2.691,"GpuMutex.wait.flush":0.159,"GpuMutex.wait.hook":48.897,"GpuMutex.wait.label":0.22,"GpuMutex.wait.present":19.416,"GpuMutex.wait.wait":187.754,"Graphics.Draw":5943.101,"Graphics.Draw.draw_and_resource_release":4474.651,"Graphics.Draw.index_upload":252.15,"Graphics.Draw.validate":496.683,"Graphics.Draw.vertex_upload":613.506,"Graphics.DrawWithRecipe":140.56,"Graphics.DrawWithRecipe.draw_and_resource_release":104.636,"Graphics.DrawWithRecipe.index_upload":7.475,"Graphics.DrawWithRecipe.validate":9.046,"Graphics.DrawWithRecipe.vertex_upload":16.764,"Graphics.Submit":0.376,"Graphics.Submit.command_end":0.029,"Graphics.Submit.queue_submit":0.345,"Graphics.Wait":33.815,"Graphics.Wait.fence_wait":33.802,"Recorder.Reap":89.614,"Recorder.Submit":193.956,"Recorder.WaitSerial":85.222,"Resources.Complete":51.097,"Resources.Prepare":17.429,"Shader.DrawStage":3106.145,"Shader.DrawStage.capture_resources":2006.848,"Shader.DrawStage.materialize":492.872,"Shader.DrawStage.prepared_invocation":555.334,"Shader.PrepareArtifact":5.749,"Shader.ResolveAbi":7.951,"Shader.ResolveGraphicsAbi":4.378,"Shader.ResolveGraphicsStagesAbi":18.349,"VideoOut.Flip":479.454,"VideoOut.Flip.completion_mutex_wait":0.78,"VideoOut.Flip.config_mutex_wait":0.051,"VideoOut.Flip.frame_limit":0.308,"VideoOut.Flip.notify_game":24.549,"VideoOut.Flip.present":420.068,"VideoOut.Flip.validate":0.571,"VideoOut.Flip.vblank_wait":0.312,"VideoOut.Flip.window_prepare":0.663,"VideoOut.Flip.window_title":31.621,"VideoOut.Readiness":0.919,"VideoOut.Readiness.locks_validate":0.365,"Vulkan.Acquire":5.563,"Vulkan.Acquire.acquire_fence_wait":0.787,"Vulkan.Acquire.acquire_image":3.553,"Vulkan.Acquire.fence_reset":0.852,"Vulkan.Acquire.retired_swapchains":0.219,"Vulkan.DispatchRecipe":13.476,"Vulkan.DispatchRecipe.command_record":13.217,"Vulkan.DrawFromRecipe":143.46,"Vulkan.GraphicsPipeline":69.656,"Vulkan.GraphicsPipeline.create":31.034,"Vulkan.GraphicsPipeline.modules_and_state":0.491,"Vulkan.GraphicsPipelineLibrary":69.102,"Vulkan.GraphicsPipelineLink":0.021,"Vulkan.GraphicsPipelinePrebuild":38.302,"Vulkan.Present":39.688,"Vulkan.Present.command_record_scale":12.304,"Vulkan.Present.pixel_upload":17.258,"Vulkan.Present.queue_submit":9.713,"Vulkan.QueuePresent":148.153,"Vulkan.QueuePresent.queue_present":147.429,"Vulkan.Retire":10.004,"Vulkan.Retire.dump":0.513,"Vulkan.Retire.wait":6.333},"top_phases_ms_per_frame":{"Driver.Packet":24.663,"Driver.Packet.draw":19.924,"Driver.Draw":19.568,"Graphics.Draw":15.681,"Graphics.Draw.draw_and_resource_release":11.806,"Driver.Draw.shader_compile_and_link":11.624,"Shader.DrawStage":8.196,"Shader.DrawStage.capture_resources":5.295},"owned_draw_counts":{},"graphics_track":{"Graphics.Barrier.dispatch-trail":379,"Graphics.Barrier.draw":48626,"Graphics.Barrier.fill":1875,"Graphics.Barrier.fill-clear":12666,"Graphics.Barrier.label-run":16698,"Graphics.Barrier.present-blit":1516,"Graphics.Barrier.shadow-publish":5,"Graphics.Barrier.staging-in":1137,"Graphics.Barrier.staging-out":379,"Graphics.Barrier.storage-upload":2110,"Graphics.Barrier.storage-writeback":2236,"Graphics.BarrierMerged.dispatch-lead":379,"Graphics.BarrierMerged.fill":349,"Graphics.BarrierMerged.label-run":4940,"Graphics.BarrierMerged.shadow-publish":1,"Graphics.BarrierMerged.staging-out":379,"Graphics.BarrierMerged.storage-writeback":349,"Graphics.Copy":794,"Graphics.Copy.bytes":408846336,"Graphics.RenderPass":19920,"Graphics.RenderPass.Close.command":8190,"Graphics.RenderPass.Close.image":1707,"Graphics.RenderPass.Close.key":768,"Graphics.RenderPass.Close.label":4940,"Graphics.RenderPass.Close.new-batch":4315,"Graphics.RenderPass.Continued":291252},"trace_dropped":true,"trace_dropped_threads":{"queue worker 0x0":{"events_full_after_s":3.934,"events_lost":454929,"totals_full":false}},"trace":"aps5-trace-53e90579f98e-24072.json.gz"}
{"commit":"53e90579f98e","dirty":false,"env":{"APS5_DUMP_FRAMES":"100000","APS5_DUMP_FRAMES_EVERY":"30","APS5_DUMP_SCALE":"8","APS5_TRACE_DIR":"<path>","APS5_TRACE_SECONDS":"70:10","APS5_TRACE_SUMMARY_EVERY":"10"},"gpu":"NVIDIA GeForce RTX 4060","driver":"NVIDIA 621.14","os":"Windows 10.0.19045","cpu":"AMD Ryzen 5 5600 6-Core Processor","cpu_threads":12,"memory_mib":32678,"title_id":"PPSA27623","title":"ASTRONEER","content_version":"01.015.000","resolution":"3840x2160","window":{"spec":"seconds 70:10","first_present":1316,"ms":10020.315},"presents":93,"frame_ms":{"p50":97.215,"p90":106.941,"p99":969.339,"max":969.339},"gpu_busy_ms_per_present":40.909,"worker_busy_pct":{"queue worker 0x0":98.287,"queue worker 0x20":99.973},"phase_totals_ms":{"Driver.Completion":1.241,"Driver.Dispatch":375.36,"Driver.Dispatch.capture_resources":142.21,"Driver.Dispatch.decode_key_device_setup":16.449,"Driver.Dispatch.lookup_cache":0.773,"Driver.Dispatch.materialize":3.792,"Driver.Dispatch.prepared_invocation":3.537,"Driver.Draw":6710.088,"Driver.Draw.device_setup":334.517,"Driver.Draw.draw_enqueued":2593.376,"Driver.Draw.post_compile_prepare":38.883,"Driver.Draw.prepare":504.603,"Driver.Draw.shader_compile_and_link":3107.728,"Driver.EndSubmission":77.369,"Driver.Packet":19787.712,"Driver.Packet.device_lock":76.458,"Driver.Packet.dispatch":2280.597,"Driver.Packet.draw":6778.445,"Driver.Packet.execute":261.397,"Driver.Packet.flip_flush":4.44,"Driver.Packet.flush_between_packets":164.643,"Driver.Packet.memory_wait":9472.405,"Driver.Packet.pipeline_drain":287.773,"Driver.Packet.pipeline_prepare":113.083,"Driver.Packet.prepare_memory":160.908,"Driver.Packet.rendering_wait":0.217,"Driver.Present":1151.291,"Driver.Present.acquire_image":1.559,"Driver.Present.device_setup":0.06,"Driver.Present.gpu_mutex_wait":31.98,"Driver.Present.inflight_wait":0.299,"Driver.Present.present_display_buffer":18.079,"Driver.Present.queue_present":30.122,"Driver.Present.release_and_callback":0.148,"Driver.Present.render_fence_wait":1068.748,"Driver.Present.resize":0.196,"Driver.Present.validate":0.03,"Driver.Suspend":0.015,"GpuMutex.wait.dispatch":58.313,"GpuMutex.wait.draw":72.71,"GpuMutex.wait.end":31.874,"GpuMutex.wait.fill":2.11,"GpuMutex.wait.flush":0.056,"GpuMutex.wait.hook":244.77,"GpuMutex.wait.label":87.826,"GpuMutex.wait.other":19.84,"GpuMutex.wait.present":31.721,"Graphics.Draw":6781.475,"Graphics.Draw.draw_and_resource_release":5545.533,"Graphics.Draw.index_upload":365.305,"Graphics.Draw.validate":338.945,"Graphics.Draw.vertex_upload":434.739,"Recorder.Reap":55.527,"Recorder.Submit":208.993,"Recorder.Sync":326.236,"Resources.Complete":22.049,"Resources.Prepare":29.673,"Shader.DrawStage":2237.44,"Shader.DrawStage.capture_resources":1076.411,"Shader.DrawStage.materialize":655.836,"Shader.DrawStage.prepared_invocation":472.941,"Shader.PrepareArtifact":178.333,"Shader.Register":18.942,"Shader.ResolveAbi":22.979,"Shader.ResolveGraphicsAbi":0.028,"Shader.ResolveGraphicsStagesAbi":70.226,"VideoOut.Flip":1162.903,"VideoOut.Flip.completion_mutex_wait":0.217,"VideoOut.Flip.config_mutex_wait":0.008,"VideoOut.Flip.frame_limit":0.183,"VideoOut.Flip.notify_game":3.252,"VideoOut.Flip.present":1152.135,"VideoOut.Flip.validate":0.122,"VideoOut.Flip.vblank_wait":0.072,"VideoOut.Flip.window_prepare":0.159,"VideoOut.Flip.window_title":6.435,"VideoOut.Readiness":0.228,"VideoOut.Readiness.locks_validate":0.087,"Vulkan.Acquire":1.442,"Vulkan.Acquire.acquire_fence_wait":0.229,"Vulkan.Acquire.acquire_image":0.907,"Vulkan.Acquire.fence_reset":0.202,"Vulkan.Acquire.retired_swapchains":0.067,"Vulkan.Dispatch":76.094,"Vulkan.Dispatch.command_record":30.305,"Vulkan.Dispatch.shader_resources":44.853,"Vulkan.GraphicsPipeline":1195.127,"Vulkan.GraphicsPipeline.create":795.629,"Vulkan.GraphicsPipeline.modules_and_state":3.054,"Vulkan.GraphicsPipelineLibrary":1191.744,"Vulkan.GraphicsPipelineLink":0.075,"Vulkan.GraphicsPipelinePrebuild":397.939,"Vulkan.Present":10.808,"Vulkan.Present.command_record_scale":4.421,"Vulkan.Present.pixel_upload":0.616,"Vulkan.Present.queue_submit":5.671,"Vulkan.QueuePresent":29.759,"Vulkan.QueuePresent.queue_present":29.607,"Vulkan.Retire":2101.587,"Vulkan.Retire.dump":0.331,"Vulkan.Retire.wait":1066.495},"top_phases_ms_per_frame":{"Driver.Packet":212.771,"Driver.Packet.memory_wait":101.854,"Graphics.Draw":72.919,"Driver.Packet.draw":72.887,"Driver.Draw":72.151,"Graphics.Draw.draw_and_resource_release":59.629,"Driver.Draw.shader_compile_and_link":33.416,"Driver.Draw.draw_enqueued":27.886},"owned_draw_counts":{"OwnedDraw.evicted_other":11141},"graphics_track":{"Graphics.Barrier.copy":1209,"Graphics.Barrier.dcc-clear":1302,"Graphics.Barrier.dcc-keys":558,"Graphics.Barrier.dispatch-lead":744,"Graphics.Barrier.dispatch-trail":1209,"Graphics.Barrier.draw":12771,"Graphics.Barrier.fill":886,"Graphics.Barrier.fill-clear":558,"Graphics.Barrier.label-run":11040,"Graphics.Barrier.present-blit":186,"Graphics.Barrier.shadow-publish":186,"Graphics.Barrier.staging-in":466,"Graphics.Barrier.staging-out":186,"Graphics.Barrier.storage-upload":4,"Graphics.Barrier.storage-writeback":2540,"Graphics.BarrierMerged.dispatch-lead":465,"Graphics.BarrierMerged.fill":602,"Graphics.BarrierMerged.label-run":406,"Graphics.BarrierMerged.shadow-publish":186,"Graphics.BarrierMerged.staging-in":92,"Graphics.BarrierMerged.staging-out":186,"Graphics.BarrierMerged.storage-writeback":622,"Graphics.Copy":837,"Graphics.Copy.bytes":2626119864,"Graphics.RenderPass":7014,"Graphics.RenderPass.Close.command":1425,"Graphics.RenderPass.Close.image":965,"Graphics.RenderPass.Close.key":532,"Graphics.RenderPass.Close.label":406,"Graphics.RenderPass.Close.new-batch":3686,"Graphics.RenderPass.Continued":208208},"trace_dropped":true,"trace_dropped_threads":{"queue worker 0x0":{"events_full_after_s":7.71,"events_lost":84918,"totals_full":false}},"trace":"aps5-trace-53e90579f98e-15108.json.gz"}
{"commit":"fbad8a40d087","dirty":false,"env":{"APS5_DUMP_FRAMES":"100000","APS5_DUMP_FRAMES_EVERY":"30","APS5_DUMP_SCALE":"8","APS5_TRACE_DIR":"<path>","APS5_TRACE_SECONDS":"70:10","APS5_TRACE_SUMMARY_EVERY":"10"},"gpu":"NVIDIA GeForce RTX 4060","driver":"NVIDIA 621.14","os":"Windows 10.0.19045","cpu":"AMD Ryzen 5 5600 6-Core Processor","cpu_threads":12,"memory_mib":32678,"title_id":"PPSA27623","title":"ASTRONEER","content_version":"01.015.000","resolution":"3840x2160","window":{"spec":"seconds 70:10","first_present":1300,"ms":10030.62},"presents":91,"frame_ms":{"p50":98.903,"p90":109.988,"p99":957.932,"max":957.932},"gpu_busy_ms_per_present":40.219,"worker_busy_pct":{"queue worker 0x0":98.257,"queue worker 0x20":99.965},"phase_totals_ms":{"Driver.Completion":1.154,"Driver.Dispatch":411.457,"Driver.Dispatch.capture_resources":160.278,"Driver.Dispatch.decode_key_device_setup":18.833,"Driver.Dispatch.lookup_cache":0.719,"Driver.Dispatch.materialize":3.747,"Driver.Dispatch.prepared_invocation":3.718,"Driver.Draw":6758.898,"Driver.Draw.device_setup":339.06,"Driver.Draw.draw_enqueued":2553.887,"Driver.Draw.post_compile_prepare":47.332,"Driver.Draw.prepare":513.088,"Driver.Draw.shader_compile_and_link":3173.013,"Driver.EndSubmission":65.301,"Driver.Packet":19816.36,"Driver.Packet.device_lock":73.094,"Driver.Packet.dispatch":2284.086,"Driver.Packet.draw":6823.571,"Driver.Packet.execute":256.637,"Driver.Packet.flip_flush":4.492,"Driver.Packet.flush_between_packets":152.966,"Driver.Packet.memory_wait":9460.93,"Driver.Packet.pipeline_drain":290.816,"Driver.Packet.pipeline_prepare":110.963,"Driver.Packet.prepare_memory":165.893,"Driver.Packet.rendering_wait":0.211,"Driver.Present":1121.757,"Driver.Present.acquire_image":1.507,"Driver.Present.device_setup":0.055,"Driver.Present.gpu_mutex_wait":3.231,"Driver.Present.inflight_wait":0.254,"Driver.Present.present_display_buffer":17.845,"Driver.Present.queue_present":30.66,"Driver.Present.release_and_callback":0.159,"Driver.Present.render_fence_wait":1067.786,"Driver.Present.resize":0.168,"Driver.Present.validate":0.029,"Driver.Suspend":0.012,"GpuMutex.wait.dispatch":84.765,"GpuMutex.wait.draw":65.281,"GpuMutex.wait.end":21.924,"GpuMutex.wait.fill":2.292,"GpuMutex.wait.flush":0.113,"GpuMutex.wait.hook":233.0,"GpuMutex.wait.label":91.312,"GpuMutex.wait.other":29.921,"GpuMutex.wait.present":3.038,"Graphics.Draw":6798.223,"Graphics.Draw.draw_and_resource_release":5513.012,"Graphics.Draw.index_upload":367.817,"Graphics.Draw.validate":342.071,"Graphics.Draw.vertex_upload":479.623,"Recorder.Reap":54.95,"Recorder.Submit":216.651,"Recorder.Sync":271.345,"Resources.Complete":23.76,"Resources.Prepare":28.111,"Shader.DrawStage":2287.316,"Shader.DrawStage.capture_resources":1116.611,"Shader.DrawStage.materialize":657.817,"Shader.DrawStage.prepared_invocation":480.327,"Shader.PrepareArtifact":187.539,"Shader.Register":10.52,"Shader.ResolveAbi":26.231,"Shader.ResolveGraphicsAbi":0.031,"Shader.ResolveGraphicsStagesAbi":69.754,"VideoOut.Flip":1136.868,"VideoOut.Flip.completion_mutex_wait":0.205,"VideoOut.Flip.config_mutex_wait":0.01,"VideoOut.Flip.frame_limit":0.067,"VideoOut.Flip.notify_game":6.627,"VideoOut.Flip.present":1122.497,"VideoOut.Flip.validate":0.134,"VideoOut.Flip.vblank_wait":0.072,"VideoOut.Flip.window_prepare":0.162,"VideoOut.Flip.window_title":6.701,"VideoOut.Readiness":0.222,"VideoOut.Readiness.locks_validate":0.089,"Vulkan.Acquire":1.391,"Vulkan.Acquire.acquire_fence_wait":0.211,"Vulkan.Acquire.acquire_image":0.867,"Vulkan.Acquire.fence_reset":0.216,"Vulkan.Acquire.retired_swapchains":0.06,"Vulkan.Dispatch":65.691,"Vulkan.Dispatch.command_record":27.018,"Vulkan.Dispatch.shader_resources":37.726,"Vulkan.GraphicsPipeline":1181.184,"Vulkan.GraphicsPipeline.create":777.271,"Vulkan.GraphicsPipeline.modules_and_state":5.542,"Vulkan.GraphicsPipelineLibrary":1175.32,"Vulkan.GraphicsPipelineLink":0.075,"Vulkan.GraphicsPipelinePrebuild":399.882,"Vulkan.Present":10.337,"Vulkan.Present.command_record_scale":4.45,"Vulkan.Present.pixel_upload":0.619,"Vulkan.Present.queue_submit":5.163,"Vulkan.QueuePresent":30.299,"Vulkan.QueuePresent.queue_present":30.142,"Vulkan.Retire":2090.894,"Vulkan.Retire.dump":0.336,"Vulkan.Retire.wait":1065.612},"top_phases_ms_per_frame":{"Driver.Packet":217.762,"Driver.Packet.memory_wait":103.966,"Driver.Packet.draw":74.984,"Graphics.Draw":74.706,"Driver.Draw":74.274,"Graphics.Draw.draw_and_resource_release":60.583,"Driver.Draw.shader_compile_and_link":34.868,"Driver.Draw.draw_enqueued":28.065},"owned_draw_counts":{"OwnedDraw.evicted_other":11664},"graphics_track":{"Graphics.Barrier.copy":1183,"Graphics.Barrier.dcc-clear":1274,"Graphics.Barrier.dcc-keys":546,"Graphics.Barrier.dispatch-lead":729,"Graphics.Barrier.dispatch-trail":1183,"Graphics.Barrier.draw":12548,"Graphics.Barrier.fill":860,"Graphics.Barrier.fill-clear":546,"Graphics.Barrier.label-run":10798,"Graphics.Barrier.present-blit":182,"Graphics.Barrier.shadow-publish":182,"Graphics.Barrier.staging-in":637,"Graphics.Barrier.staging-out":273,"Graphics.Barrier.storage-upload":4,"Graphics.Barrier.storage-writeback":2482,"Graphics.BarrierMerged.dispatch-lead":454,"Graphics.BarrierMerged.fill":596,"Graphics.BarrierMerged.label-run":435,"Graphics.BarrierMerged.shadow-publish":182,"Graphics.BarrierMerged.staging-in":182,"Graphics.BarrierMerged.staging-out":273,"Graphics.BarrierMerged.storage-writeback":612,"Graphics.Copy":1001,"Graphics.Copy.bytes":2664691848,"Graphics.RenderPass":6883,"Graphics.RenderPass.Close.command":1402,"Graphics.RenderPass.Close.image":930,"Graphics.RenderPass.Close.key":516,"Graphics.RenderPass.Close.label":435,"Graphics.RenderPass.Close.new-batch":3600,"Graphics.RenderPass.Continued":203741},"trace_dropped":true,"trace_dropped_threads":{"queue worker 0x0":{"events_full_after_s":7.489,"events_lost":90977,"totals_full":false}},"trace":"aps5-trace-fbad8a40d087-16812.json.gz"}

The traces are kept locally and I can attach them.

GPU tests. ctest -R agc_draw_inputs -V with ANYPS5_REQUIRE_VULKAN=1 ANYPS5_NO_SHADER_CACHE=1 VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation VK_LOADER_DEBUG=layer (layer 1.4.363) covers agc_draw_inputs_in_place_driver, agc_draw_inputs_in_place and agc_draw_inputs_copied.

  • On both arms: 3 of 3 pass, the loader inserts the layer, and there are 0 VUID- lines.
  • On the rebased head b90068f9f5 (built without #20310): 3 of 3 pass, the layer is inserted, and there are 0 VUID- lines. The 21 other draw-input and snapshot tests of agc_driver_recorder_tests (such as agc_draw_input_reuse, agc_owned_draw_inputs* and agc_unwatch_snapshot_scope*) also pass, with the layer inserted and 0 VUID- lines.
  • On the head rebased onto main 45f6d379cc, 2446139491: agc_draw_inputs_in_place_driver, agc_driver_recorder, agc_draw_inputs_in_place and agc_draw_inputs_copied pass, 4 of 4, with the layer inserted and 0 VUID- lines. That main has #20578, which changed the same check in InPlaceDrawInput. agc_draw_inputs_copied keeps #20578's checks and also checks that a small vertex range free of pending writes is bound in place.
  • On current main, with #20578: measured as b10ecb9916 (this head on main 45f6d379cc) against 4020742320 (that main). Both have the #16053 revert so the title renders correctly. Same replay, default path, no profiler, rounds main/PR/PR/main.
    • Dense combat (50–90 s, at least 900 draws per frame): 29.1 → 36.2 FPS (+24 %). Worker 35.4 → 28.0 µs per draw; committer 32.0 → 21.1 (APS5_PIPELINE_STATS).
    • 40–130 s medians: 31.4 / 29.9 → 41.1 / 40.8 FPS.
    • trace_digest, 55–65 s: main 334 presents, frame p50 30.9 / p90 35.0 / p99 42.7 / max 161.3 ms, GPU busy 3.9 ms per present; this PR 412 presents, frame p50 23.9 / p90 28.4 / p99 38.3 / max 164.2 ms, GPU busy 3.9 ms per present.

With #20315. The draw-input part of #20315 copies, on the GPU, only the inputs behind a pending GPU write, so it does not cover these. Same Hades replay, median FPS and committer µs/draw from 40 s:

  • #20315 alone: 27.9 FPS, 26.7 µs
  • #20315 with this PR: 36.6 FPS, 17.8 µs
  • With #20315's pipeline switches (APS5_DRAW_PIPELINE=1 APS5_PIPELINE_DISPATCH=1 APS5_PIPELINE_DISPATCH_MISSES=1): 27.6 FPS alone, 35.1 FPS with this PR

The two merge with one conflict, where both add a line at the start of prepareDrawInputs.

Overlap. #19445 changes the same condition in InPlaceDrawInput (large inputs in place); whichever merges second keeps both. tools/pr_overlap.py --branch feat/small-draw-inputs-in-place finds no overlap among the pull requests it can compare. It exits failed-closed because 112 open PRs that conflict with main share these files. I searched their diffs for InPlaceDrawInput, drawInputsInPlace, DrawInputsInPlace and APS5_DRAW_INPUTS_IN_PLACE. Only #19445, #20315 (both above) and #9852 name them; #9852 is a test that reads DrawInputsInPlace() for a storage counter, which this does not change.

python tools/check_conventions.py --base origin/main: all checks pass.

Checklist

  • Based on current main; no other open PR implements the same functions
  • One topic per PR; follow-ups go in a new PR
  • No comments in code except technical debt and the licence notice of code adapted from upstream (see AGENTS.md)
  • Unimplemented paths throw (NotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file
  • No notes, investigation .md files or images added to the repository (attach them to this PR)
  • New third-party code is a submodule built from source
  • Generic behaviour, not specific to one title
  • Depends on: none
  • Fixes: none
  • Unblocks: none
  • GPUs tested: NVIDIA GeForce RTX 4060, NVIDIA 621.14, Windows 10 22H2 (19045)
  • AI-assisted: yes
<!-- greyfinch-sync:boykopovar/AnyPS5:issue:5318874310 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/20368). Originally posted by [talha-devp](https://github.com/talha-devp) on 2026-11-15T02:55:11Z. --- ### What NVIDIA's Windows driver reads a host import of guest memory far slower than a buffer it allocated, so since 4a6069481f every draw input is copied there (`DrawInputsInPlaceUsable`). A copy costs the draw committer a write collect, a buffer and a read, whatever its size. A sprite-heavy title pays that for every draw: Hades II (PPSA36082) draws about 1,170 times per frame in combat and is CPU-bound at about 26 FPS with 4 ms of GPU time per frame. In a committer sample of that scene, `CopyDrawInput` was 15 % of the thread (`GetWriteWatch` collects and `Buffer` creation). Where draw inputs are copied, this binds in place the ones the draw barely uses: - a vertex range whose draw fetches at most 1024 bytes from its lowest vertex, and an index range of at most 1024 bytes, - when the draw reads it at most 512 times (index count times instances, `InPlaceDrawInputMaxReads`). Indirect draws keep copying, since their counts are not known when the inputs are bound. `APS5_DRAW_INPUTS_IN_PLACE_BELOW` sets the size, and 0 copies them all. `APS5_DRAW_INPUTS_IN_PLACE=1` and `APS5_NO_DRAW_INPUTS_IN_PLACE=1` keep their meaning. Since #20578, a vertex range under a pending GPU write is also bound in place there (`APS5_NO_BEHIND_INPUTS_IN_PLACE`). The two add up: a small, rarely read range is bound in place whether or not a write is pending, and a larger vertex range only when one is. Each switch turns off only its own part. **Why the fetched span.** Hades' vertex ranges are 64 KiB to over 16 MiB, because a ring buffer's base reaches up to the highest vertex, while each draw fetches a few vertices. The range size would exclude all of them. **Why the read limit.** Reads, not bytes, are what cost the GPU on that driver. Astroneer (PPSA27623, CPU-bound at about 10 FPS) warm run, GPU ms per frame: | Draw inputs | GPU ms/frame | |---|---| | all copied (`main`) | 41.2 | | all in place (`APS5_DRAW_INPUTS_IN_PLACE=1`) | 110.1 | | fetched ≤ 1024 bytes, no read limit | 68.3 | | fetched ≤ 1024 bytes, read ≤ 512 times (this PR) | 41.5 | These rows come from local diagnostic builds of the same machine and scene. About half of Astroneer's small inputs are read more than 512 times; none of Hades' is. Changes: - `DrawInputsInPlaceBelow` (driver default) - `Context::drawInputsInPlaceBelow` - the `fetched` and `reads` arguments of `InPlaceDrawInput` - the per-driver check in `agc_draw_inputs_in_place_driver` - the copied-branch cases in `agc_draw_inputs_copied`: whole range, more fetched than the size, unknown reads, one read over the limit, and at the limit - `ARCHITECTURE.md` and an `ENVIRONMENT.md` row ### Tested Windows 10 22H2 (19045), RTX 4060 (NVIDIA 621.14), Ryzen 5 5600, MSYS2 UCRT64 GCC 16.2.0, Release. **Arms.** Measured as `53e90579f9` (this change on `main` `2f6d40f29b`) against `fbad8a40d0` (that `main`). Both have #20310 merged, which records and replays controller input; the Hades II scene is a replay of one recorded session. The branch was then rebased onto `3ae84d01bd`. Its conflicts were lines `main` added next to this change, a `restartTable` line beside the index-input call in `prepareDrawInputs` and a `hostPointerImport` field beside the new `VulkanDevice` state, and both sides are kept in each. See the GPU tests below. **Hades II, combat (one replay each, 160 s, the same recording).** Windows from 40 s. - Committer and worker are µs per draw: `APS5_PROFILE_DRAW` `[draw] pipelined` and `worker_busy_pct`. - Replays follow recorded times, so the scenes match closely, not frame for frame. | 10 s window from | 40 s | 50 s | 60 s | 70 s | 80 s | median | |---|---|---|---|---|---|---| | `main` FPS | 25.6 | 29.8 | 26.6 | 28.7 | 25.5 | **26.6** | | this PR FPS | 30.7 | 38.1 | 35.4 | 34.6 | 39.8 | **35.4** | | `main` committer | 36.9 | 28.0 | 27.6 | 25.9 | 25.8 | 27.6 | | this PR committer | 22.9 | 17.5 | 18.0 | 18.1 | 17.4 | 18.0 | | `main` worker | 48.9 | 31.2 | 30.8 | 28.9 | 29.2 | 30.8 | | this PR worker | 35.0 | 23.5 | 23.7 | 23.8 | 22.9 | 23.7 | | `main` GPU ms/frame | 4.35 | 3.60 | 4.05 | 3.84 | 4.19 | | | this PR GPU ms/frame | 4.27 | 3.52 | 3.79 | 3.90 | 3.75 | | `tools/trace_digest.py` of the 55–65 s window. The traces' buffers filled, so their slice inventories are partial; the summary statistics are complete. - `main`: `306 presents, frame p50 33.4 / p90 38.3 / p99 74.4 / max 144.8 ms, GPU busy 3.8 ms per present` - this PR: `379 presents, frame p50 26.4 / p90 30.9 / p99 35.7 / max 127.8 ms, GPU busy 3.6 ms per present` **Astroneer, after the intro (two pairs, cold then warm run of 120 s each, the second pair in reverse order).** Warm run medians from 30 s: | Pair | `main` FPS / GPU ms | this PR FPS / GPU ms | |---|---|---| | 1 (`main` first) | 11.68 / 41.2 | 11.06 / 41.5 | | 2 (this PR first) | 11.32 / 40.2 | 11.41 / 41.2 | The FPS gap of pair 1 is not repeated by pair 2. The GPU time stays within about 1 ms. `trace_digest` of the 70–80 s window, pair 2: - `main`: `91 presents, frame p50 98.9 / p90 110.0 / p99 957.9 / max 957.9 ms, GPU busy 40.2 ms per present` - this PR: `93 presents, frame p50 97.2 / p90 106.9 / p99 969.3 / max 969.3 ms, GPU busy 40.9 ms per present` - Both have the same hitch of about 960 ms in that window. <details><summary>Summary lines (Hades main, Hades PR, Astroneer pair 2 PR, Astroneer pair 2 main)</summary> `APS5_DIAG_PAD_REPLAY` in `env` is set by my local wrapper; nothing in these builds reads it. ```json {"commit":"fbad8a40d087","dirty":false,"env":{"APS5_DIAG_PAD_REPLAY":"<path>","APS5_DUMP_FRAMES":"100000","APS5_DUMP_FRAMES_EVERY":"30","APS5_DUMP_SCALE":"8","APS5_NO_PAD_INPUT":"1","APS5_PAD_REPLAY":"<path>","APS5_PROFILE_DRAW":"1","APS5_TRACE_DIR":"<path>","APS5_TRACE_DRAW_CACHE":"1","APS5_TRACE_SECONDS":"55:10","APS5_TRACE_SUMMARY_EVERY":"10"},"gpu":"NVIDIA GeForce RTX 4060","driver":"NVIDIA 621.14","os":"Windows 10.0.19045","cpu":"AMD Ryzen 5 5600 6-Core Processor","cpu_threads":12,"memory_mib":32678,"title_id":"PPSA36082","title":"Hades II","content_version":"01.006.000","resolution":"1920x1080","window":{"spec":"seconds 55:10","first_present":4078,"ms":10027.299},"presents":306,"frame_ms":{"p50":33.405,"p90":38.338,"p99":74.355,"max":144.824},"gpu_busy_ms_per_present":3.801,"worker_busy_pct":{"queue worker 0x0":93.673},"phase_totals_ms":{"Driver.Completion":2.186,"Driver.Dispatch":83.309,"Driver.Dispatch.decode_key_device_setup":1.424,"Driver.Dispatch.lookup_cache":1.007,"Driver.Draw":6895.287,"Driver.Draw.device_setup":404.984,"Driver.Draw.draw_enqueued":1253.262,"Driver.Draw.post_compile_prepare":49.991,"Driver.Draw.prepare":743.562,"Driver.Draw.shader_compile_and_link":3969.582,"Driver.EndSubmission":8.184,"Driver.Packet":9382.434,"Driver.Packet.device_lock":67.811,"Driver.Packet.dispatch":1291.012,"Driver.Packet.draw":7017.058,"Driver.Packet.execute":257.962,"Driver.Packet.flip_flush":28.623,"Driver.Packet.flush_between_packets":232.43,"Driver.Packet.memory_wait":0.023,"Driver.Packet.pipeline_drain":88.589,"Driver.Packet.pipeline_prepare":100.868,"Driver.Packet.prepare_memory":178.81,"Driver.Packet.rendering_wait":0.475,"Driver.Present":491.732,"Driver.Present.acquire_image":5.061,"Driver.Present.device_setup":0.184,"Driver.Present.gpu_mutex_wait":35.111,"Driver.Present.inflight_wait":0.99,"Driver.Present.present_display_buffer":301.452,"Driver.Present.queue_present":138.879,"Driver.Present.release_and_callback":0.576,"Driver.Present.render_fence_wait":8.286,"Driver.Present.resize":0.725,"Driver.Present.validate":0.103,"Driver.Suspend":0.07,"GpuMutex.wait.draw":69.193,"GpuMutex.wait.end":1.263,"GpuMutex.wait.fill":21.889,"GpuMutex.wait.flush":0.072,"GpuMutex.wait.hook":128.705,"GpuMutex.wait.label":0.92,"GpuMutex.wait.present":34.244,"GpuMutex.wait.wait":392.878,"Graphics.Draw":7272.495,"Graphics.Draw.draw_and_resource_release":4131.761,"Graphics.Draw.index_upload":932.113,"Graphics.Draw.validate":424.743,"Graphics.Draw.vertex_upload":1679.779,"Graphics.DrawWithRecipe":111.144,"Graphics.DrawWithRecipe.draw_and_resource_release":59.238,"Graphics.DrawWithRecipe.index_upload":15.086,"Graphics.DrawWithRecipe.validate":4.604,"Graphics.DrawWithRecipe.vertex_upload":30.756,"Graphics.Submit":0.482,"Graphics.Submit.command_end":0.03,"Graphics.Submit.queue_submit":0.45,"Graphics.Wait":42.078,"Graphics.Wait.fence_wait":42.064,"Recorder.Reap":81.357,"Recorder.Submit":265.328,"Recorder.WaitSerial":55.999,"Resources.Complete":55.877,"Resources.Prepare":20.689,"Shader.DrawStage":2822.651,"Shader.DrawStage.capture_resources":1789.844,"Shader.DrawStage.materialize":463.135,"Shader.DrawStage.prepared_invocation":522.662,"Shader.PrepareArtifact":13.506,"Shader.ResolveAbi":7.81,"Shader.ResolveGraphicsAbi":4.323,"Shader.ResolveGraphicsStagesAbi":15.886,"VideoOut.Flip":540.387,"VideoOut.Flip.completion_mutex_wait":0.791,"VideoOut.Flip.config_mutex_wait":0.047,"VideoOut.Flip.frame_limit":0.225,"VideoOut.Flip.notify_game":17.696,"VideoOut.Flip.present":493.273,"VideoOut.Flip.validate":0.455,"VideoOut.Flip.vblank_wait":0.291,"VideoOut.Flip.window_prepare":0.575,"VideoOut.Flip.window_title":26.615,"VideoOut.Readiness":0.896,"VideoOut.Readiness.locks_validate":0.338,"Vulkan.Acquire":4.677,"Vulkan.Acquire.acquire_fence_wait":0.688,"Vulkan.Acquire.acquire_image":2.974,"Vulkan.Acquire.fence_reset":0.705,"Vulkan.Acquire.retired_swapchains":0.187,"Vulkan.DispatchRecipe":12.772,"Vulkan.DispatchRecipe.command_record":12.52,"Vulkan.DrawFromRecipe":112.72,"Vulkan.GraphicsPipeline":215.473,"Vulkan.GraphicsPipeline.create":144.262,"Vulkan.GraphicsPipeline.modules_and_state":1.143,"Vulkan.GraphicsPipelineLibrary":214.17,"Vulkan.GraphicsPipelineLink":0.053,"Vulkan.GraphicsPipelinePrebuild":70.459,"Vulkan.Present":67.525,"Vulkan.Present.command_record_scale":15.652,"Vulkan.Present.pixel_upload":33.453,"Vulkan.Present.queue_submit":18.089,"Vulkan.QueuePresent":136.703,"Vulkan.QueuePresent.queue_present":136.067,"Vulkan.Retire":8.186,"Vulkan.Retire.dump":0.432,"Vulkan.Retire.wait":5.501},"top_phases_ms_per_frame":{"Driver.Packet":30.662,"Graphics.Draw":23.766,"Driver.Packet.draw":22.932,"Driver.Draw":22.534,"Graphics.Draw.draw_and_resource_release":13.502,"Driver.Draw.shader_compile_and_link":12.972,"Shader.DrawStage":9.224,"Shader.DrawStage.capture_resources":5.849},"owned_draw_counts":{"OwnedDraw.evicted_other":172986},"graphics_track":{"Graphics.Barrier.dispatch-trail":306,"Graphics.Barrier.draw":40449,"Graphics.Barrier.fill":1497,"Graphics.Barrier.fill-clear":10190,"Graphics.Barrier.label-run":14161,"Graphics.Barrier.present-blit":1224,"Graphics.Barrier.shadow-publish":7,"Graphics.Barrier.staging-in":918,"Graphics.Barrier.staging-out":306,"Graphics.Barrier.storage-upload":1692,"Graphics.Barrier.storage-writeback":1792,"Graphics.BarrierMerged.dispatch-lead":306,"Graphics.BarrierMerged.fill":245,"Graphics.BarrierMerged.label-run":3797,"Graphics.BarrierMerged.shadow-publish":1,"Graphics.BarrierMerged.staging-out":306,"Graphics.BarrierMerged.storage-writeback":287,"Graphics.Copy":659,"Graphics.Copy.bytes":522256384,"Graphics.RenderPass":16467,"Graphics.RenderPass.Close.command":6790,"Graphics.RenderPass.Close.image":1493,"Graphics.RenderPass.Close.key":616,"Graphics.RenderPass.Close.label":3797,"Graphics.RenderPass.Close.new-batch":3771,"Graphics.RenderPass.Continued":230031},"trace_dropped":true,"trace_dropped_threads":{"queue worker 0x0":{"events_full_after_s":4.187,"events_lost":391681,"totals_full":false}},"trace":"aps5-trace-fbad8a40d087-22308.json.gz"} {"commit":"53e90579f98e","dirty":false,"env":{"APS5_DIAG_PAD_REPLAY":"<path>","APS5_DUMP_FRAMES":"100000","APS5_DUMP_FRAMES_EVERY":"30","APS5_DUMP_SCALE":"8","APS5_NO_PAD_INPUT":"1","APS5_PAD_REPLAY":"<path>","APS5_PROFILE_DRAW":"1","APS5_TRACE_DIR":"<path>","APS5_TRACE_DRAW_CACHE":"1","APS5_TRACE_SECONDS":"55:10","APS5_TRACE_SUMMARY_EVERY":"10"},"gpu":"NVIDIA GeForce RTX 4060","driver":"NVIDIA 621.14","os":"Windows 10.0.19045","cpu":"AMD Ryzen 5 5600 6-Core Processor","cpu_threads":12,"memory_mib":32678,"title_id":"PPSA36082","title":"Hades II","content_version":"01.006.000","resolution":"1920x1080","window":{"spec":"seconds 55:10","first_present":4398,"ms":10008.501},"presents":379,"frame_ms":{"p50":26.398,"p90":30.949,"p99":35.669,"max":127.834},"gpu_busy_ms_per_present":3.63,"worker_busy_pct":{"queue worker 0x0":93.479},"phase_totals_ms":{"Driver.Completion":5.158,"Driver.Dispatch":63.157,"Driver.Dispatch.decode_key_device_setup":1.413,"Driver.Dispatch.lookup_cache":0.982,"Driver.Draw":7416.101,"Driver.Draw.device_setup":458.961,"Driver.Draw.draw_enqueued":1173.238,"Driver.Draw.post_compile_prepare":56.185,"Driver.Draw.prepare":825.874,"Driver.Draw.shader_compile_and_link":4405.623,"Driver.EndSubmission":3.197,"Driver.Packet":9347.357,"Driver.Packet.device_lock":82.045,"Driver.Packet.dispatch":627.258,"Driver.Packet.draw":7551.133,"Driver.Packet.execute":278.38,"Driver.Packet.flip_flush":14.088,"Driver.Packet.flush_between_packets":262.471,"Driver.Packet.memory_wait":0.022,"Driver.Packet.pipeline_drain":109.911,"Driver.Packet.pipeline_prepare":110.497,"Driver.Packet.prepare_memory":198.346,"Driver.Packet.rendering_wait":0.487,"Driver.Present":418.3,"Driver.Present.acquire_image":6.025,"Driver.Present.device_setup":0.209,"Driver.Present.gpu_mutex_wait":20.433,"Driver.Present.inflight_wait":1.275,"Driver.Present.present_display_buffer":227.153,"Driver.Present.queue_present":151.076,"Driver.Present.release_and_callback":0.636,"Driver.Present.render_fence_wait":10.281,"Driver.Present.resize":0.68,"Driver.Present.validate":0.121,"Driver.Suspend":0.089,"GpuMutex.wait.draw":66.599,"GpuMutex.wait.end":0.051,"GpuMutex.wait.fill":2.691,"GpuMutex.wait.flush":0.159,"GpuMutex.wait.hook":48.897,"GpuMutex.wait.label":0.22,"GpuMutex.wait.present":19.416,"GpuMutex.wait.wait":187.754,"Graphics.Draw":5943.101,"Graphics.Draw.draw_and_resource_release":4474.651,"Graphics.Draw.index_upload":252.15,"Graphics.Draw.validate":496.683,"Graphics.Draw.vertex_upload":613.506,"Graphics.DrawWithRecipe":140.56,"Graphics.DrawWithRecipe.draw_and_resource_release":104.636,"Graphics.DrawWithRecipe.index_upload":7.475,"Graphics.DrawWithRecipe.validate":9.046,"Graphics.DrawWithRecipe.vertex_upload":16.764,"Graphics.Submit":0.376,"Graphics.Submit.command_end":0.029,"Graphics.Submit.queue_submit":0.345,"Graphics.Wait":33.815,"Graphics.Wait.fence_wait":33.802,"Recorder.Reap":89.614,"Recorder.Submit":193.956,"Recorder.WaitSerial":85.222,"Resources.Complete":51.097,"Resources.Prepare":17.429,"Shader.DrawStage":3106.145,"Shader.DrawStage.capture_resources":2006.848,"Shader.DrawStage.materialize":492.872,"Shader.DrawStage.prepared_invocation":555.334,"Shader.PrepareArtifact":5.749,"Shader.ResolveAbi":7.951,"Shader.ResolveGraphicsAbi":4.378,"Shader.ResolveGraphicsStagesAbi":18.349,"VideoOut.Flip":479.454,"VideoOut.Flip.completion_mutex_wait":0.78,"VideoOut.Flip.config_mutex_wait":0.051,"VideoOut.Flip.frame_limit":0.308,"VideoOut.Flip.notify_game":24.549,"VideoOut.Flip.present":420.068,"VideoOut.Flip.validate":0.571,"VideoOut.Flip.vblank_wait":0.312,"VideoOut.Flip.window_prepare":0.663,"VideoOut.Flip.window_title":31.621,"VideoOut.Readiness":0.919,"VideoOut.Readiness.locks_validate":0.365,"Vulkan.Acquire":5.563,"Vulkan.Acquire.acquire_fence_wait":0.787,"Vulkan.Acquire.acquire_image":3.553,"Vulkan.Acquire.fence_reset":0.852,"Vulkan.Acquire.retired_swapchains":0.219,"Vulkan.DispatchRecipe":13.476,"Vulkan.DispatchRecipe.command_record":13.217,"Vulkan.DrawFromRecipe":143.46,"Vulkan.GraphicsPipeline":69.656,"Vulkan.GraphicsPipeline.create":31.034,"Vulkan.GraphicsPipeline.modules_and_state":0.491,"Vulkan.GraphicsPipelineLibrary":69.102,"Vulkan.GraphicsPipelineLink":0.021,"Vulkan.GraphicsPipelinePrebuild":38.302,"Vulkan.Present":39.688,"Vulkan.Present.command_record_scale":12.304,"Vulkan.Present.pixel_upload":17.258,"Vulkan.Present.queue_submit":9.713,"Vulkan.QueuePresent":148.153,"Vulkan.QueuePresent.queue_present":147.429,"Vulkan.Retire":10.004,"Vulkan.Retire.dump":0.513,"Vulkan.Retire.wait":6.333},"top_phases_ms_per_frame":{"Driver.Packet":24.663,"Driver.Packet.draw":19.924,"Driver.Draw":19.568,"Graphics.Draw":15.681,"Graphics.Draw.draw_and_resource_release":11.806,"Driver.Draw.shader_compile_and_link":11.624,"Shader.DrawStage":8.196,"Shader.DrawStage.capture_resources":5.295},"owned_draw_counts":{},"graphics_track":{"Graphics.Barrier.dispatch-trail":379,"Graphics.Barrier.draw":48626,"Graphics.Barrier.fill":1875,"Graphics.Barrier.fill-clear":12666,"Graphics.Barrier.label-run":16698,"Graphics.Barrier.present-blit":1516,"Graphics.Barrier.shadow-publish":5,"Graphics.Barrier.staging-in":1137,"Graphics.Barrier.staging-out":379,"Graphics.Barrier.storage-upload":2110,"Graphics.Barrier.storage-writeback":2236,"Graphics.BarrierMerged.dispatch-lead":379,"Graphics.BarrierMerged.fill":349,"Graphics.BarrierMerged.label-run":4940,"Graphics.BarrierMerged.shadow-publish":1,"Graphics.BarrierMerged.staging-out":379,"Graphics.BarrierMerged.storage-writeback":349,"Graphics.Copy":794,"Graphics.Copy.bytes":408846336,"Graphics.RenderPass":19920,"Graphics.RenderPass.Close.command":8190,"Graphics.RenderPass.Close.image":1707,"Graphics.RenderPass.Close.key":768,"Graphics.RenderPass.Close.label":4940,"Graphics.RenderPass.Close.new-batch":4315,"Graphics.RenderPass.Continued":291252},"trace_dropped":true,"trace_dropped_threads":{"queue worker 0x0":{"events_full_after_s":3.934,"events_lost":454929,"totals_full":false}},"trace":"aps5-trace-53e90579f98e-24072.json.gz"} {"commit":"53e90579f98e","dirty":false,"env":{"APS5_DUMP_FRAMES":"100000","APS5_DUMP_FRAMES_EVERY":"30","APS5_DUMP_SCALE":"8","APS5_TRACE_DIR":"<path>","APS5_TRACE_SECONDS":"70:10","APS5_TRACE_SUMMARY_EVERY":"10"},"gpu":"NVIDIA GeForce RTX 4060","driver":"NVIDIA 621.14","os":"Windows 10.0.19045","cpu":"AMD Ryzen 5 5600 6-Core Processor","cpu_threads":12,"memory_mib":32678,"title_id":"PPSA27623","title":"ASTRONEER","content_version":"01.015.000","resolution":"3840x2160","window":{"spec":"seconds 70:10","first_present":1316,"ms":10020.315},"presents":93,"frame_ms":{"p50":97.215,"p90":106.941,"p99":969.339,"max":969.339},"gpu_busy_ms_per_present":40.909,"worker_busy_pct":{"queue worker 0x0":98.287,"queue worker 0x20":99.973},"phase_totals_ms":{"Driver.Completion":1.241,"Driver.Dispatch":375.36,"Driver.Dispatch.capture_resources":142.21,"Driver.Dispatch.decode_key_device_setup":16.449,"Driver.Dispatch.lookup_cache":0.773,"Driver.Dispatch.materialize":3.792,"Driver.Dispatch.prepared_invocation":3.537,"Driver.Draw":6710.088,"Driver.Draw.device_setup":334.517,"Driver.Draw.draw_enqueued":2593.376,"Driver.Draw.post_compile_prepare":38.883,"Driver.Draw.prepare":504.603,"Driver.Draw.shader_compile_and_link":3107.728,"Driver.EndSubmission":77.369,"Driver.Packet":19787.712,"Driver.Packet.device_lock":76.458,"Driver.Packet.dispatch":2280.597,"Driver.Packet.draw":6778.445,"Driver.Packet.execute":261.397,"Driver.Packet.flip_flush":4.44,"Driver.Packet.flush_between_packets":164.643,"Driver.Packet.memory_wait":9472.405,"Driver.Packet.pipeline_drain":287.773,"Driver.Packet.pipeline_prepare":113.083,"Driver.Packet.prepare_memory":160.908,"Driver.Packet.rendering_wait":0.217,"Driver.Present":1151.291,"Driver.Present.acquire_image":1.559,"Driver.Present.device_setup":0.06,"Driver.Present.gpu_mutex_wait":31.98,"Driver.Present.inflight_wait":0.299,"Driver.Present.present_display_buffer":18.079,"Driver.Present.queue_present":30.122,"Driver.Present.release_and_callback":0.148,"Driver.Present.render_fence_wait":1068.748,"Driver.Present.resize":0.196,"Driver.Present.validate":0.03,"Driver.Suspend":0.015,"GpuMutex.wait.dispatch":58.313,"GpuMutex.wait.draw":72.71,"GpuMutex.wait.end":31.874,"GpuMutex.wait.fill":2.11,"GpuMutex.wait.flush":0.056,"GpuMutex.wait.hook":244.77,"GpuMutex.wait.label":87.826,"GpuMutex.wait.other":19.84,"GpuMutex.wait.present":31.721,"Graphics.Draw":6781.475,"Graphics.Draw.draw_and_resource_release":5545.533,"Graphics.Draw.index_upload":365.305,"Graphics.Draw.validate":338.945,"Graphics.Draw.vertex_upload":434.739,"Recorder.Reap":55.527,"Recorder.Submit":208.993,"Recorder.Sync":326.236,"Resources.Complete":22.049,"Resources.Prepare":29.673,"Shader.DrawStage":2237.44,"Shader.DrawStage.capture_resources":1076.411,"Shader.DrawStage.materialize":655.836,"Shader.DrawStage.prepared_invocation":472.941,"Shader.PrepareArtifact":178.333,"Shader.Register":18.942,"Shader.ResolveAbi":22.979,"Shader.ResolveGraphicsAbi":0.028,"Shader.ResolveGraphicsStagesAbi":70.226,"VideoOut.Flip":1162.903,"VideoOut.Flip.completion_mutex_wait":0.217,"VideoOut.Flip.config_mutex_wait":0.008,"VideoOut.Flip.frame_limit":0.183,"VideoOut.Flip.notify_game":3.252,"VideoOut.Flip.present":1152.135,"VideoOut.Flip.validate":0.122,"VideoOut.Flip.vblank_wait":0.072,"VideoOut.Flip.window_prepare":0.159,"VideoOut.Flip.window_title":6.435,"VideoOut.Readiness":0.228,"VideoOut.Readiness.locks_validate":0.087,"Vulkan.Acquire":1.442,"Vulkan.Acquire.acquire_fence_wait":0.229,"Vulkan.Acquire.acquire_image":0.907,"Vulkan.Acquire.fence_reset":0.202,"Vulkan.Acquire.retired_swapchains":0.067,"Vulkan.Dispatch":76.094,"Vulkan.Dispatch.command_record":30.305,"Vulkan.Dispatch.shader_resources":44.853,"Vulkan.GraphicsPipeline":1195.127,"Vulkan.GraphicsPipeline.create":795.629,"Vulkan.GraphicsPipeline.modules_and_state":3.054,"Vulkan.GraphicsPipelineLibrary":1191.744,"Vulkan.GraphicsPipelineLink":0.075,"Vulkan.GraphicsPipelinePrebuild":397.939,"Vulkan.Present":10.808,"Vulkan.Present.command_record_scale":4.421,"Vulkan.Present.pixel_upload":0.616,"Vulkan.Present.queue_submit":5.671,"Vulkan.QueuePresent":29.759,"Vulkan.QueuePresent.queue_present":29.607,"Vulkan.Retire":2101.587,"Vulkan.Retire.dump":0.331,"Vulkan.Retire.wait":1066.495},"top_phases_ms_per_frame":{"Driver.Packet":212.771,"Driver.Packet.memory_wait":101.854,"Graphics.Draw":72.919,"Driver.Packet.draw":72.887,"Driver.Draw":72.151,"Graphics.Draw.draw_and_resource_release":59.629,"Driver.Draw.shader_compile_and_link":33.416,"Driver.Draw.draw_enqueued":27.886},"owned_draw_counts":{"OwnedDraw.evicted_other":11141},"graphics_track":{"Graphics.Barrier.copy":1209,"Graphics.Barrier.dcc-clear":1302,"Graphics.Barrier.dcc-keys":558,"Graphics.Barrier.dispatch-lead":744,"Graphics.Barrier.dispatch-trail":1209,"Graphics.Barrier.draw":12771,"Graphics.Barrier.fill":886,"Graphics.Barrier.fill-clear":558,"Graphics.Barrier.label-run":11040,"Graphics.Barrier.present-blit":186,"Graphics.Barrier.shadow-publish":186,"Graphics.Barrier.staging-in":466,"Graphics.Barrier.staging-out":186,"Graphics.Barrier.storage-upload":4,"Graphics.Barrier.storage-writeback":2540,"Graphics.BarrierMerged.dispatch-lead":465,"Graphics.BarrierMerged.fill":602,"Graphics.BarrierMerged.label-run":406,"Graphics.BarrierMerged.shadow-publish":186,"Graphics.BarrierMerged.staging-in":92,"Graphics.BarrierMerged.staging-out":186,"Graphics.BarrierMerged.storage-writeback":622,"Graphics.Copy":837,"Graphics.Copy.bytes":2626119864,"Graphics.RenderPass":7014,"Graphics.RenderPass.Close.command":1425,"Graphics.RenderPass.Close.image":965,"Graphics.RenderPass.Close.key":532,"Graphics.RenderPass.Close.label":406,"Graphics.RenderPass.Close.new-batch":3686,"Graphics.RenderPass.Continued":208208},"trace_dropped":true,"trace_dropped_threads":{"queue worker 0x0":{"events_full_after_s":7.71,"events_lost":84918,"totals_full":false}},"trace":"aps5-trace-53e90579f98e-15108.json.gz"} {"commit":"fbad8a40d087","dirty":false,"env":{"APS5_DUMP_FRAMES":"100000","APS5_DUMP_FRAMES_EVERY":"30","APS5_DUMP_SCALE":"8","APS5_TRACE_DIR":"<path>","APS5_TRACE_SECONDS":"70:10","APS5_TRACE_SUMMARY_EVERY":"10"},"gpu":"NVIDIA GeForce RTX 4060","driver":"NVIDIA 621.14","os":"Windows 10.0.19045","cpu":"AMD Ryzen 5 5600 6-Core Processor","cpu_threads":12,"memory_mib":32678,"title_id":"PPSA27623","title":"ASTRONEER","content_version":"01.015.000","resolution":"3840x2160","window":{"spec":"seconds 70:10","first_present":1300,"ms":10030.62},"presents":91,"frame_ms":{"p50":98.903,"p90":109.988,"p99":957.932,"max":957.932},"gpu_busy_ms_per_present":40.219,"worker_busy_pct":{"queue worker 0x0":98.257,"queue worker 0x20":99.965},"phase_totals_ms":{"Driver.Completion":1.154,"Driver.Dispatch":411.457,"Driver.Dispatch.capture_resources":160.278,"Driver.Dispatch.decode_key_device_setup":18.833,"Driver.Dispatch.lookup_cache":0.719,"Driver.Dispatch.materialize":3.747,"Driver.Dispatch.prepared_invocation":3.718,"Driver.Draw":6758.898,"Driver.Draw.device_setup":339.06,"Driver.Draw.draw_enqueued":2553.887,"Driver.Draw.post_compile_prepare":47.332,"Driver.Draw.prepare":513.088,"Driver.Draw.shader_compile_and_link":3173.013,"Driver.EndSubmission":65.301,"Driver.Packet":19816.36,"Driver.Packet.device_lock":73.094,"Driver.Packet.dispatch":2284.086,"Driver.Packet.draw":6823.571,"Driver.Packet.execute":256.637,"Driver.Packet.flip_flush":4.492,"Driver.Packet.flush_between_packets":152.966,"Driver.Packet.memory_wait":9460.93,"Driver.Packet.pipeline_drain":290.816,"Driver.Packet.pipeline_prepare":110.963,"Driver.Packet.prepare_memory":165.893,"Driver.Packet.rendering_wait":0.211,"Driver.Present":1121.757,"Driver.Present.acquire_image":1.507,"Driver.Present.device_setup":0.055,"Driver.Present.gpu_mutex_wait":3.231,"Driver.Present.inflight_wait":0.254,"Driver.Present.present_display_buffer":17.845,"Driver.Present.queue_present":30.66,"Driver.Present.release_and_callback":0.159,"Driver.Present.render_fence_wait":1067.786,"Driver.Present.resize":0.168,"Driver.Present.validate":0.029,"Driver.Suspend":0.012,"GpuMutex.wait.dispatch":84.765,"GpuMutex.wait.draw":65.281,"GpuMutex.wait.end":21.924,"GpuMutex.wait.fill":2.292,"GpuMutex.wait.flush":0.113,"GpuMutex.wait.hook":233.0,"GpuMutex.wait.label":91.312,"GpuMutex.wait.other":29.921,"GpuMutex.wait.present":3.038,"Graphics.Draw":6798.223,"Graphics.Draw.draw_and_resource_release":5513.012,"Graphics.Draw.index_upload":367.817,"Graphics.Draw.validate":342.071,"Graphics.Draw.vertex_upload":479.623,"Recorder.Reap":54.95,"Recorder.Submit":216.651,"Recorder.Sync":271.345,"Resources.Complete":23.76,"Resources.Prepare":28.111,"Shader.DrawStage":2287.316,"Shader.DrawStage.capture_resources":1116.611,"Shader.DrawStage.materialize":657.817,"Shader.DrawStage.prepared_invocation":480.327,"Shader.PrepareArtifact":187.539,"Shader.Register":10.52,"Shader.ResolveAbi":26.231,"Shader.ResolveGraphicsAbi":0.031,"Shader.ResolveGraphicsStagesAbi":69.754,"VideoOut.Flip":1136.868,"VideoOut.Flip.completion_mutex_wait":0.205,"VideoOut.Flip.config_mutex_wait":0.01,"VideoOut.Flip.frame_limit":0.067,"VideoOut.Flip.notify_game":6.627,"VideoOut.Flip.present":1122.497,"VideoOut.Flip.validate":0.134,"VideoOut.Flip.vblank_wait":0.072,"VideoOut.Flip.window_prepare":0.162,"VideoOut.Flip.window_title":6.701,"VideoOut.Readiness":0.222,"VideoOut.Readiness.locks_validate":0.089,"Vulkan.Acquire":1.391,"Vulkan.Acquire.acquire_fence_wait":0.211,"Vulkan.Acquire.acquire_image":0.867,"Vulkan.Acquire.fence_reset":0.216,"Vulkan.Acquire.retired_swapchains":0.06,"Vulkan.Dispatch":65.691,"Vulkan.Dispatch.command_record":27.018,"Vulkan.Dispatch.shader_resources":37.726,"Vulkan.GraphicsPipeline":1181.184,"Vulkan.GraphicsPipeline.create":777.271,"Vulkan.GraphicsPipeline.modules_and_state":5.542,"Vulkan.GraphicsPipelineLibrary":1175.32,"Vulkan.GraphicsPipelineLink":0.075,"Vulkan.GraphicsPipelinePrebuild":399.882,"Vulkan.Present":10.337,"Vulkan.Present.command_record_scale":4.45,"Vulkan.Present.pixel_upload":0.619,"Vulkan.Present.queue_submit":5.163,"Vulkan.QueuePresent":30.299,"Vulkan.QueuePresent.queue_present":30.142,"Vulkan.Retire":2090.894,"Vulkan.Retire.dump":0.336,"Vulkan.Retire.wait":1065.612},"top_phases_ms_per_frame":{"Driver.Packet":217.762,"Driver.Packet.memory_wait":103.966,"Driver.Packet.draw":74.984,"Graphics.Draw":74.706,"Driver.Draw":74.274,"Graphics.Draw.draw_and_resource_release":60.583,"Driver.Draw.shader_compile_and_link":34.868,"Driver.Draw.draw_enqueued":28.065},"owned_draw_counts":{"OwnedDraw.evicted_other":11664},"graphics_track":{"Graphics.Barrier.copy":1183,"Graphics.Barrier.dcc-clear":1274,"Graphics.Barrier.dcc-keys":546,"Graphics.Barrier.dispatch-lead":729,"Graphics.Barrier.dispatch-trail":1183,"Graphics.Barrier.draw":12548,"Graphics.Barrier.fill":860,"Graphics.Barrier.fill-clear":546,"Graphics.Barrier.label-run":10798,"Graphics.Barrier.present-blit":182,"Graphics.Barrier.shadow-publish":182,"Graphics.Barrier.staging-in":637,"Graphics.Barrier.staging-out":273,"Graphics.Barrier.storage-upload":4,"Graphics.Barrier.storage-writeback":2482,"Graphics.BarrierMerged.dispatch-lead":454,"Graphics.BarrierMerged.fill":596,"Graphics.BarrierMerged.label-run":435,"Graphics.BarrierMerged.shadow-publish":182,"Graphics.BarrierMerged.staging-in":182,"Graphics.BarrierMerged.staging-out":273,"Graphics.BarrierMerged.storage-writeback":612,"Graphics.Copy":1001,"Graphics.Copy.bytes":2664691848,"Graphics.RenderPass":6883,"Graphics.RenderPass.Close.command":1402,"Graphics.RenderPass.Close.image":930,"Graphics.RenderPass.Close.key":516,"Graphics.RenderPass.Close.label":435,"Graphics.RenderPass.Close.new-batch":3600,"Graphics.RenderPass.Continued":203741},"trace_dropped":true,"trace_dropped_threads":{"queue worker 0x0":{"events_full_after_s":7.489,"events_lost":90977,"totals_full":false}},"trace":"aps5-trace-fbad8a40d087-16812.json.gz"} ``` </details> The traces are kept locally and I can attach them. **GPU tests.** `ctest -R agc_draw_inputs -V` with `ANYPS5_REQUIRE_VULKAN=1 ANYPS5_NO_SHADER_CACHE=1 VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation VK_LOADER_DEBUG=layer` (layer 1.4.363) covers `agc_draw_inputs_in_place_driver`, `agc_draw_inputs_in_place` and `agc_draw_inputs_copied`. - On both arms: 3 of 3 pass, the loader inserts the layer, and there are 0 `VUID-` lines. - On the rebased head `b90068f9f5` (built without #20310): 3 of 3 pass, the layer is inserted, and there are 0 `VUID-` lines. The 21 other draw-input and snapshot tests of `agc_driver_recorder_tests` (such as `agc_draw_input_reuse`, `agc_owned_draw_inputs*` and `agc_unwatch_snapshot_scope*`) also pass, with the layer inserted and 0 `VUID-` lines. - On the head rebased onto `main` `45f6d379cc`, `2446139491`: `agc_draw_inputs_in_place_driver`, `agc_driver_recorder`, `agc_draw_inputs_in_place` and `agc_draw_inputs_copied` pass, 4 of 4, with the layer inserted and 0 `VUID-` lines. That `main` has #20578, which changed the same check in `InPlaceDrawInput`. `agc_draw_inputs_copied` keeps #20578's checks and also checks that a small vertex range free of pending writes is bound in place. - **On current `main`, with #20578:** measured as `b10ecb9916` (this head on `main` `45f6d379cc`) against `4020742320` (that `main`). Both have the #16053 revert so the title renders correctly. Same replay, default path, no profiler, rounds `main`/PR/PR/`main`. - Dense combat (50–90 s, at least 900 draws per frame): 29.1 → 36.2 FPS (+24 %). Worker 35.4 → 28.0 µs per draw; committer 32.0 → 21.1 (`APS5_PIPELINE_STATS`). - 40–130 s medians: 31.4 / 29.9 → 41.1 / 40.8 FPS. - `trace_digest`, 55–65 s: `main` `334 presents, frame p50 30.9 / p90 35.0 / p99 42.7 / max 161.3 ms, GPU busy 3.9 ms per present`; this PR `412 presents, frame p50 23.9 / p90 28.4 / p99 38.3 / max 164.2 ms, GPU busy 3.9 ms per present`. **With #20315.** The draw-input part of #20315 copies, on the GPU, only the inputs behind a pending GPU write, so it does not cover these. Same Hades replay, median FPS and committer µs/draw from 40 s: - #20315 alone: 27.9 FPS, 26.7 µs - #20315 with this PR: 36.6 FPS, 17.8 µs - With #20315's pipeline switches (`APS5_DRAW_PIPELINE=1 APS5_PIPELINE_DISPATCH=1 APS5_PIPELINE_DISPATCH_MISSES=1`): 27.6 FPS alone, 35.1 FPS with this PR The two merge with one conflict, where both add a line at the start of `prepareDrawInputs`. **Overlap.** #19445 changes the same condition in `InPlaceDrawInput` (large inputs in place); whichever merges second keeps both. `tools/pr_overlap.py --branch feat/small-draw-inputs-in-place` finds no overlap among the pull requests it can compare. It exits failed-closed because 112 open PRs that conflict with `main` share these files. I searched their diffs for `InPlaceDrawInput`, `drawInputsInPlace`, `DrawInputsInPlace` and `APS5_DRAW_INPUTS_IN_PLACE`. Only #19445, #20315 (both above) and #9852 name them; #9852 is a test that reads `DrawInputsInPlace()` for a storage counter, which this does not change. `python tools/check_conventions.py --base origin/main`: all checks pass. ### Checklist <!-- Rules behind each item: https://github.com/boykopovar/AnyPS5/blob/main/CONTRIBUTING.md --> - [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) and the licence notice of code adapted from upstream (see AGENTS.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 GeForce RTX 4060, NVIDIA 621.14, Windows 10 22H2 (19045) - [x] AI-assisted: yes
MarcZX10 commented 2026-11-15 03:53:53 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-15T03:53:53Z.

Review: APPROVED


Reviewed — looks good

Nothing blocks this change; the notes below are optional.

What I ran

  • Reviewed head 20de8205e9bc9b149770ca9c92e67b66baffcfce using repo_read.py.
  • No build or tests were run.

Results

Check Result Note
Code review passed Read all changed source and test files
Build and tests not run No execution environment available

Findings

Blocking

None.

Non-blocking

None.

Not verified

  • Build and test results, including the updated draw input tests, were not verified.
  • Performance measurements in the PR description are author reported.
  • Read all nine changed files listed in the manifest. The manifest marks all nine as included; none were excluded.

To get this to a good state

Nothing is required.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5908924044 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/20368#pullrequestreview-5908924044). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-11-15T03:53:53Z. **Review:** APPROVED --- # Reviewed — looks good Nothing blocks this change; the notes below are optional. ## What I ran - Reviewed head `20de8205e9bc9b149770ca9c92e67b66baffcfce` using `repo_read.py`. - No build or tests were run. ## Results | Check | Result | Note | |---|---|---| | Code review | passed | Read all changed source and test files | | Build and tests | not run | No execution environment available | ## Findings ### Blocking None. ### Non-blocking None. ## Not verified - Build and test results, including the updated draw input tests, were not verified. - Performance measurements in the PR description are author reported. - Read all nine changed files listed in the manifest. The manifest marks all nine as included; none were excluded. ## To get this to a good state Nothing is required.
MarcZX10 commented 2026-11-15 16:00:56 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-15T16:00:56Z.

Review: APPROVED


Reviewed — looks good

Nothing blocks this; the points below are optional.

What I ran

Reviewed head aabbdaffda3d470bf227a07a24746f19c8e42dc2 using the prepared diff and repo_read.py. I ran no build or tests.

Results

Check Result Note
Changed code review passed Read all changed files marked included
Build and tests not run No commands run

Findings

Blocking

None.

Non-blocking

None.

Not verified

VulkanDevice.cpp and Recorder.cpp were excluded from the review bundle for size; I read only the changed regions in those files through repo_read.py. description.md and commits.md were read. The bundle listed six files as included and two as excluded. Performance measurements in the PR description are author reported and were not independently verified. Build, tests, and console behavior were not run.

To get this to a good state

Nothing is required.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5911609367 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/20368#pullrequestreview-5911609367). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-11-15T16:00:56Z. **Review:** APPROVED --- # Reviewed — looks good Nothing blocks this; the points below are optional. ## What I ran Reviewed head `aabbdaffda3d470bf227a07a24746f19c8e42dc2` using the prepared diff and `repo_read.py`. I ran no build or tests. ## Results | Check | Result | Note | |---|---|---| | Changed code review | passed | Read all changed files marked `included` | | Build and tests | not run | No commands run | ## Findings ### Blocking None. ### Non-blocking None. ## Not verified `VulkanDevice.cpp` and `Recorder.cpp` were excluded from the review bundle for size; I read only the changed regions in those files through `repo_read.py`. `description.md` and `commits.md` were read. The bundle listed six files as included and two as excluded. Performance measurements in the PR description are author reported and were not independently verified. Build, tests, and console behavior were not run. ## To get this to a good state Nothing is required.
MarcZX10 commented 2026-11-16 01:13:09 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-16T01:13:09Z.

Review: COMMENTED


Reviewed — no blocking findings

Nothing blocks this change; the review was limited to selected changed files, so approval is not justified.

What I ran

Reviewed head b90068f9f5d24dd68300aa2fff2bb085422be663 using the prepared diff and targeted source reads. No build or tests were run.

Results

Check Result Note
Prepared diff review passed Draw input selection and configuration inspected
Tests and build not run No commands were run

Findings

Blocking

None identified in the code read.

Non-blocking

None.

Not verified

Full text was not read for core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp and core/libs/prx/libSceAgcDriver/tests/Recorder.cpp; only targeted ranges were inspected. Also not read: core/libs/prx/libSceAgcDriver/Graphics/include/Context.hpp, core/libs/prx/libSceAgcDriver/tests/DrawInputsInPlace.cpp, docs/dev/ARCHITECTURE.md, and docs/dev/ENVIRONMENT.md. Build, automated tests, and reported performance measurements were not independently verified.

To get this to a good state

Nothing is required. Optional: run the relevant build and tests on this head and verify the reported performance measurements.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5913980396 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/20368#pullrequestreview-5913980396). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-11-16T01:13:09Z. **Review:** COMMENTED --- # Reviewed — no blocking findings Nothing blocks this change; the review was limited to selected changed files, so approval is not justified. ## What I ran Reviewed head `b90068f9f5d24dd68300aa2fff2bb085422be663` using the prepared diff and targeted source reads. No build or tests were run. ## Results | Check | Result | Note | |---|---|---| | Prepared diff review | passed | Draw input selection and configuration inspected | | Tests and build | not run | No commands were run | ## Findings ### Blocking None identified in the code read. ### Non-blocking None. ## Not verified Full text was not read for `core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp` and `core/libs/prx/libSceAgcDriver/tests/Recorder.cpp`; only targeted ranges were inspected. Also not read: `core/libs/prx/libSceAgcDriver/Graphics/include/Context.hpp`, `core/libs/prx/libSceAgcDriver/tests/DrawInputsInPlace.cpp`, `docs/dev/ARCHITECTURE.md`, and `docs/dev/ENVIRONMENT.md`. Build, automated tests, and reported performance measurements were not independently verified. ## To get this to a good state Nothing is required. Optional: run the relevant build and tests on this head and verify the reported performance measurements.
MarcZX10 commented 2026-11-16 14:40:05 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-16T14:40:05Z.

Review: COMMENTED


Reviewed — comments

Changes are required before merge: verify and correct whether the small-input optimization applies to NVIDIA Windows draws when APS5_DRAW_INPUTS_IN_PLACE=1 is set.

What I ran

Reviewed head 244613949165e9021ffa36d9ac31df93cc0de18b using the prepared diff and repo_read.py targeted reads. No tests were run.

Results

Check Result Note
Diff review passed Changed logic inspected
Tests not run No local test execution
Runtime performance not run Author supplied measurements only

Findings

Blocking

None verified.

Non-blocking

  • APS5_DRAW_INPUTS_IN_PLACE=1 enables in-place binding on NVIDIA Windows, but the small-input default threshold remains 1024 bytes (VulkanDevice.cpp:1945-1947). The description says the optimization applies where inputs are copied; with the override set, inputs are already bound in place regardless of size. This may be intentional as the override explicitly opts into that behavior, but the interaction is not documented and makes the threshold ineffective. Clarify the override semantics or add coverage/documentation for this combination.

Not verified

  • Full text of core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp and core/libs/prx/libSceAgcDriver/tests/Recorder.cpp was not available in the review folder; the changed hunks and relevant ranges were read through repo_read.py.
  • Runtime behavior and author supplied performance measurements were not independently reproduced.
  • Tests and the remaining unchanged context were not run/read.

Read changed lines in core/libs/prx/libSceAgcDriver/Execution/include/DrawInputsInPlace.hpp, core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp, core/libs/prx/libSceAgcDriver/Graphics/include/Context.hpp, core/libs/prx/libSceAgcDriver/Graphics/include/Draw.hpp, core/libs/prx/libSceAgcDriver/Graphics/src/Draw.cpp, core/libs/prx/libSceAgcDriver/tests/DrawInputsInPlace.cpp, core/libs/prx/libSceAgcDriver/tests/Recorder.cpp, docs/dev/ARCHITECTURE.md, and docs/dev/ENVIRONMENT.md. files.json was unavailable; the review folder identifies the two changed files excluded from its full-text bundle.

To get this to a good state

Nothing is required. Optional: document or test the threshold's interaction with APS5_DRAW_INPUTS_IN_PLACE=1.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5921815445 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/20368#pullrequestreview-5921815445). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-11-16T14:40:05Z. **Review:** COMMENTED --- # Reviewed — comments Changes are required before merge: verify and correct whether the small-input optimization applies to NVIDIA Windows draws when `APS5_DRAW_INPUTS_IN_PLACE=1` is set. ## What I ran Reviewed head `244613949165e9021ffa36d9ac31df93cc0de18b` using the prepared diff and `repo_read.py` targeted reads. No tests were run. ## Results | Check | Result | Note | |---|---|---| | Diff review | passed | Changed logic inspected | | Tests | not run | No local test execution | | Runtime performance | not run | Author supplied measurements only | ## Findings ### Blocking None verified. ### Non-blocking - `APS5_DRAW_INPUTS_IN_PLACE=1` enables in-place binding on NVIDIA Windows, but the small-input default threshold remains 1024 bytes (`VulkanDevice.cpp:1945-1947`). The description says the optimization applies where inputs are copied; with the override set, inputs are already bound in place regardless of size. This may be intentional as the override explicitly opts into that behavior, but the interaction is not documented and makes the threshold ineffective. Clarify the override semantics or add coverage/documentation for this combination. ## Not verified - Full text of `core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp` and `core/libs/prx/libSceAgcDriver/tests/Recorder.cpp` was not available in the review folder; the changed hunks and relevant ranges were read through `repo_read.py`. - Runtime behavior and author supplied performance measurements were not independently reproduced. - Tests and the remaining unchanged context were not run/read. Read changed lines in `core/libs/prx/libSceAgcDriver/Execution/include/DrawInputsInPlace.hpp`, `core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp`, `core/libs/prx/libSceAgcDriver/Graphics/include/Context.hpp`, `core/libs/prx/libSceAgcDriver/Graphics/include/Draw.hpp`, `core/libs/prx/libSceAgcDriver/Graphics/src/Draw.cpp`, `core/libs/prx/libSceAgcDriver/tests/DrawInputsInPlace.cpp`, `core/libs/prx/libSceAgcDriver/tests/Recorder.cpp`, `docs/dev/ARCHITECTURE.md`, and `docs/dev/ENVIRONMENT.md`. `files.json` was unavailable; the review folder identifies the two changed files excluded from its full-text bundle. ## To get this to a good state Nothing is required. Optional: document or test the threshold's interaction with `APS5_DRAW_INPUTS_IN_PLACE=1`.
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!20368
No description provided.