Repository navigation
perf(agc): copy a descriptor region behind pending GPU work on the GPU whatever its size - #13263
Conversation
…U whatever its size A misaligned descriptor region inside a host import is copied out of the import by the GPU only up to APS5_GPU_COPY_MAX_KIB (1 MiB). A larger one was read on the CPU, and when a pending GPU write, pending storage results or a unit shadow covered it, that read waited in the flush hook for the producer's batch (the [hooksync] "buffer-upload" syncs). Such a region now takes the GPU copy whatever its size: the copy is recorded after the producer in batch order, behind the barrier and the pending-results flush the GPU path already records, so the bytes are the same and the CPU does not wait. UploadFinish asks the recorder under the GPU mutex; UploadPrepare, which holds no lock, asks the published pending-write snapshot. Larger regions behind no GPU work keep the CPU copy, which never waits for them. Completion write-backs and labels over the range are still synced first by CompletePendingCpuWrites, so a pending write the copy sees has landed in the import on the GPU. The test (agc_buffer_upload_pending_gpu_copy) uploads a 3 MiB misaligned region over a GPU write still in the open batch: the upload makes no flush-hook wait and no submission, and a GPU read of the bound buffer holds the producer's bytes.
|
This pull request is labeled |
|
Some comparisons could not be completed because a pull request conflicts with the base branch. Review these shared files manually before concluding that there is no overlap.
|
The conflict in core/libs/prx/libSceAgcDriver/CMakeLists.txt from boykopovar#12862's split is resolved with tools/agc_test_split.py resolve, which moves this PR's test registrations into tests/cmake/.
CnRJay
left a comment
There was a problem hiding this comment.
The perf(agc) title makes a speed claim, and the evidence for it does not meet the bar yet.
-
No
tools/trace_digest.pysummaries. The only numbers areAPS5_PROFILE_DRAW=1[hooksync]lines formain("65 syncs, 238 ms", "29 syncs, 364 ms" per 10 s). Those say the waits exist, not that removing them makes the scene faster. Please attach trace_digest summaries ofmainand of this branch from the same machine and scene (frame p50/p90/p99, GPU busy per present), with the RE Village menu named by title ID and a log line showing the large pending-write upload is reached onmain. -
No hardware GPU. "GPUs tested" lists llvmpipe/lavapipe only. The change turns a CPU
Readinto avkCmdCopyBufferof unbounded size into the open batch, so the cost moves to the GPU timeline. On a discrete card that copy reads from a host-imported system-memory range over PCIe, and withAPS5_GPU_COPY_MAX_KIBremoved as a bound for this case a 3+ MiB (or much larger) descriptor range is copied on every build behind pending work. Please run it on a real GPU and show GPU busy per present does not rise. -
The size bound is removed, not replaced.
copyBehindGpuWorkhas no upper limit and no per-frame budget. Is there a case where the pending overlap is a few bytes inside a very large descriptor range (PendingWriteOverlaps/AnyShadowedOverlapsonregion.begin..region.end)? Then the whole region is GPU-copied to avoid waiting for a small producer. A test with a small pending write inside a large region, counting copied bytes, would show whether that is bounded.
|
@CnRJay, thanks. This stays a draft until a pair decides the speed claim, and points 1 and 2 are what it needs before it's ready: On point 3, from the code: as you say, the size bound is removed for this case, not replaced. When a pending write, a pending storage result or a shadowed range overlaps any part of the region, the GPU copies the whole region behind that work. For a region over the bound, |
|
PPSA22408 (Hot Wheels Infinite Rush), garage menu: no effect from this PR, and where the GPU copy is skipped Linux, RTX 3080 Ti (NVIDIA 615.71.09), Ubuntu 26.10, Linux 7.3, Release. Same route into the garage each run, default settings, headless,
Both arms contain the same local diagnostic (a stack counter on the flush hook's GPU waits). It is not part of any PR. A and B were alternated, two runs each, 266 s per run, and the table is the garage window (about 110 s on).
The row this PR targets is unchanged. In the first pair of runs, Why the GPU copy isn't reached. I printed the region at the The region passes this PR's eligibility test ( So for this title the limit isn't the size cap or the eligibility rule. It is import coverage of this region. A question for the author: should the GPU copy be possible without a covering import, for example from a copy of the guest bytes? I can paste the four AI-assisted. |
|
@mrfelek, thanks for the pair. It answers the question for Hot Wheels Infinite Rush (PPSA22408): this PR doesn't reach that region. Your guess about the lease matches the code. In On a GPU copy from a copy of the guest bytes: making that copy is the CPU read this PR avoids. The bytes it needs are the ones the pending write produces, so taking them on the CPU means waiting for that write first, as The case that can still go on the GPU is a region that crosses the boundary between two registered allocations, each with its own import. Utku Halis's e10f59a (in #12082, which its author closed) splits such a region into the imports it covers and copies it piece by piece. We keep it, with a follow-up for the pending-work case, on The summary lines aren't needed for this one, since the pair shows no change. This stays a draft: its speed claim still needs a Resident Evil Village (PPSA01556) pair, which isn't planned yet. |
|
Hardware verification + a paired in-game measurement of this PR on UFC 6 ( Setup
Merge with current main (incl. #16648) — cleanThe PR predates #16648, so I audited the interaction after merging:
Focused tests on hardware (not SwiftShader)
Same-scene A/B, manual combat (10 s windows, per present)Both runs from the same save, driven by hand into the same practice fight; combat windows only (A: 34 windows, B: 23).
Full raw logs ( One disclosureOne of the two B runs stalled on the loading screen (renderer kept presenting at ~1.8 FPS, but game-logic events stopped entirely after the save read). A retry with the identical binary and save state loaded the fight in 305 s — faster than baseline — so I attribute that stall to a pre-existing intermittent issue on Net: this PR is a real, measurable win in this title's combat scene — the pending-write wait that used to serialize the upload path is mostly gone, and nothing in the remaining profile suggests it moved the cost somewhere worse. Nice change. |
|
@Logan1h thanks for the hardware run, the UFC 6 (PPSA23566) pair, and the audit of the merge with #16648. It's the first pair for this PR on a hardware GPU in a scene the change reaches: same machine, save and fight, GPU busy per present 305 → 196 ms, with the same workload by your The copied-bytes test from earlier in this thread (a small pending write inside a large region) is still ours to add. |
|
@EagleBearerYS Sure — here is one combat-window line per arm, pasted as text. Both are the window closest to the arm's median frame p50 across that arm's combat windows (34 for A, 23 for B; same save, same practice fight, manual drive). Aggregates and setup are in the table above.
{"commit": "3ac73c78593d", "dirty": false, "env": {"APS5_DRAW_PIPELINE": "1", "APS5_LOG_TIMESTAMPS": "1", "APS5_MIMALLOC": "1", "APS5_PIPELINE_DISPATCH": "1", "APS5_PROFILE_DRAW": "1", "APS5_SKIP_REFUSED_DRAWS": "1", "APS5_TRACE_SUMMARY_EVERY": "10"}, "gpu": "NVIDIA GeForce RTX 4070 SUPER", "driver": "NVIDIA 621.14", "os": "Windows 10.0.26300", "cpu": "AMD Ryzen 5 7500F 6-Core Processor", "cpu_threads": 12, "memory_mib": 32372, "title_id": "PPSA23566", "title": "EA SPORTS\u2122 UFC\u00ae 6", "content_version": "01.005.000", "resolution": "1920x1080", "window": {"spec": "summary_every 10", "first_present": 188038, "ms": 10300.394}, "interval_start_s": 4287.852, "interval_end_s": 4298.152, "presents": 11, "frame_ms": {"p50": 856.462, "p90": 1212.137, "p99": 1225.667, "max": 1225.667}, "gpu_busy_ms_per_present": 403.24, "worker_busy_pct": {"queue worker 0x0": 94.218, "queue worker 0x29": 11.784, "queue worker 0x2a": 12.573, "queue worker 0x2b": 13.764, "queue worker 0x2c": 6.193, "queue worker 0x2d": 5.753, "queue worker 0x2e": 6.246, "queue worker 0x2f": 5.635, "queue worker 0x28": 5.737}, "phase_totals_ms": {"Driver.Completion": 0.214, "Driver.Dispatch": 7205.413, "Driver.Dispatch.capture_resources": 88.665, "Driver.Dispatch.decode_key_device_setup": 21.525, "Driver.Dispatch.lookup_cache": 121.337, "Driver.Dispatch.materialize": 172.912, "Driver.Dispatch.prepared_invocation": 12.024, "Driver.Draw": 6819.909, "Driver.Draw.device_setup": 53.637, "Driver.Draw.draw_enqueued": 5567.354, "Driver.Draw.post_compile_prepare": 7.158, "Driver.Draw.prepare": 296.854, "Driver.Draw.shader_compile_and_link": 875.827, "Driver.EndSubmission": 69.356, "Driver.Packet": 16606.981, "Driver.Packet.device_lock": 18.976, "Driver.Packet.dispatch": 7115.354, "Driver.Packet.draw": 6839.514, "Driver.Packet.execute": 466.599, "Driver.Packet.flip_flush": 0.352, "Driver.Packet.flush_between_packets": 84.035, "Driver.Packet.memory_wait": 1695.822, "Driver.Packet.pipeline_drain": 89.688, "Driver.Packet.pipeline_prepare": 29.644, "Driver.Packet.prepare_memory": 98.816, "Driver.Packet.rendering_wait": 0.018, "Driver.Present": 72.754, "Driver.Present.acquire_image": 0.176, "Driver.Present.device_setup": 0.006, "Driver.Present.gpu_mutex_wait": 0.102, "Driver.Present.inflight_wait": 0.035, "Driver.Present.present_display_buffer": 1.562, "Driver.Present.queue_present": 4.772, "Driver.Present.release_and_callback": 0.014, "Driver.Present.render_fence_wait": 66.031, "Driver.Present.resize": 0.027, "Driver.Present.validate": 0.005, "Driver.Suspend": 0.003, "GpuMutex.wait.dispatch": 342.443, "GpuMutex.wait.draw": 4645.961, "GpuMutex.wait.end": 68.032, "GpuMutex.wait.fill": 0.026, "GpuMutex.wait.flush": 14.202, "GpuMutex.wait.hook": 90.999, "GpuMutex.wait.indirect": 0.311, "GpuMutex.wait.label": 38.068, "GpuMutex.wait.other": 0.071, "GpuMutex.wait.present": 0.062, "GpuMutex.wait.wait": 0.086, "Graphics.Draw": 2107.219, "Graphics.Draw.draw_and_resource_release": 1914.387, "Graphics.Draw.index_upload": 108.775, "Graphics.Draw.validate": 65.736, "Graphics.Draw.vertex_upload": 7.565, "Graphics.DrawWithRecipe": 2.751, "Graphics.DrawWithRecipe.draw_and_resource_release": 2.689, "Graphics.DrawWithRecipe.index_upload": 0.003, "Graphics.DrawWithRecipe.validate": 0.028, "Graphics.DrawWithRecipe.vertex_upload": 0.018, "Recorder.Reap": 79.277, "Recorder.Submit": 119.37, "Recorder.Sync": 3872.204, "Recorder.WaitSerial": 109.118, "Resources.Complete": 6153.95, "Resources.Prepare": 234.482, "Shader.DrawStage": 750.588, "Shader.DrawStage.capture_resources": 562.537, "Shader.DrawStage.materialize": 116.963, "Shader.DrawStage.prepared_invocation": 63.87, "Shader.ResolveAbi": 0.43, "Shader.ResolveGraphicsAbi": 0.523, "Shader.ResolveGraphicsStagesAbi": 1.812, "VideoOut.Flip": 73.927, "VideoOut.Flip.completion_mutex_wait": 0.011, "VideoOut.Flip.config_mutex_wait": 0.002, "VideoOut.Flip.frame_limit": 0.008, "VideoOut.Flip.notify_game": 0.084, "VideoOut.Flip.present": 73.07, "VideoOut.Flip.validate": 0.014, "VideoOut.Flip.vblank_wait": 0.009, "VideoOut.Flip.window_prepare": 0.025, "VideoOut.Flip.window_title": 0.7, "VideoOut.Readiness": 0.024, "VideoOut.Readiness.locks_validate": 0.011, "Vulkan.Acquire": 0.164, "Vulkan.Acquire.acquire_fence_wait": 0.024, "Vulkan.Acquire.acquire_image": 0.108, "Vulkan.Acquire.fence_reset": 0.021, "Vulkan.Acquire.retired_swapchains": 0.007, "Vulkan.ComputePipeline": 41.235, "Vulkan.Dispatch": 5926.275, "Vulkan.Dispatch.command_record": 68.606, "Vulkan.Dispatch.shader_resources": 5854.082, "Vulkan.DispatchRecipe": 18.939, "Vulkan.DispatchRecipe.command_record": 18.848, "Vulkan.DrawFromRecipe": 2.77, "Vulkan.Present": 1.121, "Vulkan.Present.command_record_scale": 0.466, "Vulkan.Present.pixel_upload": 0.06, "Vulkan.Present.queue_submit": 0.587, "Vulkan.QueuePresent": 4.748, "Vulkan.QueuePresent.queue_present": 4.73, "Vulkan.Retire": 66.025, "Vulkan.Retire.wait": 65.862}, "top_phases_ms_per_frame": {"Driver.Packet": 1509.726, "Driver.Dispatch": 655.038, "Driver.Packet.dispatch": 646.85, "Driver.Packet.draw": 621.774, "Driver.Draw": 619.992, "Resources.Complete": 559.45, "Vulkan.Dispatch": 538.752, "Vulkan.Dispatch.shader_resources": 532.189}, "owned_draw_counts": {}, "graphics_track": {"Graphics.Barrier.copy": 76, "Graphics.Barrier.dispatch-lead": 4126, "Graphics.Barrier.dispatch-trail": 6230, "Graphics.Barrier.draw": 14587, "Graphics.Barrier.fill": 172, "Graphics.Barrier.indirect-args": 814, "Graphics.Barrier.input-mirror": 4169, "Graphics.Barrier.label-run": 1302, "Graphics.Barrier.present-blit": 22, "Graphics.Barrier.shadow-publish": 857, "Graphics.Barrier.staging-in": 2387, "Graphics.Barrier.staging-out": 1291, "Graphics.Barrier.storage-upload": 1528, "Graphics.Barrier.storage-writeback": 3020, "Graphics.Barrier.template-refresh": 17, "Graphics.BarrierMerged.dispatch-lead": 3732, "Graphics.BarrierMerged.fill": 26, "Graphics.BarrierMerged.label-run": 12, "Graphics.BarrierMerged.shadow-publish": 827, "Graphics.BarrierMerged.staging-in": 1893, "Graphics.BarrierMerged.staging-out": 1291, "Graphics.BarrierMerged.storage-writeback": 923, "Graphics.Copy": 8503, "Graphics.Copy.bytes": 369511974, "Graphics.RenderPass": 6959, "Graphics.RenderPass.Close.command": 5954, "Graphics.RenderPass.Close.image": 47, "Graphics.RenderPass.Close.key": 159, "Graphics.RenderPass.Close.label": 12, "Graphics.RenderPass.Close.new-batch": 787, "Graphics.RenderPass.Continued": 37843}, "trace_dropped": false, "trace": ""}this PR (merge {"commit": "cbc33008466a", "dirty": false, "env": {"APS5_DRAW_PIPELINE": "1", "APS5_LOG_TIMESTAMPS": "1", "APS5_MIMALLOC": "1", "APS5_PIPELINE_DISPATCH": "1", "APS5_PROFILE_DRAW": "1", "APS5_SKIP_REFUSED_DRAWS": "1", "APS5_TRACE_SUMMARY_EVERY": "10"}, "gpu": "NVIDIA GeForce RTX 4070 SUPER", "driver": "NVIDIA 621.14", "os": "Windows 10.0.26300", "cpu": "AMD Ryzen 5 7500F 6-Core Processor", "cpu_threads": 12, "memory_mib": 32372, "title_id": "PPSA23566", "title": "EA SPORTS\u2122 UFC\u00ae 6", "content_version": "01.005.000", "resolution": "1920x1080", "window": {"spec": "summary_every 10", "first_present": 3835, "ms": 10279.705}, "interval_start_s": 839.79, "interval_end_s": 850.07, "presents": 12, "frame_ms": {"p50": 820.98, "p90": 1053.6, "p99": 1080.731, "max": 1080.731}, "gpu_busy_ms_per_present": 194.206, "worker_busy_pct": {"queue worker 0x0": 96.707, "queue worker 0x29": 6.322, "queue worker 0x2a": 5.961, "queue worker 0x2b": 6.351, "queue worker 0x2c": 12.333, "queue worker 0x2d": 13.018, "queue worker 0x2e": 14.13, "queue worker 0x2f": 14.511, "queue worker 0x28": 6.567}, "phase_totals_ms": {"Driver.Completion": 0.347, "Driver.Dispatch": 7704.94, "Driver.Dispatch.capture_resources": 127.952, "Driver.Dispatch.decode_key_device_setup": 35.12, "Driver.Dispatch.lookup_cache": 73.628, "Driver.Dispatch.materialize": 23.495, "Driver.Dispatch.prepared_invocation": 17.098, "Driver.Draw": 7365.637, "Driver.Draw.device_setup": 61.581, "Driver.Draw.draw_enqueued": 6112.491, "Driver.Draw.post_compile_prepare": 19.801, "Driver.Draw.prepare": 177.521, "Driver.Draw.shader_compile_and_link": 971.043, "Driver.EndSubmission": 140.611, "Driver.Packet": 17941.023, "Driver.Packet.device_lock": 21.89, "Driver.Packet.dispatch": 7688.551, "Driver.Packet.draw": 7389.123, "Driver.Packet.execute": 501.559, "Driver.Packet.flip_flush": 4.481, "Driver.Packet.flush_between_packets": 100.013, "Driver.Packet.memory_wait": 1646.57, "Driver.Packet.pipeline_drain": 38.013, "Driver.Packet.pipeline_prepare": 35.824, "Driver.Packet.prepare_memory": 100.501, "Driver.Packet.rendering_wait": 0.022, "Driver.Present": 12.582, "Driver.Present.acquire_image": 0.171, "Driver.Present.device_setup": 0.006, "Driver.Present.gpu_mutex_wait": 0.075, "Driver.Present.inflight_wait": 0.031, "Driver.Present.present_display_buffer": 1.819, "Driver.Present.queue_present": 5.234, "Driver.Present.release_and_callback": 0.015, "Driver.Present.render_fence_wait": 5.18, "Driver.Present.resize": 0.024, "Driver.Present.validate": 0.004, "Driver.Suspend": 0.002, "GpuMutex.wait.dispatch": 223.65, "GpuMutex.wait.draw": 6011.895, "GpuMutex.wait.end": 39.734, "GpuMutex.wait.fill": 0.024, "GpuMutex.wait.flush": 8.453, "GpuMutex.wait.hook": 0.101, "GpuMutex.wait.indirect": 0.108, "GpuMutex.wait.label": 46.798, "GpuMutex.wait.present": 0.036, "GpuMutex.wait.wait": 0.123, "Graphics.Draw": 1447.216, "Graphics.Draw.draw_and_resource_release": 1263.996, "Graphics.Draw.index_upload": 87.755, "Graphics.Draw.validate": 74.484, "Graphics.Draw.vertex_upload": 8.329, "Graphics.DrawWithRecipe": 5.481, "Graphics.DrawWithRecipe.draw_and_resource_release": 5.376, "Graphics.DrawWithRecipe.index_upload": 0.005, "Graphics.DrawWithRecipe.validate": 0.045, "Graphics.DrawWithRecipe.vertex_upload": 0.032, "Recorder.Reap": 88.973, "Recorder.Submit": 99.334, "Recorder.Sync": 3605.844, "Recorder.WaitSerial": 0.194, "Resources.Complete": 6708.887, "Resources.Prepare": 157.835, "Shader.DrawStage": 841.355, "Shader.DrawStage.capture_resources": 648.685, "Shader.DrawStage.materialize": 112.291, "Shader.DrawStage.prepared_invocation": 72.756, "Shader.ResolveAbi": 1.12, "Shader.ResolveGraphicsAbi": 0.794, "Shader.ResolveGraphicsStagesAbi": 3.894, "VideoOut.Flip": 13.62, "VideoOut.Flip.completion_mutex_wait": 0.012, "VideoOut.Flip.config_mutex_wait": 0.002, "VideoOut.Flip.frame_limit": 0.006, "VideoOut.Flip.notify_game": 0.085, "VideoOut.Flip.present": 12.895, "VideoOut.Flip.validate": 0.015, "VideoOut.Flip.vblank_wait": 0.008, "VideoOut.Flip.window_prepare": 0.017, "VideoOut.Flip.window_title": 0.577, "VideoOut.Readiness": 0.024, "VideoOut.Readiness.locks_validate": 0.011, "Vulkan.Acquire": 0.159, "Vulkan.Acquire.acquire_fence_wait": 0.025, "Vulkan.Acquire.acquire_image": 0.104, "Vulkan.Acquire.fence_reset": 0.021, "Vulkan.Acquire.retired_swapchains": 0.006, "Vulkan.Dispatch": 6678.578, "Vulkan.Dispatch.command_record": 126.724, "Vulkan.Dispatch.shader_resources": 6546.945, "Vulkan.DispatchRecipe": 9.627, "Vulkan.DispatchRecipe.command_record": 9.501, "Vulkan.DrawFromRecipe": 5.515, "Vulkan.Present": 1.437, "Vulkan.Present.command_record_scale": 0.471, "Vulkan.Present.pixel_upload": 0.079, "Vulkan.Present.queue_submit": 0.878, "Vulkan.QueuePresent": 5.214, "Vulkan.QueuePresent.queue_present": 5.196, "Vulkan.Retire": 5.182, "Vulkan.Retire.wait": 4.993}, "top_phases_ms_per_frame": {"Driver.Packet": 1495.085, "Driver.Dispatch": 642.078, "Driver.Packet.dispatch": 640.713, "Driver.Packet.draw": 615.76, "Driver.Draw": 613.803, "Resources.Complete": 559.074, "Vulkan.Dispatch": 556.548, "Vulkan.Dispatch.shader_resources": 545.579}, "owned_draw_counts": {"OwnedDraw.evicted_other": 66}, "graphics_track": {"Graphics.Barrier.dispatch-lead": 7665, "Graphics.Barrier.dispatch-trail": 10669, "Graphics.Barrier.draw": 12226, "Graphics.Barrier.fill": 262, "Graphics.Barrier.indirect-args": 1476, "Graphics.Barrier.input-mirror": 859, "Graphics.Barrier.label-run": 1698, "Graphics.Barrier.present-blit": 24, "Graphics.Barrier.shadow-publish": 455, "Graphics.Barrier.staging-in": 13353, "Graphics.Barrier.staging-out": 5858, "Graphics.Barrier.storage-upload": 1296, "Graphics.Barrier.storage-writeback": 2663, "Graphics.Barrier.template-refresh": 38, "Graphics.BarrierMerged.dispatch-lead": 5956, "Graphics.BarrierMerged.fill": 28, "Graphics.BarrierMerged.label-run": 14, "Graphics.BarrierMerged.shadow-publish": 443, "Graphics.BarrierMerged.staging-in": 6201, "Graphics.BarrierMerged.staging-out": 5858, "Graphics.BarrierMerged.storage-writeback": 1028, "Graphics.Copy": 25125, "Graphics.Copy.bytes": 3778831928, "Graphics.RenderPass": 5592, "Graphics.RenderPass.Close.command": 4037, "Graphics.RenderPass.Close.image": 26, "Graphics.RenderPass.Close.key": 252, "Graphics.RenderPass.Close.label": 14, "Graphics.RenderPass.Close.new-batch": 1263, "Graphics.RenderPass.Continued": 48591}, "trace_dropped": false, "trace": ""} |
|
@Logan1h thanks for the two lines, and for picking each arm's window nearest its median frame p50. They're in the description now, under UFC 6, with the numbers they show: GPU busy per present 403 ms on One correction to what I wrote earlier: the |
|
Same-window pair, taken with
{"commit": "3ac73c78593d", "dirty": false, "env": {"APS5_DRAW_PIPELINE": "1", "APS5_LOG_TIMESTAMPS": "1", "APS5_MIMALLOC": "1", "APS5_PIPELINE_DISPATCH": "1", "APS5_PROFILE_DRAW": "1", "APS5_SKIP_REFUSED_DRAWS": "1", "APS5_TRACE_ALL_PHASES": "1", "APS5_TRACE_SECONDS": "0:60", "APS5_TRACE_SUMMARY_EVERY": "10", "APS5_TRACE_TRIGGER_FILE": "<path>"}, "gpu": "NVIDIA GeForce RTX 4070 SUPER", "driver": "NVIDIA 621.24", "os": "Windows 10.0.26300", "cpu": "AMD Ryzen 5 7500F 6-Core Processor", "cpu_threads": 12, "memory_mib": 32372, "title_id": "PPSA23566", "title": "EA SPORTS\u2122 UFC\u00ae 6", "content_version": "01.005.000", "resolution": "1920x1080", "window": {"spec": "seconds 0:60", "first_present": 4445, "ms": 60667.543}, "presents": 62, "frame_ms": {"p50": 974.217, "p90": 1049.354, "p99": 1266.741, "max": 1266.741}, "gpu_busy_ms_per_present": 222.763, "worker_busy_pct": {"queue worker 0x0": 98.097, "queue worker 0x29": 9.814, "queue worker 0x2a": 10.251, "queue worker 0x2b": 10.332, "queue worker 0x2c": 10.578, "queue worker 0x2d": 8.861, "queue worker 0x2e": 8.58, "queue worker 0x2f": 9.797, "queue worker 0x28": 9.756}, "phase_totals_ms": {"Driver.Completion": 1.363, "Driver.Dispatch": 48857.51, "Driver.Dispatch.capture_resources": 740.673, "Driver.Dispatch.decode_key_device_setup": 192.7, "Driver.Dispatch.lookup_cache": 590.147, "Driver.Dispatch.materialize": 144.039, "Driver.Dispatch.prepared_invocation": 104.957, "Driver.Draw": 43847.68, "Driver.Draw.device_setup": 321.63, "Driver.Draw.draw_enqueued": 37429.006, "Driver.Draw.post_compile_prepare": 46.456, "Driver.Draw.prepare": 986.143, "Driver.Draw.shader_compile_and_link": 4943.771, "Driver.EndSubmission": 502.527, "Driver.Packet": 106311.381, "Driver.Packet.device_lock": 113.82, "Driver.Packet.dispatch": 48832.991, "Driver.Packet.draw": 43980.431, "Driver.Packet.execute": 1701.35, "Driver.Packet.flip_flush": 2.227, "Driver.Packet.flush_between_packets": 487.441, "Driver.Packet.memory_wait": 8587.898, "Driver.Packet.pipeline_drain": 259.087, "Driver.Packet.pipeline_prepare": 185.613, "Driver.Packet.prepare_memory": 481.297, "Driver.Packet.rendering_wait": 0.098, "Driver.Present": 69.318, "Driver.Present.acquire_image": 0.93, "Driver.Present.device_setup": 0.03, "Driver.Present.gpu_mutex_wait": 0.594, "Driver.Present.inflight_wait": 0.178, "Driver.Present.present_display_buffer": 8.261, "Driver.Present.queue_present": 26.237, "Driver.Present.release_and_callback": 0.087, "Driver.Present.render_fence_wait": 32.712, "Driver.Present.resize": 0.132, "Driver.Present.validate": 0.023, "Driver.Suspend": 0.011, "GpuMutex.wait.dispatch": 1413.598, "GpuMutex.wait.draw": 36059.61, "GpuMutex.wait.end": 142.186, "GpuMutex.wait.fill": 0.299, "GpuMutex.wait.flush": 103.357, "GpuMutex.wait.hook": 33.336, "GpuMutex.wait.indirect": 0.964, "GpuMutex.wait.label": 518.561, "GpuMutex.wait.other": 0.672, "GpuMutex.wait.present": 0.343, "GpuMutex.wait.wait": 1.23, "Graphics.Draw": 7626.864, "Graphics.Draw.draw_and_resource_release": 6540.725, "Graphics.Draw.index_upload": 569.344, "Graphics.Draw.validate": 392.465, "Graphics.Draw.vertex_upload": 47.69, "Graphics.DrawWithRecipe": 29.235, "Graphics.DrawWithRecipe.draw_and_resource_release": 28.749, "Graphics.DrawWithRecipe.index_upload": 0.023, "Graphics.DrawWithRecipe.validate": 0.207, "Graphics.DrawWithRecipe.vertex_upload": 0.144, "Recorder.Reap": 626.493, "Recorder.Submit": 597.614, "Recorder.Sync": 25584.288, "Recorder.WaitSerial": 4.952, "Resources.Complete": 43545.917, "Resources.Prepare": 1086.663, "Shader.DrawStage": 4340.06, "Shader.DrawStage.capture_resources": 3329.717, "Shader.DrawStage.materialize": 594.025, "Shader.DrawStage.prepared_invocation": 375.737, "Shader.ResolveAbi": 9.236, "Shader.ResolveGraphicsAbi": 4.105, "Shader.ResolveGraphicsStagesAbi": 20.026, "VideoOut.Flip": 75.738, "VideoOut.Flip.completion_mutex_wait": 0.063, "VideoOut.Flip.config_mutex_wait": 0.009, "VideoOut.Flip.frame_limit": 0.03, "VideoOut.Flip.notify_game": 0.45, "VideoOut.Flip.present": 71.766, "VideoOut.Flip.validate": 0.103, "VideoOut.Flip.vblank_wait": 0.044, "VideoOut.Flip.window_prepare": 0.092, "VideoOut.Flip.window_title": 3.153, "VideoOut.Readiness": 0.131, "VideoOut.Readiness.locks_validate": 0.06, "Vulkan.Acquire": 0.864, "Vulkan.Acquire.acquire_fence_wait": 0.13, "Vulkan.Acquire.acquire_image": 0.561, "Vulkan.Acquire.fence_reset": 0.118, "Vulkan.Acquire.retired_swapchains": 0.032, "Vulkan.Dispatch": 43476.893, "Vulkan.Dispatch.command_record": 739.761, "Vulkan.Dispatch.shader_resources": 42711.666, "Vulkan.DispatchRecipe": 62.644, "Vulkan.DispatchRecipe.command_record": 61.951, "Vulkan.DrawFromRecipe": 29.443, "Vulkan.Present": 6.069, "Vulkan.Present.command_record_scale": 2.381, "Vulkan.Present.pixel_upload": 0.459, "Vulkan.Present.queue_submit": 3.173, "Vulkan.QueuePresent": 26.058, "Vulkan.QueuePresent.queue_present": 25.945, "Vulkan.Retire": 32.698, "Vulkan.Retire.wait": 31.637}, "top_phases_ms_per_frame": {"Driver.Packet": 1714.7, "Driver.Dispatch": 788.024, "Driver.Packet.dispatch": 787.629, "Driver.Packet.draw": 709.362, "Driver.Draw": 707.221, "Resources.Complete": 702.353, "Vulkan.Dispatch": 701.24, "Vulkan.Dispatch.shader_resources": 688.898}, "owned_draw_counts": {}, "graphics_track": {"Graphics.Barrier.copy": 240, "Graphics.Barrier.dispatch-lead": 42466, "Graphics.Barrier.dispatch-trail": 56057, "Graphics.Barrier.draw": 82652, "Graphics.Barrier.fill": 1572, "Graphics.Barrier.indirect-args": 7587, "Graphics.Barrier.input-mirror": 14254, "Graphics.Barrier.label-run": 8482, "Graphics.Barrier.present-blit": 124, "Graphics.Barrier.shadow-publish": 2585, "Graphics.Barrier.staging-in": 69860, "Graphics.Barrier.staging-out": 30156, "Graphics.Barrier.storage-upload": 6724, "Graphics.Barrier.storage-writeback": 14791, "Graphics.Barrier.template-refresh": 335, "Graphics.BarrierMerged.dispatch-lead": 28765, "Graphics.BarrierMerged.fill": 184, "Graphics.BarrierMerged.label-run": 86, "Graphics.BarrierMerged.shadow-publish": 2479, "Graphics.BarrierMerged.staging-in": 29553, "Graphics.BarrierMerged.staging-out": 30156, "Graphics.BarrierMerged.storage-writeback": 5049, "Graphics.Copy": 139250, "Graphics.Copy.bytes": 16875346660, "Graphics.RenderPass": 38549, "Graphics.RenderPass.Close.command": 30286, "Graphics.RenderPass.Close.image": 181, "Graphics.RenderPass.Close.key": 1246, "Graphics.RenderPass.Close.label": 86, "Graphics.RenderPass.Close.new-batch": 6750, "Graphics.RenderPass.Continued": 242028}, "trace_dropped": true, "trace_dropped_threads": {"queue worker 0x0": {"events_full_after_s": 21.88, "events_lost": 481507, "totals_full": false}}, "trace": "aps5-trace-3ac73c78593d-11720.json.gz"}this PR (merge {"commit": "cbc33008466a", "dirty": false, "env": {"APS5_DRAW_PIPELINE": "1", "APS5_LOG_TIMESTAMPS": "1", "APS5_MIMALLOC": "1", "APS5_PIPELINE_DISPATCH": "1", "APS5_PROFILE_DRAW": "1", "APS5_SKIP_REFUSED_DRAWS": "1", "APS5_TRACE_ALL_PHASES": "1", "APS5_TRACE_SECONDS": "0:60", "APS5_TRACE_SUMMARY_EVERY": "10", "APS5_TRACE_TRIGGER_FILE": "<path>"}, "gpu": "NVIDIA GeForce RTX 4070 SUPER", "driver": "NVIDIA 621.24", "os": "Windows 10.0.26300", "cpu": "AMD Ryzen 5 7500F 6-Core Processor", "cpu_threads": 12, "memory_mib": 32372, "title_id": "PPSA23566", "title": "EA SPORTS\u2122 UFC\u00ae 6", "content_version": "01.005.000", "resolution": "1920x1080", "window": {"spec": "seconds 0:60", "first_present": 3584, "ms": 60881.035}, "presents": 63, "frame_ms": {"p50": 945.706, "p90": 1107.58, "p99": 1467.772, "max": 1467.772}, "gpu_busy_ms_per_present": 187.248, "worker_busy_pct": {"queue worker 0x0": 97.616, "queue worker 0x29": 10.314, "queue worker 0x2a": 11.016, "queue worker 0x2b": 10.778, "queue worker 0x2c": 8.872, "queue worker 0x2d": 10.64, "queue worker 0x2e": 10.917, "queue worker 0x2f": 10.046, "queue worker 0x28": 10.118}, "phase_totals_ms": {"Driver.Completion": 1.683, "Driver.Dispatch": 47883.6, "Driver.Dispatch.capture_resources": 746.527, "Driver.Dispatch.decode_key_device_setup": 196.995, "Driver.Dispatch.lookup_cache": 583.098, "Driver.Dispatch.materialize": 166.953, "Driver.Dispatch.prepared_invocation": 99.513, "Driver.Draw": 47402.291, "Driver.Draw.device_setup": 367.482, "Driver.Draw.draw_enqueued": 40494.185, "Driver.Draw.post_compile_prepare": 50.037, "Driver.Draw.prepare": 1066.909, "Driver.Draw.shader_compile_and_link": 5290.617, "Driver.EndSubmission": 420.931, "Driver.Packet": 109356.533, "Driver.Packet.device_lock": 117.496, "Driver.Packet.dispatch": 47861.928, "Driver.Packet.draw": 47534.663, "Driver.Packet.execute": 1517.833, "Driver.Packet.flip_flush": 2.125, "Driver.Packet.flush_between_packets": 534.211, "Driver.Packet.memory_wait": 9644.9, "Driver.Packet.pipeline_drain": 267.762, "Driver.Packet.pipeline_prepare": 193.815, "Driver.Packet.prepare_memory": 511.476, "Driver.Packet.rendering_wait": 0.132, "Driver.Present": 88.626, "Driver.Present.acquire_image": 0.958, "Driver.Present.device_setup": 0.032, "Driver.Present.gpu_mutex_wait": 0.697, "Driver.Present.inflight_wait": 0.179, "Driver.Present.present_display_buffer": 8.64, "Driver.Present.queue_present": 27.49, "Driver.Present.release_and_callback": 0.098, "Driver.Present.render_fence_wait": 50.224, "Driver.Present.resize": 0.133, "Driver.Present.validate": 0.026, "Driver.Suspend": 0.015, "GpuMutex.wait.dispatch": 2238.763, "GpuMutex.wait.draw": 37692.046, "GpuMutex.wait.end": 179.837, "GpuMutex.wait.fill": 0.256, "GpuMutex.wait.flush": 45.701, "GpuMutex.wait.hook": 23.598, "GpuMutex.wait.indirect": 0.734, "GpuMutex.wait.label": 569.519, "GpuMutex.wait.other": 6.159, "GpuMutex.wait.present": 0.457, "GpuMutex.wait.wait": 0.725, "Graphics.Draw": 8827.595, "Graphics.Draw.draw_and_resource_release": 7604.427, "Graphics.Draw.index_upload": 653.428, "Graphics.Draw.validate": 444.998, "Graphics.Draw.vertex_upload": 47.77, "Graphics.DrawWithRecipe": 37.483, "Graphics.DrawWithRecipe.draw_and_resource_release": 37.028, "Graphics.DrawWithRecipe.index_upload": 0.023, "Graphics.DrawWithRecipe.validate": 0.192, "Graphics.DrawWithRecipe.vertex_upload": 0.13, "Recorder.Reap": 613.163, "Recorder.Submit": 570.947, "Recorder.Sync": 23291.265, "Recorder.WaitSerial": 1.753, "Resources.Complete": 41549.272, "Resources.Prepare": 1070.003, "Shader.DrawStage": 4635.947, "Shader.DrawStage.capture_resources": 3556.026, "Shader.DrawStage.materialize": 638.359, "Shader.DrawStage.prepared_invocation": 397.98, "Shader.ResolveAbi": 5.276, "Shader.ResolveGraphicsAbi": 4.879, "Shader.ResolveGraphicsStagesAbi": 17.689, "VideoOut.Flip": 99.788, "VideoOut.Flip.completion_mutex_wait": 0.117, "VideoOut.Flip.config_mutex_wait": 0.01, "VideoOut.Flip.frame_limit": 0.057, "VideoOut.Flip.notify_game": 0.582, "VideoOut.Flip.present": 90.862, "VideoOut.Flip.validate": 0.075, "VideoOut.Flip.vblank_wait": 0.041, "VideoOut.Flip.window_prepare": 0.094, "VideoOut.Flip.window_title": 7.913, "VideoOut.Readiness": 0.13, "VideoOut.Readiness.locks_validate": 0.06, "Vulkan.Acquire": 0.887, "Vulkan.Acquire.acquire_fence_wait": 0.145, "Vulkan.Acquire.acquire_image": 0.578, "Vulkan.Acquire.fence_reset": 0.109, "Vulkan.Acquire.retired_swapchains": 0.032, "Vulkan.Dispatch": 41542.601, "Vulkan.Dispatch.command_record": 765.417, "Vulkan.Dispatch.shader_resources": 40750.716, "Vulkan.DispatchRecipe": 64.13, "Vulkan.DispatchRecipe.command_record": 63.37, "Vulkan.DrawFromRecipe": 37.656, "Vulkan.Present": 6.529, "Vulkan.Present.command_record_scale": 2.446, "Vulkan.Present.pixel_upload": 0.453, "Vulkan.Present.queue_submit": 3.576, "Vulkan.QueuePresent": 27.362, "Vulkan.QueuePresent.queue_present": 27.256, "Vulkan.Retire": 50.23, "Vulkan.Retire.wait": 49.07}, "top_phases_ms_per_frame": {"Driver.Packet": 1735.818, "Driver.Dispatch": 760.057, "Driver.Packet.dispatch": 759.713, "Driver.Packet.draw": 754.518, "Driver.Draw": 752.417, "Resources.Complete": 659.512, "Vulkan.Dispatch": 659.406, "Vulkan.Dispatch.shader_resources": 646.837}, "owned_draw_counts": {}, "graphics_track": {"Graphics.Barrier.dispatch-lead": 45703, "Graphics.Barrier.dispatch-trail": 57634, "Graphics.Barrier.draw": 103043, "Graphics.Barrier.fill": 1365, "Graphics.Barrier.indirect-args": 8157, "Graphics.Barrier.input-mirror": 24229, "Graphics.Barrier.label-run": 9020, "Graphics.Barrier.present-blit": 126, "Graphics.Barrier.shadow-publish": 2592, "Graphics.Barrier.staging-in": 77731, "Graphics.Barrier.staging-out": 34818, "Graphics.Barrier.storage-upload": 6692, "Graphics.Barrier.storage-writeback": 13464, "Graphics.Barrier.template-refresh": 490, "Graphics.BarrierMerged.dispatch-lead": 28245, "Graphics.BarrierMerged.fill": 171, "Graphics.BarrierMerged.label-run": 73, "Graphics.BarrierMerged.shadow-publish": 2432, "Graphics.BarrierMerged.staging-in": 34111, "Graphics.BarrierMerged.staging-out": 34818, "Graphics.BarrierMerged.storage-writeback": 5274, "Graphics.Copy": 152518, "Graphics.Copy.bytes": 25217545222, "Graphics.RenderPass": 48747, "Graphics.RenderPass.Close.command": 40582, "Graphics.RenderPass.Close.image": 188, "Graphics.RenderPass.Close.key": 1208, "Graphics.RenderPass.Close.label": 73, "Graphics.RenderPass.Close.new-batch": 6696, "Graphics.RenderPass.Continued": 238362}, "trace_dropped": true, "trace_dropped_threads": {"queue worker 0x0": {"events_full_after_s": 20.777, "events_lost": 523008, "totals_full": false}}, "trace": "aps5-trace-cbc33008466a-2952.json.gz"}What the pair shows here: frame p50 974.2 -> 945.7 ms (-2.9%), mean frame 978.5 -> 966.4 ms (-1.2%), GPU busy per present 222.8 -> 187.2 ms (-15.9%). The p99 of this particular minute regressed (1266.7 -> 1467.8 ms, +15.9%) — at ~1 fps each window holds ~62 presents, so per-window variance is large; the multi-window aggregates from the table above (23-34 windows per arm) are the more stable read. If the label flow also wants the window traces attached with |
|
@Logan1h thanks, that's the pair the check takes: the same On the traces: yes, please. For a perf PR, CONTRIBUTING asks for the two traces with |
|
Traces attached as release assets (GitHub comments can't carry files): https://github.com/Logan1h/AnyPS5/releases/tag/evidence-13263-ufc6-2026-11-16 — the two Heads of the digest output:
seconds 0:60 from present 4445: 62 presents, frame p50 974.2 / p90 1049.4 / p99 1266.7 / max 1266.7 ms, GPU busy 222.8 ms per present {"commit":"3ac73c78593d","dirty":false,"env":{"APS5_DRAW_PIPELINE":"1","APS5_LOG_TIMESTAMPS":"1","APS5_MIMALLOC":"1","APS5_PIPELINE_DISPATCH":"1","APS5_PROFILE_DRAW":"1","APS5_SKIP_REFUSED_DRAWS":"1","APS5_TRACE_ALL_PHASES":"1","APS5_TRACE_SECONDS":"0:60","APS5_TRACE_SUMMARY_EVERY":"10","APS5_TRACE_TRIGGER_FILE":"<path>"},"gpu":"NVIDIA GeForce RTX 4070 SUPER","driver":"NVIDIA 621.24","os":"Windows 10.0.26300","cpu":"AMD Ryzen 5 7500F 6-Core Processor","cpu_threads":12,"memory_mib":32372,"title_id":"PPSA23566","title":"EA SPORTS\u2122 UFC\u00ae 6","content_version":"01.005.000","resolution":"1920x1080","window":{"spec":"seconds 0:60","first_present":4445,"ms":60667.543},"presents":62,"frame_ms":{"p50":974.217,"p90":1049.354,"p99":1266.741,"max":1266.741},"gpu_busy_ms_per_present":222.763,"worker_busy_pct":{"queue worker 0x0":98.097,"queue worker 0x29":9.814,"queue worker 0x2a":10.251,"queue worker 0x2b":10.332,"queue worker 0x2c":10.578,"queue worker 0x2d":8.861,"queue worker 0x2e":8.58,"queue worker 0x2f":9.797,"queue worker 0x28":9.756},"phase_totals_ms":{"Driver.Completion":1.363,"Driver.Dispatch":48857.51,"Driver.Dispatch.capture_resources":740.673,"Driver.Dispatch.decode_key_device_setup":192.7,"Driver.Dispatch.lookup_cache":590.147,"Driver.Dispatch.materialize":144.039,"Driver.Dispatch.prepared_invocation":104.957,"Driver.Draw":43847.68,"Driver.Draw.device_setup":321.63,"Driver.Draw.draw_enqueued":37429.006,"Driver.Draw.post_compile_prepare":46.456,"Driver.Draw.prepare":986.143,"Driver.Draw.shader_compile_and_link":4943.771,"Driver.EndSubmission":502.527,"Driver.Packet":106311.381,"Driver.Packet.device_lock":113.82,"Driver.Packet.dispatch":48832.991,"Driver.Packet.draw":43980.431,"Driver.Packet.execute":1701.35,"Driver.Packet.flip_flush":2.227,"Driver.Packet.flush_between_packets":487.441,"Driver.Packet.memory_wait":8587.898,"Driver.Packet.pipeline_drain":259.087,"Driver.Packet.pipeline_prepare":185.613,"Driver.Packet.prepare_memory":481.297,"Driver.Packet.rendering_wait":0.098,"Driver.Present":69.318,"Driver.Present.acquire_image":0.93,"Driver.Present.device_setup":0.03,"Driver.Present.gpu_mutex_wait":0.594,"Driver.Present.inflight_wait":0.178,"Driver.Present.present_display_buffer":8.261,"Driver.Present.queue_present":26.237,"Driver.Present.release_and_callback":0.087,"Driver.Present.render_fence_wait":32.712,"Driver.Present.resize":0.132,"Driver.Present.validate":0.023,"Driver.Suspend":0.011,"GpuMutex.wait.dispatch":1413.598,"GpuMutex.wait.draw":36059.61,"GpuMutex.wait.end":142.186,"GpuMutex.wait.fill":0.299,"GpuMutex.wait.flush":103.357,"GpuMutex.wait.hook":33.336,"GpuMutex.wait.indirect":0.964,"GpuMutex.wait.label":518.561,"GpuMutex.wait.other":0.672,"GpuMutex.wait.present":0.343,"GpuMutex.wait.wait":1.23,"Graphics.Draw":7626.864,"Graphics.Draw.draw_and_resource_release":6540.725,"Graphics.Draw.index_upload":569.344,"Graphics.Draw.validate":392.465,"Graphics.Draw.vertex_upload":47.69,"Graphics.DrawWithRecipe":29.235,"Graphics.DrawWithRecipe.draw_and_resource_release":28.749,"Graphics.DrawWithRecipe.index_upload":0.023,"Graphics.DrawWithRecipe.validate":0.207,"Graphics.DrawWithRecipe.vertex_upload":0.144,"Recorder.Reap":626.493,"Recorder.Submit":597.614,"Recorder.Sync":25584.288,"Recorder.WaitSerial":4.952,"Resources.Complete":43545.917,"Resources.Prepare":1086.663,"Shader.DrawStage":4340.06,"Shader.DrawStage.capture_resources":3329.717,"Shader.DrawStage.materialize":594.025,"Shader.DrawStage.prepared_invocation":375.737,"Shader.ResolveAbi":9.236,"Shader.ResolveGraphicsAbi":4.105,"Shader.ResolveGraphicsStagesAbi":20.026,"VideoOut.Flip":75.738,"VideoOut.Flip.completion_mutex_wait":0.063,"VideoOut.Flip.config_mutex_wait":0.009,"VideoOut.Flip.frame_limit":0.03,"VideoOut.Flip.notify_game":0.45,"VideoOut.Flip.present":71.766,"VideoOut.Flip.validate":0.103,"VideoOut.Flip.vblank_wait":0.044,"VideoOut.Flip.window_prepare":0.092,"VideoOut.Flip.window_title":3.153,"VideoOut.Readiness":0.131,"VideoOut.Readiness.locks_validate":0.06,"Vulkan.Acquire":0.864,"Vulkan.Acquire.acquire_fence_wait":0.13,"Vulkan.Acquire.acquire_image":0.561,"Vulkan.Acquire.fence_reset":0.118,"Vulkan.Acquire.retired_swapchains":0.032,"Vulkan.Dispatch":43476.893,"Vulkan.Dispatch.command_record":739.761,"Vulkan.Dispatch.shader_resources":42711.666,"Vulkan.DispatchRecipe":62.644,"Vulkan.DispatchRecipe.command_record":61.951,"Vulkan.DrawFromRecipe":29.443,"Vulkan.Present":6.069,"Vulkan.Present.command_record_scale":2.381,"Vulkan.Present.pixel_upload":0.459,"Vulkan.Present.queue_submit":3.173,"Vulkan.QueuePresent":26.058,"Vulkan.QueuePresent.queue_present":25.945,"Vulkan.Retire":32.698,"Vulkan.Retire.wait":31.637},"top_phases_ms_per_frame":{"Driver.Packet":1714.7,"Driver.Dispatch":788.024,"Driver.Packet.dispatch":787.629,"Driver.Packet.draw":709.362,"Driver.Draw":707.221,"Resources.Complete":702.353,"Vulkan.Dispatch":701.24,"Vulkan.Dispatch.shader_resources":688.898},"owned_draw_counts":{},"graphics_track":{"Graphics.Barrier.copy":240,"Graphics.Barrier.dispatch-lead":42466,"Graphics.Barrier.dispatch-trail":56057,"Graphics.Barrier.draw":82652,"Graphics.Barrier.fill":1572,"Graphics.Barrier.indirect-args":7587,"Graphics.Barrier.input-mirror":14254,"Graphics.Barrier.label-run":8482,"Graphics.Barrier.present-blit":124,"Graphics.Barrier.shadow-publish":2585,"Graphics.Barrier.staging-in":69860,"Graphics.Barrier.staging-out":30156,"Graphics.Barrier.storage-upload":6724,"Graphics.Barrier.storage-writeback":14791,"Graphics.Barrier.template-refresh":335,"Graphics.BarrierMerged.dispatch-lead":28765,"Graphics.BarrierMerged.fill":184,"Graphics.BarrierMerged.label-run":86,"Graphics.BarrierMerged.shadow-publish":2479,"Graphics.BarrierMerged.staging-in":29553,"Graphics.BarrierMerged.staging-out":30156,"Graphics.BarrierMerged.storage-writeback":5049,"Graphics.Copy":139250,"Graphics.Copy.bytes":16875346660,"Graphics.RenderPass":38549,"Graphics.RenderPass.Close.command":30286,"Graphics.RenderPass.Close.image":181,"Graphics.RenderPass.Close.key":1246,"Graphics.RenderPass.Close.label":86,"Graphics.RenderPass.Close.new-batch":6750,"Graphics.RenderPass.Continued":242028},"trace_dropped":true,"trace_dropped_threads":{"queue worker 0x0":{"events_full_after_s":21.88,"events_lost":481507,"totals_full":false}},"trace":"aps5-trace-3ac73c78593d-11720.json.gz"}Incomplete trace: recorded data was lost. Slice-based timings, waits and batch inventories cover retained events only; missing slices are not idle time. Summary statistics are reported separately.
Slowest frames (largest slices inside each, inclusive)
this PR (arm B): seconds 0:60 from present 3584: 63 presents, frame p50 945.7 / p90 1107.6 / p99 1467.8 / max 1467.8 ms, GPU busy 187.2 ms per present {"commit":"cbc33008466a","dirty":false,"env":{"APS5_DRAW_PIPELINE":"1","APS5_LOG_TIMESTAMPS":"1","APS5_MIMALLOC":"1","APS5_PIPELINE_DISPATCH":"1","APS5_PROFILE_DRAW":"1","APS5_SKIP_REFUSED_DRAWS":"1","APS5_TRACE_ALL_PHASES":"1","APS5_TRACE_SECONDS":"0:60","APS5_TRACE_SUMMARY_EVERY":"10","APS5_TRACE_TRIGGER_FILE":"<path>"},"gpu":"NVIDIA GeForce RTX 4070 SUPER","driver":"NVIDIA 621.24","os":"Windows 10.0.26300","cpu":"AMD Ryzen 5 7500F 6-Core Processor","cpu_threads":12,"memory_mib":32372,"title_id":"PPSA23566","title":"EA SPORTS\u2122 UFC\u00ae 6","content_version":"01.005.000","resolution":"1920x1080","window":{"spec":"seconds 0:60","first_present":3584,"ms":60881.035},"presents":63,"frame_ms":{"p50":945.706,"p90":1107.58,"p99":1467.772,"max":1467.772},"gpu_busy_ms_per_present":187.248,"worker_busy_pct":{"queue worker 0x0":97.616,"queue worker 0x29":10.314,"queue worker 0x2a":11.016,"queue worker 0x2b":10.778,"queue worker 0x2c":8.872,"queue worker 0x2d":10.64,"queue worker 0x2e":10.917,"queue worker 0x2f":10.046,"queue worker 0x28":10.118},"phase_totals_ms":{"Driver.Completion":1.683,"Driver.Dispatch":47883.6,"Driver.Dispatch.capture_resources":746.527,"Driver.Dispatch.decode_key_device_setup":196.995,"Driver.Dispatch.lookup_cache":583.098,"Driver.Dispatch.materialize":166.953,"Driver.Dispatch.prepared_invocation":99.513,"Driver.Draw":47402.291,"Driver.Draw.device_setup":367.482,"Driver.Draw.draw_enqueued":40494.185,"Driver.Draw.post_compile_prepare":50.037,"Driver.Draw.prepare":1066.909,"Driver.Draw.shader_compile_and_link":5290.617,"Driver.EndSubmission":420.931,"Driver.Packet":109356.533,"Driver.Packet.device_lock":117.496,"Driver.Packet.dispatch":47861.928,"Driver.Packet.draw":47534.663,"Driver.Packet.execute":1517.833,"Driver.Packet.flip_flush":2.125,"Driver.Packet.flush_between_packets":534.211,"Driver.Packet.memory_wait":9644.9,"Driver.Packet.pipeline_drain":267.762,"Driver.Packet.pipeline_prepare":193.815,"Driver.Packet.prepare_memory":511.476,"Driver.Packet.rendering_wait":0.132,"Driver.Present":88.626,"Driver.Present.acquire_image":0.958,"Driver.Present.device_setup":0.032,"Driver.Present.gpu_mutex_wait":0.697,"Driver.Present.inflight_wait":0.179,"Driver.Present.present_display_buffer":8.64,"Driver.Present.queue_present":27.49,"Driver.Present.release_and_callback":0.098,"Driver.Present.render_fence_wait":50.224,"Driver.Present.resize":0.133,"Driver.Present.validate":0.026,"Driver.Suspend":0.015,"GpuMutex.wait.dispatch":2238.763,"GpuMutex.wait.draw":37692.046,"GpuMutex.wait.end":179.837,"GpuMutex.wait.fill":0.256,"GpuMutex.wait.flush":45.701,"GpuMutex.wait.hook":23.598,"GpuMutex.wait.indirect":0.734,"GpuMutex.wait.label":569.519,"GpuMutex.wait.other":6.159,"GpuMutex.wait.present":0.457,"GpuMutex.wait.wait":0.725,"Graphics.Draw":8827.595,"Graphics.Draw.draw_and_resource_release":7604.427,"Graphics.Draw.index_upload":653.428,"Graphics.Draw.validate":444.998,"Graphics.Draw.vertex_upload":47.77,"Graphics.DrawWithRecipe":37.483,"Graphics.DrawWithRecipe.draw_and_resource_release":37.028,"Graphics.DrawWithRecipe.index_upload":0.023,"Graphics.DrawWithRecipe.validate":0.192,"Graphics.DrawWithRecipe.vertex_upload":0.13,"Recorder.Reap":613.163,"Recorder.Submit":570.947,"Recorder.Sync":23291.265,"Recorder.WaitSerial":1.753,"Resources.Complete":41549.272,"Resources.Prepare":1070.003,"Shader.DrawStage":4635.947,"Shader.DrawStage.capture_resources":3556.026,"Shader.DrawStage.materialize":638.359,"Shader.DrawStage.prepared_invocation":397.98,"Shader.ResolveAbi":5.276,"Shader.ResolveGraphicsAbi":4.879,"Shader.ResolveGraphicsStagesAbi":17.689,"VideoOut.Flip":99.788,"VideoOut.Flip.completion_mutex_wait":0.117,"VideoOut.Flip.config_mutex_wait":0.01,"VideoOut.Flip.frame_limit":0.057,"VideoOut.Flip.notify_game":0.582,"VideoOut.Flip.present":90.862,"VideoOut.Flip.validate":0.075,"VideoOut.Flip.vblank_wait":0.041,"VideoOut.Flip.window_prepare":0.094,"VideoOut.Flip.window_title":7.913,"VideoOut.Readiness":0.13,"VideoOut.Readiness.locks_validate":0.06,"Vulkan.Acquire":0.887,"Vulkan.Acquire.acquire_fence_wait":0.145,"Vulkan.Acquire.acquire_image":0.578,"Vulkan.Acquire.fence_reset":0.109,"Vulkan.Acquire.retired_swapchains":0.032,"Vulkan.Dispatch":41542.601,"Vulkan.Dispatch.command_record":765.417,"Vulkan.Dispatch.shader_resources":40750.716,"Vulkan.DispatchRecipe":64.13,"Vulkan.DispatchRecipe.command_record":63.37,"Vulkan.DrawFromRecipe":37.656,"Vulkan.Present":6.529,"Vulkan.Present.command_record_scale":2.446,"Vulkan.Present.pixel_upload":0.453,"Vulkan.Present.queue_submit":3.576,"Vulkan.QueuePresent":27.362,"Vulkan.QueuePresent.queue_present":27.256,"Vulkan.Retire":50.23,"Vulkan.Retire.wait":49.07},"top_phases_ms_per_frame":{"Driver.Packet":1735.818,"Driver.Dispatch":760.057,"Driver.Packet.dispatch":759.713,"Driver.Packet.draw":754.518,"Driver.Draw":752.417,"Resources.Complete":659.512,"Vulkan.Dispatch":659.406,"Vulkan.Dispatch.shader_resources":646.837},"owned_draw_counts":{},"graphics_track":{"Graphics.Barrier.dispatch-lead":45703,"Graphics.Barrier.dispatch-trail":57634,"Graphics.Barrier.draw":103043,"Graphics.Barrier.fill":1365,"Graphics.Barrier.indirect-args":8157,"Graphics.Barrier.input-mirror":24229,"Graphics.Barrier.label-run":9020,"Graphics.Barrier.present-blit":126,"Graphics.Barrier.shadow-publish":2592,"Graphics.Barrier.staging-in":77731,"Graphics.Barrier.staging-out":34818,"Graphics.Barrier.storage-upload":6692,"Graphics.Barrier.storage-writeback":13464,"Graphics.Barrier.template-refresh":490,"Graphics.BarrierMerged.dispatch-lead":28245,"Graphics.BarrierMerged.fill":171,"Graphics.BarrierMerged.label-run":73,"Graphics.BarrierMerged.shadow-publish":2432,"Graphics.BarrierMerged.staging-in":34111,"Graphics.BarrierMerged.staging-out":34818,"Graphics.BarrierMerged.storage-writeback":5274,"Graphics.Copy":152518,"Graphics.Copy.bytes":25217545222,"Graphics.RenderPass":48747,"Graphics.RenderPass.Close.command":40582,"Graphics.RenderPass.Close.image":188,"Graphics.RenderPass.Close.key":1208,"Graphics.RenderPass.Close.label":73,"Graphics.RenderPass.Close.new-batch":6696,"Graphics.RenderPass.Continued":238362},"trace_dropped":true,"trace_dropped_threads":{"queue worker 0x0":{"events_full_after_s":20.777,"events_lost":523008,"totals_full":false}},"trace":"aps5-trace-cbc33008466a-2952.json.gz"}Incomplete trace: recorded data was lost. Slice-based timings, waits and batch inventories cover retained events only; missing slices are not idle time. Summary statistics are reported separately.
Slowest frames (largest slices inside each, inclusive)
Both traces are lossy at this event rate — the queue worker's event buffer fills ~22 s into each 60 s window ( |
|
@Logan1h thanks for the traces and both digests. They're linked in the description under UFC 6, with the digests' note that queue worker 0x0's buffer filled about 21 s into each window. |
|
NVIDIA Linux run of the focused tests with the Khronos validation layer, main against this PR. Setup: Arch Linux, kernel 7.3.4, GCC 16.2.1 Release, NVIDIA GeForce RTX 4090 (vendor 0x10de, device 0x2684), proprietary driver 620.70.06, Vulkan 1.4.357, Khronos validation layer 1.4.363.1. Head
The layer counts are log lines: 19 of the tests ( No new AI-assisted: yes (Claude Code) |
|
@domx4q thanks for the RTX 4090 pair with the validation layer, and for checking that both new upload tests ran with the layer loaded. It's in the description under Tested, and in the GPUs tested line. |
MarcZX10
left a comment
There was a problem hiding this comment.
Reviewed — looks good
Nothing blocks this change; the reviewed code and reported checks support merging, and the optional points below are informational.
What I ran
Reviewed head d75ba83d7aa6a38019edbc1459de3c574abe5f64 using repo_read.py. No commands or tests were run in this review. The author reports targeted tests and CI results in the PR description; those were not run by me.
Results
| Check | Result | Note |
|---|---|---|
| Changed source and tests | passed | New decision path and regression test inspected |
| Runtime checks | not run | Author-reported results only |
| Other repository checks | not run | No local toolchain run |
Findings
Blocking
None.
Non-blocking
- The diff’s comment at
core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp:5137still describes oversized regions as staying on the CPU path. It could mention the new exception when pending GPU work overlaps.
Not verified
core/libs/prx/libSceAgcDriver/tests/Recorder.cppwas not read in full; its added test bodies and changed dispatch lines were read. The full texts of the other four changed files were not read, but all added lines in them were inspected.- Tests, builds, console behavior, and the performance measurements in the description were not independently verified. The description’s reported test and CI outcomes are author-supplied.
- Files reviewed:
core/libs/prx/libSceAgcDriver/Graphics/include/GuestBufferMemory.hpp,core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp, added test sections and dispatch lines incore/libs/prx/libSceAgcDriver/tests/Recorder.cpp,core/libs/prx/libSceAgcDriver/tests/cmake/agc_driver_recorder_tests.cmake, anddocs/dev/ENVIRONMENT.md. Excluded from full-text review:core/libs/prx/libSceAgcDriver/tests/Recorder.cpp, because it was too large for the review folder.
To get this to a good state
Nothing is required. The stale explanatory comment noted above is optional.
What
When a dispatch's or draw's build uploads a descriptor region that isn't aligned inside its host import, the driver can copy it on the GPU from the import (
recordGpuCopies) instead of reading it on the CPU. Onmainthat GPU copy is allowed only up toAPS5_GPU_COPY_MAX_KIB(1024 KiB by default,gpuCopyEligible). A larger region takes the CPU copy incopyRegion, and itsGuestMemory::Readgoes through the flush hook. So when GPU work is still pending over the region, the CPU waits for it, under the GPU mutex inUploadFinish:This change copies such a region on the GPU whatever its size, when there is pending GPU work over it: a pending write, pending storage results, or a unit shadow.
Why that's safe: the bound isn't there for correctness. The GPU copy uses the same host-visible buffer as the CPU copy, and for a region with no GPU work over it the CPU copy never waits, so keeping that region on the CPU stays the cheaper choice. Behind GPU work, the GPU path already records everything the CPU would have waited for:
UploadFinish.How it decides:
copyBehindGpuWork(region, locked): holds for a GPU-copyable region the active recorder has GPU work over.Unchanged:
APS5_CPU_COPIES=1, which disables every GPU copy.The
APS5_GPU_COPY_MAX_KIBrow inENVIRONMENT.mdnow says the cap doesn't apply behind GPU work.Pending:
Resident Evil Village (PPSA01556)
Static menu, profiled boot (
APS5_PROFILE_DRAW=1) onmainebb4075 plus #12478. Its[hooksync]lines show these buffer-upload waits per 10 s:0x0 DISPATCH_DIRECT buffer-upload, 65 syncs, 238 ms, average access 11,632 KiB over an average noted range of 3,162 KiB;0x28 DISPATCH_DIRECT buffer-upload, 29 syncs, 364 ms.Not confirmed yet: whether those regions lie inside one host import, which is the case this change covers, or cross several registered allocations, which it doesn't. A profiled boot with this change will tell, from its
[buffers]line and thebuffer-uploadsyncs left.UFC 6 (PPSA23566), by Logan1h
Logan1h's pair, on Windows 11 (10.0.26300), a Ryzen 5 7500F and an NVIDIA GeForce RTX 4070 SUPER (driver 621.14), with a WinLibs GCC 15.2 Release build. Clock state not stated.
mainb7aeb6f with a local diagnostic-counters patch, which they note changes no behaviour. B adds this PR (their merge cbc3300846 of 5a09407).main)vvms/training)UploadFinishwait per presentCompletePendingCpuWriteswait per presentclassify+cpu-copywait per present[hooksync]buffer-upload waits per presentUploadFinishcalls per present are 552 for A and 548 for B.main; not checked by us.agc_buffer_upload_pending_gpu_copy,agc_driver_depth_plane_sampling,agc_driver_depth_plane_sampling_evictingandagc_driver_draw_recipe_datapassed, with noVUID-lines.main): 11 presents in 10.30 s, frame p50 856 ms and p90 1,212 ms, GPU busy 403 ms per present.tools/pr_labels.pyreads them as different configurations, since theirsummary_every 10windows start at different presents (window.first_present188038 and 3835). The same-window pair below is the one it takes.The two lines
A,
mainb7aeb6f with the diagnostic-counters patch:{"commit": "3ac73c78593d", "dirty": false, "env": {"APS5_DRAW_PIPELINE": "1", "APS5_LOG_TIMESTAMPS": "1", "APS5_MIMALLOC": "1", "APS5_PIPELINE_DISPATCH": "1", "APS5_PROFILE_DRAW": "1", "APS5_SKIP_REFUSED_DRAWS": "1", "APS5_TRACE_SUMMARY_EVERY": "10"}, "gpu": "NVIDIA GeForce RTX 4070 SUPER", "driver": "NVIDIA 621.14", "os": "Windows 10.0.26300", "cpu": "AMD Ryzen 5 7500F 6-Core Processor", "cpu_threads": 12, "memory_mib": 32372, "title_id": "PPSA23566", "title": "EA SPORTS\u2122 UFC\u00ae 6", "content_version": "01.005.000", "resolution": "1920x1080", "window": {"spec": "summary_every 10", "first_present": 188038, "ms": 10300.394}, "interval_start_s": 4287.852, "interval_end_s": 4298.152, "presents": 11, "frame_ms": {"p50": 856.462, "p90": 1212.137, "p99": 1225.667, "max": 1225.667}, "gpu_busy_ms_per_present": 403.24, "worker_busy_pct": {"queue worker 0x0": 94.218, "queue worker 0x29": 11.784, "queue worker 0x2a": 12.573, "queue worker 0x2b": 13.764, "queue worker 0x2c": 6.193, "queue worker 0x2d": 5.753, "queue worker 0x2e": 6.246, "queue worker 0x2f": 5.635, "queue worker 0x28": 5.737}, "phase_totals_ms": {"Driver.Completion": 0.214, "Driver.Dispatch": 7205.413, "Driver.Dispatch.capture_resources": 88.665, "Driver.Dispatch.decode_key_device_setup": 21.525, "Driver.Dispatch.lookup_cache": 121.337, "Driver.Dispatch.materialize": 172.912, "Driver.Dispatch.prepared_invocation": 12.024, "Driver.Draw": 6819.909, "Driver.Draw.device_setup": 53.637, "Driver.Draw.draw_enqueued": 5567.354, "Driver.Draw.post_compile_prepare": 7.158, "Driver.Draw.prepare": 296.854, "Driver.Draw.shader_compile_and_link": 875.827, "Driver.EndSubmission": 69.356, "Driver.Packet": 16606.981, "Driver.Packet.device_lock": 18.976, "Driver.Packet.dispatch": 7115.354, "Driver.Packet.draw": 6839.514, "Driver.Packet.execute": 466.599, "Driver.Packet.flip_flush": 0.352, "Driver.Packet.flush_between_packets": 84.035, "Driver.Packet.memory_wait": 1695.822, "Driver.Packet.pipeline_drain": 89.688, "Driver.Packet.pipeline_prepare": 29.644, "Driver.Packet.prepare_memory": 98.816, "Driver.Packet.rendering_wait": 0.018, "Driver.Present": 72.754, "Driver.Present.acquire_image": 0.176, "Driver.Present.device_setup": 0.006, "Driver.Present.gpu_mutex_wait": 0.102, "Driver.Present.inflight_wait": 0.035, "Driver.Present.present_display_buffer": 1.562, "Driver.Present.queue_present": 4.772, "Driver.Present.release_and_callback": 0.014, "Driver.Present.render_fence_wait": 66.031, "Driver.Present.resize": 0.027, "Driver.Present.validate": 0.005, "Driver.Suspend": 0.003, "GpuMutex.wait.dispatch": 342.443, "GpuMutex.wait.draw": 4645.961, "GpuMutex.wait.end": 68.032, "GpuMutex.wait.fill": 0.026, "GpuMutex.wait.flush": 14.202, "GpuMutex.wait.hook": 90.999, "GpuMutex.wait.indirect": 0.311, "GpuMutex.wait.label": 38.068, "GpuMutex.wait.other": 0.071, "GpuMutex.wait.present": 0.062, "GpuMutex.wait.wait": 0.086, "Graphics.Draw": 2107.219, "Graphics.Draw.draw_and_resource_release": 1914.387, "Graphics.Draw.index_upload": 108.775, "Graphics.Draw.validate": 65.736, "Graphics.Draw.vertex_upload": 7.565, "Graphics.DrawWithRecipe": 2.751, "Graphics.DrawWithRecipe.draw_and_resource_release": 2.689, "Graphics.DrawWithRecipe.index_upload": 0.003, "Graphics.DrawWithRecipe.validate": 0.028, "Graphics.DrawWithRecipe.vertex_upload": 0.018, "Recorder.Reap": 79.277, "Recorder.Submit": 119.37, "Recorder.Sync": 3872.204, "Recorder.WaitSerial": 109.118, "Resources.Complete": 6153.95, "Resources.Prepare": 234.482, "Shader.DrawStage": 750.588, "Shader.DrawStage.capture_resources": 562.537, "Shader.DrawStage.materialize": 116.963, "Shader.DrawStage.prepared_invocation": 63.87, "Shader.ResolveAbi": 0.43, "Shader.ResolveGraphicsAbi": 0.523, "Shader.ResolveGraphicsStagesAbi": 1.812, "VideoOut.Flip": 73.927, "VideoOut.Flip.completion_mutex_wait": 0.011, "VideoOut.Flip.config_mutex_wait": 0.002, "VideoOut.Flip.frame_limit": 0.008, "VideoOut.Flip.notify_game": 0.084, "VideoOut.Flip.present": 73.07, "VideoOut.Flip.validate": 0.014, "VideoOut.Flip.vblank_wait": 0.009, "VideoOut.Flip.window_prepare": 0.025, "VideoOut.Flip.window_title": 0.7, "VideoOut.Readiness": 0.024, "VideoOut.Readiness.locks_validate": 0.011, "Vulkan.Acquire": 0.164, "Vulkan.Acquire.acquire_fence_wait": 0.024, "Vulkan.Acquire.acquire_image": 0.108, "Vulkan.Acquire.fence_reset": 0.021, "Vulkan.Acquire.retired_swapchains": 0.007, "Vulkan.ComputePipeline": 41.235, "Vulkan.Dispatch": 5926.275, "Vulkan.Dispatch.command_record": 68.606, "Vulkan.Dispatch.shader_resources": 5854.082, "Vulkan.DispatchRecipe": 18.939, "Vulkan.DispatchRecipe.command_record": 18.848, "Vulkan.DrawFromRecipe": 2.77, "Vulkan.Present": 1.121, "Vulkan.Present.command_record_scale": 0.466, "Vulkan.Present.pixel_upload": 0.06, "Vulkan.Present.queue_submit": 0.587, "Vulkan.QueuePresent": 4.748, "Vulkan.QueuePresent.queue_present": 4.73, "Vulkan.Retire": 66.025, "Vulkan.Retire.wait": 65.862}, "top_phases_ms_per_frame": {"Driver.Packet": 1509.726, "Driver.Dispatch": 655.038, "Driver.Packet.dispatch": 646.85, "Driver.Packet.draw": 621.774, "Driver.Draw": 619.992, "Resources.Complete": 559.45, "Vulkan.Dispatch": 538.752, "Vulkan.Dispatch.shader_resources": 532.189}, "owned_draw_counts": {}, "graphics_track": {"Graphics.Barrier.copy": 76, "Graphics.Barrier.dispatch-lead": 4126, "Graphics.Barrier.dispatch-trail": 6230, "Graphics.Barrier.draw": 14587, "Graphics.Barrier.fill": 172, "Graphics.Barrier.indirect-args": 814, "Graphics.Barrier.input-mirror": 4169, "Graphics.Barrier.label-run": 1302, "Graphics.Barrier.present-blit": 22, "Graphics.Barrier.shadow-publish": 857, "Graphics.Barrier.staging-in": 2387, "Graphics.Barrier.staging-out": 1291, "Graphics.Barrier.storage-upload": 1528, "Graphics.Barrier.storage-writeback": 3020, "Graphics.Barrier.template-refresh": 17, "Graphics.BarrierMerged.dispatch-lead": 3732, "Graphics.BarrierMerged.fill": 26, "Graphics.BarrierMerged.label-run": 12, "Graphics.BarrierMerged.shadow-publish": 827, "Graphics.BarrierMerged.staging-in": 1893, "Graphics.BarrierMerged.staging-out": 1291, "Graphics.BarrierMerged.storage-writeback": 923, "Graphics.Copy": 8503, "Graphics.Copy.bytes": 369511974, "Graphics.RenderPass": 6959, "Graphics.RenderPass.Close.command": 5954, "Graphics.RenderPass.Close.image": 47, "Graphics.RenderPass.Close.key": 159, "Graphics.RenderPass.Close.label": 12, "Graphics.RenderPass.Close.new-batch": 787, "Graphics.RenderPass.Continued": 37843}, "trace_dropped": false, "trace": ""}B, their merge cbc3300846 of this PR's 5a09407:
{"commit": "cbc33008466a", "dirty": false, "env": {"APS5_DRAW_PIPELINE": "1", "APS5_LOG_TIMESTAMPS": "1", "APS5_MIMALLOC": "1", "APS5_PIPELINE_DISPATCH": "1", "APS5_PROFILE_DRAW": "1", "APS5_SKIP_REFUSED_DRAWS": "1", "APS5_TRACE_SUMMARY_EVERY": "10"}, "gpu": "NVIDIA GeForce RTX 4070 SUPER", "driver": "NVIDIA 621.14", "os": "Windows 10.0.26300", "cpu": "AMD Ryzen 5 7500F 6-Core Processor", "cpu_threads": 12, "memory_mib": 32372, "title_id": "PPSA23566", "title": "EA SPORTS\u2122 UFC\u00ae 6", "content_version": "01.005.000", "resolution": "1920x1080", "window": {"spec": "summary_every 10", "first_present": 3835, "ms": 10279.705}, "interval_start_s": 839.79, "interval_end_s": 850.07, "presents": 12, "frame_ms": {"p50": 820.98, "p90": 1053.6, "p99": 1080.731, "max": 1080.731}, "gpu_busy_ms_per_present": 194.206, "worker_busy_pct": {"queue worker 0x0": 96.707, "queue worker 0x29": 6.322, "queue worker 0x2a": 5.961, "queue worker 0x2b": 6.351, "queue worker 0x2c": 12.333, "queue worker 0x2d": 13.018, "queue worker 0x2e": 14.13, "queue worker 0x2f": 14.511, "queue worker 0x28": 6.567}, "phase_totals_ms": {"Driver.Completion": 0.347, "Driver.Dispatch": 7704.94, "Driver.Dispatch.capture_resources": 127.952, "Driver.Dispatch.decode_key_device_setup": 35.12, "Driver.Dispatch.lookup_cache": 73.628, "Driver.Dispatch.materialize": 23.495, "Driver.Dispatch.prepared_invocation": 17.098, "Driver.Draw": 7365.637, "Driver.Draw.device_setup": 61.581, "Driver.Draw.draw_enqueued": 6112.491, "Driver.Draw.post_compile_prepare": 19.801, "Driver.Draw.prepare": 177.521, "Driver.Draw.shader_compile_and_link": 971.043, "Driver.EndSubmission": 140.611, "Driver.Packet": 17941.023, "Driver.Packet.device_lock": 21.89, "Driver.Packet.dispatch": 7688.551, "Driver.Packet.draw": 7389.123, "Driver.Packet.execute": 501.559, "Driver.Packet.flip_flush": 4.481, "Driver.Packet.flush_between_packets": 100.013, "Driver.Packet.memory_wait": 1646.57, "Driver.Packet.pipeline_drain": 38.013, "Driver.Packet.pipeline_prepare": 35.824, "Driver.Packet.prepare_memory": 100.501, "Driver.Packet.rendering_wait": 0.022, "Driver.Present": 12.582, "Driver.Present.acquire_image": 0.171, "Driver.Present.device_setup": 0.006, "Driver.Present.gpu_mutex_wait": 0.075, "Driver.Present.inflight_wait": 0.031, "Driver.Present.present_display_buffer": 1.819, "Driver.Present.queue_present": 5.234, "Driver.Present.release_and_callback": 0.015, "Driver.Present.render_fence_wait": 5.18, "Driver.Present.resize": 0.024, "Driver.Present.validate": 0.004, "Driver.Suspend": 0.002, "GpuMutex.wait.dispatch": 223.65, "GpuMutex.wait.draw": 6011.895, "GpuMutex.wait.end": 39.734, "GpuMutex.wait.fill": 0.024, "GpuMutex.wait.flush": 8.453, "GpuMutex.wait.hook": 0.101, "GpuMutex.wait.indirect": 0.108, "GpuMutex.wait.label": 46.798, "GpuMutex.wait.present": 0.036, "GpuMutex.wait.wait": 0.123, "Graphics.Draw": 1447.216, "Graphics.Draw.draw_and_resource_release": 1263.996, "Graphics.Draw.index_upload": 87.755, "Graphics.Draw.validate": 74.484, "Graphics.Draw.vertex_upload": 8.329, "Graphics.DrawWithRecipe": 5.481, "Graphics.DrawWithRecipe.draw_and_resource_release": 5.376, "Graphics.DrawWithRecipe.index_upload": 0.005, "Graphics.DrawWithRecipe.validate": 0.045, "Graphics.DrawWithRecipe.vertex_upload": 0.032, "Recorder.Reap": 88.973, "Recorder.Submit": 99.334, "Recorder.Sync": 3605.844, "Recorder.WaitSerial": 0.194, "Resources.Complete": 6708.887, "Resources.Prepare": 157.835, "Shader.DrawStage": 841.355, "Shader.DrawStage.capture_resources": 648.685, "Shader.DrawStage.materialize": 112.291, "Shader.DrawStage.prepared_invocation": 72.756, "Shader.ResolveAbi": 1.12, "Shader.ResolveGraphicsAbi": 0.794, "Shader.ResolveGraphicsStagesAbi": 3.894, "VideoOut.Flip": 13.62, "VideoOut.Flip.completion_mutex_wait": 0.012, "VideoOut.Flip.config_mutex_wait": 0.002, "VideoOut.Flip.frame_limit": 0.006, "VideoOut.Flip.notify_game": 0.085, "VideoOut.Flip.present": 12.895, "VideoOut.Flip.validate": 0.015, "VideoOut.Flip.vblank_wait": 0.008, "VideoOut.Flip.window_prepare": 0.017, "VideoOut.Flip.window_title": 0.577, "VideoOut.Readiness": 0.024, "VideoOut.Readiness.locks_validate": 0.011, "Vulkan.Acquire": 0.159, "Vulkan.Acquire.acquire_fence_wait": 0.025, "Vulkan.Acquire.acquire_image": 0.104, "Vulkan.Acquire.fence_reset": 0.021, "Vulkan.Acquire.retired_swapchains": 0.006, "Vulkan.Dispatch": 6678.578, "Vulkan.Dispatch.command_record": 126.724, "Vulkan.Dispatch.shader_resources": 6546.945, "Vulkan.DispatchRecipe": 9.627, "Vulkan.DispatchRecipe.command_record": 9.501, "Vulkan.DrawFromRecipe": 5.515, "Vulkan.Present": 1.437, "Vulkan.Present.command_record_scale": 0.471, "Vulkan.Present.pixel_upload": 0.079, "Vulkan.Present.queue_submit": 0.878, "Vulkan.QueuePresent": 5.214, "Vulkan.QueuePresent.queue_present": 5.196, "Vulkan.Retire": 5.182, "Vulkan.Retire.wait": 4.993}, "top_phases_ms_per_frame": {"Driver.Packet": 1495.085, "Driver.Dispatch": 642.078, "Driver.Packet.dispatch": 640.713, "Driver.Packet.draw": 615.76, "Driver.Draw": 613.803, "Resources.Complete": 559.074, "Vulkan.Dispatch": 556.548, "Vulkan.Dispatch.shader_resources": 545.579}, "owned_draw_counts": {"OwnedDraw.evicted_other": 66}, "graphics_track": {"Graphics.Barrier.dispatch-lead": 7665, "Graphics.Barrier.dispatch-trail": 10669, "Graphics.Barrier.draw": 12226, "Graphics.Barrier.fill": 262, "Graphics.Barrier.indirect-args": 1476, "Graphics.Barrier.input-mirror": 859, "Graphics.Barrier.label-run": 1698, "Graphics.Barrier.present-blit": 24, "Graphics.Barrier.shadow-publish": 455, "Graphics.Barrier.staging-in": 13353, "Graphics.Barrier.staging-out": 5858, "Graphics.Barrier.storage-upload": 1296, "Graphics.Barrier.storage-writeback": 2663, "Graphics.Barrier.template-refresh": 38, "Graphics.BarrierMerged.dispatch-lead": 5956, "Graphics.BarrierMerged.fill": 28, "Graphics.BarrierMerged.label-run": 14, "Graphics.BarrierMerged.shadow-publish": 443, "Graphics.BarrierMerged.staging-in": 6201, "Graphics.BarrierMerged.staging-out": 5858, "Graphics.BarrierMerged.storage-writeback": 1028, "Graphics.Copy": 25125, "Graphics.Copy.bytes": 3778831928, "Graphics.RenderPass": 5592, "Graphics.RenderPass.Close.command": 4037, "Graphics.RenderPass.Close.image": 26, "Graphics.RenderPass.Close.key": 252, "Graphics.RenderPass.Close.label": 14, "Graphics.RenderPass.Close.new-batch": 1263, "Graphics.RenderPass.Continued": 48591}, "trace_dropped": false, "trace": ""}APS5_TRACE_SECONDS=0:60with a trigger file, opened once the fight was on screen), same save and practice fight, driven by hand, the sameAPS5_*settings in both arms, driver 621.24.tools/performance_compare.pyfinds no configuration differences.main)APS5_GPU_COPY_MAX_KIBbehind pending GPU work is now copied on the GPU, wheremainwaited and read it on the CPU.aps5-trace-*.json.gzfiles of this pair, with the fulltools/trace_digest.pyoutput for each (digest-A.txt,digest-B.txt). Each digest's header gives the same window, presents, frame percentiles and GPU busy as its summary line.Driver.WorkerWait.idle_and_completion_poll) for the whole frame. These are the retained slices only: A's three slowest frames (from 49.6 s) and B's third (23.1 s) come after queue worker 0x0's buffer filled, so that worker's slices for them are missing.The two same-window lines
A,
mainb7aeb6f with the diagnostic-counters patch:{"commit": "3ac73c78593d", "dirty": false, "env": {"APS5_DRAW_PIPELINE": "1", "APS5_LOG_TIMESTAMPS": "1", "APS5_MIMALLOC": "1", "APS5_PIPELINE_DISPATCH": "1", "APS5_PROFILE_DRAW": "1", "APS5_SKIP_REFUSED_DRAWS": "1", "APS5_TRACE_ALL_PHASES": "1", "APS5_TRACE_SECONDS": "0:60", "APS5_TRACE_SUMMARY_EVERY": "10", "APS5_TRACE_TRIGGER_FILE": "<path>"}, "gpu": "NVIDIA GeForce RTX 4070 SUPER", "driver": "NVIDIA 621.24", "os": "Windows 10.0.26300", "cpu": "AMD Ryzen 5 7500F 6-Core Processor", "cpu_threads": 12, "memory_mib": 32372, "title_id": "PPSA23566", "title": "EA SPORTS\u2122 UFC\u00ae 6", "content_version": "01.005.000", "resolution": "1920x1080", "window": {"spec": "seconds 0:60", "first_present": 4445, "ms": 60667.543}, "presents": 62, "frame_ms": {"p50": 974.217, "p90": 1049.354, "p99": 1266.741, "max": 1266.741}, "gpu_busy_ms_per_present": 222.763, "worker_busy_pct": {"queue worker 0x0": 98.097, "queue worker 0x29": 9.814, "queue worker 0x2a": 10.251, "queue worker 0x2b": 10.332, "queue worker 0x2c": 10.578, "queue worker 0x2d": 8.861, "queue worker 0x2e": 8.58, "queue worker 0x2f": 9.797, "queue worker 0x28": 9.756}, "phase_totals_ms": {"Driver.Completion": 1.363, "Driver.Dispatch": 48857.51, "Driver.Dispatch.capture_resources": 740.673, "Driver.Dispatch.decode_key_device_setup": 192.7, "Driver.Dispatch.lookup_cache": 590.147, "Driver.Dispatch.materialize": 144.039, "Driver.Dispatch.prepared_invocation": 104.957, "Driver.Draw": 43847.68, "Driver.Draw.device_setup": 321.63, "Driver.Draw.draw_enqueued": 37429.006, "Driver.Draw.post_compile_prepare": 46.456, "Driver.Draw.prepare": 986.143, "Driver.Draw.shader_compile_and_link": 4943.771, "Driver.EndSubmission": 502.527, "Driver.Packet": 106311.381, "Driver.Packet.device_lock": 113.82, "Driver.Packet.dispatch": 48832.991, "Driver.Packet.draw": 43980.431, "Driver.Packet.execute": 1701.35, "Driver.Packet.flip_flush": 2.227, "Driver.Packet.flush_between_packets": 487.441, "Driver.Packet.memory_wait": 8587.898, "Driver.Packet.pipeline_drain": 259.087, "Driver.Packet.pipeline_prepare": 185.613, "Driver.Packet.prepare_memory": 481.297, "Driver.Packet.rendering_wait": 0.098, "Driver.Present": 69.318, "Driver.Present.acquire_image": 0.93, "Driver.Present.device_setup": 0.03, "Driver.Present.gpu_mutex_wait": 0.594, "Driver.Present.inflight_wait": 0.178, "Driver.Present.present_display_buffer": 8.261, "Driver.Present.queue_present": 26.237, "Driver.Present.release_and_callback": 0.087, "Driver.Present.render_fence_wait": 32.712, "Driver.Present.resize": 0.132, "Driver.Present.validate": 0.023, "Driver.Suspend": 0.011, "GpuMutex.wait.dispatch": 1413.598, "GpuMutex.wait.draw": 36059.61, "GpuMutex.wait.end": 142.186, "GpuMutex.wait.fill": 0.299, "GpuMutex.wait.flush": 103.357, "GpuMutex.wait.hook": 33.336, "GpuMutex.wait.indirect": 0.964, "GpuMutex.wait.label": 518.561, "GpuMutex.wait.other": 0.672, "GpuMutex.wait.present": 0.343, "GpuMutex.wait.wait": 1.23, "Graphics.Draw": 7626.864, "Graphics.Draw.draw_and_resource_release": 6540.725, "Graphics.Draw.index_upload": 569.344, "Graphics.Draw.validate": 392.465, "Graphics.Draw.vertex_upload": 47.69, "Graphics.DrawWithRecipe": 29.235, "Graphics.DrawWithRecipe.draw_and_resource_release": 28.749, "Graphics.DrawWithRecipe.index_upload": 0.023, "Graphics.DrawWithRecipe.validate": 0.207, "Graphics.DrawWithRecipe.vertex_upload": 0.144, "Recorder.Reap": 626.493, "Recorder.Submit": 597.614, "Recorder.Sync": 25584.288, "Recorder.WaitSerial": 4.952, "Resources.Complete": 43545.917, "Resources.Prepare": 1086.663, "Shader.DrawStage": 4340.06, "Shader.DrawStage.capture_resources": 3329.717, "Shader.DrawStage.materialize": 594.025, "Shader.DrawStage.prepared_invocation": 375.737, "Shader.ResolveAbi": 9.236, "Shader.ResolveGraphicsAbi": 4.105, "Shader.ResolveGraphicsStagesAbi": 20.026, "VideoOut.Flip": 75.738, "VideoOut.Flip.completion_mutex_wait": 0.063, "VideoOut.Flip.config_mutex_wait": 0.009, "VideoOut.Flip.frame_limit": 0.03, "VideoOut.Flip.notify_game": 0.45, "VideoOut.Flip.present": 71.766, "VideoOut.Flip.validate": 0.103, "VideoOut.Flip.vblank_wait": 0.044, "VideoOut.Flip.window_prepare": 0.092, "VideoOut.Flip.window_title": 3.153, "VideoOut.Readiness": 0.131, "VideoOut.Readiness.locks_validate": 0.06, "Vulkan.Acquire": 0.864, "Vulkan.Acquire.acquire_fence_wait": 0.13, "Vulkan.Acquire.acquire_image": 0.561, "Vulkan.Acquire.fence_reset": 0.118, "Vulkan.Acquire.retired_swapchains": 0.032, "Vulkan.Dispatch": 43476.893, "Vulkan.Dispatch.command_record": 739.761, "Vulkan.Dispatch.shader_resources": 42711.666, "Vulkan.DispatchRecipe": 62.644, "Vulkan.DispatchRecipe.command_record": 61.951, "Vulkan.DrawFromRecipe": 29.443, "Vulkan.Present": 6.069, "Vulkan.Present.command_record_scale": 2.381, "Vulkan.Present.pixel_upload": 0.459, "Vulkan.Present.queue_submit": 3.173, "Vulkan.QueuePresent": 26.058, "Vulkan.QueuePresent.queue_present": 25.945, "Vulkan.Retire": 32.698, "Vulkan.Retire.wait": 31.637}, "top_phases_ms_per_frame": {"Driver.Packet": 1714.7, "Driver.Dispatch": 788.024, "Driver.Packet.dispatch": 787.629, "Driver.Packet.draw": 709.362, "Driver.Draw": 707.221, "Resources.Complete": 702.353, "Vulkan.Dispatch": 701.24, "Vulkan.Dispatch.shader_resources": 688.898}, "owned_draw_counts": {}, "graphics_track": {"Graphics.Barrier.copy": 240, "Graphics.Barrier.dispatch-lead": 42466, "Graphics.Barrier.dispatch-trail": 56057, "Graphics.Barrier.draw": 82652, "Graphics.Barrier.fill": 1572, "Graphics.Barrier.indirect-args": 7587, "Graphics.Barrier.input-mirror": 14254, "Graphics.Barrier.label-run": 8482, "Graphics.Barrier.present-blit": 124, "Graphics.Barrier.shadow-publish": 2585, "Graphics.Barrier.staging-in": 69860, "Graphics.Barrier.staging-out": 30156, "Graphics.Barrier.storage-upload": 6724, "Graphics.Barrier.storage-writeback": 14791, "Graphics.Barrier.template-refresh": 335, "Graphics.BarrierMerged.dispatch-lead": 28765, "Graphics.BarrierMerged.fill": 184, "Graphics.BarrierMerged.label-run": 86, "Graphics.BarrierMerged.shadow-publish": 2479, "Graphics.BarrierMerged.staging-in": 29553, "Graphics.BarrierMerged.staging-out": 30156, "Graphics.BarrierMerged.storage-writeback": 5049, "Graphics.Copy": 139250, "Graphics.Copy.bytes": 16875346660, "Graphics.RenderPass": 38549, "Graphics.RenderPass.Close.command": 30286, "Graphics.RenderPass.Close.image": 181, "Graphics.RenderPass.Close.key": 1246, "Graphics.RenderPass.Close.label": 86, "Graphics.RenderPass.Close.new-batch": 6750, "Graphics.RenderPass.Continued": 242028}, "trace_dropped": true, "trace_dropped_threads": {"queue worker 0x0": {"events_full_after_s": 21.88, "events_lost": 481507, "totals_full": false}}, "trace": "aps5-trace-3ac73c78593d-11720.json.gz"}B, their merge cbc3300846 of this PR's 5a09407:
{"commit": "cbc33008466a", "dirty": false, "env": {"APS5_DRAW_PIPELINE": "1", "APS5_LOG_TIMESTAMPS": "1", "APS5_MIMALLOC": "1", "APS5_PIPELINE_DISPATCH": "1", "APS5_PROFILE_DRAW": "1", "APS5_SKIP_REFUSED_DRAWS": "1", "APS5_TRACE_ALL_PHASES": "1", "APS5_TRACE_SECONDS": "0:60", "APS5_TRACE_SUMMARY_EVERY": "10", "APS5_TRACE_TRIGGER_FILE": "<path>"}, "gpu": "NVIDIA GeForce RTX 4070 SUPER", "driver": "NVIDIA 621.24", "os": "Windows 10.0.26300", "cpu": "AMD Ryzen 5 7500F 6-Core Processor", "cpu_threads": 12, "memory_mib": 32372, "title_id": "PPSA23566", "title": "EA SPORTS\u2122 UFC\u00ae 6", "content_version": "01.005.000", "resolution": "1920x1080", "window": {"spec": "seconds 0:60", "first_present": 3584, "ms": 60881.035}, "presents": 63, "frame_ms": {"p50": 945.706, "p90": 1107.58, "p99": 1467.772, "max": 1467.772}, "gpu_busy_ms_per_present": 187.248, "worker_busy_pct": {"queue worker 0x0": 97.616, "queue worker 0x29": 10.314, "queue worker 0x2a": 11.016, "queue worker 0x2b": 10.778, "queue worker 0x2c": 8.872, "queue worker 0x2d": 10.64, "queue worker 0x2e": 10.917, "queue worker 0x2f": 10.046, "queue worker 0x28": 10.118}, "phase_totals_ms": {"Driver.Completion": 1.683, "Driver.Dispatch": 47883.6, "Driver.Dispatch.capture_resources": 746.527, "Driver.Dispatch.decode_key_device_setup": 196.995, "Driver.Dispatch.lookup_cache": 583.098, "Driver.Dispatch.materialize": 166.953, "Driver.Dispatch.prepared_invocation": 99.513, "Driver.Draw": 47402.291, "Driver.Draw.device_setup": 367.482, "Driver.Draw.draw_enqueued": 40494.185, "Driver.Draw.post_compile_prepare": 50.037, "Driver.Draw.prepare": 1066.909, "Driver.Draw.shader_compile_and_link": 5290.617, "Driver.EndSubmission": 420.931, "Driver.Packet": 109356.533, "Driver.Packet.device_lock": 117.496, "Driver.Packet.dispatch": 47861.928, "Driver.Packet.draw": 47534.663, "Driver.Packet.execute": 1517.833, "Driver.Packet.flip_flush": 2.125, "Driver.Packet.flush_between_packets": 534.211, "Driver.Packet.memory_wait": 9644.9, "Driver.Packet.pipeline_drain": 267.762, "Driver.Packet.pipeline_prepare": 193.815, "Driver.Packet.prepare_memory": 511.476, "Driver.Packet.rendering_wait": 0.132, "Driver.Present": 88.626, "Driver.Present.acquire_image": 0.958, "Driver.Present.device_setup": 0.032, "Driver.Present.gpu_mutex_wait": 0.697, "Driver.Present.inflight_wait": 0.179, "Driver.Present.present_display_buffer": 8.64, "Driver.Present.queue_present": 27.49, "Driver.Present.release_and_callback": 0.098, "Driver.Present.render_fence_wait": 50.224, "Driver.Present.resize": 0.133, "Driver.Present.validate": 0.026, "Driver.Suspend": 0.015, "GpuMutex.wait.dispatch": 2238.763, "GpuMutex.wait.draw": 37692.046, "GpuMutex.wait.end": 179.837, "GpuMutex.wait.fill": 0.256, "GpuMutex.wait.flush": 45.701, "GpuMutex.wait.hook": 23.598, "GpuMutex.wait.indirect": 0.734, "GpuMutex.wait.label": 569.519, "GpuMutex.wait.other": 6.159, "GpuMutex.wait.present": 0.457, "GpuMutex.wait.wait": 0.725, "Graphics.Draw": 8827.595, "Graphics.Draw.draw_and_resource_release": 7604.427, "Graphics.Draw.index_upload": 653.428, "Graphics.Draw.validate": 444.998, "Graphics.Draw.vertex_upload": 47.77, "Graphics.DrawWithRecipe": 37.483, "Graphics.DrawWithRecipe.draw_and_resource_release": 37.028, "Graphics.DrawWithRecipe.index_upload": 0.023, "Graphics.DrawWithRecipe.validate": 0.192, "Graphics.DrawWithRecipe.vertex_upload": 0.13, "Recorder.Reap": 613.163, "Recorder.Submit": 570.947, "Recorder.Sync": 23291.265, "Recorder.WaitSerial": 1.753, "Resources.Complete": 41549.272, "Resources.Prepare": 1070.003, "Shader.DrawStage": 4635.947, "Shader.DrawStage.capture_resources": 3556.026, "Shader.DrawStage.materialize": 638.359, "Shader.DrawStage.prepared_invocation": 397.98, "Shader.ResolveAbi": 5.276, "Shader.ResolveGraphicsAbi": 4.879, "Shader.ResolveGraphicsStagesAbi": 17.689, "VideoOut.Flip": 99.788, "VideoOut.Flip.completion_mutex_wait": 0.117, "VideoOut.Flip.config_mutex_wait": 0.01, "VideoOut.Flip.frame_limit": 0.057, "VideoOut.Flip.notify_game": 0.582, "VideoOut.Flip.present": 90.862, "VideoOut.Flip.validate": 0.075, "VideoOut.Flip.vblank_wait": 0.041, "VideoOut.Flip.window_prepare": 0.094, "VideoOut.Flip.window_title": 7.913, "VideoOut.Readiness": 0.13, "VideoOut.Readiness.locks_validate": 0.06, "Vulkan.Acquire": 0.887, "Vulkan.Acquire.acquire_fence_wait": 0.145, "Vulkan.Acquire.acquire_image": 0.578, "Vulkan.Acquire.fence_reset": 0.109, "Vulkan.Acquire.retired_swapchains": 0.032, "Vulkan.Dispatch": 41542.601, "Vulkan.Dispatch.command_record": 765.417, "Vulkan.Dispatch.shader_resources": 40750.716, "Vulkan.DispatchRecipe": 64.13, "Vulkan.DispatchRecipe.command_record": 63.37, "Vulkan.DrawFromRecipe": 37.656, "Vulkan.Present": 6.529, "Vulkan.Present.command_record_scale": 2.446, "Vulkan.Present.pixel_upload": 0.453, "Vulkan.Present.queue_submit": 3.576, "Vulkan.QueuePresent": 27.362, "Vulkan.QueuePresent.queue_present": 27.256, "Vulkan.Retire": 50.23, "Vulkan.Retire.wait": 49.07}, "top_phases_ms_per_frame": {"Driver.Packet": 1735.818, "Driver.Dispatch": 760.057, "Driver.Packet.dispatch": 759.713, "Driver.Packet.draw": 754.518, "Driver.Draw": 752.417, "Resources.Complete": 659.512, "Vulkan.Dispatch": 659.406, "Vulkan.Dispatch.shader_resources": 646.837}, "owned_draw_counts": {}, "graphics_track": {"Graphics.Barrier.dispatch-lead": 45703, "Graphics.Barrier.dispatch-trail": 57634, "Graphics.Barrier.draw": 103043, "Graphics.Barrier.fill": 1365, "Graphics.Barrier.indirect-args": 8157, "Graphics.Barrier.input-mirror": 24229, "Graphics.Barrier.label-run": 9020, "Graphics.Barrier.present-blit": 126, "Graphics.Barrier.shadow-publish": 2592, "Graphics.Barrier.staging-in": 77731, "Graphics.Barrier.staging-out": 34818, "Graphics.Barrier.storage-upload": 6692, "Graphics.Barrier.storage-writeback": 13464, "Graphics.Barrier.template-refresh": 490, "Graphics.BarrierMerged.dispatch-lead": 28245, "Graphics.BarrierMerged.fill": 171, "Graphics.BarrierMerged.label-run": 73, "Graphics.BarrierMerged.shadow-publish": 2432, "Graphics.BarrierMerged.staging-in": 34111, "Graphics.BarrierMerged.staging-out": 34818, "Graphics.BarrierMerged.storage-writeback": 5274, "Graphics.Copy": 152518, "Graphics.Copy.bytes": 25217545222, "Graphics.RenderPass": 48747, "Graphics.RenderPass.Close.command": 40582, "Graphics.RenderPass.Close.image": 188, "Graphics.RenderPass.Close.key": 1208, "Graphics.RenderPass.Close.label": 73, "Graphics.RenderPass.Close.new-batch": 6696, "Graphics.RenderPass.Continued": 238362}, "trace_dropped": true, "trace_dropped_threads": {"queue worker 0x0": {"events_full_after_s": 20.777, "events_lost": 523008, "totals_full": false}}, "trace": "aps5-trace-cbc33008466a-2952.json.gz"}Tested
agc_buffer_upload_pending_gpu_copy(new), run asagc_driver_recorder_tests --pending-upload-gpu-copy-only. The full recorder run includes it too.vkCmdCopyBufferin the open batch writes a 1 MiB pattern at +1 MiB, noted as a pending write.mainplus the test only): "the upload of a misaligned 3 MiB region over a pending GPU write waited for it on the CPU (1 flush-hook waits, 1 submissions)". Since d75ba83 the message names the write's size: "over a pending 1024 KiB GPU write".ctest -R '^agc'once, 1,136 tests: 1,060 passed, 75 skipped, 1 failed. The one failure,agc_driver_image_sample_force_degamma, is that VM's known llvmpipe JIT illegal instruction (vpdpwssd) and fails onmainthere too.main's code,agc_buffer_upload_pending_gpu_copyfails with the message above, and so doesagc_driver_recorder, the full recorder run that includes it.VUID-VkDeviceCreateInfo-pNext-pNext, whichmain's run reports too, so the fix adds none. The layer loaded in both runs. In this modemain's side runsmain's own tree, so the new test is only in the fix's side.agc_buffer_upload_pending_gpu_copy_bytes(new in d75ba83), run asagc_driver_recorder_tests --pending-upload-gpu-copy-bytes-only. The full recorder run includes it too. It uploads the same misaligned 3 MiB region with a 4 KiB pending write inside it, at +2 MiB.GuestBufferMemory::CopiedBytes()must equal the region's 3 MiB, so nothing is copied twice.GpuCopyread in the open batch. It must cover the region's first and last DWORD and neither DWORD just outside it. A CPU copy notes no read, and over the pending write it would have waited, which the wait check rules out.main's code with the tests, on Linux): both fail at the wait check, "the upload of a misaligned 3 MiB region over a pending 4 KiB GPU write waited for it on the CPU (1 flush-hook waits, 1 submissions)", and the same with 1024 KiB for the first test. In a local build with that check forced to pass, the byte count passes, sincemain's CPU copy also copies the 3 MiB once. The GPU check fails with "did not copy the region once on the GPU (0 reads noted)".check_test_registration.pyandcheck_conventions.pypass.main's code both failed in all 3 runs, with the two messages above. With this PR: 2 run, 2 pass, 0 skip, 0 fail, 10 runs in a row.APS5_SKIP_TIMING_TESTS=1, which relaxes onlyprecise_wait's median bounds on GitHub's hosted runners.main's side runsmain's own tree, which has neither test, so it made no Vulkan instance and there is nothing to compare. The run is marked failed for that reason.check_conventions.pyandcheck_test_registration.pypass. MinGW-w64-fsyntax-onlyshows no new diagnostic.ANYPS5_REQUIRE_VULKAN=1andANYPS5_NO_SHADER_CACHE=1. This head d75ba83 merged ontomaine4caa07 (their merge 4d8299bc5e, clean), againstmaine4caa07 alone,ctest -R '^agc_(driver_recorder$|buffer_upload|.*(copy|staging))'.main: 55 of 55 pass. This PR: 57 of 57 pass, including the two testsmaindoesn't have,agc_buffer_upload_pending_gpu_copyand_bytes, each with the layer loaded, andagc_driver_recorder. 19 of the tests create no Vulkan instance. NoVUID-line on either side, and every device test selected the RTX 4090.Overlap:
recorder->ReadBuffer; it closed without merging on 2026-10-14.docs/dev/ENVIRONMENT.md. They add theAPS5_GPU_HEAProws right after theAPS5_GPU_COPY_MAX_KIBrow this PR rewrites. Textual only, so no merge order: whichever lands second keeps both rows.mainintests/Recorder.cpp's option dispatch, and this PR's two options land inside that conflict. Textual only.main0a148be (run). build(agc): register each AGC test executable in its own CMake fragment #12862 movedlibSceAgcDriver's test registrations intotests/cmake/; the conflict inCMakeLists.txtis resolved withtools/agc_test_split.py resolve, which moves this PR's registrations intotests/cmake/agc_driver_recorder_tests.cmake(+6 lines). Nothing else conflicted, and apart from the move this PR's diff is unchanged. With-DBUILD_TESTING=ON,ctest -Ngives 3106 tests:main's 3105 plus its 1 test, each listed once. The tests of this PR's verify set pass 10 runs in a row. Linux: 5 run, 5 pass, 0 skip, 0 fail. Windows: 5 run, 0 pass, 5 skip (no Vulkan device), 0 fail. Suites: libc and libkernel pass on Linux (199 and 308) and on Windows (226 and 330). The suites ran withAPS5_SKIP_TIMING_TESTS=1, which relaxesprecise_wait's median bounds on GitHub's hosted runners.Checklist
main; no other open PR implements the same functionsNotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file.mdfiles or images added to the repository (attach them to this PR)