perf(agc): drop per-batch fences when a timeline tracks completion #20066

Merged
meh7an merged 2 commits from upstream-pr/20066 into main 2026-11-19 09:12:09 +00:00
meh7an commented 2026-11-14 14:43:06 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by meh7an on 2026-11-14T14:43:06Z.


What

Recorder gave every recorded batch a VkFence of its own and also signalled its timeline semaphore (serial = submissions + 1) in the same vkQueueSubmit. Recorder::Reap, which VulkanDevice::WriteLabelOnGpu and SubmitRecorded call on the draw committer, then asked the driver vkGetFenceStatus once per in-flight batch until one was not signalled. On the S3K menu page that is 1.0 to 1.8% of the committer's samples in Recorder::Reap on main, 31 to 49 of those samples in nvoglv64 (the driver's fence query).

perf(agc): drop per-batch fences when a timeline tracks completion

  • When the recorder has a timeline semaphore, its batches are submitted without a fence. A batch is complete when the timeline counter has reached its serial. Reap reads the counter once (when the newest in-flight serial is above the highest value already read) and retires batches by comparing serials; no per-batch fence is created, queried, reset or pooled.
  • APS5_BATCH_FENCES=1 restores the fence per batch and asks the fence whether a batch completed. A recorder without a timeline (extension absent, APS5_NO_TIMELINE, semaphore creation failed, Recorder(context) in tests) never takes the new path: its code is main's.
  • Code: Recorder::fenceless (set in the constructor when the timeline exists and the switch is absent), Recorder::readTimeline() (reads vkGetSemaphoreCounterValueKHR, keeps the maximum in reachedSerial, ignores a failed read), Recorder::gpuDone(batch) (fenced: vkGetFenceStatus == VK_SUCCESS; fenceless: serial != 0 && (serial <= reachedSerial || serial <= readTimeline())). signaled, unsignaled, DescribePendingWrite, the profile block of syncThroughUnlocked, finish's signaledAtStart and Reap ask gpuDone; finish(wait) waits on the timeline (WaitTimeline, same 5 s slices and warnings as the fence wait) only when the serial is above reachedSerial after a read. No public API changes; ensureOpen makes no fence when fenceless and Submit passes the batch's fence, null then.
  • Same completion as a fence per batch, for every configuration:
    • One queue. Every Recorder submits to context.queue only (the guest queues are tags on batches). Each submit signals the one timeline with the next serial, in submission order. The first synchronization scope of a vkQueueSubmit semaphore signal includes every earlier submission on that queue, exactly as a fence's does, so a counter value N means batches 1..N completed: the same prefix a fence per batch gives. WaitSerial to FinishUpTo and syncThroughUnlocked already rely on this on main. A batch is never counted done early: reachedSerial only holds values the counter returned, and a stale low read only keeps a batch in flight, as an unsignalled fence does.
    • Order. Reap, Sync, FinishUpTo and SyncThrough pop inFlight from the front, so completion order is serial order in both modes.
    • Failed submit. The failure throws before submitted and serial are set and DiscardUnsubmitted discards the batch; submissions is not consumed, so the next batch signals the same value (as on main). There is no fence to reset.
    • Device lost or a failed query. A failed counter read leaves reachedSerial alone, so Reap retires nothing (a lost vkGetFenceStatus is not VK_SUCCESS either). A failed timeline wait takes finish's existing path (vkDeviceWaitIdle unless VK_ERROR_DEVICE_LOST, release, throw).
    • Teardown. ~Recorder runs Sync(), which finishes every batch through WaitTimeline while the semaphore lives, and the waiters of unlockedWaiters are waited for before vkDestroySemaphore: unchanged. There are no fence objects to destroy.
    • Locking. Every reader of inFlight runs under the GPU mutex, so the non-atomic reachedSerial is as safe as inFlight; syncThroughUnlocked copies the function pointer before it releases the mutex and touches this only after the relock.
    • Several queues (not on main). One counter does not give per-lane prefix completion across two queues. Open #13863 adds a second queue lane with its own timeline and fence reads; it has to set fenceless = false (or give lane batches fences) while its lane is active. Declared under Overlaps.
  • docs/dev/ENVIRONMENT.md has a row for APS5_BATCH_FENCES (tools/env_reference.py --check, 617 names).

Not changed: the batch cap and the submit points (APS5_BATCH_CAP), what a batch waits for, the ProgressWatcher, the timeline values, and the work finish does after a batch completes (release, publishPendingWrites, NoteFinished: that is what is left under Reap below).

Which thread limits the scene. On the S3K page the draw committer is the busiest CPU thread (70 to 78% of its samples outside a wait in the sampler windows below, 41 to 42% in retained trace slices; the queue worker 22%) and the GPU is 57% busy, so neither saturates and the frame is paced by the committer-to-GPU chain. A committer saving can show in the frame but does not have to; it showed as about +1%.

Scope of the measurement. One title (Sonic Origins S3K page), one GPU (RTX 2080 Ti, NVIDIA 617.14) on Windows. The saving is the driver's fence queries and the per-batch fence creation and reset; other drivers and platforms are not measured, and the change is not claimed to be faster there. It never makes more driver calls than the fence path (a reap reads the counter at most once where it polled one fence per in-flight batch), and APS5_BATCH_FENCES=1 is the old behaviour.

Tested

Windows 11 (10.0.26300), NVIDIA GeForce RTX 2080 Ti (driver 617.14), Sonic Origins (PPSA05324) menu on the S3K page, 3840x2160, default environment. Measured commits: main f0c9b11f91c and this PR 4a2c126ca7a (one commit on top of it), clean builds of each. The code was written on main 44270d9910a (commit 1b044694cad); after the validation and mutation runs below main moved and docs/dev/ENVIRONMENT.md conflicted (the APS5_BATCH_CAP row next to the new row), so the branch was rebased onto f0c9b11f91c; Recorder.cpp, Recorder.hpp and the test merged without changes. The measurements below and the new test were run on the rebased commits; the validation protocol and the mutants on 44270d9910a and 1b044694cad.

New test agc_recorder_batch_fences (tests/RecorderBatchFences.cpp, a mock Vulkan device with an in-order controllable queue, held submissions, counters for fence creations, fence queries and waits, timeline reads and waits, and injectable failures; it runs on every platform the agc tests build on):

  • Three recorder configurations: fenceless (timeline, no switch), fenced (timeline with APS5_BATCH_FENCES set) and no timeline. Every scenario runs on each, with the data and the counts checked in each run: fenceless batches are submitted with no fence and none is created; fenced and no-timeline batches have one each.
  • Scenarios: configuration and fence counts; reap cost (a fenceless reap with four of eight batches complete makes 1 counter read and 0 fence queries, the fenced one 5 fence queries; four settled queries make 1 read; a reap right after a covering read makes none); a held first batch; partial prefix completion; WaitSerial with FinishUpTo and the unlocked SyncThrough (one semaphore wait for the whole prefix); a SyncThrough under the GPU lock; a failed submit; failed waits (VK_ERROR_DEVICE_LOST, VK_ERROR_OUT_OF_HOST_MEMORY); a failed counter read; failed timeline creation; and a 400-step random walk (submits, reaps, waits, completions) of a fenceless recorder compared step by step with a fence-only recorder on the same sequence; every case ends with no leaked fence or batch.
  • Mutants: 16 broken copies of Recorder.cpp, each built and run: 14 caught (an off-by-one in gpuDone, readTimeline never storing, a reap without its pre-read, the switch ignored, a fence made while fenceless, >= in Reap, signaled always true, finish always or never reading the timeline, DescribePendingWrite always signalled, a failed read taken as a value, fenceless without a timeline (two variants, found by a hang timeout), a finish waiting on a null fence (found by the crash)). 2 survive and are equivalent: a failed wait marking its already-popped batch as reached, and the serial != 0 guard of gpuDone (an in-flight batch never has serial 0).

Vulkan validation protocol (ANYPS5_REQUIRE_VULKAN=1 ANYPS5_NO_SHADER_CACHE=1 VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation, ctest -V, same machine and GPU, one build tree, each arm rebuilt):

  • Tests (78 on this PR, 77 on main): the agc_* tests that construct a Recorder and submit, wait or reap through it (label ordering, completion and write-back, submit progress and shutdown, kept bytes, batch cap and command batches, queue and pipelined waits, agc_recorder_*) and video_out_flip_labels*; main lacks the new test.
  • Results: this PR: 76 pass, 2 skip (video_out_flip_labels*), 78 of 78 accounted for. Main: 75 pass, the same 2 skips. This PR with APS5_BATCH_FENCES=1: the same 78 of 78.
  • Logs: none of the three contains was not found but was requested by env var VK_INSTANCE_LAYERS or a VUID- line.

tools/check_conventions.py --base upstream/main passes. Full ctest was not run.

Sampler (APS5_SAMPLE_COMMITTER, four overlapping 60 s windows of 3,843 committer samples each, snapshots 0-3, 1-4, 2-5 and 3-6; one sample is about 0.0145 ms of a frame; a warm boot of the new main came first). Both arms in the same order on the same page; the same window number is the same time since the page opened:

draw committer main f0c9b11f91c (windows 0-3 / 1-4 / 2-5 / 3-6) this PR 4a2c126ca7a
Recorder::Reap inclusive 68 (1.77%) / 66 (1.72%) / 49 (1.28%) / 38 (0.99%) 27 (0.70%) / 28 (0.73%) / 25 (0.65%) / 23 (0.60%)
of which in nvoglv64 (the driver) 48 / 49 / 41 / 31 5 / 2 / 0 / 2
VulkanDevice::WriteLabelOnGpu inclusive 95 / 88 / 80 / 65 77 / 73 / 68 / 67
VulkanDevice::SubmitRecorded inclusive 20 / 17 / 8 / 5 7 / 6 / 3 / 1
committer busy (samples outside a wait frame) 69.4 / 74.6 / 73.9 / 73.5% 70.3 / 75.3 / 77.7 / 77.9%
run FPS (median of the readings) 17.89 18.04
  • Saving: 15 to 41 fewer samples in Recorder::Reap in every window, 29.5 on average (0.77% of the committer, about 0.4 ms of a 55 ms frame). The driver part of Reap falls from 31-49 samples to 0-5; what is left under Reap is finish (release, publishPendingWrites, NoteFinished) and the single counter read (readTimeline, 0 to 5 samples). Reap shrinks over the run in both arms (the scene's batches per reap change); the comparison is window against window.
  • Busy share: I do not claim a lower busy share. It rose by 1 to 4 points in the PR arm in windows 1-4 to 3-6 and is 0.9 points higher in window 0-3, where both arms were at the same point after boot; the figure counts every sample outside a wait frame, and the committer's wait share is 22 to 31% in both arms. The result is in the frame times below.

Two traced runs per arm (APS5_TRACE_SECONDS=200:15), in main, PR, PR, main order, both commit IDs in the summaries:

main f0c9b11f91c this PR 4a2c126ca7a
reading FPS (median) 18.39 / 18.47 18.66 / 18.67
frame p50 58.6 / 58.4 ms 57.7 / 57.8 ms
frame p99 66.0 / 67.2 ms 66.1 / 65.0 ms
committer Graphics.Draw per frame (retained events) 23.1 / 23.3 ms 21.9 / 22.7 ms
committer busy per frame (retained events) 24.6 / 24.9 ms 23.1 / 24.1 ms
Recorder.Submit per frame 1.0 / 1.0 ms 0.8 / 0.9 ms
GPU busy per present 33.0 / 33.5 ms 32.9 / 32.7 ms
presents in the 15 s window 254 / 255 258 / 258
  • Result: about +0.2 FPS (+1.2%) and frame p50 0.6 to 0.9 ms lower in both PR runs, the committer's Graphics.Draw 0.6 to 1.4 ms lower per frame and Recorder.Submit 0.1 to 0.2 ms lower, p99 within the spread, GPU busy unchanged to slightly lower. The two main runs differ by 0.08 FPS and the two PR runs by 0.01; every PR run is faster than both main runs on FPS and p50. The sampler window's FPS (17.89 to 18.04, +0.8%) points the same way. The gain is small, as the sampler's 0.4 ms predicts, and the trace's committer difference (1.2 ms on average) is larger than the sampler's, so I read the trace figure as upper bound.
  • Dropped events: all four traces dropped events once the worker's buffer filled (at about 6 s), and the committer's buffer filled late in two of them (main run 1 at 14.8 s, PR run 1 at 13.9 s); slice figures cover retained events only.
  • Machine: the benchmark leases report 2.0% CPU on average and 16.9% at the peak for the warm boot and the two sampler runs, 1.9% and 9.8% for the four traced runs, quiet at the start of both. -PCbisect kept the executable staged earlier from an older main's relinker; both arms ran it, with each arm's own .prx modules swapped in. Traces: m321_traces_main_f0c9b11f91c.zip and m321_traces_pr_4a2c126ca7a.zip (two runs each, trace and aps5-summary.jsonl).
Digest of main `f0c9b11f91`, run 1

seconds 200:15 from present 5121: 254 presents, frame p50 58.6 / p90 60.7 / p99 66.0 / max 70.6 ms, GPU busy 33.0 ms per present
NVIDIA GeForce RTX 2080 Ti, NVIDIA 617.14, Windows 10.0.26300, 3840x2160, commit f0c9b11f91, dropped: yes

{"commit":"f0c9b11f91cc","dirty":false,"env":{"APS5_TRACE_DIR":"<path>","APS5_TRACE_SECONDS":"200:15"},"gpu":"NVIDIA GeForce RTX 2080 Ti","driver":"NVIDIA 617.14","os":"Windows 10.0.26300","cpu":"Intel(R) Core(TM) i9-9900K CPU @ 3.60GHz","cpu_threads":16,"memory_mib":32700,"title_id":"PPSA05324","title":"Sonic Origins","content_version":"02.002.000","resolution":"3840x2160","window":{"spec":"seconds 200:15","first_present":5121,"ms":15000.568},"presents":254,"frame_ms":{"p50":58.61,"p90":60.697,"p99":66.011,"max":70.58},"gpu_busy_ms_per_present":32.998,"worker_busy_pct":{"queue worker 0x0":96.654},"phase_totals_ms":{"Driver.Completion":1.309,"Driver.Dispatch":659.774,"Driver.Dispatch.capture_resources":16.858,"Driver.Dispatch.decode_key_device_setup":10.155,"Driver.Dispatch.lookup_cache":11.526,"Driver.Dispatch.materialize":2.792,"Driver.Dispatch.prepared_invocation":2.602,"Driver.Draw":10167.079,"Driver.Draw.device_setup":790.065,"Driver.Draw.draw_enqueued":2215.505,"Driver.Draw.post_compile_prepare":123.408,"Driver.Draw.prepare":1228.192,"Driver.Draw.shader_compile_and_link":5546.37,"Driver.EndSubmission":13.19,"Driver.Packet":14484.107,"Driver.Packet.device_lock":166.261,"Driver.Packet.dispatch":1793.722,"Driver.Packet.draw":10370.89,"Driver.Packet.execute":382.236,"Driver.Packet.flip_flush":8.336,"Driver.Packet.flush_between_packets":474.286,"Driver.Packet.memory_wait":0.005,"Driver.Packet.pipeline_drain":349.885,"Driver.Packet.pipeline_prepare":272.686,"Driver.Packet.prepare_memory":263.345,"Driver.Packet.rendering_wait":0.284,"Driver.Present":2906.745,"Driver.Present.acquire_image":2.973,"Driver.Present.device_setup":0.276,"Driver.Present.gpu_mutex_wait":53.709,"Driver.Present.inflight_wait":0.598,"Driver.Present.present_display_buffer":42.932,"Driver.Present.queue_present":108.993,"Driver.Present.release_and_callback":0.941,"Driver.Present.render_fence_wait":2695.476,"Driver.Present.resize":0.553,"Driver.Present.validate":0.08,"Driver.Suspend":0.05,"GpuMutex.wait.dispatch":0.133,"GpuMutex.wait.draw":33.152,"GpuMutex.wait.end":0.749,"GpuMutex.wait.fill":19.771,"GpuMutex.wait.flush":2.434,"GpuMutex.wait.label":3.787,"GpuMutex.wait.other":5.205,"GpuMutex.wait.present":52.947,"GpuMutex.wait.wait":2.224,"Graphics.Draw":9705.799,"Graphics.Draw.draw_and_resource_release":7544.336,"Graphics.Draw.index_upload":588.619,"Graphics.Draw.validate":740.374,"Graphics.Draw.vertex_upload":661.552,"Graphics.DrawWithRecipe":104.27,"Graphics.DrawWithRecipe.draw_and_resource_release":101.106,"Graphics.DrawWithRecipe.index_upload":0.262,"Graphics.DrawWithRecipe.validate":1.5,"Graphics.DrawWithRecipe.vertex_upload":0.735,"Recorder.Reap":119.31,"Recorder.Submit":304.449,"Recorder.WaitSerial":2872.018,"Resources.Complete":63.812,"Resources.Prepare":110.234,"Shader.DrawStage":3555.825,"Shader.DrawStage.capture_resources":1655.746,"Shader.DrawStage.materialize":902.539,"Shader.DrawStage.prepared_invocation":909.355,"Shader.ResolveAbi":152.02,"Shader.ResolveGraphicsAbi":55.455,"Shader.ResolveGraphicsStagesAbi":145.835,"VideoOut.Flip":2946.925,"VideoOut.Flip.completion_mutex_wait":0.65,"VideoOut.Flip.config_mutex_wait":0.028,"VideoOut.Flip.frame_limit":0.247,"VideoOut.Flip.notify_game":25.395,"VideoOut.Flip.present":2897.986,"VideoOut.Flip.validate":0.397,"VideoOut.Flip.vblank_wait":0.185,"VideoOut.Flip.window_prepare":0.631,"VideoOut.Flip.window_title":21.034,"VideoOut.Readiness":1.03,"VideoOut.Readiness.locks_validate":0.405,"Vulkan.Acquire":2.707,"Vulkan.Acquire.acquire_fence_wait":0.432,"Vulkan.Acquire.acquire_image":1.47,"Vulkan.Acquire.fence_reset":0.53,"Vulkan.Acquire.retired_swapchains":0.163,"Vulkan.Dispatch":219.669,"Vulkan.Dispatch.command_record":96.875,"Vulkan.Dispatch.shader_resources":121.617,"Vulkan.DispatchRecipe":0.819,"Vulkan.DispatchRecipe.command_record":0.818,"Vulkan.DrawFromRecipe":105.93,"Vulkan.Present":22.659,"Vulkan.Present.command_record_scale":7.756,"Vulkan.Present.pixel_upload":5.575,"Vulkan.Present.queue_submit":8.982,"Vulkan.QueuePresent":107.755,"Vulkan.QueuePresent.queue_present":107.045,"Vulkan.Retire":2695.058,"Vulkan.Retire.wait":2689.398},"top_phases_ms_per_frame":{"Driver.Packet":57.024,"Driver.Packet.draw":40.83,"Driver.Draw":40.028,"Graphics.Draw":38.212,"Graphics.Draw.draw_and_resource_release":29.702,"Driver.Draw.shader_compile_and_link":21.836,"Shader.DrawStage":13.999,"VideoOut.Flip":11.602},"owned_draw_counts":{"OwnedDraw.evicted_other":23363},"graphics_track":{"Graphics.Barrier.copy":2540,"Graphics.Barrier.dispatch-lead":1319,"Graphics.Barrier.dispatch-trail":2797,"Graphics.Barrier.draw":39162,"Graphics.Barrier.fill-clear":2540,"Graphics.Barrier.label-run":18635,"Graphics.Barrier.present-blit":508,"Graphics.Barrier.shadow-publish":510,"Graphics.Barrier.staging-in":2566,"Graphics.Barrier.staging-out":508,"Graphics.Barrier.storage-upload":29982,"Graphics.Barrier.storage-writeback":3338,"Graphics.BarrierMerged.dispatch-lead":1478,"Graphics.BarrierMerged.label-run":11,"Graphics.BarrierMerged.shadow-publish":510,"Graphics.BarrierMerged.staging-in":486,"Graphics.BarrierMerged.staging-out":508,"Graphics.BarrierMerged.storage-writeback":740,"Graphics.Copy":1780,"Graphics.Copy.bytes":16300800,"Graphics.RenderPass":19008,"Graphics.RenderPass.Close.command":11878,"Graphics.RenderPass.Close.image":505,"Graphics.RenderPass.Close.key":1338,"Graphics.RenderPass.Close.label":11,"Graphics.RenderPass.Close.new-batch":5276,"Graphics.RenderPass.Continued":479087},"trace_dropped":true,"trace_dropped_threads":{"queue worker 0x0":{"events_full_after_s":6.061,"events_lost":383854,"totals_full":false},"draw committer":{"events_full_after_s":14.81,"events_lost":3497,"totals_full":false}},"trace":"aps5-trace-f0c9b11f91cc-84288.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.

  • queue worker 0x0: 383854 events lost; buffer full at 6061.1 ms
  • draw committer: 3497 events lost; buffer full at 14810.4 ms

Slowest frames (largest slices inside each, inclusive)

  • present 5121: 70.6 ms at 0 ms: Driver.Packet (queue worker 0x0) 43.1, Graphics.Draw (draw committer) 31.9, batch (gpu) 31.7, Driver.Packet.draw (queue worker 0x0) 29.7
  • present 5214: 66.2 ms at 5480 ms: Driver.Packet (queue worker 0x0) 42.0, batch (gpu) 33.5, Driver.Packet.draw (queue worker 0x0) 31.6, Driver.Draw (queue worker 0x0) 30.4
  • present 5232: 66.0 ms at 6555 ms: batch (gpu) 37.5, Graphics.Draw (draw committer) 28.1, Graphics.Draw.draw_and_resource_release (draw committer) 20.0, VideoOut.Flip (presenter) 12.8
  • present 5349: 65.7 ms at 13471 ms: batch (gpu) 33.7, Graphics.Draw (draw committer) 28.1, Graphics.Draw.draw_and_resource_release (draw committer) 21.7, VideoOut.Flip (presenter) 12.0
  • present 5281: 65.5 ms at 9470 ms: batch (gpu) 34.7, Graphics.Draw (draw committer) 26.6, Graphics.Draw.draw_and_resource_release (draw committer) 21.0, VideoOut.Flip (presenter) 12.4

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

  • present 5121: 70.6 ms at 0 ms, persistence 14.3 ms
  • present 5214: 66.2 ms at 5480 ms, persistence 9.9 ms
  • present 5349: 65.7 ms at 13471 ms, persistence 8.8 ms
  • present 5281: 65.5 ms at 9470 ms, persistence 8.4 ms
  • present 5232: 66.0 ms at 6555 ms, persistence 8.3 ms
  • present 5180: 65.0 ms at 3477 ms, persistence 8.3 ms
  • present 5146: 64.7 ms at 1483 ms, persistence 8.1 ms
  • present 5332: 65.5 ms at 12471 ms, persistence 8.0 ms
  • present 5315: 65.0 ms at 11474 ms, persistence 7.9 ms
  • present 5298: 64.4 ms at 10474 ms, persistence 7.2 ms

Threads (ms per frame)

thread busy wait untraced in slices < 20 us largest
title 0.1 (0 %) 11.3 (19 %) 47.6 0.4 Shader.ResolveGraphicsStagesAbi 0.0, Shader.ResolveAbi 0.0
queue worker 0x0 13.0 (22 %) 0.0 (0 %) 46.0 50.0 Driver.Packet 13.0, Driver.EndSubmission 0.0
draw committer 24.6 (42 %) 0.2 (0 %) 34.2 37.4 Graphics.Draw 23.1, Recorder.Submit 1.0
title 0.0 (0 %) 0.0 (0 %) 59.0 0.0 Shader.ResolveAbi 0.0, Shader.ResolveGraphicsStagesAbi 0.0
title 0.0 (0 %) 0.0 (0 %) 59.0 0.0 Shader.ResolveAbi 0.0, Shader.ResolveGraphicsStagesAbi 0.0
title 0.0 (0 %) 0.0 (0 %) 59.0 0.0 Shader.ResolveAbi 0.0, Shader.ResolveGraphicsStagesAbi 0.0
title 0.0 (0 %) 0.0 (0 %) 59.0 0.1 Shader.ResolveAbi 0.0, Shader.ResolveGraphicsStagesAbi 0.0
presenter 0.8 (1 %) 10.8 (18 %) 47.4 0.0 VideoOut.Flip 11.6, Driver.Present 0.0
title 0.0 (0 %) 0.0 (0 %) 59.0 0.0 Shader.ResolveAbi 0.0, Shader.ResolveGraphicsStagesAbi 0.0
title 0.0 (0 %) 0.0 (0 %) 59.0 0.0 Shader.ResolveAbi 0.0, Shader.ResolveGraphicsStagesAbi 0.0
title 0.0 (0 %) 0.0 (0 %) 59.0 0.0 Shader.ResolveAbi 0.0, Shader.ResolveGraphicsStagesAbi 0.0
title 0.0 (0 %) 0.0 (0 %) 59.0 0.0 Shader.ResolveAbi 0.0, Shader.ResolveGraphicsStagesAbi 0.0
title 0.0 (0 %) 0.0 (0 %) 59.0 0.0 Shader.ResolveAbi 0.0, Shader.ResolveGraphicsStagesAbi 0.0
title 0.0 (0 %) 0.0 (0 %) 59.0 0.0 Shader.ResolveAbi 0.0, Shader.ResolveGraphicsStagesAbi 0.0
title 0.0 (0 %) 0.0 (0 %) 59.0 0.0 Shader.ResolveAbi 0.0, Shader.ResolveGraphicsStagesAbi 0.0
title 0.0 (0 %) 0.0 (0 %) 59.0 0.0 Shader.ResolveAbi 0.0, Shader.ResolveGraphicsStagesAbi 0.0
gpu 33.0 (56 %) 0.0 (0 %) 26.1 0.0 batch 33.0

Largest slices (ms per frame, inclusive, all threads): batch 33.0, Graphics.Draw 23.1, Graphics.Draw.draw_and_resource_release 14.3, Driver.Packet 13.0, VideoOut.Flip 11.6, Driver.Present 11.4, VideoOut.Flip.present 11.4, Recorder.WaitSerial 11.3, Driver.Present.render_fence_wait 10.6, Vulkan.Retire 10.6

Longest waits

  • Recorder.WaitSerial (title) 12.7 ms at 4894 ms, present 5204
  • Recorder.WaitSerial (title) 12.7 ms at 5009 ms, present 5205
  • Recorder.WaitSerial (title) 12.5 ms at 1078 ms, present 5139
  • Recorder.WaitSerial (title) 12.5 ms at 3477 ms, present 5180
  • Recorder.WaitSerial (title) 12.5 ms at 6555 ms, present 5231
  • Recorder.WaitSerial (title) 12.4 ms at 6074 ms, present 5223
  • Recorder.WaitSerial (title) 12.4 ms at 4778 ms, present 5201
  • Recorder.WaitSerial (title) 12.4 ms at 4602 ms, present 5199
  • Recorder.WaitSerial (title) 12.4 ms at 10359 ms, present 5296
  • Recorder.WaitSerial (title) 12.4 ms at 5957 ms, present 5221

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

  • batch 60: 9.4 ms at 122 ms, present 5122: GPU no ranges; recorded by Driver.Packet (queue worker 0x0) 9.3, Driver.Packet.dispatch (queue worker 0x0) 4.8, Driver.Packet.draw (queue worker 0x0) 3.3, Driver.Draw (queue worker 0x0) 3.2
  • batch 7772: 9.3 ms at 12528 ms, present 5332: GPU no ranges; recorded by Graphics.Draw (draw committer) 0.5, Graphics.Draw.draw_and_resource_release (draw committer) 0.5, Resources.Complete (draw committer) 0.1
  • batch 8690: 9.3 ms at 13997 ms, present 5357: GPU no ranges; recorded by Graphics.Draw (draw committer) 0.5, Graphics.Draw.draw_and_resource_release (draw committer) 0.5, Resources.Complete (draw committer) 0.1
  • batch 8833: 9.2 ms at 14229 ms, present 5361: GPU no ranges; recorded by Graphics.Draw (draw committer) 0.4, Graphics.Draw.draw_and_resource_release (draw committer) 0.4, Resources.Complete (draw committer) 0.1
  • batch 4569: 9.2 ms at 7378 ms, present 5245: GPU no ranges; recorded by Graphics.Draw (draw committer) 0.5, Graphics.Draw.draw_and_resource_release (draw committer) 0.5, Resources.Complete (draw committer) 0.1
Digest of this PR `4a2c126ca7`, run 1

seconds 200:15 from present 5146: 258 presents, frame p50 57.7 / p90 61.2 / p99 66.1 / max 69.9 ms, GPU busy 32.9 ms per present
NVIDIA GeForce RTX 2080 Ti, NVIDIA 617.14, Windows 10.0.26300, 3840x2160, commit 4a2c126ca7, dropped: yes

{"commit":"4a2c126ca7a9","dirty":false,"env":{"APS5_TRACE_DIR":"<path>","APS5_TRACE_SECONDS":"200:15"},"gpu":"NVIDIA GeForce RTX 2080 Ti","driver":"NVIDIA 617.14","os":"Windows 10.0.26300","cpu":"Intel(R) Core(TM) i9-9900K CPU @ 3.60GHz","cpu_threads":16,"memory_mib":32700,"title_id":"PPSA05324","title":"Sonic Origins","content_version":"02.002.000","resolution":"3840x2160","window":{"spec":"seconds 200:15","first_present":5146,"ms":15032.523},"presents":258,"frame_ms":{"p50":57.69,"p90":61.178,"p99":66.095,"max":69.921},"gpu_busy_ms_per_present":32.94,"worker_busy_pct":{"queue worker 0x0":96.603},"phase_totals_ms":{"Driver.Completion":2.1,"Driver.Dispatch":669.01,"Driver.Dispatch.capture_resources":15.68,"Driver.Dispatch.decode_key_device_setup":10.127,"Driver.Dispatch.lookup_cache":11.939,"Driver.Dispatch.materialize":2.694,"Driver.Dispatch.prepared_invocation":2.486,"Driver.Draw":10148.644,"Driver.Draw.device_setup":799.031,"Driver.Draw.draw_enqueued":2175.515,"Driver.Draw.post_compile_prepare":115.055,"Driver.Draw.prepare":1226.169,"Driver.Draw.shader_compile_and_link":5572.625,"Driver.EndSubmission":16.385,"Driver.Packet":14503.383,"Driver.Packet.device_lock":169.554,"Driver.Packet.dispatch":1801.892,"Driver.Packet.draw":10365.316,"Driver.Packet.execute":381.852,"Driver.Packet.flip_flush":7.394,"Driver.Packet.flush_between_packets":471.374,"Driver.Packet.memory_wait":0.026,"Driver.Packet.pipeline_drain":346.218,"Driver.Packet.pipeline_prepare":278.092,"Driver.Packet.prepare_memory":278.292,"Driver.Packet.rendering_wait":0.291,"Driver.Present":2972.961,"Driver.Present.acquire_image":3.241,"Driver.Present.device_setup":0.217,"Driver.Present.gpu_mutex_wait":49.369,"Driver.Present.inflight_wait":0.741,"Driver.Present.present_display_buffer":44.253,"Driver.Present.queue_present":105.464,"Driver.Present.release_and_callback":0.801,"Driver.Present.render_fence_wait":2767.995,"Driver.Present.resize":0.488,"Driver.Present.validate":0.076,"Driver.Suspend":0.053,"GpuMutex.wait.dispatch":0.137,"GpuMutex.wait.draw":34.391,"GpuMutex.wait.end":0.647,"GpuMutex.wait.fill":21.483,"GpuMutex.wait.flush":1.893,"GpuMutex.wait.label":2.398,"GpuMutex.wait.other":4.941,"GpuMutex.wait.present":48.528,"GpuMutex.wait.wait":1.489,"Graphics.Draw":9899.812,"Graphics.Draw.draw_and_resource_release":7675.24,"Graphics.Draw.index_upload":620.681,"Graphics.Draw.validate":735.455,"Graphics.Draw.vertex_upload":688.061,"Graphics.DrawWithRecipe":79.594,"Graphics.DrawWithRecipe.draw_and_resource_release":76.793,"Graphics.DrawWithRecipe.index_upload":0.253,"Graphics.DrawWithRecipe.validate":1.248,"Graphics.DrawWithRecipe.vertex_upload":0.581,"Recorder.Reap":81.248,"Recorder.Submit":288.718,"Recorder.WaitSerial":2935.124,"Resources.Complete":60.668,"Resources.Prepare":112.436,"Shader.DrawStage":3485.718,"Shader.DrawStage.capture_resources":1676.249,"Shader.DrawStage.materialize":830.319,"Shader.DrawStage.prepared_invocation":890.133,"Shader.ResolveAbi":154.274,"Shader.ResolveGraphicsAbi":55.904,"Shader.ResolveGraphicsStagesAbi":147.464,"VideoOut.Flip":3016.682,"VideoOut.Flip.completion_mutex_wait":0.772,"VideoOut.Flip.config_mutex_wait":0.066,"VideoOut.Flip.frame_limit":0.161,"VideoOut.Flip.notify_game":27.891,"VideoOut.Flip.present":2963.577,"VideoOut.Flip.validate":0.308,"VideoOut.Flip.vblank_wait":0.187,"VideoOut.Flip.window_prepare":0.391,"VideoOut.Flip.window_title":22.988,"VideoOut.Readiness":0.881,"VideoOut.Readiness.locks_validate":0.295,"Vulkan.Acquire":2.942,"Vulkan.Acquire.acquire_fence_wait":0.508,"Vulkan.Acquire.acquire_image":1.587,"Vulkan.Acquire.fence_reset":0.608,"Vulkan.Acquire.retired_swapchains":0.148,"Vulkan.Dispatch":224.312,"Vulkan.Dispatch.command_record":98.312,"Vulkan.Dispatch.shader_resources":124.78,"Vulkan.DrawFromRecipe":81.022,"Vulkan.Present":23.826,"Vulkan.Present.command_record_scale":8.139,"Vulkan.Present.pixel_upload":5.39,"Vulkan.Present.queue_submit":9.937,"Vulkan.QueuePresent":104.027,"Vulkan.QueuePresent.queue_present":103.359,"Vulkan.Retire":2767.662,"Vulkan.Retire.wait":2761.946},"top_phases_ms_per_frame":{"Driver.Packet":56.215,"Driver.Packet.draw":40.176,"Driver.Draw":39.336,"Graphics.Draw":38.371,"Graphics.Draw.draw_and_resource_release":29.749,"Driver.Draw.shader_compile_and_link":21.599,"Shader.DrawStage":13.511,"VideoOut.Flip":11.693},"owned_draw_counts":{"OwnedDraw.evicted_other":23626},"graphics_track":{"Graphics.Barrier.copy":2580,"Graphics.Barrier.dispatch-lead":1345,"Graphics.Barrier.dispatch-trail":2841,"Graphics.Barrier.draw":39806,"Graphics.Barrier.fill-clear":2580,"Graphics.Barrier.label-run":18974,"Graphics.Barrier.present-blit":516,"Graphics.Barrier.shadow-publish":518,"Graphics.Barrier.staging-in":2598,"Graphics.Barrier.staging-out":516,"Graphics.Barrier.storage-upload":30454,"Graphics.Barrier.storage-writeback":3393,"Graphics.BarrierMerged.dispatch-lead":1496,"Graphics.BarrierMerged.label-run":6,"Graphics.BarrierMerged.shadow-publish":518,"Graphics.BarrierMerged.staging-in":502,"Graphics.BarrierMerged.staging-out":516,"Graphics.BarrierMerged.storage-writeback":749,"Graphics.Copy":1808,"Graphics.Copy.bytes":16557504,"Graphics.RenderPass":19312,"Graphics.RenderPass.Close.command":12040,"Graphics.RenderPass.Close.image":513,"Graphics.RenderPass.Close.key":1352,"Graphics.RenderPass.Close.label":6,"Graphics.RenderPass.Close.new-batch":5402,"Graphics.RenderPass.Continued":486626},"trace_dropped":true,"trace_dropped_threads":{"queue worker 0x0":{"events_full_after_s":6.226,"events_lost":377128,"totals_full":false},"draw committer":{"events_full_after_s":13.904,"events_lost":21735,"totals_full":false}},"trace":"aps5-trace-4a2c126ca7a9-71740.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.

  • queue worker 0x0: 377128 events lost; buffer full at 6225.8 ms
  • draw committer: 21735 events lost; buffer full at 13904.0 ms

Slowest frames (largest slices inside each, inclusive)

  • present 5154: 69.9 ms at 468 ms: Driver.Packet (queue worker 0x0) 43.8, Graphics.Draw (draw committer) 36.9, batch (gpu) 33.4, Driver.Packet.draw (queue worker 0x0) 32.6
  • present 5176: 67.2 ms at 1769 ms: Driver.Packet (queue worker 0x0) 39.6, batch (gpu) 36.3, Driver.Packet.draw (queue worker 0x0) 28.9, Graphics.Draw (draw committer) 28.8
  • present 5391: 66.1 ms at 14266 ms: batch (gpu) 34.0, VideoOut.Flip (presenter) 12.1, VideoOut.Flip.present (presenter) 11.9, Driver.Present (presenter) 11.9
  • present 5400: 65.1 ms at 14794 ms: batch (gpu) 32.7, VideoOut.Flip (presenter) 11.8, VideoOut.Flip.present (presenter) 11.6, Driver.Present (presenter) 11.6
  • present 5245: 64.8 ms at 5778 ms: Driver.Packet (queue worker 0x0) 38.9, batch (gpu) 34.3, Driver.Packet.draw (queue worker 0x0) 29.0, Driver.Draw (queue worker 0x0) 28.1

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

  • present 5154: 69.9 ms at 468 ms, persistence 14.4 ms
  • present 5176: 67.2 ms at 1769 ms, persistence 11.0 ms
  • present 5391: 66.1 ms at 14266 ms, persistence 10.6 ms
  • present 5245: 64.8 ms at 5778 ms, persistence 9.2 ms
  • present 5400: 65.1 ms at 14794 ms, persistence 8.4 ms
  • present 5366: 64.5 ms at 12798 ms, persistence 8.3 ms
  • present 5290: 64.6 ms at 8424 ms, persistence 8.0 ms
  • present 5378: 64.1 ms at 13498 ms, persistence 7.7 ms
  • present 5348: 63.1 ms at 11767 ms, persistence 7.5 ms
  • present 5228: 63.9 ms at 4783 ms, persistence 7.4 ms

Threads (ms per frame)

thread busy wait untraced in slices < 20 us largest
title 0.1 (0 %) 11.4 (20 %) 46.8 0.4 Shader.ResolveGraphicsStagesAbi 0.0, Shader.ResolveAbi 0.0
queue worker 0x0 13.0 (22 %) 0.0 (0 %) 45.3 50.8 Driver.Packet 12.9, Driver.EndSubmission 0.0
draw committer 23.1 (40 %) 0.2 (0 %) 34.9 33.7 Graphics.Draw 21.9, Recorder.Submit 0.8
title 0.0 (0 %) 0.0 (0 %) 58.2 0.0 Shader.ResolveAbi 0.0, Shader.ResolveGraphicsStagesAbi 0.0
title 0.0 (0 %) 0.0 (0 %) 58.2 0.0 Shader.ResolveAbi 0.0, Shader.ResolveGraphicsAbi 0.0
title 0.0 (0 %) 0.0 (0 %) 58.2 0.0 Shader.ResolveAbi 0.0, Shader.ResolveGraphicsStagesAbi 0.0
title 0.0 (0 %) 0.0 (0 %) 58.2 0.0 Shader.ResolveAbi 0.0, Shader.ResolveGraphicsStagesAbi 0.0
presenter 0.8 (1 %) 10.9 (19 %) 46.5 0.0 VideoOut.Flip 11.7, Driver.Present 0.0
title 0.0 (0 %) 0.0 (0 %) 58.2 0.0 Shader.ResolveAbi 0.0, Shader.ResolveGraphicsStagesAbi 0.0
title 0.0 (0 %) 0.0 (0 %) 58.2 0.0 Shader.ResolveAbi 0.0, Shader.ResolveGraphicsStagesAbi 0.0
title 0.0 (0 %) 0.0 (0 %) 58.2 0.0 Shader.ResolveAbi 0.0, Shader.ResolveGraphicsStagesAbi 0.0
title 0.0 (0 %) 0.0 (0 %) 58.2 0.0 Shader.ResolveAbi 0.0, Shader.ResolveGraphicsStagesAbi 0.0
title 0.0 (0 %) 0.0 (0 %) 58.2 0.0 Shader.ResolveAbi 0.0, Shader.ResolveGraphicsStagesAbi 0.0
title 0.0 (0 %) 0.0 (0 %) 58.2 0.0 Shader.ResolveAbi 0.0, Shader.ResolveGraphicsStagesAbi 0.0
title 0.0 (0 %) 0.0 (0 %) 58.2 0.0 Shader.ResolveAbi 0.0, Shader.ResolveGraphicsStagesAbi 0.0
title 0.0 (0 %) 0.0 (0 %) 58.2 0.1 Shader.ResolveAbi 0.0, Shader.ResolveGraphicsStagesAbi 0.0
gpu 33.0 (57 %) 0.0 (0 %) 25.2 0.0 batch 33.0

Largest slices (ms per frame, inclusive, all threads): batch 33.0, Graphics.Draw 21.9, Graphics.Draw.draw_and_resource_release 14.5, Driver.Packet 12.9, VideoOut.Flip 11.7, Driver.Present 11.5, VideoOut.Flip.present 11.5, Recorder.WaitSerial 11.4, Driver.Present.render_fence_wait 10.7, Vulkan.Retire 10.7

Longest waits

  • Recorder.WaitSerial (title) 12.8 ms at 1594 ms, present 5173
  • Recorder.WaitSerial (title) 12.7 ms at 10448 ms, present 5324
  • Recorder.WaitSerial (title) 12.7 ms at 6957 ms, present 5264
  • Recorder.WaitSerial (title) 12.7 ms at 1769 ms, present 5176
  • Recorder.WaitSerial (title) 12.7 ms at 3687 ms, present 5208
  • Recorder.WaitSerial (title) 12.6 ms at 1072 ms, present 5163
  • Recorder.WaitSerial (title) 12.6 ms at 1478 ms, present 5171
  • Recorder.WaitSerial (title) 12.5 ms at 4153 ms, present 5216
  • Recorder.WaitSerial (title) 12.5 ms at 6019 ms, present 5248
  • Recorder.WaitSerial (title) 12.5 ms at 6899 ms, present 5263

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

  • batch 939: 9.4 ms at 1529 ms, present 5171: GPU no ranges; recorded by Graphics.Draw (draw committer) 0.5, Graphics.Draw.draw_and_resource_release (draw committer) 0.5, Resources.Complete (draw committer) 0.0
  • batch 2705: 9.3 ms at 4320 ms, present 5219: GPU no ranges; recorded by Graphics.Draw (draw committer) 0.5, Graphics.Draw.draw_and_resource_release (draw committer) 0.5, Resources.Complete (draw committer) 0.0
  • batch 576: 9.3 ms at 948 ms, present 5161: GPU no ranges; recorded by Graphics.Draw (draw committer) 0.5, Graphics.Draw.draw_and_resource_release (draw committer) 0.5, Resources.Complete (draw committer) 0.0
  • batch 1529: 9.2 ms at 2464 ms, present 5187: GPU no ranges; recorded by Graphics.Draw (draw committer) 0.4, Graphics.Draw.draw_and_resource_release (draw committer) 0.4, Resources.Complete (draw committer) 0.0
  • batch 868: 9.2 ms at 1413 ms, present 5169: GPU no ranges; recorded by Graphics.Draw (draw committer) 0.5, Graphics.Draw.draw_and_resource_release (draw committer) 0.5, Resources.Complete (draw committer) 0.0
Digest of this PR `4a2c126ca7`, run 2

seconds 200:15 from present 5139: 258 presents, frame p50 57.8 / p90 60.4 / p99 65.0 / max 67.0 ms, GPU busy 32.7 ms per present
NVIDIA GeForce RTX 2080 Ti, NVIDIA 617.14, Windows 10.0.26300, 3840x2160, commit 4a2c126ca7, dropped: yes

{"commit":"4a2c126ca7a9","dirty":false,"env":{"APS5_TRACE_DIR":"<path>","APS5_TRACE_SECONDS":"200:15"},"gpu":"NVIDIA GeForce RTX 2080 Ti","driver":"NVIDIA 617.14","os":"Windows 10.0.26300","cpu":"Intel(R) Core(TM) i9-9900K CPU @ 3.60GHz","cpu_threads":16,"memory_mib":32700,"title_id":"PPSA05324","title":"Sonic Origins","content_version":"02.002.000","resolution":"3840x2160","window":{"spec":"seconds 200:15","first_present":5139,"ms":15019.062},"presents":258,"frame_ms":{"p50":57.786,"p90":60.435,"p99":64.983,"max":67.003},"gpu_busy_ms_per_present":32.702,"worker_busy_pct":{"queue worker 0x0":96.575},"phase_totals_ms":{"Driver.Completion":1.551,"Driver.Dispatch":669.534,"Driver.Dispatch.capture_resources":16.184,"Driver.Dispatch.decode_key_device_setup":10.509,"Driver.Dispatch.lookup_cache":12.329,"Driver.Dispatch.materialize":2.829,"Driver.Dispatch.prepared_invocation":2.547,"Driver.Draw":10255.788,"Driver.Draw.device_setup":800.942,"Driver.Draw.draw_enqueued":2228.156,"Driver.Draw.post_compile_prepare":117.499,"Driver.Draw.prepare":1233.938,"Driver.Draw.shader_compile_and_link":5614.945,"Driver.EndSubmission":9.636,"Driver.Packet":14493.432,"Driver.Packet.device_lock":166.127,"Driver.Packet.dispatch":1731.977,"Driver.Packet.draw":10470.855,"Driver.Packet.execute":385.27,"Driver.Packet.flip_flush":7.755,"Driver.Packet.flush_between_packets":472.407,"Driver.Packet.memory_wait":0.035,"Driver.Packet.pipeline_drain":338.928,"Driver.Packet.pipeline_prepare":272.924,"Driver.Packet.prepare_memory":270.233,"Driver.Packet.rendering_wait":0.29,"Driver.Present":2944.181,"Driver.Present.acquire_image":3.3,"Driver.Present.device_setup":0.243,"Driver.Present.gpu_mutex_wait":71.762,"Driver.Present.inflight_wait":0.801,"Driver.Present.present_display_buffer":43.129,"Driver.Present.queue_present":111.43,"Driver.Present.release_and_callback":0.635,"Driver.Present.render_fence_wait":2712.055,"Driver.Present.resize":0.462,"Driver.Present.validate":0.103,"Driver.Suspend":0.05,"GpuMutex.wait.dispatch":0.065,"GpuMutex.wait.draw":26.736,"GpuMutex.wait.end":0.69,"GpuMutex.wait.fill":24.707,"GpuMutex.wait.flush":3.669,"GpuMutex.wait.label":2.638,"GpuMutex.wait.other":2.589,"GpuMutex.wait.present":71.014,"GpuMutex.wait.wait":2.054,"Graphics.Draw":9694.756,"Graphics.Draw.draw_and_resource_release":7491.699,"Graphics.Draw.index_upload":605.016,"Graphics.Draw.validate":749.248,"Graphics.Draw.vertex_upload":677.67,"Graphics.DrawWithRecipe":102.621,"Graphics.DrawWithRecipe.draw_and_resource_release":97.832,"Graphics.DrawWithRecipe.index_upload":0.273,"Graphics.DrawWithRecipe.validate":1.637,"Graphics.DrawWithRecipe.vertex_upload":0.775,"Recorder.Reap":77.705,"Recorder.Submit":285.602,"Recorder.WaitSerial":2904.981,"Resources.Complete":60.347,"Resources.Prepare":112.258,"Shader.DrawStage":3569.501,"Shader.DrawStage.capture_resources":1678.91,"Shader.DrawStage.materialize":883.913,"Shader.DrawStage.prepared_invocation":916.328,"Shader.ResolveAbi":154.027,"Shader.ResolveGraphicsAbi":56.574,"Shader.ResolveGraphicsStagesAbi":145.15,"VideoOut.Flip":2981.969,"VideoOut.Flip.completion_mutex_wait":0.674,"VideoOut.Flip.config_mutex_wait":0.031,"VideoOut.Flip.frame_limit":0.193,"VideoOut.Flip.notify_game":24.695,"VideoOut.Flip.present":2933.814,"VideoOut.Flip.validate":0.359,"VideoOut.Flip.vblank_wait":0.181,"VideoOut.Flip.window_prepare":0.419,"VideoOut.Flip.window_title":21.236,"VideoOut.Readiness":1.059,"VideoOut.Readiness.locks_validate":0.544,"Vulkan.Acquire":3.02,"Vulkan.Acquire.acquire_fence_wait":0.488,"Vulkan.Acquire.acquire_image":1.676,"Vulkan.Acquire.fence_reset":0.61,"Vulkan.Acquire.retired_swapchains":0.129,"Vulkan.Dispatch":222.594,"Vulkan.Dispatch.command_record":96.893,"Vulkan.Dispatch.shader_resources":124.317,"Vulkan.DispatchRecipe":0.814,"Vulkan.DispatchRecipe.command_record":0.81,"Vulkan.DrawFromRecipe":104.356,"Vulkan.Present":22.929,"Vulkan.Present.command_record_scale":7.771,"Vulkan.Present.pixel_upload":5.812,"Vulkan.Present.queue_submit":9.029,"Vulkan.QueuePresent":110.063,"Vulkan.QueuePresent.queue_present":109.246,"Vulkan.Retire":2711.832,"Vulkan.Retire.wait":2707.114},"top_phases_ms_per_frame":{"Driver.Packet":56.176,"Driver.Packet.draw":40.585,"Driver.Draw":39.751,"Graphics.Draw":37.577,"Graphics.Draw.draw_and_resource_release":29.038,"Driver.Draw.shader_compile_and_link":21.763,"Shader.DrawStage":13.835,"VideoOut.Flip":11.558},"owned_draw_counts":{"OwnedDraw.evicted_other":24007},"graphics_track":{"Graphics.Barrier.copy":2580,"Graphics.Barrier.dispatch-lead":1325,"Graphics.Barrier.dispatch-trail":2841,"Graphics.Barrier.draw":39819,"Graphics.Barrier.fill-clear":2580,"Graphics.Barrier.label-run":18991,"Graphics.Barrier.present-blit":516,"Graphics.Barrier.shadow-publish":518,"Graphics.Barrier.staging-in":2625,"Graphics.Barrier.staging-out":516,"Graphics.Barrier.storage-upload":30454,"Graphics.Barrier.storage-writeback":3411,"Graphics.BarrierMerged.dispatch-lead":1516,"Graphics.BarrierMerged.label-run":13,"Graphics.BarrierMerged.shadow-publish":518,"Graphics.BarrierMerged.staging-in":475,"Graphics.BarrierMerged.staging-out":516,"Graphics.BarrierMerged.storage-writeback":731,"Graphics.Copy":1808,"Graphics.Copy.bytes":16557504,"Graphics.RenderPass":19346,"Graphics.RenderPass.Close.command":12035,"Graphics.RenderPass.Close.image":512,"Graphics.RenderPass.Close.key":1382,"Graphics.RenderPass.Close.label":13,"Graphics.RenderPass.Close.new-batch":5404,"Graphics.RenderPass.Continued":486593},"trace_dropped":true,"trace_dropped_threads":{"queue worker 0x0":{"events_full_after_s":6.111,"events_lost":383951,"totals_full":false}},"trace":"aps5-trace-4a2c126ca7a9-95848.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.

  • queue worker 0x0: 383951 events lost; buffer full at 6111.0 ms

Slowest frames (largest slices inside each, inclusive)

  • present 5340: 67.0 ms at 11699 ms: batch (gpu) 31.6, Graphics.Draw (draw committer) 24.5, Graphics.Draw.draw_and_resource_release (draw committer) 14.8, VideoOut.Flip (presenter) 10.1
  • present 5310: 65.3 ms at 9958 ms: batch (gpu) 33.2, Graphics.Draw (draw committer) 26.1, Graphics.Draw.draw_and_resource_release (draw committer) 16.2, VideoOut.Flip (presenter) 11.7
  • present 5344: 65.0 ms at 11937 ms: batch (gpu) 33.5, Graphics.Draw (draw committer) 27.8, Graphics.Draw.draw_and_resource_release (draw committer) 21.4, VideoOut.Flip (presenter) 11.8
  • present 5172: 64.8 ms at 1921 ms: Driver.Packet (queue worker 0x0) 38.0, batch (gpu) 37.8, Graphics.Draw (draw committer) 26.8, Driver.Packet.draw (queue worker 0x0) 26.3
  • present 5224: 64.8 ms at 4936 ms: Driver.Packet (queue worker 0x0) 37.6, batch (gpu) 34.5, Graphics.Draw (draw committer) 28.1, Driver.Packet.draw (queue worker 0x0) 27.8

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

  • present 5340: 67.0 ms at 11699 ms, persistence 12.2 ms
  • present 5310: 65.3 ms at 9958 ms, persistence 10.5 ms
  • present 5172: 64.8 ms at 1921 ms, persistence 9.9 ms
  • present 5224: 64.8 ms at 4936 ms, persistence 9.0 ms
  • present 5344: 65.0 ms at 11937 ms, persistence 8.9 ms
  • present 5379: 64.5 ms at 13967 ms, persistence 8.7 ms
  • present 5276: 64.6 ms at 7965 ms, persistence 8.1 ms
  • present 5253: 63.9 ms at 6621 ms, persistence 7.8 ms
  • present 5293: 64.2 ms at 8964 ms, persistence 7.4 ms
  • present 5190: 62.8 ms at 2965 ms, persistence 7.3 ms

Threads (ms per frame)

thread busy wait untraced in slices < 20 us largest
title 0.1 (0 %) 11.3 (19 %) 46.9 0.4 Shader.ResolveGraphicsStagesAbi 0.0, Shader.ResolveAbi 0.0
queue worker 0x0 12.8 (22 %) 0.0 (0 %) 45.4 50.4 Driver.Packet 12.8, Driver.EndSubmission 0.0
draw committer 24.1 (41 %) 0.2 (0 %) 33.9 38.2 Graphics.Draw 22.7, Recorder.Submit 0.9
title 0.0 (0 %) 0.0 (0 %) 58.2 0.0 Shader.ResolveAbi 0.0, Shader.ResolveGraphicsStagesAbi 0.0
title 0.0 (0 %) 0.0 (0 %) 58.2 0.0 Shader.ResolveAbi 0.0, Shader.ResolveGraphicsStagesAbi 0.0
title 0.0 (0 %) 0.0 (0 %) 58.2 0.0 Shader.ResolveAbi 0.0, Shader.ResolveGraphicsStagesAbi 0.0
presenter 0.8 (1 %) 10.8 (19 %) 46.6 0.0 VideoOut.Flip 11.6, Driver.Present 0.0
title 0.0 (0 %) 0.0 (0 %) 58.2 0.0 Shader.ResolveAbi 0.0, Shader.ResolveGraphicsAbi 0.0
title 0.0 (0 %) 0.0 (0 %) 58.2 0.0 Shader.ResolveAbi 0.0, Shader.ResolveGraphicsStagesAbi 0.0
title 0.0 (0 %) 0.0 (0 %) 58.2 0.0 Shader.ResolveAbi 0.0, Shader.ResolveGraphicsAbi 0.0
title 0.0 (0 %) 0.0 (0 %) 58.2 0.1 Shader.ResolveAbi 0.0, Shader.ResolveGraphicsStagesAbi 0.0
title 0.0 (0 %) 0.0 (0 %) 58.2 0.0 Shader.ResolveAbi 0.0, Shader.ResolveGraphicsAbi 0.0
title 0.0 (0 %) 0.0 (0 %) 58.2 0.0 Shader.ResolveAbi 0.0, Shader.ResolveGraphicsStagesAbi 0.0
title 0.0 (0 %) 0.0 (0 %) 58.2 0.0 Shader.ResolveAbi 0.0, Shader.ResolveGraphicsAbi 0.0
title 0.0 (0 %) 0.0 (0 %) 58.2 0.0 Shader.ResolveAbi 0.0, Shader.ResolveGraphicsStagesAbi 0.0
title 0.0 (0 %) 0.0 (0 %) 58.2 0.1 Shader.ResolveAbi 0.0, Shader.ResolveGraphicsStagesAbi 0.0
gpu 32.7 (56 %) 0.0 (0 %) 25.5 0.0 batch 32.7

Largest slices (ms per frame, inclusive, all threads): batch 32.7, Graphics.Draw 22.7, Graphics.Draw.draw_and_resource_release 13.4, Driver.Packet 12.8, VideoOut.Flip 11.6, Driver.Present 11.4, VideoOut.Flip.present 11.4, Recorder.WaitSerial 11.3, Driver.Present.render_fence_wait 10.5, Vulkan.Retire 10.5

The lists of longest waits and largest GPU batches are left out of this run to fit the description; tools/trace_digest.py prints them from the attached trace.

Digest of main `f0c9b11f91`, run 2

seconds 200:15 from present 5096: 255 presents, frame p50 58.4 / p90 61.9 / p99 67.2 / max 69.8 ms, GPU busy 33.5 ms per present
NVIDIA GeForce RTX 2080 Ti, NVIDIA 617.14, Windows 10.0.26300, 3840x2160, commit f0c9b11f91, dropped: yes

{"commit":"f0c9b11f91cc","dirty":false,"env":{"APS5_TRACE_DIR":"<path>","APS5_TRACE_SECONDS":"200:15"},"gpu":"NVIDIA GeForce RTX 2080 Ti","driver":"NVIDIA 617.14","os":"Windows 10.0.26300","cpu":"Intel(R) Core(TM) i9-9900K CPU @ 3.60GHz","cpu_threads":16,"memory_mib":32700,"title_id":"PPSA05324","title":"Sonic Origins","content_version":"02.002.000","resolution":"3840x2160","window":{"spec":"seconds 200:15","first_present":5096,"ms":15033.404},"presents":255,"frame_ms":{"p50":58.431,"p90":61.851,"p99":67.167,"max":69.833},"gpu_busy_ms_per_present":33.522,"worker_busy_pct":{"queue worker 0x0":96.68},"phase_totals_ms":{"Driver.Completion":1.653,"Driver.Dispatch":669.186,"Driver.Dispatch.capture_resources":16.079,"Driver.Dispatch.decode_key_device_setup":10.131,"Driver.Dispatch.lookup_cache":11.631,"Driver.Dispatch.materialize":2.824,"Driver.Dispatch.prepared_invocation":2.47,"Driver.Draw":10178.974,"Driver.Draw.device_setup":776.476,"Driver.Draw.draw_enqueued":2224.6,"Driver.Draw.post_compile_prepare":124.366,"Driver.Draw.prepare":1219.351,"Driver.Draw.shader_compile_and_link":5581.635,"Driver.EndSubmission":11.837,"Driver.Packet":14520.716,"Driver.Packet.device_lock":166.903,"Driver.Packet.dispatch":1789.996,"Driver.Packet.draw":10387.68,"Driver.Packet.execute":378.141,"Driver.Packet.flip_flush":8.27,"Driver.Packet.flush_between_packets":485.351,"Driver.Packet.memory_wait":0.005,"Driver.Packet.pipeline_drain":361.233,"Driver.Packet.pipeline_prepare":278.494,"Driver.Packet.prepare_memory":267.891,"Driver.Packet.rendering_wait":0.294,"Driver.Present":3033.491,"Driver.Present.acquire_image":3.174,"Driver.Present.device_setup":0.222,"Driver.Present.gpu_mutex_wait":70.139,"Driver.Present.inflight_wait":0.684,"Driver.Present.present_display_buffer":44.458,"Driver.Present.queue_present":106.133,"Driver.Present.release_and_callback":0.795,"Driver.Present.render_fence_wait":2807.044,"Driver.Present.resize":0.528,"Driver.Present.validate":0.068,"Driver.Suspend":0.051,"GpuMutex.wait.dispatch":0.114,"GpuMutex.wait.draw":33.896,"GpuMutex.wait.end":1.194,"GpuMutex.wait.fill":20.413,"GpuMutex.wait.flush":2.772,"GpuMutex.wait.hook":0.014,"GpuMutex.wait.label":4.236,"GpuMutex.wait.other":5.172,"GpuMutex.wait.present":69.421,"GpuMutex.wait.wait":1.877,"Graphics.Draw":9753.406,"Graphics.Draw.draw_and_resource_release":7556.125,"Graphics.Draw.index_upload":596.761,"Graphics.Draw.validate":761.118,"Graphics.Draw.vertex_upload":664.291,"Graphics.DrawWithRecipe":97.379,"Graphics.DrawWithRecipe.draw_and_resource_release":93.266,"Graphics.DrawWithRecipe.index_upload":0.271,"Graphics.DrawWithRecipe.validate":1.482,"Graphics.DrawWithRecipe.vertex_upload":0.704,"Recorder.Reap":118.637,"Recorder.Submit":310.389,"Recorder.WaitSerial":2997.027,"Resources.Complete":71.363,"Resources.Prepare":117.664,"Shader.DrawStage":3577.406,"Shader.DrawStage.capture_resources":1676.972,"Shader.DrawStage.materialize":911.674,"Shader.DrawStage.prepared_invocation":900.522,"Shader.ResolveAbi":151.952,"Shader.ResolveGraphicsAbi":55.581,"Shader.ResolveGraphicsStagesAbi":147.385,"VideoOut.Flip":3060.807,"VideoOut.Flip.completion_mutex_wait":0.664,"VideoOut.Flip.config_mutex_wait":0.048,"VideoOut.Flip.frame_limit":0.174,"VideoOut.Flip.notify_game":12.654,"VideoOut.Flip.present":3024.935,"VideoOut.Flip.validate":0.331,"VideoOut.Flip.vblank_wait":0.291,"VideoOut.Flip.window_prepare":0.498,"VideoOut.Flip.window_title":20.877,"VideoOut.Readiness":1.115,"VideoOut.Readiness.locks_validate":0.534,"Vulkan.Acquire":2.877,"Vulkan.Acquire.acquire_fence_wait":0.506,"Vulkan.Acquire.acquire_image":1.508,"Vulkan.Acquire.fence_reset":0.634,"Vulkan.Acquire.retired_swapchains":0.129,"Vulkan.Dispatch":222.592,"Vulkan.Dispatch.command_record":95.516,"Vulkan.Dispatch.shader_resources":125.871,"Vulkan.DispatchRecipe":1.291,"Vulkan.DispatchRecipe.command_record":1.285,"Vulkan.DrawFromRecipe":99.076,"Vulkan.Present":23.847,"Vulkan.Present.command_record_scale":8.157,"Vulkan.Present.pixel_upload":5.91,"Vulkan.Present.queue_submit":9.406,"Vulkan.QueuePresent":104.698,"Vulkan.QueuePresent.queue_present":103.928,"Vulkan.Retire":2806.778,"Vulkan.Retire.wait":2801.758},"top_phases_ms_per_frame":{"Driver.Packet":56.944,"Driver.Packet.draw":40.736,"Driver.Draw":39.918,"Graphics.Draw":38.249,"Graphics.Draw.draw_and_resource_release":29.632,"Driver.Draw.shader_compile_and_link":21.889,"Shader.DrawStage":14.029,"VideoOut.Flip":12.003},"owned_draw_counts":{"OwnedDraw.evicted_other":24234},"graphics_track":{"Graphics.Barrier.copy":2550,"Graphics.Barrier.dispatch-lead":1276,"Graphics.Barrier.dispatch-trail":2808,"Graphics.Barrier.draw":39334,"Graphics.Barrier.fill-clear":2550,"Graphics.Barrier.label-run":18804,"Graphics.Barrier.present-blit":510,"Graphics.Barrier.shadow-publish":512,"Graphics.Barrier.staging-in":3081,"Graphics.Barrier.staging-out":510,"Graphics.Barrier.storage-upload":30100,"Graphics.Barrier.storage-writeback":3342,"Graphics.BarrierMerged.dispatch-lead":1532,"Graphics.BarrierMerged.label-run":16,"Graphics.BarrierMerged.shadow-publish":512,"Graphics.BarrierMerged.staging-in":901,"Graphics.BarrierMerged.staging-out":510,"Graphics.BarrierMerged.storage-writeback":752,"Graphics.Copy":2488,"Graphics.Copy.bytes":16376192,"Graphics.RenderPass":19060,"Graphics.RenderPass.Close.command":11903,"Graphics.RenderPass.Close.image":505,"Graphics.RenderPass.Close.key":1318,"Graphics.RenderPass.Close.label":16,"Graphics.RenderPass.Close.new-batch":5318,"Graphics.RenderPass.Continued":480996},"trace_dropped":true,"trace_dropped_threads":{"queue worker 0x0":{"events_full_after_s":6.057,"events_lost":387461,"totals_full":false}},"trace":"aps5-trace-f0c9b11f91cc-84916.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.

  • queue worker 0x0: 387461 events lost; buffer full at 6057.0 ms

Slowest frames (largest slices inside each, inclusive)

  • present 5178: 69.8 ms at 4813 ms: Driver.Packet (queue worker 0x0) 46.5, Driver.Packet.draw (queue worker 0x0) 35.1, Driver.Draw (queue worker 0x0) 34.1, Graphics.Draw (draw committer) 33.8
  • present 5284: 67.7 ms at 11080 ms: batch (gpu) 36.0, Graphics.Draw (draw committer) 28.9, Graphics.Draw.draw_and_resource_release (draw committer) 22.3, VideoOut.Flip (presenter) 10.4
  • present 5296: 67.2 ms at 11795 ms: batch (gpu) 33.5, Graphics.Draw (draw committer) 30.6, Graphics.Draw.draw_and_resource_release (draw committer) 24.3, VideoOut.Flip (presenter) 11.4
  • present 5149: 66.6 ms at 3105 ms: Driver.Packet (queue worker 0x0) 43.7, batch (gpu) 34.7, Driver.Packet.draw (queue worker 0x0) 33.2, Driver.Draw (queue worker 0x0) 31.9
  • present 5282: 65.7 ms at 10954 ms: batch (gpu) 33.7, Graphics.Draw (draw committer) 29.4, Graphics.Draw.draw_and_resource_release (draw committer) 20.8, VideoOut.Flip (presenter) 11.2

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

  • present 5178: 69.8 ms at 4813 ms, persistence 13.7 ms
  • present 5284: 67.7 ms at 11080 ms, persistence 11.0 ms
  • present 5149: 66.6 ms at 3105 ms, persistence 10.3 ms
  • present 5296: 67.2 ms at 11795 ms, persistence 10.1 ms
  • present 5335: 65.4 ms at 14091 ms, persistence 9.0 ms
  • present 5217: 64.8 ms at 7112 ms, persistence 8.1 ms
  • present 5098: 64.1 ms at 117 ms, persistence 8.0 ms
  • present 5166: 64.7 ms at 4108 ms, persistence 7.7 ms
  • present 5200: 64.6 ms at 6118 ms, persistence 7.6 ms
  • present 5318: 64.3 ms at 13100 ms, persistence 7.4 ms

Threads (ms per frame)

thread busy wait untraced in slices < 20 us largest
title 0.1 (0 %) 11.8 (20 %) 47.1 0.4 Shader.ResolveGraphicsStagesAbi 0.0, Shader.ResolveAbi 0.0
queue worker 0x0 12.9 (22 %) 0.0 (0 %) 46.0 50.0 Driver.Packet 12.9, Driver.EndSubmission 0.0
draw committer 24.9 (42 %) 0.3 (0 %) 33.8 38.9 Graphics.Draw 23.3, Recorder.Submit 1.0
title 0.0 (0 %) 0.0 (0 %) 58.9 0.0 Shader.ResolveAbi 0.0, Shader.ResolveGraphicsStagesAbi 0.0
title 0.0 (0 %) 0.0 (0 %) 58.9 0.0 Shader.ResolveAbi 0.0, Shader.ResolveGraphicsStagesAbi 0.0
title 0.0 (0 %) 0.0 (0 %) 58.9 0.0 Shader.ResolveAbi 0.0, Shader.ResolveGraphicsStagesAbi 0.0
title 0.0 (0 %) 0.0 (0 %) 58.9 0.0 Shader.ResolveAbi 0.0, Shader.ResolveGraphicsStagesAbi 0.0
presenter 0.8 (1 %) 11.3 (19 %) 46.9 0.0 VideoOut.Flip 12.0, Driver.Present 0.0
title 0.0 (0 %) 0.0 (0 %) 58.9 0.0 Shader.ResolveAbi 0.0, Shader.ResolveGraphicsStagesAbi 0.0
title 0.0 (0 %) 0.0 (0 %) 58.9 0.0 Shader.ResolveAbi 0.0, Shader.ResolveGraphicsStagesAbi 0.0
title 0.0 (0 %) 0.0 (0 %) 58.9 0.1 Shader.ResolveAbi 0.0, Shader.ResolveGraphicsStagesAbi 0.0
title 0.0 (0 %) 0.0 (0 %) 58.9 0.0 Shader.ResolveAbi 0.0, Shader.ResolveGraphicsStagesAbi 0.0
title 0.0 (0 %) 0.0 (0 %) 58.9 0.0 Shader.ResolveAbi 0.0, Shader.ResolveGraphicsStagesAbi 0.0
title 0.0 (0 %) 0.0 (0 %) 58.9 0.1 Shader.ResolveAbi 0.0, Shader.ResolveGraphicsStagesAbi 0.0
title 0.0 (0 %) 0.0 (0 %) 58.9 0.1 Shader.ResolveAbi 0.0, Shader.ResolveGraphicsStagesAbi 0.0
title 0.0 (0 %) 0.0 (0 %) 58.9 0.0 Shader.ResolveAbi 0.0, Shader.ResolveGraphicsStagesAbi 0.0
gpu 33.5 (57 %) 0.0 (0 %) 25.5 0.0 batch 33.5

Largest slices (ms per frame, inclusive, all threads): batch 33.5, Graphics.Draw 23.3, Graphics.Draw.draw_and_resource_release 13.5, Driver.Packet 12.9, VideoOut.Flip 12.0, Driver.Present 11.9, VideoOut.Flip.present 11.9, Recorder.WaitSerial 11.8, Driver.Present.render_fence_wait 11.0, Vulkan.Retire 11.0

The lists of longest waits and largest GPU batches are left out of this run to fit the description; tools/trace_digest.py prints them from the attached trace.

tools/pr_overlap.py fails closed (exit 2): of the 1,534 open PRs, 132 share a file with this branch, and 84 of those conflict with main so it cannot compare them (30 of the 84 touch Recorder.cpp or Recorder.hpp, the rest only ENVIRONMENT.md). It does report three line conflicts: #17943 and #18029 (Recorder.cpp lines 2160-2166 in ensureOpen, where the batch's fence is made and their encoder thread allocates command buffers) and #17738 (the ENVIRONMENT.md row next to ours). So I scanned the diffs of the open PRs that touch Recorder.cpp, Recorder.hpp, VulkanDevice.cpp, VulkanDevice.hpp, DeferredLabels.cpp, PacketMemory.cpp, PacketFlush.cpp, WaitMemory.cpp, Submission.cpp, QueueWorker.cpp, PacketExecution.cpp or ENVIRONMENT.md (193 of 1,533 open) for fence, timeline, Reap, WaitSerial, FinishUpTo, signaled, unsignaled and counter-read lines. No open PR drops batch fences, adds APS5_BATCH_FENCES or changes Reap's poll. Three diffs were too big for gh pr diff (#12315, #9508, #7642); they were read through the files API at the first scan on 2026-11-13, with no fence, timeline or Reap line in their Recorder or VulkanDevice patches, and not re-read today.

Overlaps to declare (this PR depends on none of them; whichever merges second rebases):

  • #17943 and #18029 (encoder thread) change the Recorder constructor signature and the ensureOpen lines above; #18173 (draft, conflicting) moves vkQueueSubmit into a submitter with its own timeline values and has to keep one counter per queue (or set fenceless itself). None of them changes the fence poll, Reap, finish or the timeline reads.
  • #13863 and #13920 (opt-in compute queue lane, AsyncLaneActive()) add a second queue with its own timeline. One counter does not give prefix completion across two queues, so while the lane is active batches on it keep a fence (fenceless = false); that is theirs to set when they rebase.
  • #9289 (batch a dispatch run's staged copy-ins) reads batch.fence directly behind a != VK_NULL_HANDLE check, so with fenceless batches its idle-chunk test is false and it falls back to the slower path (correct, no gain) until it asks gpuDone.
  • #10442 and #7464 call signaled and unsignaled, which now ask gpuDone in both modes; #18829, #17850 and #19335 add Reap and FinishUpTo calls and get the cheaper reap; #11587 (draft) reads the counter once for a MoltenVK idle check, independent of this change.
  • #17738 adds an ENVIRONMENT.md row next to the new one (textual only).

Checklist

  • Based on current main; no other open PR implements the same functions
  • One topic per PR; follow-ups go in a new PR
  • No comments in code except technical debt
  • Unimplemented paths throw (NotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file
  • No notes, investigation .md files or images added to the repository (attach them to this PR)
  • New third-party code is a submodule built from source
  • Generic behaviour, not specific to one title
  • Depends on: none
  • Fixes: none
  • Unblocks: none
  • GPUs tested: NVIDIA GeForce RTX 2080 Ti, driver 617.14, Windows 11 (10.0.26300)
  • AI-assisted: yes
<!-- greyfinch-sync:boykopovar/AnyPS5:issue:5312449102 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/20066). Originally posted by [meh7an](https://github.com/meh7an) on 2026-11-14T14:43:06Z. --- ### What `Recorder` gave every recorded batch a `VkFence` of its own and also signalled its timeline semaphore (`serial = submissions + 1`) in the same `vkQueueSubmit`. `Recorder::Reap`, which `VulkanDevice::WriteLabelOnGpu` and `SubmitRecorded` call on the draw committer, then asked the driver `vkGetFenceStatus` once per in-flight batch until one was not signalled. On the S3K menu page that is 1.0 to 1.8% of the committer's samples in `Recorder::Reap` on main, 31 to 49 of those samples in `nvoglv64` (the driver's fence query). **`perf(agc): drop per-batch fences when a timeline tracks completion`** - When the recorder has a timeline semaphore, its batches are submitted without a fence. A batch is complete when the timeline counter has reached its serial. `Reap` reads the counter once (when the newest in-flight serial is above the highest value already read) and retires batches by comparing serials; no per-batch fence is created, queried, reset or pooled. - `APS5_BATCH_FENCES=1` restores the fence per batch and asks the fence whether a batch completed. A recorder without a timeline (extension absent, `APS5_NO_TIMELINE`, semaphore creation failed, `Recorder(context)` in tests) never takes the new path: its code is main's. - Code: `Recorder::fenceless` (set in the constructor when the timeline exists and the switch is absent), `Recorder::readTimeline()` (reads `vkGetSemaphoreCounterValueKHR`, keeps the maximum in `reachedSerial`, ignores a failed read), `Recorder::gpuDone(batch)` (fenced: `vkGetFenceStatus == VK_SUCCESS`; fenceless: `serial != 0 && (serial <= reachedSerial || serial <= readTimeline())`). `signaled`, `unsignaled`, `DescribePendingWrite`, the profile block of `syncThroughUnlocked`, `finish`'s `signaledAtStart` and `Reap` ask `gpuDone`; `finish(wait)` waits on the timeline (`WaitTimeline`, same 5 s slices and warnings as the fence wait) only when the serial is above `reachedSerial` after a read. No public API changes; `ensureOpen` makes no fence when fenceless and `Submit` passes the batch's fence, null then. - **Same completion as a fence per batch, for every configuration:** - *One queue.* Every `Recorder` submits to `context.queue` only (the guest queues are tags on batches). Each submit signals the one timeline with the next serial, in submission order. The first synchronization scope of a `vkQueueSubmit` semaphore signal includes every earlier submission on that queue, exactly as a fence's does, so a counter value N means batches 1..N completed: the same prefix a fence per batch gives. `WaitSerial` to `FinishUpTo` and `syncThroughUnlocked` already rely on this on main. A batch is never counted done early: `reachedSerial` only holds values the counter returned, and a stale low read only keeps a batch in flight, as an unsignalled fence does. - *Order.* `Reap`, `Sync`, `FinishUpTo` and `SyncThrough` pop `inFlight` from the front, so completion order is serial order in both modes. - *Failed submit.* The failure throws before `submitted` and `serial` are set and `DiscardUnsubmitted` discards the batch; `submissions` is not consumed, so the next batch signals the same value (as on main). There is no fence to reset. - *Device lost or a failed query.* A failed counter read leaves `reachedSerial` alone, so `Reap` retires nothing (a lost `vkGetFenceStatus` is not `VK_SUCCESS` either). A failed timeline wait takes `finish`'s existing path (`vkDeviceWaitIdle` unless `VK_ERROR_DEVICE_LOST`, `release`, throw). - *Teardown.* `~Recorder` runs `Sync()`, which finishes every batch through `WaitTimeline` while the semaphore lives, and the waiters of `unlockedWaiters` are waited for before `vkDestroySemaphore`: unchanged. There are no fence objects to destroy. - *Locking.* Every reader of `inFlight` runs under the GPU mutex, so the non-atomic `reachedSerial` is as safe as `inFlight`; `syncThroughUnlocked` copies the function pointer before it releases the mutex and touches `this` only after the relock. - *Several queues (not on main).* One counter does not give per-lane prefix completion across two queues. Open #13863 adds a second queue lane with its own timeline and fence reads; it has to set `fenceless = false` (or give lane batches fences) while its lane is active. Declared under Overlaps. - `docs/dev/ENVIRONMENT.md` has a row for `APS5_BATCH_FENCES` (`tools/env_reference.py --check`, 617 names). Not changed: the batch cap and the submit points (`APS5_BATCH_CAP`), what a batch waits for, the `ProgressWatcher`, the timeline values, and the work `finish` does after a batch completes (`release`, `publishPendingWrites`, `NoteFinished`: that is what is left under `Reap` below). **Which thread limits the scene.** On the S3K page the draw committer is the busiest CPU thread (70 to 78% of its samples outside a wait in the sampler windows below, 41 to 42% in retained trace slices; the queue worker 22%) and the GPU is 57% busy, so neither saturates and the frame is paced by the committer-to-GPU chain. A committer saving can show in the frame but does not have to; it showed as about +1%. **Scope of the measurement.** One title (Sonic Origins S3K page), one GPU (RTX 2080 Ti, NVIDIA 617.14) on Windows. The saving is the driver's fence queries and the per-batch fence creation and reset; other drivers and platforms are not measured, and the change is not claimed to be faster there. It never makes more driver calls than the fence path (a reap reads the counter at most once where it polled one fence per in-flight batch), and `APS5_BATCH_FENCES=1` is the old behaviour. ### Tested Windows 11 (10.0.26300), NVIDIA GeForce RTX 2080 Ti (driver 617.14), Sonic Origins (PPSA05324) menu on the S3K page, 3840x2160, default environment. Measured commits: main `f0c9b11f91c` and this PR `4a2c126ca7a` (one commit on top of it), clean builds of each. The code was written on main `44270d9910a` (commit `1b044694cad`); after the validation and mutation runs below main moved and `docs/dev/ENVIRONMENT.md` conflicted (the `APS5_BATCH_CAP` row next to the new row), so the branch was rebased onto `f0c9b11f91c`; `Recorder.cpp`, `Recorder.hpp` and the test merged without changes. The measurements below and the new test were run on the rebased commits; the validation protocol and the mutants on `44270d9910a` and `1b044694cad`. New test **`agc_recorder_batch_fences`** (`tests/RecorderBatchFences.cpp`, a mock Vulkan device with an in-order controllable queue, held submissions, counters for fence creations, fence queries and waits, timeline reads and waits, and injectable failures; it runs on every platform the agc tests build on): - Three recorder configurations: fenceless (timeline, no switch), fenced (timeline with `APS5_BATCH_FENCES` set) and no timeline. Every scenario runs on each, with the data and the counts checked in each run: fenceless batches are submitted with no fence and none is created; fenced and no-timeline batches have one each. - Scenarios: configuration and fence counts; reap cost (a fenceless reap with four of eight batches complete makes 1 counter read and 0 fence queries, the fenced one 5 fence queries; four settled queries make 1 read; a reap right after a covering read makes none); a held first batch; partial prefix completion; `WaitSerial` with `FinishUpTo` and the unlocked `SyncThrough` (one semaphore wait for the whole prefix); a `SyncThrough` under the GPU lock; a failed submit; failed waits (`VK_ERROR_DEVICE_LOST`, `VK_ERROR_OUT_OF_HOST_MEMORY`); a failed counter read; failed timeline creation; and a 400-step random walk (submits, reaps, waits, completions) of a fenceless recorder compared step by step with a fence-only recorder on the same sequence; every case ends with no leaked fence or batch. - **Mutants:** 16 broken copies of `Recorder.cpp`, each built and run: 14 caught (an off-by-one in `gpuDone`, `readTimeline` never storing, a reap without its pre-read, the switch ignored, a fence made while fenceless, `>=` in `Reap`, `signaled` always true, `finish` always or never reading the timeline, `DescribePendingWrite` always signalled, a failed read taken as a value, fenceless without a timeline (two variants, found by a hang timeout), a `finish` waiting on a null fence (found by the crash)). 2 survive and are equivalent: a failed wait marking its already-popped batch as reached, and the `serial != 0` guard of `gpuDone` (an in-flight batch never has serial 0). Vulkan validation protocol (`ANYPS5_REQUIRE_VULKAN=1 ANYPS5_NO_SHADER_CACHE=1 VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation`, `ctest -V`, same machine and GPU, one build tree, each arm rebuilt): - **Tests (78 on this PR, 77 on main):** the `agc_*` tests that construct a `Recorder` and submit, wait or reap through it (label ordering, completion and write-back, submit progress and shutdown, kept bytes, batch cap and command batches, queue and pipelined waits, `agc_recorder_*`) and `video_out_flip_labels*`; main lacks the new test. - **Results:** this PR: 76 pass, 2 skip (`video_out_flip_labels*`), 78 of 78 accounted for. Main: 75 pass, the same 2 skips. This PR with `APS5_BATCH_FENCES=1`: the same 78 of 78. - **Logs:** none of the three contains `was not found but was requested by env var VK_INSTANCE_LAYERS` or a `VUID-` line. `tools/check_conventions.py --base upstream/main` passes. Full ctest was not run. Sampler (`APS5_SAMPLE_COMMITTER`, four overlapping 60 s windows of 3,843 committer samples each, snapshots 0-3, 1-4, 2-5 and 3-6; one sample is about 0.0145 ms of a frame; a warm boot of the new main came first). Both arms in the same order on the same page; the same window number is the same time since the page opened: | draw committer | main `f0c9b11f91c` (windows 0-3 / 1-4 / 2-5 / 3-6) | this PR `4a2c126ca7a` | |---|---|---| | `Recorder::Reap` inclusive | 68 (1.77%) / 66 (1.72%) / 49 (1.28%) / 38 (0.99%) | 27 (0.70%) / 28 (0.73%) / 25 (0.65%) / 23 (0.60%) | | of which in `nvoglv64` (the driver) | 48 / 49 / 41 / 31 | 5 / 2 / 0 / 2 | | `VulkanDevice::WriteLabelOnGpu` inclusive | 95 / 88 / 80 / 65 | 77 / 73 / 68 / 67 | | `VulkanDevice::SubmitRecorded` inclusive | 20 / 17 / 8 / 5 | 7 / 6 / 3 / 1 | | committer busy (samples outside a wait frame) | 69.4 / 74.6 / 73.9 / 73.5% | 70.3 / 75.3 / 77.7 / 77.9% | | run FPS (median of the readings) | 17.89 | 18.04 | - **Saving:** 15 to 41 fewer samples in `Recorder::Reap` in every window, 29.5 on average (0.77% of the committer, about 0.4 ms of a 55 ms frame). The driver part of `Reap` falls from 31-49 samples to 0-5; what is left under `Reap` is `finish` (`release`, `publishPendingWrites`, `NoteFinished`) and the single counter read (`readTimeline`, 0 to 5 samples). `Reap` shrinks over the run in both arms (the scene's batches per reap change); the comparison is window against window. - **Busy share:** I do not claim a lower busy share. It rose by 1 to 4 points in the PR arm in windows 1-4 to 3-6 and is 0.9 points higher in window 0-3, where both arms were at the same point after boot; the figure counts every sample outside a wait frame, and the committer's wait share is 22 to 31% in both arms. The result is in the frame times below. Two traced runs per arm (`APS5_TRACE_SECONDS=200:15`), in main, PR, PR, main order, both commit IDs in the summaries: | | main `f0c9b11f91c` | this PR `4a2c126ca7a` | |---|---|---| | reading FPS (median) | 18.39 / 18.47 | 18.66 / 18.67 | | frame p50 | 58.6 / 58.4 ms | 57.7 / 57.8 ms | | frame p99 | 66.0 / 67.2 ms | 66.1 / 65.0 ms | | committer `Graphics.Draw` per frame (retained events) | 23.1 / 23.3 ms | 21.9 / 22.7 ms | | committer busy per frame (retained events) | 24.6 / 24.9 ms | 23.1 / 24.1 ms | | `Recorder.Submit` per frame | 1.0 / 1.0 ms | 0.8 / 0.9 ms | | GPU busy per present | 33.0 / 33.5 ms | 32.9 / 32.7 ms | | presents in the 15 s window | 254 / 255 | 258 / 258 | - **Result:** about +0.2 FPS (+1.2%) and frame p50 0.6 to 0.9 ms lower in both PR runs, the committer's `Graphics.Draw` 0.6 to 1.4 ms lower per frame and `Recorder.Submit` 0.1 to 0.2 ms lower, p99 within the spread, GPU busy unchanged to slightly lower. The two main runs differ by 0.08 FPS and the two PR runs by 0.01; every PR run is faster than both main runs on FPS and p50. The sampler window's FPS (17.89 to 18.04, +0.8%) points the same way. The gain is small, as the sampler's 0.4 ms predicts, and the trace's committer difference (1.2 ms on average) is larger than the sampler's, so I read the trace figure as upper bound. - **Dropped events:** all four traces dropped events once the worker's buffer filled (at about 6 s), and the committer's buffer filled late in two of them (main run 1 at 14.8 s, PR run 1 at 13.9 s); slice figures cover retained events only. - **Machine:** the benchmark leases report 2.0% CPU on average and 16.9% at the peak for the warm boot and the two sampler runs, 1.9% and 9.8% for the four traced runs, quiet at the start of both. `-PCbisect` kept the executable staged earlier from an older main's relinker; both arms ran it, with each arm's own `.prx` modules swapped in. Traces: `m321_traces_main_f0c9b11f91c.zip` and `m321_traces_pr_4a2c126ca7a.zip` (two runs each, trace and `aps5-summary.jsonl`). <details> <summary>Digest of main `f0c9b11f91c`, run 1</summary> **seconds 200:15** from present 5121: 254 presents, frame p50 58.6 / p90 60.7 / p99 66.0 / max 70.6 ms, GPU busy 33.0 ms per present NVIDIA GeForce RTX 2080 Ti, NVIDIA 617.14, Windows 10.0.26300, 3840x2160, commit f0c9b11f91cc, dropped: yes ```json {"commit":"f0c9b11f91cc","dirty":false,"env":{"APS5_TRACE_DIR":"<path>","APS5_TRACE_SECONDS":"200:15"},"gpu":"NVIDIA GeForce RTX 2080 Ti","driver":"NVIDIA 617.14","os":"Windows 10.0.26300","cpu":"Intel(R) Core(TM) i9-9900K CPU @ 3.60GHz","cpu_threads":16,"memory_mib":32700,"title_id":"PPSA05324","title":"Sonic Origins","content_version":"02.002.000","resolution":"3840x2160","window":{"spec":"seconds 200:15","first_present":5121,"ms":15000.568},"presents":254,"frame_ms":{"p50":58.61,"p90":60.697,"p99":66.011,"max":70.58},"gpu_busy_ms_per_present":32.998,"worker_busy_pct":{"queue worker 0x0":96.654},"phase_totals_ms":{"Driver.Completion":1.309,"Driver.Dispatch":659.774,"Driver.Dispatch.capture_resources":16.858,"Driver.Dispatch.decode_key_device_setup":10.155,"Driver.Dispatch.lookup_cache":11.526,"Driver.Dispatch.materialize":2.792,"Driver.Dispatch.prepared_invocation":2.602,"Driver.Draw":10167.079,"Driver.Draw.device_setup":790.065,"Driver.Draw.draw_enqueued":2215.505,"Driver.Draw.post_compile_prepare":123.408,"Driver.Draw.prepare":1228.192,"Driver.Draw.shader_compile_and_link":5546.37,"Driver.EndSubmission":13.19,"Driver.Packet":14484.107,"Driver.Packet.device_lock":166.261,"Driver.Packet.dispatch":1793.722,"Driver.Packet.draw":10370.89,"Driver.Packet.execute":382.236,"Driver.Packet.flip_flush":8.336,"Driver.Packet.flush_between_packets":474.286,"Driver.Packet.memory_wait":0.005,"Driver.Packet.pipeline_drain":349.885,"Driver.Packet.pipeline_prepare":272.686,"Driver.Packet.prepare_memory":263.345,"Driver.Packet.rendering_wait":0.284,"Driver.Present":2906.745,"Driver.Present.acquire_image":2.973,"Driver.Present.device_setup":0.276,"Driver.Present.gpu_mutex_wait":53.709,"Driver.Present.inflight_wait":0.598,"Driver.Present.present_display_buffer":42.932,"Driver.Present.queue_present":108.993,"Driver.Present.release_and_callback":0.941,"Driver.Present.render_fence_wait":2695.476,"Driver.Present.resize":0.553,"Driver.Present.validate":0.08,"Driver.Suspend":0.05,"GpuMutex.wait.dispatch":0.133,"GpuMutex.wait.draw":33.152,"GpuMutex.wait.end":0.749,"GpuMutex.wait.fill":19.771,"GpuMutex.wait.flush":2.434,"GpuMutex.wait.label":3.787,"GpuMutex.wait.other":5.205,"GpuMutex.wait.present":52.947,"GpuMutex.wait.wait":2.224,"Graphics.Draw":9705.799,"Graphics.Draw.draw_and_resource_release":7544.336,"Graphics.Draw.index_upload":588.619,"Graphics.Draw.validate":740.374,"Graphics.Draw.vertex_upload":661.552,"Graphics.DrawWithRecipe":104.27,"Graphics.DrawWithRecipe.draw_and_resource_release":101.106,"Graphics.DrawWithRecipe.index_upload":0.262,"Graphics.DrawWithRecipe.validate":1.5,"Graphics.DrawWithRecipe.vertex_upload":0.735,"Recorder.Reap":119.31,"Recorder.Submit":304.449,"Recorder.WaitSerial":2872.018,"Resources.Complete":63.812,"Resources.Prepare":110.234,"Shader.DrawStage":3555.825,"Shader.DrawStage.capture_resources":1655.746,"Shader.DrawStage.materialize":902.539,"Shader.DrawStage.prepared_invocation":909.355,"Shader.ResolveAbi":152.02,"Shader.ResolveGraphicsAbi":55.455,"Shader.ResolveGraphicsStagesAbi":145.835,"VideoOut.Flip":2946.925,"VideoOut.Flip.completion_mutex_wait":0.65,"VideoOut.Flip.config_mutex_wait":0.028,"VideoOut.Flip.frame_limit":0.247,"VideoOut.Flip.notify_game":25.395,"VideoOut.Flip.present":2897.986,"VideoOut.Flip.validate":0.397,"VideoOut.Flip.vblank_wait":0.185,"VideoOut.Flip.window_prepare":0.631,"VideoOut.Flip.window_title":21.034,"VideoOut.Readiness":1.03,"VideoOut.Readiness.locks_validate":0.405,"Vulkan.Acquire":2.707,"Vulkan.Acquire.acquire_fence_wait":0.432,"Vulkan.Acquire.acquire_image":1.47,"Vulkan.Acquire.fence_reset":0.53,"Vulkan.Acquire.retired_swapchains":0.163,"Vulkan.Dispatch":219.669,"Vulkan.Dispatch.command_record":96.875,"Vulkan.Dispatch.shader_resources":121.617,"Vulkan.DispatchRecipe":0.819,"Vulkan.DispatchRecipe.command_record":0.818,"Vulkan.DrawFromRecipe":105.93,"Vulkan.Present":22.659,"Vulkan.Present.command_record_scale":7.756,"Vulkan.Present.pixel_upload":5.575,"Vulkan.Present.queue_submit":8.982,"Vulkan.QueuePresent":107.755,"Vulkan.QueuePresent.queue_present":107.045,"Vulkan.Retire":2695.058,"Vulkan.Retire.wait":2689.398},"top_phases_ms_per_frame":{"Driver.Packet":57.024,"Driver.Packet.draw":40.83,"Driver.Draw":40.028,"Graphics.Draw":38.212,"Graphics.Draw.draw_and_resource_release":29.702,"Driver.Draw.shader_compile_and_link":21.836,"Shader.DrawStage":13.999,"VideoOut.Flip":11.602},"owned_draw_counts":{"OwnedDraw.evicted_other":23363},"graphics_track":{"Graphics.Barrier.copy":2540,"Graphics.Barrier.dispatch-lead":1319,"Graphics.Barrier.dispatch-trail":2797,"Graphics.Barrier.draw":39162,"Graphics.Barrier.fill-clear":2540,"Graphics.Barrier.label-run":18635,"Graphics.Barrier.present-blit":508,"Graphics.Barrier.shadow-publish":510,"Graphics.Barrier.staging-in":2566,"Graphics.Barrier.staging-out":508,"Graphics.Barrier.storage-upload":29982,"Graphics.Barrier.storage-writeback":3338,"Graphics.BarrierMerged.dispatch-lead":1478,"Graphics.BarrierMerged.label-run":11,"Graphics.BarrierMerged.shadow-publish":510,"Graphics.BarrierMerged.staging-in":486,"Graphics.BarrierMerged.staging-out":508,"Graphics.BarrierMerged.storage-writeback":740,"Graphics.Copy":1780,"Graphics.Copy.bytes":16300800,"Graphics.RenderPass":19008,"Graphics.RenderPass.Close.command":11878,"Graphics.RenderPass.Close.image":505,"Graphics.RenderPass.Close.key":1338,"Graphics.RenderPass.Close.label":11,"Graphics.RenderPass.Close.new-batch":5276,"Graphics.RenderPass.Continued":479087},"trace_dropped":true,"trace_dropped_threads":{"queue worker 0x0":{"events_full_after_s":6.061,"events_lost":383854,"totals_full":false},"draw committer":{"events_full_after_s":14.81,"events_lost":3497,"totals_full":false}},"trace":"aps5-trace-f0c9b11f91cc-84288.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. - queue worker 0x0: 383854 events lost; buffer full at 6061.1 ms - draw committer: 3497 events lost; buffer full at 14810.4 ms **Slowest frames** (largest slices inside each, inclusive) - present 5121: 70.6 ms at 0 ms: Driver.Packet (queue worker 0x0) 43.1, Graphics.Draw (draw committer) 31.9, batch (gpu) 31.7, Driver.Packet.draw (queue worker 0x0) 29.7 - present 5214: 66.2 ms at 5480 ms: Driver.Packet (queue worker 0x0) 42.0, batch (gpu) 33.5, Driver.Packet.draw (queue worker 0x0) 31.6, Driver.Draw (queue worker 0x0) 30.4 - present 5232: 66.0 ms at 6555 ms: batch (gpu) 37.5, Graphics.Draw (draw committer) 28.1, Graphics.Draw.draw_and_resource_release (draw committer) 20.0, VideoOut.Flip (presenter) 12.8 - present 5349: 65.7 ms at 13471 ms: batch (gpu) 33.7, Graphics.Draw (draw committer) 28.1, Graphics.Draw.draw_and_resource_release (draw committer) 21.7, VideoOut.Flip (presenter) 12.0 - present 5281: 65.5 ms at 9470 ms: batch (gpu) 34.7, Graphics.Draw (draw committer) 26.6, Graphics.Draw.draw_and_resource_release (draw committer) 21.0, VideoOut.Flip (presenter) 12.4 **Persistent spikes** (frame time above the fastest frame that separates it from a longer frame; one entry per stall, not per frame) - present 5121: 70.6 ms at 0 ms, persistence 14.3 ms - present 5214: 66.2 ms at 5480 ms, persistence 9.9 ms - present 5349: 65.7 ms at 13471 ms, persistence 8.8 ms - present 5281: 65.5 ms at 9470 ms, persistence 8.4 ms - present 5232: 66.0 ms at 6555 ms, persistence 8.3 ms - present 5180: 65.0 ms at 3477 ms, persistence 8.3 ms - present 5146: 64.7 ms at 1483 ms, persistence 8.1 ms - present 5332: 65.5 ms at 12471 ms, persistence 8.0 ms - present 5315: 65.0 ms at 11474 ms, persistence 7.9 ms - present 5298: 64.4 ms at 10474 ms, persistence 7.2 ms **Threads** (ms per frame) | thread | busy | wait | untraced | in slices < 20 us | largest | |---|---|---|---|---|---| | title | 0.1 (0 %) | 11.3 (19 %) | 47.6 | 0.4 | Shader.ResolveGraphicsStagesAbi 0.0, Shader.ResolveAbi 0.0 | | queue worker 0x0 | 13.0 (22 %) | 0.0 (0 %) | 46.0 | 50.0 | Driver.Packet 13.0, Driver.EndSubmission 0.0 | | draw committer | 24.6 (42 %) | 0.2 (0 %) | 34.2 | 37.4 | Graphics.Draw 23.1, Recorder.Submit 1.0 | | title | 0.0 (0 %) | 0.0 (0 %) | 59.0 | 0.0 | Shader.ResolveAbi 0.0, Shader.ResolveGraphicsStagesAbi 0.0 | | title | 0.0 (0 %) | 0.0 (0 %) | 59.0 | 0.0 | Shader.ResolveAbi 0.0, Shader.ResolveGraphicsStagesAbi 0.0 | | title | 0.0 (0 %) | 0.0 (0 %) | 59.0 | 0.0 | Shader.ResolveAbi 0.0, Shader.ResolveGraphicsStagesAbi 0.0 | | title | 0.0 (0 %) | 0.0 (0 %) | 59.0 | 0.1 | Shader.ResolveAbi 0.0, Shader.ResolveGraphicsStagesAbi 0.0 | | presenter | 0.8 (1 %) | 10.8 (18 %) | 47.4 | 0.0 | VideoOut.Flip 11.6, Driver.Present 0.0 | | title | 0.0 (0 %) | 0.0 (0 %) | 59.0 | 0.0 | Shader.ResolveAbi 0.0, Shader.ResolveGraphicsStagesAbi 0.0 | | title | 0.0 (0 %) | 0.0 (0 %) | 59.0 | 0.0 | Shader.ResolveAbi 0.0, Shader.ResolveGraphicsStagesAbi 0.0 | | title | 0.0 (0 %) | 0.0 (0 %) | 59.0 | 0.0 | Shader.ResolveAbi 0.0, Shader.ResolveGraphicsStagesAbi 0.0 | | title | 0.0 (0 %) | 0.0 (0 %) | 59.0 | 0.0 | Shader.ResolveAbi 0.0, Shader.ResolveGraphicsStagesAbi 0.0 | | title | 0.0 (0 %) | 0.0 (0 %) | 59.0 | 0.0 | Shader.ResolveAbi 0.0, Shader.ResolveGraphicsStagesAbi 0.0 | | title | 0.0 (0 %) | 0.0 (0 %) | 59.0 | 0.0 | Shader.ResolveAbi 0.0, Shader.ResolveGraphicsStagesAbi 0.0 | | title | 0.0 (0 %) | 0.0 (0 %) | 59.0 | 0.0 | Shader.ResolveAbi 0.0, Shader.ResolveGraphicsStagesAbi 0.0 | | title | 0.0 (0 %) | 0.0 (0 %) | 59.0 | 0.0 | Shader.ResolveAbi 0.0, Shader.ResolveGraphicsStagesAbi 0.0 | | gpu | 33.0 (56 %) | 0.0 (0 %) | 26.1 | 0.0 | batch 33.0 | **Largest slices** (ms per frame, inclusive, all threads): batch 33.0, Graphics.Draw 23.1, Graphics.Draw.draw_and_resource_release 14.3, Driver.Packet 13.0, VideoOut.Flip 11.6, Driver.Present 11.4, VideoOut.Flip.present 11.4, Recorder.WaitSerial 11.3, Driver.Present.render_fence_wait 10.6, Vulkan.Retire 10.6 **Longest waits** - Recorder.WaitSerial (title) 12.7 ms at 4894 ms, present 5204 - Recorder.WaitSerial (title) 12.7 ms at 5009 ms, present 5205 - Recorder.WaitSerial (title) 12.5 ms at 1078 ms, present 5139 - Recorder.WaitSerial (title) 12.5 ms at 3477 ms, present 5180 - Recorder.WaitSerial (title) 12.5 ms at 6555 ms, present 5231 - Recorder.WaitSerial (title) 12.4 ms at 6074 ms, present 5223 - Recorder.WaitSerial (title) 12.4 ms at 4778 ms, present 5201 - Recorder.WaitSerial (title) 12.4 ms at 4602 ms, present 5199 - Recorder.WaitSerial (title) 12.4 ms at 10359 ms, present 5296 - Recorder.WaitSerial (title) 12.4 ms at 5957 ms, present 5221 **Largest GPU batches** (GPU ranges inside, and the CPU slices that recorded each, inclusive) - batch 60: 9.4 ms at 122 ms, present 5122: GPU no ranges; recorded by Driver.Packet (queue worker 0x0) 9.3, Driver.Packet.dispatch (queue worker 0x0) 4.8, Driver.Packet.draw (queue worker 0x0) 3.3, Driver.Draw (queue worker 0x0) 3.2 - batch 7772: 9.3 ms at 12528 ms, present 5332: GPU no ranges; recorded by Graphics.Draw (draw committer) 0.5, Graphics.Draw.draw_and_resource_release (draw committer) 0.5, Resources.Complete (draw committer) 0.1 - batch 8690: 9.3 ms at 13997 ms, present 5357: GPU no ranges; recorded by Graphics.Draw (draw committer) 0.5, Graphics.Draw.draw_and_resource_release (draw committer) 0.5, Resources.Complete (draw committer) 0.1 - batch 8833: 9.2 ms at 14229 ms, present 5361: GPU no ranges; recorded by Graphics.Draw (draw committer) 0.4, Graphics.Draw.draw_and_resource_release (draw committer) 0.4, Resources.Complete (draw committer) 0.1 - batch 4569: 9.2 ms at 7378 ms, present 5245: GPU no ranges; recorded by Graphics.Draw (draw committer) 0.5, Graphics.Draw.draw_and_resource_release (draw committer) 0.5, Resources.Complete (draw committer) 0.1 </details> <details> <summary>Digest of this PR `4a2c126ca7a`, run 1</summary> **seconds 200:15** from present 5146: 258 presents, frame p50 57.7 / p90 61.2 / p99 66.1 / max 69.9 ms, GPU busy 32.9 ms per present NVIDIA GeForce RTX 2080 Ti, NVIDIA 617.14, Windows 10.0.26300, 3840x2160, commit 4a2c126ca7a9, dropped: yes ```json {"commit":"4a2c126ca7a9","dirty":false,"env":{"APS5_TRACE_DIR":"<path>","APS5_TRACE_SECONDS":"200:15"},"gpu":"NVIDIA GeForce RTX 2080 Ti","driver":"NVIDIA 617.14","os":"Windows 10.0.26300","cpu":"Intel(R) Core(TM) i9-9900K CPU @ 3.60GHz","cpu_threads":16,"memory_mib":32700,"title_id":"PPSA05324","title":"Sonic Origins","content_version":"02.002.000","resolution":"3840x2160","window":{"spec":"seconds 200:15","first_present":5146,"ms":15032.523},"presents":258,"frame_ms":{"p50":57.69,"p90":61.178,"p99":66.095,"max":69.921},"gpu_busy_ms_per_present":32.94,"worker_busy_pct":{"queue worker 0x0":96.603},"phase_totals_ms":{"Driver.Completion":2.1,"Driver.Dispatch":669.01,"Driver.Dispatch.capture_resources":15.68,"Driver.Dispatch.decode_key_device_setup":10.127,"Driver.Dispatch.lookup_cache":11.939,"Driver.Dispatch.materialize":2.694,"Driver.Dispatch.prepared_invocation":2.486,"Driver.Draw":10148.644,"Driver.Draw.device_setup":799.031,"Driver.Draw.draw_enqueued":2175.515,"Driver.Draw.post_compile_prepare":115.055,"Driver.Draw.prepare":1226.169,"Driver.Draw.shader_compile_and_link":5572.625,"Driver.EndSubmission":16.385,"Driver.Packet":14503.383,"Driver.Packet.device_lock":169.554,"Driver.Packet.dispatch":1801.892,"Driver.Packet.draw":10365.316,"Driver.Packet.execute":381.852,"Driver.Packet.flip_flush":7.394,"Driver.Packet.flush_between_packets":471.374,"Driver.Packet.memory_wait":0.026,"Driver.Packet.pipeline_drain":346.218,"Driver.Packet.pipeline_prepare":278.092,"Driver.Packet.prepare_memory":278.292,"Driver.Packet.rendering_wait":0.291,"Driver.Present":2972.961,"Driver.Present.acquire_image":3.241,"Driver.Present.device_setup":0.217,"Driver.Present.gpu_mutex_wait":49.369,"Driver.Present.inflight_wait":0.741,"Driver.Present.present_display_buffer":44.253,"Driver.Present.queue_present":105.464,"Driver.Present.release_and_callback":0.801,"Driver.Present.render_fence_wait":2767.995,"Driver.Present.resize":0.488,"Driver.Present.validate":0.076,"Driver.Suspend":0.053,"GpuMutex.wait.dispatch":0.137,"GpuMutex.wait.draw":34.391,"GpuMutex.wait.end":0.647,"GpuMutex.wait.fill":21.483,"GpuMutex.wait.flush":1.893,"GpuMutex.wait.label":2.398,"GpuMutex.wait.other":4.941,"GpuMutex.wait.present":48.528,"GpuMutex.wait.wait":1.489,"Graphics.Draw":9899.812,"Graphics.Draw.draw_and_resource_release":7675.24,"Graphics.Draw.index_upload":620.681,"Graphics.Draw.validate":735.455,"Graphics.Draw.vertex_upload":688.061,"Graphics.DrawWithRecipe":79.594,"Graphics.DrawWithRecipe.draw_and_resource_release":76.793,"Graphics.DrawWithRecipe.index_upload":0.253,"Graphics.DrawWithRecipe.validate":1.248,"Graphics.DrawWithRecipe.vertex_upload":0.581,"Recorder.Reap":81.248,"Recorder.Submit":288.718,"Recorder.WaitSerial":2935.124,"Resources.Complete":60.668,"Resources.Prepare":112.436,"Shader.DrawStage":3485.718,"Shader.DrawStage.capture_resources":1676.249,"Shader.DrawStage.materialize":830.319,"Shader.DrawStage.prepared_invocation":890.133,"Shader.ResolveAbi":154.274,"Shader.ResolveGraphicsAbi":55.904,"Shader.ResolveGraphicsStagesAbi":147.464,"VideoOut.Flip":3016.682,"VideoOut.Flip.completion_mutex_wait":0.772,"VideoOut.Flip.config_mutex_wait":0.066,"VideoOut.Flip.frame_limit":0.161,"VideoOut.Flip.notify_game":27.891,"VideoOut.Flip.present":2963.577,"VideoOut.Flip.validate":0.308,"VideoOut.Flip.vblank_wait":0.187,"VideoOut.Flip.window_prepare":0.391,"VideoOut.Flip.window_title":22.988,"VideoOut.Readiness":0.881,"VideoOut.Readiness.locks_validate":0.295,"Vulkan.Acquire":2.942,"Vulkan.Acquire.acquire_fence_wait":0.508,"Vulkan.Acquire.acquire_image":1.587,"Vulkan.Acquire.fence_reset":0.608,"Vulkan.Acquire.retired_swapchains":0.148,"Vulkan.Dispatch":224.312,"Vulkan.Dispatch.command_record":98.312,"Vulkan.Dispatch.shader_resources":124.78,"Vulkan.DrawFromRecipe":81.022,"Vulkan.Present":23.826,"Vulkan.Present.command_record_scale":8.139,"Vulkan.Present.pixel_upload":5.39,"Vulkan.Present.queue_submit":9.937,"Vulkan.QueuePresent":104.027,"Vulkan.QueuePresent.queue_present":103.359,"Vulkan.Retire":2767.662,"Vulkan.Retire.wait":2761.946},"top_phases_ms_per_frame":{"Driver.Packet":56.215,"Driver.Packet.draw":40.176,"Driver.Draw":39.336,"Graphics.Draw":38.371,"Graphics.Draw.draw_and_resource_release":29.749,"Driver.Draw.shader_compile_and_link":21.599,"Shader.DrawStage":13.511,"VideoOut.Flip":11.693},"owned_draw_counts":{"OwnedDraw.evicted_other":23626},"graphics_track":{"Graphics.Barrier.copy":2580,"Graphics.Barrier.dispatch-lead":1345,"Graphics.Barrier.dispatch-trail":2841,"Graphics.Barrier.draw":39806,"Graphics.Barrier.fill-clear":2580,"Graphics.Barrier.label-run":18974,"Graphics.Barrier.present-blit":516,"Graphics.Barrier.shadow-publish":518,"Graphics.Barrier.staging-in":2598,"Graphics.Barrier.staging-out":516,"Graphics.Barrier.storage-upload":30454,"Graphics.Barrier.storage-writeback":3393,"Graphics.BarrierMerged.dispatch-lead":1496,"Graphics.BarrierMerged.label-run":6,"Graphics.BarrierMerged.shadow-publish":518,"Graphics.BarrierMerged.staging-in":502,"Graphics.BarrierMerged.staging-out":516,"Graphics.BarrierMerged.storage-writeback":749,"Graphics.Copy":1808,"Graphics.Copy.bytes":16557504,"Graphics.RenderPass":19312,"Graphics.RenderPass.Close.command":12040,"Graphics.RenderPass.Close.image":513,"Graphics.RenderPass.Close.key":1352,"Graphics.RenderPass.Close.label":6,"Graphics.RenderPass.Close.new-batch":5402,"Graphics.RenderPass.Continued":486626},"trace_dropped":true,"trace_dropped_threads":{"queue worker 0x0":{"events_full_after_s":6.226,"events_lost":377128,"totals_full":false},"draw committer":{"events_full_after_s":13.904,"events_lost":21735,"totals_full":false}},"trace":"aps5-trace-4a2c126ca7a9-71740.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. - queue worker 0x0: 377128 events lost; buffer full at 6225.8 ms - draw committer: 21735 events lost; buffer full at 13904.0 ms **Slowest frames** (largest slices inside each, inclusive) - present 5154: 69.9 ms at 468 ms: Driver.Packet (queue worker 0x0) 43.8, Graphics.Draw (draw committer) 36.9, batch (gpu) 33.4, Driver.Packet.draw (queue worker 0x0) 32.6 - present 5176: 67.2 ms at 1769 ms: Driver.Packet (queue worker 0x0) 39.6, batch (gpu) 36.3, Driver.Packet.draw (queue worker 0x0) 28.9, Graphics.Draw (draw committer) 28.8 - present 5391: 66.1 ms at 14266 ms: batch (gpu) 34.0, VideoOut.Flip (presenter) 12.1, VideoOut.Flip.present (presenter) 11.9, Driver.Present (presenter) 11.9 - present 5400: 65.1 ms at 14794 ms: batch (gpu) 32.7, VideoOut.Flip (presenter) 11.8, VideoOut.Flip.present (presenter) 11.6, Driver.Present (presenter) 11.6 - present 5245: 64.8 ms at 5778 ms: Driver.Packet (queue worker 0x0) 38.9, batch (gpu) 34.3, Driver.Packet.draw (queue worker 0x0) 29.0, Driver.Draw (queue worker 0x0) 28.1 **Persistent spikes** (frame time above the fastest frame that separates it from a longer frame; one entry per stall, not per frame) - present 5154: 69.9 ms at 468 ms, persistence 14.4 ms - present 5176: 67.2 ms at 1769 ms, persistence 11.0 ms - present 5391: 66.1 ms at 14266 ms, persistence 10.6 ms - present 5245: 64.8 ms at 5778 ms, persistence 9.2 ms - present 5400: 65.1 ms at 14794 ms, persistence 8.4 ms - present 5366: 64.5 ms at 12798 ms, persistence 8.3 ms - present 5290: 64.6 ms at 8424 ms, persistence 8.0 ms - present 5378: 64.1 ms at 13498 ms, persistence 7.7 ms - present 5348: 63.1 ms at 11767 ms, persistence 7.5 ms - present 5228: 63.9 ms at 4783 ms, persistence 7.4 ms **Threads** (ms per frame) | thread | busy | wait | untraced | in slices < 20 us | largest | |---|---|---|---|---|---| | title | 0.1 (0 %) | 11.4 (20 %) | 46.8 | 0.4 | Shader.ResolveGraphicsStagesAbi 0.0, Shader.ResolveAbi 0.0 | | queue worker 0x0 | 13.0 (22 %) | 0.0 (0 %) | 45.3 | 50.8 | Driver.Packet 12.9, Driver.EndSubmission 0.0 | | draw committer | 23.1 (40 %) | 0.2 (0 %) | 34.9 | 33.7 | Graphics.Draw 21.9, Recorder.Submit 0.8 | | title | 0.0 (0 %) | 0.0 (0 %) | 58.2 | 0.0 | Shader.ResolveAbi 0.0, Shader.ResolveGraphicsStagesAbi 0.0 | | title | 0.0 (0 %) | 0.0 (0 %) | 58.2 | 0.0 | Shader.ResolveAbi 0.0, Shader.ResolveGraphicsAbi 0.0 | | title | 0.0 (0 %) | 0.0 (0 %) | 58.2 | 0.0 | Shader.ResolveAbi 0.0, Shader.ResolveGraphicsStagesAbi 0.0 | | title | 0.0 (0 %) | 0.0 (0 %) | 58.2 | 0.0 | Shader.ResolveAbi 0.0, Shader.ResolveGraphicsStagesAbi 0.0 | | presenter | 0.8 (1 %) | 10.9 (19 %) | 46.5 | 0.0 | VideoOut.Flip 11.7, Driver.Present 0.0 | | title | 0.0 (0 %) | 0.0 (0 %) | 58.2 | 0.0 | Shader.ResolveAbi 0.0, Shader.ResolveGraphicsStagesAbi 0.0 | | title | 0.0 (0 %) | 0.0 (0 %) | 58.2 | 0.0 | Shader.ResolveAbi 0.0, Shader.ResolveGraphicsStagesAbi 0.0 | | title | 0.0 (0 %) | 0.0 (0 %) | 58.2 | 0.0 | Shader.ResolveAbi 0.0, Shader.ResolveGraphicsStagesAbi 0.0 | | title | 0.0 (0 %) | 0.0 (0 %) | 58.2 | 0.0 | Shader.ResolveAbi 0.0, Shader.ResolveGraphicsStagesAbi 0.0 | | title | 0.0 (0 %) | 0.0 (0 %) | 58.2 | 0.0 | Shader.ResolveAbi 0.0, Shader.ResolveGraphicsStagesAbi 0.0 | | title | 0.0 (0 %) | 0.0 (0 %) | 58.2 | 0.0 | Shader.ResolveAbi 0.0, Shader.ResolveGraphicsStagesAbi 0.0 | | title | 0.0 (0 %) | 0.0 (0 %) | 58.2 | 0.0 | Shader.ResolveAbi 0.0, Shader.ResolveGraphicsStagesAbi 0.0 | | title | 0.0 (0 %) | 0.0 (0 %) | 58.2 | 0.1 | Shader.ResolveAbi 0.0, Shader.ResolveGraphicsStagesAbi 0.0 | | gpu | 33.0 (57 %) | 0.0 (0 %) | 25.2 | 0.0 | batch 33.0 | **Largest slices** (ms per frame, inclusive, all threads): batch 33.0, Graphics.Draw 21.9, Graphics.Draw.draw_and_resource_release 14.5, Driver.Packet 12.9, VideoOut.Flip 11.7, Driver.Present 11.5, VideoOut.Flip.present 11.5, Recorder.WaitSerial 11.4, Driver.Present.render_fence_wait 10.7, Vulkan.Retire 10.7 **Longest waits** - Recorder.WaitSerial (title) 12.8 ms at 1594 ms, present 5173 - Recorder.WaitSerial (title) 12.7 ms at 10448 ms, present 5324 - Recorder.WaitSerial (title) 12.7 ms at 6957 ms, present 5264 - Recorder.WaitSerial (title) 12.7 ms at 1769 ms, present 5176 - Recorder.WaitSerial (title) 12.7 ms at 3687 ms, present 5208 - Recorder.WaitSerial (title) 12.6 ms at 1072 ms, present 5163 - Recorder.WaitSerial (title) 12.6 ms at 1478 ms, present 5171 - Recorder.WaitSerial (title) 12.5 ms at 4153 ms, present 5216 - Recorder.WaitSerial (title) 12.5 ms at 6019 ms, present 5248 - Recorder.WaitSerial (title) 12.5 ms at 6899 ms, present 5263 **Largest GPU batches** (GPU ranges inside, and the CPU slices that recorded each, inclusive) - batch 939: 9.4 ms at 1529 ms, present 5171: GPU no ranges; recorded by Graphics.Draw (draw committer) 0.5, Graphics.Draw.draw_and_resource_release (draw committer) 0.5, Resources.Complete (draw committer) 0.0 - batch 2705: 9.3 ms at 4320 ms, present 5219: GPU no ranges; recorded by Graphics.Draw (draw committer) 0.5, Graphics.Draw.draw_and_resource_release (draw committer) 0.5, Resources.Complete (draw committer) 0.0 - batch 576: 9.3 ms at 948 ms, present 5161: GPU no ranges; recorded by Graphics.Draw (draw committer) 0.5, Graphics.Draw.draw_and_resource_release (draw committer) 0.5, Resources.Complete (draw committer) 0.0 - batch 1529: 9.2 ms at 2464 ms, present 5187: GPU no ranges; recorded by Graphics.Draw (draw committer) 0.4, Graphics.Draw.draw_and_resource_release (draw committer) 0.4, Resources.Complete (draw committer) 0.0 - batch 868: 9.2 ms at 1413 ms, present 5169: GPU no ranges; recorded by Graphics.Draw (draw committer) 0.5, Graphics.Draw.draw_and_resource_release (draw committer) 0.5, Resources.Complete (draw committer) 0.0 </details> <details> <summary>Digest of this PR `4a2c126ca7a`, run 2</summary> **seconds 200:15** from present 5139: 258 presents, frame p50 57.8 / p90 60.4 / p99 65.0 / max 67.0 ms, GPU busy 32.7 ms per present NVIDIA GeForce RTX 2080 Ti, NVIDIA 617.14, Windows 10.0.26300, 3840x2160, commit 4a2c126ca7a9, dropped: yes ```json {"commit":"4a2c126ca7a9","dirty":false,"env":{"APS5_TRACE_DIR":"<path>","APS5_TRACE_SECONDS":"200:15"},"gpu":"NVIDIA GeForce RTX 2080 Ti","driver":"NVIDIA 617.14","os":"Windows 10.0.26300","cpu":"Intel(R) Core(TM) i9-9900K CPU @ 3.60GHz","cpu_threads":16,"memory_mib":32700,"title_id":"PPSA05324","title":"Sonic Origins","content_version":"02.002.000","resolution":"3840x2160","window":{"spec":"seconds 200:15","first_present":5139,"ms":15019.062},"presents":258,"frame_ms":{"p50":57.786,"p90":60.435,"p99":64.983,"max":67.003},"gpu_busy_ms_per_present":32.702,"worker_busy_pct":{"queue worker 0x0":96.575},"phase_totals_ms":{"Driver.Completion":1.551,"Driver.Dispatch":669.534,"Driver.Dispatch.capture_resources":16.184,"Driver.Dispatch.decode_key_device_setup":10.509,"Driver.Dispatch.lookup_cache":12.329,"Driver.Dispatch.materialize":2.829,"Driver.Dispatch.prepared_invocation":2.547,"Driver.Draw":10255.788,"Driver.Draw.device_setup":800.942,"Driver.Draw.draw_enqueued":2228.156,"Driver.Draw.post_compile_prepare":117.499,"Driver.Draw.prepare":1233.938,"Driver.Draw.shader_compile_and_link":5614.945,"Driver.EndSubmission":9.636,"Driver.Packet":14493.432,"Driver.Packet.device_lock":166.127,"Driver.Packet.dispatch":1731.977,"Driver.Packet.draw":10470.855,"Driver.Packet.execute":385.27,"Driver.Packet.flip_flush":7.755,"Driver.Packet.flush_between_packets":472.407,"Driver.Packet.memory_wait":0.035,"Driver.Packet.pipeline_drain":338.928,"Driver.Packet.pipeline_prepare":272.924,"Driver.Packet.prepare_memory":270.233,"Driver.Packet.rendering_wait":0.29,"Driver.Present":2944.181,"Driver.Present.acquire_image":3.3,"Driver.Present.device_setup":0.243,"Driver.Present.gpu_mutex_wait":71.762,"Driver.Present.inflight_wait":0.801,"Driver.Present.present_display_buffer":43.129,"Driver.Present.queue_present":111.43,"Driver.Present.release_and_callback":0.635,"Driver.Present.render_fence_wait":2712.055,"Driver.Present.resize":0.462,"Driver.Present.validate":0.103,"Driver.Suspend":0.05,"GpuMutex.wait.dispatch":0.065,"GpuMutex.wait.draw":26.736,"GpuMutex.wait.end":0.69,"GpuMutex.wait.fill":24.707,"GpuMutex.wait.flush":3.669,"GpuMutex.wait.label":2.638,"GpuMutex.wait.other":2.589,"GpuMutex.wait.present":71.014,"GpuMutex.wait.wait":2.054,"Graphics.Draw":9694.756,"Graphics.Draw.draw_and_resource_release":7491.699,"Graphics.Draw.index_upload":605.016,"Graphics.Draw.validate":749.248,"Graphics.Draw.vertex_upload":677.67,"Graphics.DrawWithRecipe":102.621,"Graphics.DrawWithRecipe.draw_and_resource_release":97.832,"Graphics.DrawWithRecipe.index_upload":0.273,"Graphics.DrawWithRecipe.validate":1.637,"Graphics.DrawWithRecipe.vertex_upload":0.775,"Recorder.Reap":77.705,"Recorder.Submit":285.602,"Recorder.WaitSerial":2904.981,"Resources.Complete":60.347,"Resources.Prepare":112.258,"Shader.DrawStage":3569.501,"Shader.DrawStage.capture_resources":1678.91,"Shader.DrawStage.materialize":883.913,"Shader.DrawStage.prepared_invocation":916.328,"Shader.ResolveAbi":154.027,"Shader.ResolveGraphicsAbi":56.574,"Shader.ResolveGraphicsStagesAbi":145.15,"VideoOut.Flip":2981.969,"VideoOut.Flip.completion_mutex_wait":0.674,"VideoOut.Flip.config_mutex_wait":0.031,"VideoOut.Flip.frame_limit":0.193,"VideoOut.Flip.notify_game":24.695,"VideoOut.Flip.present":2933.814,"VideoOut.Flip.validate":0.359,"VideoOut.Flip.vblank_wait":0.181,"VideoOut.Flip.window_prepare":0.419,"VideoOut.Flip.window_title":21.236,"VideoOut.Readiness":1.059,"VideoOut.Readiness.locks_validate":0.544,"Vulkan.Acquire":3.02,"Vulkan.Acquire.acquire_fence_wait":0.488,"Vulkan.Acquire.acquire_image":1.676,"Vulkan.Acquire.fence_reset":0.61,"Vulkan.Acquire.retired_swapchains":0.129,"Vulkan.Dispatch":222.594,"Vulkan.Dispatch.command_record":96.893,"Vulkan.Dispatch.shader_resources":124.317,"Vulkan.DispatchRecipe":0.814,"Vulkan.DispatchRecipe.command_record":0.81,"Vulkan.DrawFromRecipe":104.356,"Vulkan.Present":22.929,"Vulkan.Present.command_record_scale":7.771,"Vulkan.Present.pixel_upload":5.812,"Vulkan.Present.queue_submit":9.029,"Vulkan.QueuePresent":110.063,"Vulkan.QueuePresent.queue_present":109.246,"Vulkan.Retire":2711.832,"Vulkan.Retire.wait":2707.114},"top_phases_ms_per_frame":{"Driver.Packet":56.176,"Driver.Packet.draw":40.585,"Driver.Draw":39.751,"Graphics.Draw":37.577,"Graphics.Draw.draw_and_resource_release":29.038,"Driver.Draw.shader_compile_and_link":21.763,"Shader.DrawStage":13.835,"VideoOut.Flip":11.558},"owned_draw_counts":{"OwnedDraw.evicted_other":24007},"graphics_track":{"Graphics.Barrier.copy":2580,"Graphics.Barrier.dispatch-lead":1325,"Graphics.Barrier.dispatch-trail":2841,"Graphics.Barrier.draw":39819,"Graphics.Barrier.fill-clear":2580,"Graphics.Barrier.label-run":18991,"Graphics.Barrier.present-blit":516,"Graphics.Barrier.shadow-publish":518,"Graphics.Barrier.staging-in":2625,"Graphics.Barrier.staging-out":516,"Graphics.Barrier.storage-upload":30454,"Graphics.Barrier.storage-writeback":3411,"Graphics.BarrierMerged.dispatch-lead":1516,"Graphics.BarrierMerged.label-run":13,"Graphics.BarrierMerged.shadow-publish":518,"Graphics.BarrierMerged.staging-in":475,"Graphics.BarrierMerged.staging-out":516,"Graphics.BarrierMerged.storage-writeback":731,"Graphics.Copy":1808,"Graphics.Copy.bytes":16557504,"Graphics.RenderPass":19346,"Graphics.RenderPass.Close.command":12035,"Graphics.RenderPass.Close.image":512,"Graphics.RenderPass.Close.key":1382,"Graphics.RenderPass.Close.label":13,"Graphics.RenderPass.Close.new-batch":5404,"Graphics.RenderPass.Continued":486593},"trace_dropped":true,"trace_dropped_threads":{"queue worker 0x0":{"events_full_after_s":6.111,"events_lost":383951,"totals_full":false}},"trace":"aps5-trace-4a2c126ca7a9-95848.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. - queue worker 0x0: 383951 events lost; buffer full at 6111.0 ms **Slowest frames** (largest slices inside each, inclusive) - present 5340: 67.0 ms at 11699 ms: batch (gpu) 31.6, Graphics.Draw (draw committer) 24.5, Graphics.Draw.draw_and_resource_release (draw committer) 14.8, VideoOut.Flip (presenter) 10.1 - present 5310: 65.3 ms at 9958 ms: batch (gpu) 33.2, Graphics.Draw (draw committer) 26.1, Graphics.Draw.draw_and_resource_release (draw committer) 16.2, VideoOut.Flip (presenter) 11.7 - present 5344: 65.0 ms at 11937 ms: batch (gpu) 33.5, Graphics.Draw (draw committer) 27.8, Graphics.Draw.draw_and_resource_release (draw committer) 21.4, VideoOut.Flip (presenter) 11.8 - present 5172: 64.8 ms at 1921 ms: Driver.Packet (queue worker 0x0) 38.0, batch (gpu) 37.8, Graphics.Draw (draw committer) 26.8, Driver.Packet.draw (queue worker 0x0) 26.3 - present 5224: 64.8 ms at 4936 ms: Driver.Packet (queue worker 0x0) 37.6, batch (gpu) 34.5, Graphics.Draw (draw committer) 28.1, Driver.Packet.draw (queue worker 0x0) 27.8 **Persistent spikes** (frame time above the fastest frame that separates it from a longer frame; one entry per stall, not per frame) - present 5340: 67.0 ms at 11699 ms, persistence 12.2 ms - present 5310: 65.3 ms at 9958 ms, persistence 10.5 ms - present 5172: 64.8 ms at 1921 ms, persistence 9.9 ms - present 5224: 64.8 ms at 4936 ms, persistence 9.0 ms - present 5344: 65.0 ms at 11937 ms, persistence 8.9 ms - present 5379: 64.5 ms at 13967 ms, persistence 8.7 ms - present 5276: 64.6 ms at 7965 ms, persistence 8.1 ms - present 5253: 63.9 ms at 6621 ms, persistence 7.8 ms - present 5293: 64.2 ms at 8964 ms, persistence 7.4 ms - present 5190: 62.8 ms at 2965 ms, persistence 7.3 ms **Threads** (ms per frame) | thread | busy | wait | untraced | in slices < 20 us | largest | |---|---|---|---|---|---| | title | 0.1 (0 %) | 11.3 (19 %) | 46.9 | 0.4 | Shader.ResolveGraphicsStagesAbi 0.0, Shader.ResolveAbi 0.0 | | queue worker 0x0 | 12.8 (22 %) | 0.0 (0 %) | 45.4 | 50.4 | Driver.Packet 12.8, Driver.EndSubmission 0.0 | | draw committer | 24.1 (41 %) | 0.2 (0 %) | 33.9 | 38.2 | Graphics.Draw 22.7, Recorder.Submit 0.9 | | title | 0.0 (0 %) | 0.0 (0 %) | 58.2 | 0.0 | Shader.ResolveAbi 0.0, Shader.ResolveGraphicsStagesAbi 0.0 | | title | 0.0 (0 %) | 0.0 (0 %) | 58.2 | 0.0 | Shader.ResolveAbi 0.0, Shader.ResolveGraphicsStagesAbi 0.0 | | title | 0.0 (0 %) | 0.0 (0 %) | 58.2 | 0.0 | Shader.ResolveAbi 0.0, Shader.ResolveGraphicsStagesAbi 0.0 | | presenter | 0.8 (1 %) | 10.8 (19 %) | 46.6 | 0.0 | VideoOut.Flip 11.6, Driver.Present 0.0 | | title | 0.0 (0 %) | 0.0 (0 %) | 58.2 | 0.0 | Shader.ResolveAbi 0.0, Shader.ResolveGraphicsAbi 0.0 | | title | 0.0 (0 %) | 0.0 (0 %) | 58.2 | 0.0 | Shader.ResolveAbi 0.0, Shader.ResolveGraphicsStagesAbi 0.0 | | title | 0.0 (0 %) | 0.0 (0 %) | 58.2 | 0.0 | Shader.ResolveAbi 0.0, Shader.ResolveGraphicsAbi 0.0 | | title | 0.0 (0 %) | 0.0 (0 %) | 58.2 | 0.1 | Shader.ResolveAbi 0.0, Shader.ResolveGraphicsStagesAbi 0.0 | | title | 0.0 (0 %) | 0.0 (0 %) | 58.2 | 0.0 | Shader.ResolveAbi 0.0, Shader.ResolveGraphicsAbi 0.0 | | title | 0.0 (0 %) | 0.0 (0 %) | 58.2 | 0.0 | Shader.ResolveAbi 0.0, Shader.ResolveGraphicsStagesAbi 0.0 | | title | 0.0 (0 %) | 0.0 (0 %) | 58.2 | 0.0 | Shader.ResolveAbi 0.0, Shader.ResolveGraphicsAbi 0.0 | | title | 0.0 (0 %) | 0.0 (0 %) | 58.2 | 0.0 | Shader.ResolveAbi 0.0, Shader.ResolveGraphicsStagesAbi 0.0 | | title | 0.0 (0 %) | 0.0 (0 %) | 58.2 | 0.1 | Shader.ResolveAbi 0.0, Shader.ResolveGraphicsStagesAbi 0.0 | | gpu | 32.7 (56 %) | 0.0 (0 %) | 25.5 | 0.0 | batch 32.7 | **Largest slices** (ms per frame, inclusive, all threads): batch 32.7, Graphics.Draw 22.7, Graphics.Draw.draw_and_resource_release 13.4, Driver.Packet 12.8, VideoOut.Flip 11.6, Driver.Present 11.4, VideoOut.Flip.present 11.4, Recorder.WaitSerial 11.3, Driver.Present.render_fence_wait 10.5, Vulkan.Retire 10.5 The lists of longest waits and largest GPU batches are left out of this run to fit the description; `tools/trace_digest.py` prints them from the attached trace. </details> <details> <summary>Digest of main `f0c9b11f91c`, run 2</summary> **seconds 200:15** from present 5096: 255 presents, frame p50 58.4 / p90 61.9 / p99 67.2 / max 69.8 ms, GPU busy 33.5 ms per present NVIDIA GeForce RTX 2080 Ti, NVIDIA 617.14, Windows 10.0.26300, 3840x2160, commit f0c9b11f91cc, dropped: yes ```json {"commit":"f0c9b11f91cc","dirty":false,"env":{"APS5_TRACE_DIR":"<path>","APS5_TRACE_SECONDS":"200:15"},"gpu":"NVIDIA GeForce RTX 2080 Ti","driver":"NVIDIA 617.14","os":"Windows 10.0.26300","cpu":"Intel(R) Core(TM) i9-9900K CPU @ 3.60GHz","cpu_threads":16,"memory_mib":32700,"title_id":"PPSA05324","title":"Sonic Origins","content_version":"02.002.000","resolution":"3840x2160","window":{"spec":"seconds 200:15","first_present":5096,"ms":15033.404},"presents":255,"frame_ms":{"p50":58.431,"p90":61.851,"p99":67.167,"max":69.833},"gpu_busy_ms_per_present":33.522,"worker_busy_pct":{"queue worker 0x0":96.68},"phase_totals_ms":{"Driver.Completion":1.653,"Driver.Dispatch":669.186,"Driver.Dispatch.capture_resources":16.079,"Driver.Dispatch.decode_key_device_setup":10.131,"Driver.Dispatch.lookup_cache":11.631,"Driver.Dispatch.materialize":2.824,"Driver.Dispatch.prepared_invocation":2.47,"Driver.Draw":10178.974,"Driver.Draw.device_setup":776.476,"Driver.Draw.draw_enqueued":2224.6,"Driver.Draw.post_compile_prepare":124.366,"Driver.Draw.prepare":1219.351,"Driver.Draw.shader_compile_and_link":5581.635,"Driver.EndSubmission":11.837,"Driver.Packet":14520.716,"Driver.Packet.device_lock":166.903,"Driver.Packet.dispatch":1789.996,"Driver.Packet.draw":10387.68,"Driver.Packet.execute":378.141,"Driver.Packet.flip_flush":8.27,"Driver.Packet.flush_between_packets":485.351,"Driver.Packet.memory_wait":0.005,"Driver.Packet.pipeline_drain":361.233,"Driver.Packet.pipeline_prepare":278.494,"Driver.Packet.prepare_memory":267.891,"Driver.Packet.rendering_wait":0.294,"Driver.Present":3033.491,"Driver.Present.acquire_image":3.174,"Driver.Present.device_setup":0.222,"Driver.Present.gpu_mutex_wait":70.139,"Driver.Present.inflight_wait":0.684,"Driver.Present.present_display_buffer":44.458,"Driver.Present.queue_present":106.133,"Driver.Present.release_and_callback":0.795,"Driver.Present.render_fence_wait":2807.044,"Driver.Present.resize":0.528,"Driver.Present.validate":0.068,"Driver.Suspend":0.051,"GpuMutex.wait.dispatch":0.114,"GpuMutex.wait.draw":33.896,"GpuMutex.wait.end":1.194,"GpuMutex.wait.fill":20.413,"GpuMutex.wait.flush":2.772,"GpuMutex.wait.hook":0.014,"GpuMutex.wait.label":4.236,"GpuMutex.wait.other":5.172,"GpuMutex.wait.present":69.421,"GpuMutex.wait.wait":1.877,"Graphics.Draw":9753.406,"Graphics.Draw.draw_and_resource_release":7556.125,"Graphics.Draw.index_upload":596.761,"Graphics.Draw.validate":761.118,"Graphics.Draw.vertex_upload":664.291,"Graphics.DrawWithRecipe":97.379,"Graphics.DrawWithRecipe.draw_and_resource_release":93.266,"Graphics.DrawWithRecipe.index_upload":0.271,"Graphics.DrawWithRecipe.validate":1.482,"Graphics.DrawWithRecipe.vertex_upload":0.704,"Recorder.Reap":118.637,"Recorder.Submit":310.389,"Recorder.WaitSerial":2997.027,"Resources.Complete":71.363,"Resources.Prepare":117.664,"Shader.DrawStage":3577.406,"Shader.DrawStage.capture_resources":1676.972,"Shader.DrawStage.materialize":911.674,"Shader.DrawStage.prepared_invocation":900.522,"Shader.ResolveAbi":151.952,"Shader.ResolveGraphicsAbi":55.581,"Shader.ResolveGraphicsStagesAbi":147.385,"VideoOut.Flip":3060.807,"VideoOut.Flip.completion_mutex_wait":0.664,"VideoOut.Flip.config_mutex_wait":0.048,"VideoOut.Flip.frame_limit":0.174,"VideoOut.Flip.notify_game":12.654,"VideoOut.Flip.present":3024.935,"VideoOut.Flip.validate":0.331,"VideoOut.Flip.vblank_wait":0.291,"VideoOut.Flip.window_prepare":0.498,"VideoOut.Flip.window_title":20.877,"VideoOut.Readiness":1.115,"VideoOut.Readiness.locks_validate":0.534,"Vulkan.Acquire":2.877,"Vulkan.Acquire.acquire_fence_wait":0.506,"Vulkan.Acquire.acquire_image":1.508,"Vulkan.Acquire.fence_reset":0.634,"Vulkan.Acquire.retired_swapchains":0.129,"Vulkan.Dispatch":222.592,"Vulkan.Dispatch.command_record":95.516,"Vulkan.Dispatch.shader_resources":125.871,"Vulkan.DispatchRecipe":1.291,"Vulkan.DispatchRecipe.command_record":1.285,"Vulkan.DrawFromRecipe":99.076,"Vulkan.Present":23.847,"Vulkan.Present.command_record_scale":8.157,"Vulkan.Present.pixel_upload":5.91,"Vulkan.Present.queue_submit":9.406,"Vulkan.QueuePresent":104.698,"Vulkan.QueuePresent.queue_present":103.928,"Vulkan.Retire":2806.778,"Vulkan.Retire.wait":2801.758},"top_phases_ms_per_frame":{"Driver.Packet":56.944,"Driver.Packet.draw":40.736,"Driver.Draw":39.918,"Graphics.Draw":38.249,"Graphics.Draw.draw_and_resource_release":29.632,"Driver.Draw.shader_compile_and_link":21.889,"Shader.DrawStage":14.029,"VideoOut.Flip":12.003},"owned_draw_counts":{"OwnedDraw.evicted_other":24234},"graphics_track":{"Graphics.Barrier.copy":2550,"Graphics.Barrier.dispatch-lead":1276,"Graphics.Barrier.dispatch-trail":2808,"Graphics.Barrier.draw":39334,"Graphics.Barrier.fill-clear":2550,"Graphics.Barrier.label-run":18804,"Graphics.Barrier.present-blit":510,"Graphics.Barrier.shadow-publish":512,"Graphics.Barrier.staging-in":3081,"Graphics.Barrier.staging-out":510,"Graphics.Barrier.storage-upload":30100,"Graphics.Barrier.storage-writeback":3342,"Graphics.BarrierMerged.dispatch-lead":1532,"Graphics.BarrierMerged.label-run":16,"Graphics.BarrierMerged.shadow-publish":512,"Graphics.BarrierMerged.staging-in":901,"Graphics.BarrierMerged.staging-out":510,"Graphics.BarrierMerged.storage-writeback":752,"Graphics.Copy":2488,"Graphics.Copy.bytes":16376192,"Graphics.RenderPass":19060,"Graphics.RenderPass.Close.command":11903,"Graphics.RenderPass.Close.image":505,"Graphics.RenderPass.Close.key":1318,"Graphics.RenderPass.Close.label":16,"Graphics.RenderPass.Close.new-batch":5318,"Graphics.RenderPass.Continued":480996},"trace_dropped":true,"trace_dropped_threads":{"queue worker 0x0":{"events_full_after_s":6.057,"events_lost":387461,"totals_full":false}},"trace":"aps5-trace-f0c9b11f91cc-84916.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. - queue worker 0x0: 387461 events lost; buffer full at 6057.0 ms **Slowest frames** (largest slices inside each, inclusive) - present 5178: 69.8 ms at 4813 ms: Driver.Packet (queue worker 0x0) 46.5, Driver.Packet.draw (queue worker 0x0) 35.1, Driver.Draw (queue worker 0x0) 34.1, Graphics.Draw (draw committer) 33.8 - present 5284: 67.7 ms at 11080 ms: batch (gpu) 36.0, Graphics.Draw (draw committer) 28.9, Graphics.Draw.draw_and_resource_release (draw committer) 22.3, VideoOut.Flip (presenter) 10.4 - present 5296: 67.2 ms at 11795 ms: batch (gpu) 33.5, Graphics.Draw (draw committer) 30.6, Graphics.Draw.draw_and_resource_release (draw committer) 24.3, VideoOut.Flip (presenter) 11.4 - present 5149: 66.6 ms at 3105 ms: Driver.Packet (queue worker 0x0) 43.7, batch (gpu) 34.7, Driver.Packet.draw (queue worker 0x0) 33.2, Driver.Draw (queue worker 0x0) 31.9 - present 5282: 65.7 ms at 10954 ms: batch (gpu) 33.7, Graphics.Draw (draw committer) 29.4, Graphics.Draw.draw_and_resource_release (draw committer) 20.8, VideoOut.Flip (presenter) 11.2 **Persistent spikes** (frame time above the fastest frame that separates it from a longer frame; one entry per stall, not per frame) - present 5178: 69.8 ms at 4813 ms, persistence 13.7 ms - present 5284: 67.7 ms at 11080 ms, persistence 11.0 ms - present 5149: 66.6 ms at 3105 ms, persistence 10.3 ms - present 5296: 67.2 ms at 11795 ms, persistence 10.1 ms - present 5335: 65.4 ms at 14091 ms, persistence 9.0 ms - present 5217: 64.8 ms at 7112 ms, persistence 8.1 ms - present 5098: 64.1 ms at 117 ms, persistence 8.0 ms - present 5166: 64.7 ms at 4108 ms, persistence 7.7 ms - present 5200: 64.6 ms at 6118 ms, persistence 7.6 ms - present 5318: 64.3 ms at 13100 ms, persistence 7.4 ms **Threads** (ms per frame) | thread | busy | wait | untraced | in slices < 20 us | largest | |---|---|---|---|---|---| | title | 0.1 (0 %) | 11.8 (20 %) | 47.1 | 0.4 | Shader.ResolveGraphicsStagesAbi 0.0, Shader.ResolveAbi 0.0 | | queue worker 0x0 | 12.9 (22 %) | 0.0 (0 %) | 46.0 | 50.0 | Driver.Packet 12.9, Driver.EndSubmission 0.0 | | draw committer | 24.9 (42 %) | 0.3 (0 %) | 33.8 | 38.9 | Graphics.Draw 23.3, Recorder.Submit 1.0 | | title | 0.0 (0 %) | 0.0 (0 %) | 58.9 | 0.0 | Shader.ResolveAbi 0.0, Shader.ResolveGraphicsStagesAbi 0.0 | | title | 0.0 (0 %) | 0.0 (0 %) | 58.9 | 0.0 | Shader.ResolveAbi 0.0, Shader.ResolveGraphicsStagesAbi 0.0 | | title | 0.0 (0 %) | 0.0 (0 %) | 58.9 | 0.0 | Shader.ResolveAbi 0.0, Shader.ResolveGraphicsStagesAbi 0.0 | | title | 0.0 (0 %) | 0.0 (0 %) | 58.9 | 0.0 | Shader.ResolveAbi 0.0, Shader.ResolveGraphicsStagesAbi 0.0 | | presenter | 0.8 (1 %) | 11.3 (19 %) | 46.9 | 0.0 | VideoOut.Flip 12.0, Driver.Present 0.0 | | title | 0.0 (0 %) | 0.0 (0 %) | 58.9 | 0.0 | Shader.ResolveAbi 0.0, Shader.ResolveGraphicsStagesAbi 0.0 | | title | 0.0 (0 %) | 0.0 (0 %) | 58.9 | 0.0 | Shader.ResolveAbi 0.0, Shader.ResolveGraphicsStagesAbi 0.0 | | title | 0.0 (0 %) | 0.0 (0 %) | 58.9 | 0.1 | Shader.ResolveAbi 0.0, Shader.ResolveGraphicsStagesAbi 0.0 | | title | 0.0 (0 %) | 0.0 (0 %) | 58.9 | 0.0 | Shader.ResolveAbi 0.0, Shader.ResolveGraphicsStagesAbi 0.0 | | title | 0.0 (0 %) | 0.0 (0 %) | 58.9 | 0.0 | Shader.ResolveAbi 0.0, Shader.ResolveGraphicsStagesAbi 0.0 | | title | 0.0 (0 %) | 0.0 (0 %) | 58.9 | 0.1 | Shader.ResolveAbi 0.0, Shader.ResolveGraphicsStagesAbi 0.0 | | title | 0.0 (0 %) | 0.0 (0 %) | 58.9 | 0.1 | Shader.ResolveAbi 0.0, Shader.ResolveGraphicsStagesAbi 0.0 | | title | 0.0 (0 %) | 0.0 (0 %) | 58.9 | 0.0 | Shader.ResolveAbi 0.0, Shader.ResolveGraphicsStagesAbi 0.0 | | gpu | 33.5 (57 %) | 0.0 (0 %) | 25.5 | 0.0 | batch 33.5 | **Largest slices** (ms per frame, inclusive, all threads): batch 33.5, Graphics.Draw 23.3, Graphics.Draw.draw_and_resource_release 13.5, Driver.Packet 12.9, VideoOut.Flip 12.0, Driver.Present 11.9, VideoOut.Flip.present 11.9, Recorder.WaitSerial 11.8, Driver.Present.render_fence_wait 11.0, Vulkan.Retire 11.0 The lists of longest waits and largest GPU batches are left out of this run to fit the description; `tools/trace_digest.py` prints them from the attached trace. </details> `tools/pr_overlap.py` fails closed (exit 2): of the 1,534 open PRs, 132 share a file with this branch, and 84 of those conflict with main so it cannot compare them (30 of the 84 touch `Recorder.cpp` or `Recorder.hpp`, the rest only `ENVIRONMENT.md`). It does report three line conflicts: #17943 and #18029 (`Recorder.cpp` lines 2160-2166 in `ensureOpen`, where the batch's fence is made and their encoder thread allocates command buffers) and #17738 (the `ENVIRONMENT.md` row next to ours). So I scanned the diffs of the open PRs that touch `Recorder.cpp`, `Recorder.hpp`, `VulkanDevice.cpp`, `VulkanDevice.hpp`, `DeferredLabels.cpp`, `PacketMemory.cpp`, `PacketFlush.cpp`, `WaitMemory.cpp`, `Submission.cpp`, `QueueWorker.cpp`, `PacketExecution.cpp` or `ENVIRONMENT.md` (193 of 1,533 open) for fence, timeline, `Reap`, `WaitSerial`, `FinishUpTo`, `signaled`, `unsignaled` and counter-read lines. No open PR drops batch fences, adds `APS5_BATCH_FENCES` or changes `Reap`'s poll. Three diffs were too big for `gh pr diff` (#12315, #9508, #7642); they were read through the files API at the first scan on 2026-11-13, with no fence, timeline or `Reap` line in their `Recorder` or `VulkanDevice` patches, and not re-read today. Overlaps to declare (this PR depends on none of them; whichever merges second rebases): - #17943 and #18029 (encoder thread) change the `Recorder` constructor signature and the `ensureOpen` lines above; #18173 (draft, conflicting) moves `vkQueueSubmit` into a submitter with its own timeline values and has to keep one counter per queue (or set `fenceless` itself). None of them changes the fence poll, `Reap`, `finish` or the timeline reads. - #13863 and #13920 (opt-in compute queue lane, `AsyncLaneActive()`) add a second queue with its own timeline. One counter does not give prefix completion across two queues, so while the lane is active batches on it keep a fence (`fenceless = false`); that is theirs to set when they rebase. - #9289 (batch a dispatch run's staged copy-ins) reads `batch.fence` directly behind a `!= VK_NULL_HANDLE` check, so with fenceless batches its idle-chunk test is false and it falls back to the slower path (correct, no gain) until it asks `gpuDone`. - #10442 and #7464 call `signaled` and `unsignaled`, which now ask `gpuDone` in both modes; #18829, #17850 and #19335 add `Reap` and `FinishUpTo` calls and get the cheaper reap; #11587 (draft) reads the counter once for a MoltenVK idle check, independent of this change. - #17738 adds an `ENVIRONMENT.md` row next to the new one (textual only). ### 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) - [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 2080 Ti, driver 617.14, Windows 11 (10.0.26300) - [x] AI-assisted: yes
Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
boykopovar/AnyPS5!20066
No description provided.