perf(agc): trim push constant assembly and fragment output lookups #18174

Merged
meh7an merged 1 commit from upstream-pr/18174 into main 2026-11-14 04:34:26 +00:00
meh7an commented 2026-11-10 17:59:15 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by meh7an on 2026-11-10T17:59:15Z.


What

Two trims in the per-draw work planDraw does on the draw committer.

  • Push constants. AssemblePushConstants built the 256-byte push-constant block one byte at a time and checked overlap with a 256-entry bool array. It now keeps one bit per DWORD in a std::uint64_t and copies each stage's range with one memcpy. The Require checks are the same, in the same order, with the same messages.
    • Every range is DWORD aligned (checked first), so two ranges share a byte exactly when they share a DWORD.
    • The block is 64 DWORDs (static_assert), and the slot check limits a range to 32 DWORDs, so the mask and the shift stay inside 64 bits.
  • Fragment outputs. CachedFragmentOutputs already let a thread serve a repeat of its last validation key without the shared memo, but only under APS5_DRAW_PIPELINE (CommitTrims). It now does so by default.
    • The last key lives in a ThreadScratch slot: one TEB read, where it was an FLS value plus two emulated thread_locals on MinGW.
    • It is remembered after a fresh validation too, not only after a memo hit.
    • The memo's value is copied out under validationMutex, so the lock is not held while the key is copied.
    • The skip rests on the shared memo's own premise: the outputs are a function of the key. A failed validation is never remembered.
    • APS5_NO_LAST_FRAGMENT_OUTPUTS=1 asks the memo for every draw (new ENVIRONMENT.md row). ARCHITECTURE.md no longer lists this skip under CommitTrims.
  • ThreadFragmentOutputLookups returns per-thread counters (last-key hits, memo hits, validations) for the tests. They are plain increments on the thread's own slot.
  • Memory: one copy of the validation key per drawing thread.
  • Overlap: no open PR changes AssemblePushConstants or the last-key lookup in CachedFragmentOutputs. This comes from a diff scan of the 2,012 open PRs for these symbols. Five PRs too large for gh pr diff were checked file by file; #9508 and #7642 add a push-data mask of their own in a new function (PushDataPlacements).
    • #15456 turns the draw finisher on by default, and with it CommitTrims, so main's opt-in last key would also run by default once it lands. This PR moves the last key out of CommitTrims, behind its own switch, in a TEB slot, remembering validated keys too. It does not depend on #15456, and the two compose. Both edit the same ARCHITECTURE.md paragraph.
    • #6188 adds a parameter to CachedFragmentOutputs, and #5925 calls it from the pipeline journal; neither changes the lookup.
    • #16752 (pipeline and dynamic-state commands) and #16753 (framebuffer owners, clock reads) trim other per-draw work and touch neither function.
    • tools/pr_overlap.py failed closed.
      • It reports line conflicts with #9508 and #15456 in that ARCHITECTURE.md paragraph, and with #16413 and #16753 at the top of the graphics test runner's main, where each adds a mode.
      • It could not compare 72 PRs that conflict with main. Their shared files (Draw.cpp, tests/Graphics.cpp, ENVIRONMENT.md, Shaders.hpp, Draw.hpp) were covered by the symbol scan above.

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 164ac9b078 and this change on top of it (e312386c58).
  • Rebase: the branch was then rebased onto main eb3839d4f3 without conflicts. git range-diff shows the same patch, now b2ca8d4f36. The validation runs below used the rebased commit and main eb3839d4f3.

New tests:

  • agc_driver_push_constant_assembly (agc_driver_graphics_tests --push-constant-assembly, also in the default run): compares the result, or the error, with a copy of the old byte loop.
    • It covers every vertex size and pixel offset (0-128 by 0-252 bytes, in DWORD steps) and 40,000 random layouts.
    • It requires at least 50 cases of each outcome. The counts were: assembled 22,238, unaligned 7,229, overlap 6,613, outside the block 2,689, slot crossing 2,336, missing shader 1,007.
  • agc_driver_last_fragment_outputs, and agc_driver_last_fragment_outputs_off (the same with APS5_NO_LAST_FRAGMENT_OUTPUTS=1): six real draws on the device, A, A, B, A, A, B, where B culls both faces (another key).
    • Each step checks which path answered: a fresh validation, the last key or the memo. With the switch on, the repeats are last-key hits; with it off, they are memo hits and there are no last-key hits.
    • Every A draw must cover its whole target, and B must write nothing.

Broken copies of the change, each run against these tests, are all caught (10 of 10):

  • push constants: no overlap check, a mask one DWORD short, the mask at half its offset, a short copy, the mask not accumulated;
  • fragment outputs: any key served as the last, the last never valid, the switch ignored, the outputs never updated, nothing remembered after a validation.

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):

  • Tests: agc_graphics_profile_draw, agc_driver_pass_break_reasons, agc_driver_draw_offset_indices, agc_driver_multisampled_pass_order, agc_driver_unclamped_normalized_blend, agc_driver_sample_order* (4), agc_driver_draw_cache_relocation* (6), agc_driver_depth_fast_clear_submit.
  • Results: 15 pass on main eb3839d4f3. On the change, 18 pass, the three new tests included. agc_driver_sample_order_grid_reference skips by its own check in both.
  • Logs: neither contains was not found but was requested by env var VK_INSTANCE_LAYERS or a VUID- line. Both contain the same 53 host-import fallback lines from agc_graphics_profile_draw; this machine's host heap reports an 8 MiB budget.

tools/check_conventions.py and tools/env_reference.py --check pass. Full ctest was not run.

Sampler (APS5_SAMPLE_COMMITTER and APS5_SAMPLE_WORKER, 60 s window, 3843 samples per thread). The first PR window ran on 3781aedc48, an earlier revision of this commit. It has the same code, with the memo insert's lock in an inner block.

draw committer, samples main 164ac9b078 (3 windows) this PR (2 windows)
planDraw self 47 / 49 / 51 24 / 22
planDraw inclusive 174 / 175 / 182 138 / 139
AssemblePushConstants inclusive 15 / 25 / 11 4 / 11
  • Saving: about 26 samples of planDraw self (0.7% of the committer, about 0.5 ms per frame), and about 10 in push constants (about 0.2 ms per frame, noisier).
  • Limiting threads: the committer and the GPU limit the frame. The worker waits 22-27% of its samples in DrawPipeline::Enqueue.

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

main 164ac9b078 this PR e312386c58
reading FPS (median) 14.61 / 14.63 14.40 / 14.21
frame p50 73.1 / 72.3 ms 72.8 / 73.7 ms
committer Graphics.Draw per frame (retained events) 30.0 / 29.9 ms 29.6 / 30.7 ms
GPU busy per present 35.6 / 35.8 ms 36.2 / 35.8 ms
  • No FPS change is claimed. The saving shows in the sampler, while frame time and FPS stay within the run-to-run spread. The traced pairs read the PR about 0.3 FPS lower; the sampler runs read 14.31 / 14.37 on main and 14.41 / 14.30 on the PR.
  • Dropped events: all four traces dropped events once the worker's buffer filled, equally in both arms, so the slice figures cover retained events only.
  • Machine: other work on the machine was not excluded during the runs.

seconds 200:15 from present 4465: 205 presents, frame p50 73.1 / p90 77.4 / p99 82.0 / max 83.4 ms, GPU busy 35.6 ms per present
NVIDIA GeForce RTX 2080 Ti, NVIDIA 617.14, Windows 10.0.26300, 3840x2160, commit 164ac9b078, dropped: yes

{"commit":"164ac9b078cd","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":4465,"ms":15059.647},"presents":205,"frame_ms":{"p50":73.072,"p90":77.381,"p99":82.036,"max":83.356},"gpu_busy_ms_per_present":35.634,"worker_busy_pct":{"queue worker 0x0":96.964},"top_phases_ms_per_frame":{"Driver.Packet":69.194,"Driver.Packet.draw":52.168,"Graphics.Draw":51.695,"Driver.Draw":51.198,"Graphics.Draw.draw_and_resource_release":40.675,"Driver.Draw.shader_compile_and_link":25.09,"Shader.DrawStage":16.308,"Driver.Draw.draw_enqueued":14.965},"owned_draw_counts":{"OwnedDraw.evicted_other":18897},"trace_dropped":true,"trace_dropped_threads":{"queue worker 0x0":{"events_full_after_s":5.476,"events_lost":463498,"totals_full":false},"draw committer":{"events_full_after_s":12.383,"events_lost":58587,"totals_full":false}},"trace":"aps5-trace-164ac9b078cd-9328.json.gz"}

seconds 200:15 from present 4433: 205 presents, frame p50 72.8 / p90 77.1 / p99 81.1 / max 84.4 ms, GPU busy 36.2 ms per present
NVIDIA GeForce RTX 2080 Ti, NVIDIA 617.14, Windows 10.0.26300, 3840x2160, commit e312386c5883, dropped: yes

{"commit":"e312386c5883","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":4433,"ms":15003.737},"presents":205,"frame_ms":{"p50":72.802,"p90":77.09,"p99":81.076,"max":84.377},"gpu_busy_ms_per_present":36.244,"worker_busy_pct":{"queue worker 0x0":96.925},"top_phases_ms_per_frame":{"Driver.Packet":68.915,"Driver.Packet.draw":51.909,"Graphics.Draw":51.086,"Driver.Draw":50.881,"Graphics.Draw.draw_and_resource_release":40.518,"Driver.Draw.shader_compile_and_link":25.08,"Shader.DrawStage":16.193,"Driver.Draw.draw_enqueued":14.398},"owned_draw_counts":{"OwnedDraw.evicted_other":18465},"trace_dropped":true,"trace_dropped_threads":{"queue worker 0x0":{"events_full_after_s":5.413,"events_lost":467768,"totals_full":false},"draw committer":{"events_full_after_s":12.289,"events_lost":57947,"totals_full":false}},"trace":"aps5-trace-e312386c5883-2676.json.gz"}

seconds 200:15 from present 4416: 203 presents, frame p50 73.7 / p90 78.0 / p99 83.7 / max 84.5 ms, GPU busy 35.8 ms per present
NVIDIA GeForce RTX 2080 Ti, NVIDIA 617.14, Windows 10.0.26300, 3840x2160, commit e312386c5883, dropped: yes

{"commit":"e312386c5883","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":4416,"ms":15034.272},"presents":203,"frame_ms":{"p50":73.691,"p90":78.017,"p99":83.69,"max":84.466},"gpu_busy_ms_per_present":35.778,"worker_busy_pct":{"queue worker 0x0":97.008},"top_phases_ms_per_frame":{"Driver.Packet":69.777,"Graphics.Draw":52.894,"Driver.Packet.draw":52.574,"Driver.Draw":51.622,"Graphics.Draw.draw_and_resource_release":41.79,"Driver.Draw.shader_compile_and_link":24.74,"Shader.DrawStage":16.056,"Driver.Draw.draw_enqueued":15.792},"owned_draw_counts":{"OwnedDraw.evicted_other":17768},"trace_dropped":true,"trace_dropped_threads":{"queue worker 0x0":{"events_full_after_s":5.665,"events_lost":440056,"totals_full":false},"draw committer":{"events_full_after_s":12.117,"events_lost":63019,"totals_full":false}},"trace":"aps5-trace-e312386c5883-20848.json.gz"}

seconds 200:15 from present 4497: 207 presents, frame p50 72.3 / p90 76.6 / p99 81.1 / max 84.6 ms, GPU busy 35.8 ms per present
NVIDIA GeForce RTX 2080 Ti, NVIDIA 617.14, Windows 10.0.26300, 3840x2160, commit 164ac9b078, dropped: yes

{"commit":"164ac9b078cd","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":4497,"ms":15040.999},"presents":207,"frame_ms":{"p50":72.345,"p90":76.571,"p99":81.078,"max":84.559},"gpu_busy_ms_per_present":35.753,"worker_busy_pct":{"queue worker 0x0":96.797},"top_phases_ms_per_frame":{"Driver.Packet":68.271,"Driver.Packet.draw":51.348,"Graphics.Draw":51.169,"Driver.Draw":50.314,"Graphics.Draw.draw_and_resource_release":40.642,"Driver.Draw.shader_compile_and_link":24.656,"Shader.DrawStage":15.902,"Driver.Draw.draw_enqueued":14.498},"owned_draw_counts":{"OwnedDraw.evicted_other":19589},"trace_dropped":true,"trace_dropped_threads":{"queue worker 0x0":{"events_full_after_s":5.624,"events_lost":451055,"totals_full":false},"draw committer":{"events_full_after_s":12.523,"events_lost":54723,"totals_full":false}},"trace":"aps5-trace-164ac9b078cd-14232.json.gz"}

Traces (two runs per zip, each with its aps5-summary.jsonl): m330-main-traces.zip (main 164ac9b078), m330-change-traces.zip (this PR e312386c58).

trace_digest.py, main run 1

seconds 200:15 from present 4465: 205 presents, frame p50 73.1 / p90 77.4 / p99 82.0 / max 83.4 ms, GPU busy 35.6 ms per present
NVIDIA GeForce RTX 2080 Ti, NVIDIA 617.14, Windows 10.0.26300, 3840x2160, commit 164ac9b078, dropped: yes

{"commit":"164ac9b078cd","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":4465,"ms":15059.647},"presents":205,"frame_ms":{"p50":73.072,"p90":77.381,"p99":82.036,"max":83.356},"gpu_busy_ms_per_present":35.634,"worker_busy_pct":{"queue worker 0x0":96.964},"top_phases_ms_per_frame":{"Driver.Packet":69.194,"Driver.Packet.draw":52.168,"Graphics.Draw":51.695,"Driver.Draw":51.198,"Graphics.Draw.draw_and_resource_release":40.675,"Driver.Draw.shader_compile_and_link":25.09,"Shader.DrawStage":16.308,"Driver.Draw.draw_enqueued":14.965},"owned_draw_counts":{"OwnedDraw.evicted_other":18897},"trace_dropped":true,"trace_dropped_threads":{"queue worker 0x0":{"events_full_after_s":5.476,"events_lost":463498,"totals_full":false},"draw committer":{"events_full_after_s":12.383,"events_lost":58587,"totals_full":false}},"trace":"aps5-trace-164ac9b078cd-9328.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: 463498 events lost; buffer full at 5475.7 ms
  • draw committer: 58587 events lost; buffer full at 12383.3 ms

Slowest frames (largest slices inside each, inclusive)

  • present 4631: 83.4 ms at 12158 ms: Graphics.Draw (draw committer) 47.5, batch (gpu) 39.9, Graphics.Draw.draw_and_resource_release (draw committer) 30.9, VideoOut.Flip (presenter) 10.3
  • present 4645: 83.1 ms at 13191 ms: batch (gpu) 37.7, VideoOut.Flip (presenter) 11.4, VideoOut.Flip.present (presenter) 11.2, Driver.Present (presenter) 11.2
  • present 4551: 82.0 ms at 6315 ms: Graphics.Draw (draw committer) 47.1, batch (gpu) 35.0, Graphics.Draw.draw_and_resource_release (draw committer) 31.8, VideoOut.Flip (presenter) 9.4
  • present 4658: 80.9 ms at 14167 ms: batch (gpu) 38.1, VideoOut.Flip (presenter) 11.3, VideoOut.Flip.present (presenter) 11.2, Driver.Present (presenter) 11.2
  • present 4644: 80.7 ms at 13110 ms: batch (gpu) 34.3, VideoOut.Flip (presenter) 9.5, VideoOut.Flip.present (presenter) 9.4, Driver.Present (presenter) 9.4

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

  • present 4631: 83.4 ms at 12158 ms, persistence 16.5 ms
  • present 4551: 82.0 ms at 6315 ms, persistence 14.3 ms
  • present 4467: 80.4 ms at 146 ms, persistence 13.5 ms
  • present 4645: 83.1 ms at 13191 ms, persistence 12.0 ms
  • present 4658: 80.9 ms at 14167 ms, persistence 11.9 ms
  • present 4516: 80.5 ms at 3722 ms, persistence 11.8 ms
  • present 4493: 77.8 ms at 2046 ms, persistence 9.8 ms
  • present 4576: 77.6 ms at 8151 ms, persistence 9.6 ms
  • present 4507: 79.0 ms at 3065 ms, persistence 9.4 ms
  • present 4604: 77.3 ms at 10191 ms, persistence 8.9 ms

Threads (ms per frame)

thread busy wait untraced in slices < 20 us largest
title 0.4 (0 %) 9.2 (12 %) 63.9 0.5 Shader.ResolveGraphicsStagesAbi 0.2, Shader.ResolveGraphicsAbi 0.1
queue worker 0x0 17.8 (24 %) 0.0 (0 %) 55.7 44.6 Driver.Packet 17.1, Driver.EndSubmission 0.7
draw committer 32.5 (44 %) 0.2 (0 %) 40.7 32.1 Graphics.Draw 30.0, Recorder.Submit 1.9
title 0.1 (0 %) 0.0 (0 %) 73.4 0.1 Shader.ResolveGraphicsStagesAbi 0.0, Shader.ResolveAbi 0.0
title 0.1 (0 %) 0.0 (0 %) 73.4 0.1 Shader.ResolveGraphicsStagesAbi 0.0, Shader.ResolveGraphicsAbi 0.0
title 0.1 (0 %) 0.0 (0 %) 73.4 0.1 Shader.ResolveGraphicsStagesAbi 0.0, Shader.ResolveAbi 0.0
presenter 1.0 (1 %) 8.5 (12 %) 64.0 0.0 VideoOut.Flip 9.4, Driver.Present 0.0
title 0.1 (0 %) 0.0 (0 %) 73.4 0.1 Shader.ResolveGraphicsStagesAbi 0.0, Shader.ResolveGraphicsAbi 0.0
title 0.1 (0 %) 0.0 (0 %) 73.3 0.1 Shader.ResolveGraphicsStagesAbi 0.0, Shader.ResolveAbi 0.0
title 0.1 (0 %) 0.0 (0 %) 73.4 0.1 Shader.ResolveGraphicsStagesAbi 0.0, Shader.ResolveGraphicsAbi 0.0
title 0.1 (0 %) 0.0 (0 %) 73.4 0.1 Shader.ResolveAbi 0.0, Shader.ResolveGraphicsAbi 0.0
title 0.1 (0 %) 0.0 (0 %) 73.4 0.1 Shader.ResolveGraphicsAbi 0.0, Shader.ResolveAbi 0.0
title 0.1 (0 %) 0.0 (0 %) 73.4 0.1 Shader.ResolveGraphicsAbi 0.0, Shader.ResolveAbi 0.0
title 0.1 (0 %) 0.0 (0 %) 73.4 0.1 Shader.ResolveGraphicsAbi 0.0, Shader.ResolveGraphicsStagesAbi 0.0
title 0.1 (0 %) 0.0 (0 %) 73.4 0.1 Shader.ResolveGraphicsStagesAbi 0.0, Shader.ResolveGraphicsAbi 0.0
title 0.1 (0 %) 0.0 (0 %) 73.4 0.1 Shader.ResolveAbi 0.0, Shader.ResolveGraphicsStagesAbi 0.0
gpu 35.5 (48 %) 0.0 (0 %) 38.0 0.0 batch 35.5

Largest slices (ms per frame, inclusive, all threads): batch 35.5, Graphics.Draw 30.0, Graphics.Draw.draw_and_resource_release 22.2, Driver.Packet 17.1, Driver.Packet.draw 13.4, Driver.Draw 13.1, VideoOut.Flip 9.4, Driver.Present 9.3, VideoOut.Flip.present 9.2, Recorder.WaitSerial 9.1

Longest waits

  • Recorder.WaitSerial (title) 12.7 ms at 10482 ms, present 4607
  • Recorder.WaitSerial (title) 12.4 ms at 10556 ms, present 4608
  • Driver.Present.render_fence_wait (presenter) 12.0 ms at 10483 ms, present 4608
  • Recorder.WaitSerial (title) 11.8 ms at 10415 ms, present 4606
  • Recorder.WaitSerial (title) 11.7 ms at 10191 ms, present 4603
  • Recorder.WaitSerial (title) 11.6 ms at 10630 ms, present 4609
  • Driver.Present.render_fence_wait (presenter) 11.6 ms at 10556 ms, present 4609
  • Recorder.WaitSerial (title) 11.5 ms at 14019 ms, present 4655
  • Recorder.WaitSerial (title) 11.4 ms at 9903 ms, present 4599
  • Recorder.WaitSerial (title) 11.3 ms at 8824 ms, present 4584

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

  • batch 3093: 10.7 ms at 3710 ms, present 4515: GPU no ranges; recorded by Graphics.Draw (draw committer) 0.6, Graphics.Draw.draw_and_resource_release (draw committer) 0.6, Resources.Complete (draw committer) 0.1
  • batch 1149: 10.5 ms at 1380 ms, present 4483: 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 6209: 10.2 ms at 7493 ms, present 4566: 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 844: 10.1 ms at 1011 ms, present 4478: 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 8454: 10.0 ms at 10180 ms, present 4603: 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
trace_digest.py, PR run 1

seconds 200:15 from present 4433: 205 presents, frame p50 72.8 / p90 77.1 / p99 81.1 / max 84.4 ms, GPU busy 36.2 ms per present
NVIDIA GeForce RTX 2080 Ti, NVIDIA 617.14, Windows 10.0.26300, 3840x2160, commit e312386c5883, dropped: yes

{"commit":"e312386c5883","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":4433,"ms":15003.737},"presents":205,"frame_ms":{"p50":72.802,"p90":77.09,"p99":81.076,"max":84.377},"gpu_busy_ms_per_present":36.244,"worker_busy_pct":{"queue worker 0x0":96.925},"top_phases_ms_per_frame":{"Driver.Packet":68.915,"Driver.Packet.draw":51.909,"Graphics.Draw":51.086,"Driver.Draw":50.881,"Graphics.Draw.draw_and_resource_release":40.518,"Driver.Draw.shader_compile_and_link":25.08,"Shader.DrawStage":16.193,"Driver.Draw.draw_enqueued":14.398},"owned_draw_counts":{"OwnedDraw.evicted_other":18465},"trace_dropped":true,"trace_dropped_threads":{"queue worker 0x0":{"events_full_after_s":5.413,"events_lost":467768,"totals_full":false},"draw committer":{"events_full_after_s":12.289,"events_lost":57947,"totals_full":false}},"trace":"aps5-trace-e312386c5883-2676.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: 467768 events lost; buffer full at 5413.4 ms
  • draw committer: 57947 events lost; buffer full at 12289.0 ms

Slowest frames (largest slices inside each, inclusive)

  • present 4468: 84.4 ms at 2568 ms: Driver.Packet (queue worker 0x0) 58.2, Graphics.Draw (draw committer) 42.8, batch (gpu) 41.8, Driver.Packet.draw (queue worker 0x0) 40.4
  • present 4496: 81.5 ms at 4637 ms: Driver.Packet (queue worker 0x0) 56.9, Driver.Packet.draw (queue worker 0x0) 46.5, Graphics.Draw (draw committer) 45.6, Driver.Draw (queue worker 0x0) 45.1
  • present 4581: 81.1 ms at 10829 ms: Graphics.Draw (draw committer) 51.1, batch (gpu) 35.9, Graphics.Draw.draw_and_resource_release (draw committer) 30.2, VideoOut.Flip (presenter) 10.6
  • present 4619: 80.8 ms at 13591 ms: batch (gpu) 39.1, VideoOut.Flip (presenter) 9.7, VideoOut.Flip.present (presenter) 9.6, Driver.Present (presenter) 9.6
  • present 4511: 80.6 ms at 5729 ms: Graphics.Draw (draw committer) 50.2, batch (gpu) 36.0, Graphics.Draw.draw_and_resource_release (draw committer) 27.7, VideoOut.Flip (presenter) 10.2

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

  • present 4468: 84.4 ms at 2568 ms, persistence 17.7 ms
  • present 4581: 81.1 ms at 10829 ms, persistence 14.4 ms
  • present 4619: 80.8 ms at 13591 ms, persistence 13.9 ms
  • present 4496: 81.5 ms at 4637 ms, persistence 13.3 ms
  • present 4511: 80.6 ms at 5729 ms, persistence 11.5 ms
  • present 4634: 80.3 ms at 14707 ms, persistence 10.5 ms
  • present 4441: 78.6 ms at 585 ms, persistence 8.9 ms
  • present 4458: 78.6 ms at 1826 ms, persistence 8.6 ms
  • present 4585: 79.4 ms at 11126 ms, persistence 8.6 ms
  • present 4480: 79.6 ms at 3461 ms, persistence 8.5 ms

Threads (ms per frame)

thread busy wait untraced in slices < 20 us largest
title 0.3 (0 %) 10.2 (14 %) 62.7 0.5 Shader.ResolveGraphicsStagesAbi 0.2, Shader.ResolveGraphicsAbi 0.1
queue worker 0x0 17.7 (24 %) 0.0 (0 %) 55.5 44.0 Driver.Packet 16.9, Driver.EndSubmission 0.7
draw committer 32.1 (44 %) 0.2 (0 %) 40.9 31.7 Graphics.Draw 29.6, Recorder.Submit 1.8
title 0.1 (0 %) 0.0 (0 %) 73.1 0.1 Shader.ResolveGraphicsStagesAbi 0.0, Shader.ResolveAbi 0.0
title 0.1 (0 %) 0.0 (0 %) 73.1 0.1 Shader.ResolveGraphicsAbi 0.0, Shader.ResolveAbi 0.0
title 0.1 (0 %) 0.0 (0 %) 73.1 0.1 Shader.ResolveAbi 0.0, Shader.ResolveGraphicsAbi 0.0
title 0.1 (0 %) 0.0 (0 %) 73.1 0.1 Shader.ResolveGraphicsStagesAbi 0.0, Shader.ResolveAbi 0.0
presenter 0.9 (1 %) 9.5 (13 %) 62.8 0.0 VideoOut.Flip 10.3, Driver.Present 0.0
title 0.1 (0 %) 0.0 (0 %) 73.1 0.1 Shader.ResolveGraphicsStagesAbi 0.0, Shader.ResolveAbi 0.0
title 0.1 (0 %) 0.0 (0 %) 73.1 0.0 Shader.ResolveAbi 0.0, Shader.ResolveGraphicsStagesAbi 0.0
title 0.1 (0 %) 0.0 (0 %) 73.1 0.1 Shader.ResolveGraphicsStagesAbi 0.0, Shader.ResolveAbi 0.0
title 0.1 (0 %) 0.0 (0 %) 73.1 0.1 Shader.ResolveGraphicsAbi 0.0, Shader.ResolveGraphicsStagesAbi 0.0
title 0.1 (0 %) 0.0 (0 %) 73.1 0.1 Shader.ResolveAbi 0.0, Shader.ResolveGraphicsStagesAbi 0.0
title 0.1 (0 %) 0.0 (0 %) 73.1 0.1 Shader.ResolveAbi 0.0, Shader.ResolveGraphicsStagesAbi 0.0
title 0.1 (0 %) 0.0 (0 %) 73.1 0.1 Shader.ResolveGraphicsStagesAbi 0.0, Shader.ResolveAbi 0.0
title 0.1 (0 %) 0.0 (0 %) 73.1 0.1 Shader.ResolveGraphicsStagesAbi 0.0, Shader.ResolveAbi 0.0
gpu 36.3 (50 %) 0.0 (0 %) 36.9 0.0 batch 36.3

Largest slices (ms per frame, inclusive, all threads): batch 36.3, Graphics.Draw 29.6, Graphics.Draw.draw_and_resource_release 21.8, Driver.Packet 16.9, Driver.Packet.draw 13.3, Driver.Draw 12.9, VideoOut.Flip 10.3, Driver.Present 10.3, VideoOut.Flip.present 10.2, Recorder.WaitSerial 10.1

Longest waits

  • Recorder.WaitSerial (title) 12.4 ms at 4493 ms, present 4493
  • Recorder.WaitSerial (title) 12.4 ms at 13228 ms, present 4613
  • Recorder.WaitSerial (title) 12.4 ms at 13087 ms, present 4611
  • Recorder.WaitSerial (title) 12.3 ms at 5583 ms, present 4508
  • Recorder.WaitSerial (title) 12.3 ms at 14044 ms, present 4624
  • Recorder.WaitSerial (title) 12.3 ms at 216 ms, present 4435
  • Recorder.WaitSerial (title) 12.2 ms at 12217 ms, present 4599
  • Recorder.WaitSerial (title) 12.2 ms at 11799 ms, present 4593
  • Recorder.WaitSerial (title) 12.1 ms at 4564 ms, present 4494
  • Recorder.WaitSerial (title) 12.1 ms at 12077 ms, present 4597

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

  • batch 3683: 10.6 ms at 4483 ms, present 4493: GPU no ranges; recorded by Vulkan.DrawFromRecipe (draw committer) 0.3, Graphics.DrawWithRecipe (draw committer) 0.3, Graphics.DrawWithRecipe.draw_and_resource_release (draw committer) 0.3, Graphics.Draw (draw committer) 0.1
  • batch 3142: 10.4 ms at 3823 ms, present 4484: 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 285: 10.4 ms at 351 ms, present 4437: 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 2476: 10.4 ms at 3013 ms, present 4473: GPU no ranges; recorded by Graphics.Draw (draw committer) 0.6, Graphics.Draw.draw_and_resource_release (draw committer) 0.6, Resources.Complete (draw committer) 0.1
  • batch 1802: 10.4 ms at 2191 ms, present 4462: GPU no ranges; recorded by Vulkan.DrawFromRecipe (draw committer) 0.3, Graphics.DrawWithRecipe (draw committer) 0.3, Graphics.DrawWithRecipe.draw_and_resource_release (draw committer) 0.3, Graphics.Draw (draw committer) 0.2
trace_digest.py, PR run 2

seconds 200:15 from present 4416: 203 presents, frame p50 73.7 / p90 78.0 / p99 83.7 / max 84.5 ms, GPU busy 35.8 ms per present
NVIDIA GeForce RTX 2080 Ti, NVIDIA 617.14, Windows 10.0.26300, 3840x2160, commit e312386c5883, dropped: yes

{"commit":"e312386c5883","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":4416,"ms":15034.272},"presents":203,"frame_ms":{"p50":73.691,"p90":78.017,"p99":83.69,"max":84.466},"gpu_busy_ms_per_present":35.778,"worker_busy_pct":{"queue worker 0x0":97.008},"top_phases_ms_per_frame":{"Driver.Packet":69.777,"Graphics.Draw":52.894,"Driver.Packet.draw":52.574,"Driver.Draw":51.622,"Graphics.Draw.draw_and_resource_release":41.79,"Driver.Draw.shader_compile_and_link":24.74,"Shader.DrawStage":16.056,"Driver.Draw.draw_enqueued":15.792},"owned_draw_counts":{"OwnedDraw.evicted_other":17768},"trace_dropped":true,"trace_dropped_threads":{"queue worker 0x0":{"events_full_after_s":5.665,"events_lost":440056,"totals_full":false},"draw committer":{"events_full_after_s":12.117,"events_lost":63019,"totals_full":false}},"trace":"aps5-trace-e312386c5883-20848.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: 440056 events lost; buffer full at 5665.4 ms
  • draw committer: 63019 events lost; buffer full at 12116.7 ms

Slowest frames (largest slices inside each, inclusive)

  • present 4466: 84.5 ms at 3684 ms: Driver.Packet (queue worker 0x0) 61.0, Driver.Packet.draw (queue worker 0x0) 49.5, Driver.Draw (queue worker 0x0) 48.3, Graphics.Draw (draw committer) 48.0
  • present 4595: 84.1 ms at 13232 ms: batch (gpu) 34.0, VideoOut.Flip (presenter) 8.4, VideoOut.Flip.present (presenter) 8.3, Driver.Present (presenter) 8.3
  • present 4501: 83.7 ms at 6243 ms: Graphics.Draw (draw committer) 53.5, batch (gpu) 36.5, Graphics.Draw.draw_and_resource_release (draw committer) 32.5, VideoOut.Flip (presenter) 8.1
  • present 4460: 82.5 ms at 3237 ms: Driver.Packet (queue worker 0x0) 59.1, Driver.Packet.draw (queue worker 0x0) 48.8, Graphics.Draw (draw committer) 48.7, Driver.Draw (queue worker 0x0) 47.5
  • present 4450: 82.3 ms at 2498 ms: Driver.Packet (queue worker 0x0) 57.3, Graphics.Draw (draw committer) 47.1, Driver.Packet.draw (queue worker 0x0) 45.6, Driver.Draw (queue worker 0x0) 44.3

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

  • present 4466: 84.5 ms at 3684 ms, persistence 17.5 ms
  • present 4595: 84.1 ms at 13232 ms, persistence 16.2 ms
  • present 4501: 83.7 ms at 6243 ms, persistence 15.7 ms
  • present 4460: 82.5 ms at 3237 ms, persistence 12.7 ms
  • present 4450: 82.3 ms at 2498 ms, persistence 12.1 ms
  • present 4520: 80.1 ms at 7655 ms, persistence 10.7 ms
  • present 4551: 80.6 ms at 9956 ms, persistence 10.2 ms
  • present 4574: 81.0 ms at 11665 ms, persistence 9.9 ms
  • present 4615: 78.7 ms at 14725 ms, persistence 8.7 ms
  • present 4473: 78.4 ms at 4205 ms, persistence 8.7 ms

Threads (ms per frame)

thread busy wait untraced in slices < 20 us largest
title 0.3 (0 %) 8.9 (12 %) 64.8 0.5 Shader.ResolveGraphicsStagesAbi 0.1, Shader.ResolveGraphicsAbi 0.1
queue worker 0x0 18.5 (25 %) 0.0 (0 %) 55.6 47.0 Driver.Packet 17.7, Driver.EndSubmission 0.8
draw committer 33.5 (45 %) 0.2 (0 %) 40.4 31.5 Graphics.Draw 30.7, Recorder.Submit 2.1
title 0.1 (0 %) 0.0 (0 %) 73.9 0.1 Shader.ResolveGraphicsStagesAbi 0.0, Shader.ResolveGraphicsAbi 0.0
title 0.1 (0 %) 0.0 (0 %) 74.0 0.1 Shader.ResolveGraphicsStagesAbi 0.0, Shader.ResolveAbi 0.0
title 0.1 (0 %) 0.0 (0 %) 74.0 0.1 Shader.ResolveGraphicsStagesAbi 0.0, Shader.ResolveAbi 0.0
presenter 0.9 (1 %) 8.2 (11 %) 64.9 0.1 VideoOut.Flip 9.1, Driver.Present 0.1
title 0.1 (0 %) 0.0 (0 %) 74.0 0.1 Shader.ResolveGraphicsStagesAbi 0.0, Shader.ResolveGraphicsAbi 0.0
title 0.1 (0 %) 0.0 (0 %) 74.0 0.1 Shader.ResolveGraphicsAbi 0.0, Shader.ResolveGraphicsStagesAbi 0.0
title 0.1 (0 %) 0.0 (0 %) 74.0 0.1 Shader.ResolveGraphicsStagesAbi 0.0, Shader.ResolveAbi 0.0
title 0.1 (0 %) 0.0 (0 %) 74.0 0.1 Shader.ResolveGraphicsStagesAbi 0.0, Shader.ResolveGraphicsAbi 0.0
title 0.1 (0 %) 0.0 (0 %) 74.0 0.1 Shader.ResolveGraphicsStagesAbi 0.0, Shader.ResolveGraphicsAbi 0.0
title 0.1 (0 %) 0.0 (0 %) 74.0 0.1 Shader.ResolveGraphicsStagesAbi 0.0, Shader.ResolveGraphicsAbi 0.0
title 0.1 (0 %) 0.0 (0 %) 73.9 0.1 Shader.ResolveGraphicsStagesAbi 0.0, Shader.ResolveAbi 0.0
title 0.1 (0 %) 0.0 (0 %) 74.0 0.0 Shader.ResolveGraphicsAbi 0.0, Shader.ResolveGraphicsStagesAbi 0.0
title 0.1 (0 %) 0.0 (0 %) 74.0 0.1 Shader.ResolveAbi 0.0, Shader.ResolveGraphicsStagesAbi 0.0
gpu 35.6 (48 %) 0.0 (0 %) 38.5 0.0 batch 35.6

Largest slices (ms per frame, inclusive, all threads): batch 35.6, Graphics.Draw 30.7, Graphics.Draw.draw_and_resource_release 22.5, Driver.Packet 17.7, Driver.Packet.draw 13.8, Driver.Draw 13.5, VideoOut.Flip 9.1, Driver.Present 9.0, VideoOut.Flip.present 8.9, Recorder.WaitSerial 8.9

Longest waits

  • Recorder.WaitSerial (title) 13.1 ms at 2043 ms, present 4443
  • Driver.Present.render_fence_wait (presenter) 12.2 ms at 2044 ms, present 4444
  • Recorder.WaitSerial (title) 11.3 ms at 9506 ms, present 4544
  • Recorder.WaitSerial (title) 11.3 ms at 2348 ms, present 4447
  • Recorder.WaitSerial (title) 11.1 ms at 12857 ms, present 4589
  • Recorder.WaitSerial (title) 11.0 ms at 1971 ms, present 4442
  • Recorder.WaitSerial (title) 11.0 ms at 653 ms, present 4425
  • Recorder.WaitSerial (title) 10.9 ms at 8261 ms, present 4527
  • Recorder.WaitSerial (title) 10.9 ms at 2199 ms, present 4445
  • Recorder.WaitSerial (title) 10.8 ms at 2271 ms, present 4446

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

  • batch 1810: 10.8 ms at 2188 ms, present 4445: GPU no ranges; recorded by Graphics.Draw (draw committer) 0.6, Graphics.Draw.draw_and_resource_release (draw committer) 0.6, Resources.Complete (draw committer) 0.1
  • batch 10275: 10.4 ms at 12473 ms, present 4584: GPU no ranges; recorded by no CPU slices
  • batch 3451: 10.2 ms at 4194 ms, present 4472: 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 6258: 9.3 ms at 7572 ms, present 4518: 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 8442: 9.3 ms at 10253 ms, present 4554: 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, Recorder.Reap (draw committer) 0.0
trace_digest.py, main run 2

seconds 200:15 from present 4497: 207 presents, frame p50 72.3 / p90 76.6 / p99 81.1 / max 84.6 ms, GPU busy 35.8 ms per present
NVIDIA GeForce RTX 2080 Ti, NVIDIA 617.14, Windows 10.0.26300, 3840x2160, commit 164ac9b078, dropped: yes

{"commit":"164ac9b078cd","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":4497,"ms":15040.999},"presents":207,"frame_ms":{"p50":72.345,"p90":76.571,"p99":81.078,"max":84.559},"gpu_busy_ms_per_present":35.753,"worker_busy_pct":{"queue worker 0x0":96.797},"top_phases_ms_per_frame":{"Driver.Packet":68.271,"Driver.Packet.draw":51.348,"Graphics.Draw":51.169,"Driver.Draw":50.314,"Graphics.Draw.draw_and_resource_release":40.642,"Driver.Draw.shader_compile_and_link":24.656,"Shader.DrawStage":15.902,"Driver.Draw.draw_enqueued":14.498},"owned_draw_counts":{"OwnedDraw.evicted_other":19589},"trace_dropped":true,"trace_dropped_threads":{"queue worker 0x0":{"events_full_after_s":5.624,"events_lost":451055,"totals_full":false},"draw committer":{"events_full_after_s":12.523,"events_lost":54723,"totals_full":false}},"trace":"aps5-trace-164ac9b078cd-14232.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: 451055 events lost; buffer full at 5623.8 ms
  • draw committer: 54723 events lost; buffer full at 12523.1 ms

Slowest frames (largest slices inside each, inclusive)

  • present 4609: 84.6 ms at 8111 ms: Graphics.Draw (draw committer) 37.3, batch (gpu) 37.0, Graphics.Draw.draw_and_resource_release (draw committer) 28.7, VideoOut.Flip (presenter) 10.3
  • present 4570: 81.1 ms at 5262 ms: Driver.Packet (queue worker 0x0) 58.4, Driver.Packet.draw (queue worker 0x0) 48.4, Driver.Draw (queue worker 0x0) 47.1, Graphics.Draw (draw committer) 39.5
  • present 4673: 81.1 ms at 12782 ms: batch (gpu) 35.5, VideoOut.Flip (presenter) 10.0, VideoOut.Flip.present (presenter) 9.8, Driver.Present (presenter) 9.8
  • present 4668: 80.6 ms at 12413 ms: Graphics.Draw (draw committer) 46.1, batch (gpu) 36.7, Graphics.Draw.draw_and_resource_release (draw committer) 31.3, VideoOut.Flip (presenter) 8.9
  • present 4595: 79.8 ms at 7081 ms: Graphics.Draw (draw committer) 47.4, batch (gpu) 36.1, Graphics.Draw.draw_and_resource_release (draw committer) 30.1, VideoOut.Flip (presenter) 9.0

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

  • present 4609: 84.6 ms at 8111 ms, persistence 18.5 ms
  • present 4570: 81.1 ms at 5262 ms, persistence 14.3 ms
  • present 4673: 81.1 ms at 12782 ms, persistence 13.6 ms
  • present 4595: 79.8 ms at 7081 ms, persistence 12.8 ms
  • present 4622: 79.4 ms at 9066 ms, persistence 11.2 ms
  • present 4498: 77.1 ms at 71 ms, persistence 11.1 ms
  • present 4664: 79.3 ms at 12115 ms, persistence 10.8 ms
  • present 4668: 80.6 ms at 12413 ms, persistence 10.4 ms
  • present 4691: 79.6 ms at 14087 ms, persistence 10.2 ms
  • present 4650: 78.8 ms at 11112 ms, persistence 9.8 ms

Threads (ms per frame)

thread busy wait untraced in slices < 20 us largest
title 0.3 (0 %) 9.6 (13 %) 62.7 0.5 Shader.ResolveGraphicsStagesAbi 0.2, Shader.ResolveGraphicsAbi 0.1
queue worker 0x0 17.7 (24 %) 0.0 (0 %) 54.9 46.0 Driver.Packet 17.0, Driver.EndSubmission 0.8
draw committer 32.4 (45 %) 0.2 (0 %) 40.0 32.3 Graphics.Draw 29.9, Recorder.Submit 1.9
title 0.1 (0 %) 0.0 (0 %) 72.5 0.1 Shader.ResolveGraphicsStagesAbi 0.0, Shader.ResolveGraphicsAbi 0.0
title 0.1 (0 %) 0.0 (0 %) 72.6 0.1 Shader.ResolveGraphicsStagesAbi 0.0, Shader.ResolveGraphicsAbi 0.0
title 0.1 (0 %) 0.0 (0 %) 72.5 0.1 Shader.ResolveGraphicsStagesAbi 0.0, Shader.ResolveGraphicsAbi 0.0
presenter 0.9 (1 %) 8.9 (12 %) 62.8 0.0 VideoOut.Flip 9.8, Driver.Present 0.0
title 0.1 (0 %) 0.0 (0 %) 72.6 0.1 Shader.ResolveAbi 0.0, Shader.ResolveGraphicsStagesAbi 0.0
title 0.1 (0 %) 0.0 (0 %) 72.6 0.1 Shader.ResolveGraphicsStagesAbi 0.0, Shader.ResolveGraphicsAbi 0.0
title 0.1 (0 %) 0.0 (0 %) 72.6 0.1 Shader.ResolveAbi 0.0, Shader.ResolveGraphicsStagesAbi 0.0
title 0.1 (0 %) 0.0 (0 %) 72.5 0.1 Shader.ResolveGraphicsStagesAbi 0.0, Shader.ResolveAbi 0.0
title 0.1 (0 %) 0.0 (0 %) 72.6 0.1 Shader.ResolveGraphicsStagesAbi 0.0, Shader.ResolveAbi 0.0
title 0.1 (0 %) 0.0 (0 %) 72.6 0.1 Shader.ResolveAbi 0.0, Shader.ResolveGraphicsStagesAbi 0.0
title 0.1 (0 %) 0.0 (0 %) 72.6 0.1 Shader.ResolveAbi 0.0, Shader.ResolveGraphicsStagesAbi 0.0
title 0.1 (0 %) 0.0 (0 %) 72.6 0.1 Shader.ResolveGraphicsStagesAbi 0.0, Shader.ResolveGraphicsAbi 0.0
title 0.1 (0 %) 0.0 (0 %) 72.6 0.1 Shader.ResolveGraphicsStagesAbi 0.0, Shader.ResolveGraphicsAbi 0.0
gpu 35.8 (49 %) 0.0 (0 %) 36.9 0.0 batch 35.8

Largest slices (ms per frame, inclusive, all threads): batch 35.8, Graphics.Draw 29.9, Graphics.Draw.draw_and_resource_release 22.5, Driver.Packet 17.0, Driver.Packet.draw 13.3, Driver.Draw 12.9, VideoOut.Flip 9.8, Driver.Present 9.7, VideoOut.Flip.present 9.7, Recorder.WaitSerial 9.6

Longest waits

  • Recorder.WaitSerial (title) 11.8 ms at 13228 ms, present 4678
  • Recorder.WaitSerial (title) 11.8 ms at 11547 ms, present 4655
  • Recorder.WaitSerial (title) 11.8 ms at 8846 ms, present 4618
  • Recorder.WaitSerial (title) 11.8 ms at 8346 ms, present 4611
  • Recorder.WaitSerial (title) 11.6 ms at 13369 ms, present 4680
  • Recorder.WaitSerial (title) 11.6 ms at 13076 ms, present 4676
  • Recorder.WaitSerial (title) 11.5 ms at 2241 ms, present 4527
  • Recorder.WaitSerial (title) 11.5 ms at 12195 ms, present 4664
  • Recorder.WaitSerial (title) 11.5 ms at 6786 ms, present 4590
  • Recorder.WaitSerial (title) 11.4 ms at 2743 ms, present 4534

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

  • batch 9823: 10.4 ms at 11745 ms, present 4658: 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 8856: 10.2 ms at 10579 ms, present 4642: GPU no ranges; recorded by Graphics.Draw (draw committer) 0.5, Graphics.Draw.draw_and_resource_release (draw committer) 0.4, Resources.Complete (draw committer) 0.1
  • batch 2050: 9.3 ms at 2441 ms, present 4530: GPU no ranges; recorded by Vulkan.DrawFromRecipe (draw committer) 0.3, Graphics.DrawWithRecipe (draw committer) 0.3, Graphics.DrawWithRecipe.draw_and_resource_release (draw committer) 0.3, Graphics.Draw (draw committer) 0.1
  • batch 12560: 9.2 ms at 15031 ms, present 4703: GPU no ranges; recorded by no CPU slices
  • batch 11042: 9.2 ms at 13218 ms, present 4678: GPU no ranges; recorded by no CPU slices

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:5246252935 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/18174). Originally posted by [meh7an](https://github.com/meh7an) on 2026-11-10T17:59:15Z. --- ### What Two trims in the per-draw work `planDraw` does on the draw committer. - **Push constants.** `AssemblePushConstants` built the 256-byte push-constant block one byte at a time and checked overlap with a 256-entry `bool` array. It now keeps one bit per DWORD in a `std::uint64_t` and copies each stage's range with one `memcpy`. The `Require` checks are the same, in the same order, with the same messages. - Every range is DWORD aligned (checked first), so two ranges share a byte exactly when they share a DWORD. - The block is 64 DWORDs (`static_assert`), and the slot check limits a range to 32 DWORDs, so the mask and the shift stay inside 64 bits. - **Fragment outputs.** `CachedFragmentOutputs` already let a thread serve a repeat of its last validation key without the shared memo, but only under `APS5_DRAW_PIPELINE` (`CommitTrims`). It now does so by default. - The last key lives in a `ThreadScratch` slot: one TEB read, where it was an FLS value plus two emulated `thread_local`s on MinGW. - It is remembered after a fresh validation too, not only after a memo hit. - The memo's value is copied out under `validationMutex`, so the lock is not held while the key is copied. - The skip rests on the shared memo's own premise: the outputs are a function of the key. A failed validation is never remembered. - `APS5_NO_LAST_FRAGMENT_OUTPUTS=1` asks the memo for every draw (new `ENVIRONMENT.md` row). `ARCHITECTURE.md` no longer lists this skip under `CommitTrims`. - `ThreadFragmentOutputLookups` returns per-thread counters (last-key hits, memo hits, validations) for the tests. They are plain increments on the thread's own slot. - **Memory:** one copy of the validation key per drawing thread. - **Overlap:** no open PR changes `AssemblePushConstants` or the last-key lookup in `CachedFragmentOutputs`. This comes from a diff scan of the 2,012 open PRs for these symbols. Five PRs too large for `gh pr diff` were checked file by file; #9508 and #7642 add a push-data mask of their own in a new function (`PushDataPlacements`). - #15456 turns the draw finisher on by default, and with it `CommitTrims`, so main's opt-in last key would also run by default once it lands. This PR moves the last key out of `CommitTrims`, behind its own switch, in a TEB slot, remembering validated keys too. It does not depend on #15456, and the two compose. Both edit the same `ARCHITECTURE.md` paragraph. - #6188 adds a parameter to `CachedFragmentOutputs`, and #5925 calls it from the pipeline journal; neither changes the lookup. - #16752 (pipeline and dynamic-state commands) and #16753 (framebuffer owners, clock reads) trim other per-draw work and touch neither function. - `tools/pr_overlap.py` failed closed. - It reports line conflicts with #9508 and #15456 in that `ARCHITECTURE.md` paragraph, and with #16413 and #16753 at the top of the graphics test runner's `main`, where each adds a mode. - It could not compare 72 PRs that conflict with main. Their shared files (`Draw.cpp`, `tests/Graphics.cpp`, `ENVIRONMENT.md`, `Shaders.hpp`, `Draw.hpp`) were covered by the symbol scan above. ### Tested <!-- OS, title or homebrew, what was checked. "Not tested" is a valid answer. A performance change: the summary lines of main and of this PR from the same machine and scene, with the traces attached, captured as the Performance report issue form describes. --> 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 `164ac9b078` and this change on top of it (`e312386c58`). - **Rebase:** the branch was then rebased onto main `eb3839d4f3` without conflicts. `git range-diff` shows the same patch, now `b2ca8d4f36`. The validation runs below used the rebased commit and main `eb3839d4f3`. New tests: - **`agc_driver_push_constant_assembly`** (`agc_driver_graphics_tests --push-constant-assembly`, also in the default run): compares the result, or the error, with a copy of the old byte loop. - It covers every vertex size and pixel offset (0-128 by 0-252 bytes, in DWORD steps) and 40,000 random layouts. - It requires at least 50 cases of each outcome. The counts were: assembled 22,238, unaligned 7,229, overlap 6,613, outside the block 2,689, slot crossing 2,336, missing shader 1,007. - **`agc_driver_last_fragment_outputs`**, and **`agc_driver_last_fragment_outputs_off`** (the same with `APS5_NO_LAST_FRAGMENT_OUTPUTS=1`): six real draws on the device, A, A, B, A, A, B, where B culls both faces (another key). - Each step checks which path answered: a fresh validation, the last key or the memo. With the switch on, the repeats are last-key hits; with it off, they are memo hits and there are no last-key hits. - Every A draw must cover its whole target, and B must write nothing. Broken copies of the change, each run against these tests, are all caught (10 of 10): - push constants: no overlap check, a mask one DWORD short, the mask at half its offset, a short copy, the mask not accumulated; - fragment outputs: any key served as the last, the last never valid, the switch ignored, the outputs never updated, nothing remembered after a validation. 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): - **Tests:** `agc_graphics_profile_draw`, `agc_driver_pass_break_reasons`, `agc_driver_draw_offset_indices`, `agc_driver_multisampled_pass_order`, `agc_driver_unclamped_normalized_blend`, `agc_driver_sample_order*` (4), `agc_driver_draw_cache_relocation*` (6), `agc_driver_depth_fast_clear_submit`. - **Results:** 15 pass on main `eb3839d4f3`. On the change, 18 pass, the three new tests included. `agc_driver_sample_order_grid_reference` skips by its own check in both. - **Logs:** neither contains `was not found but was requested by env var VK_INSTANCE_LAYERS` or a `VUID-` line. Both contain the same 53 host-import fallback lines from `agc_graphics_profile_draw`; this machine's host heap reports an 8 MiB budget. `tools/check_conventions.py` and `tools/env_reference.py --check` pass. Full ctest was not run. Sampler (`APS5_SAMPLE_COMMITTER` and `APS5_SAMPLE_WORKER`, 60 s window, 3843 samples per thread). The first PR window ran on `3781aedc48`, an earlier revision of this commit. It has the same code, with the memo insert's lock in an inner block. | draw committer, samples | main `164ac9b078` (3 windows) | this PR (2 windows) | |---|---|---| | `planDraw` self | 47 / 49 / 51 | 24 / 22 | | `planDraw` inclusive | 174 / 175 / 182 | 138 / 139 | | `AssemblePushConstants` inclusive | 15 / 25 / 11 | 4 / 11 | - **Saving:** about 26 samples of `planDraw` self (0.7% of the committer, about 0.5 ms per frame), and about 10 in push constants (about 0.2 ms per frame, noisier). - **Limiting threads:** the committer and the GPU limit the frame. The worker waits 22-27% of its samples in `DrawPipeline::Enqueue`. Two traced runs per arm (`APS5_TRACE_SECONDS=200:15`), in main, PR, PR, main order, both commit IDs in the summaries: | | main `164ac9b078` | this PR `e312386c58` | |---|---|---| | reading FPS (median) | 14.61 / 14.63 | 14.40 / 14.21 | | frame p50 | 73.1 / 72.3 ms | 72.8 / 73.7 ms | | committer `Graphics.Draw` per frame (retained events) | 30.0 / 29.9 ms | 29.6 / 30.7 ms | | GPU busy per present | 35.6 / 35.8 ms | 36.2 / 35.8 ms | - **No FPS change is claimed.** The saving shows in the sampler, while frame time and FPS stay within the run-to-run spread. The traced pairs read the PR about 0.3 FPS lower; the sampler runs read 14.31 / 14.37 on main and 14.41 / 14.30 on the PR. - **Dropped events:** all four traces dropped events once the worker's buffer filled, equally in both arms, so the slice figures cover retained events only. - **Machine:** other work on the machine was not excluded during the runs. **seconds 200:15** from present 4465: 205 presents, frame p50 73.1 / p90 77.4 / p99 82.0 / max 83.4 ms, GPU busy 35.6 ms per present NVIDIA GeForce RTX 2080 Ti, NVIDIA 617.14, Windows 10.0.26300, 3840x2160, commit 164ac9b078cd, dropped: yes ```json {"commit":"164ac9b078cd","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":4465,"ms":15059.647},"presents":205,"frame_ms":{"p50":73.072,"p90":77.381,"p99":82.036,"max":83.356},"gpu_busy_ms_per_present":35.634,"worker_busy_pct":{"queue worker 0x0":96.964},"top_phases_ms_per_frame":{"Driver.Packet":69.194,"Driver.Packet.draw":52.168,"Graphics.Draw":51.695,"Driver.Draw":51.198,"Graphics.Draw.draw_and_resource_release":40.675,"Driver.Draw.shader_compile_and_link":25.09,"Shader.DrawStage":16.308,"Driver.Draw.draw_enqueued":14.965},"owned_draw_counts":{"OwnedDraw.evicted_other":18897},"trace_dropped":true,"trace_dropped_threads":{"queue worker 0x0":{"events_full_after_s":5.476,"events_lost":463498,"totals_full":false},"draw committer":{"events_full_after_s":12.383,"events_lost":58587,"totals_full":false}},"trace":"aps5-trace-164ac9b078cd-9328.json.gz"} ``` **seconds 200:15** from present 4433: 205 presents, frame p50 72.8 / p90 77.1 / p99 81.1 / max 84.4 ms, GPU busy 36.2 ms per present NVIDIA GeForce RTX 2080 Ti, NVIDIA 617.14, Windows 10.0.26300, 3840x2160, commit e312386c5883, dropped: yes ```json {"commit":"e312386c5883","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":4433,"ms":15003.737},"presents":205,"frame_ms":{"p50":72.802,"p90":77.09,"p99":81.076,"max":84.377},"gpu_busy_ms_per_present":36.244,"worker_busy_pct":{"queue worker 0x0":96.925},"top_phases_ms_per_frame":{"Driver.Packet":68.915,"Driver.Packet.draw":51.909,"Graphics.Draw":51.086,"Driver.Draw":50.881,"Graphics.Draw.draw_and_resource_release":40.518,"Driver.Draw.shader_compile_and_link":25.08,"Shader.DrawStage":16.193,"Driver.Draw.draw_enqueued":14.398},"owned_draw_counts":{"OwnedDraw.evicted_other":18465},"trace_dropped":true,"trace_dropped_threads":{"queue worker 0x0":{"events_full_after_s":5.413,"events_lost":467768,"totals_full":false},"draw committer":{"events_full_after_s":12.289,"events_lost":57947,"totals_full":false}},"trace":"aps5-trace-e312386c5883-2676.json.gz"} ``` **seconds 200:15** from present 4416: 203 presents, frame p50 73.7 / p90 78.0 / p99 83.7 / max 84.5 ms, GPU busy 35.8 ms per present NVIDIA GeForce RTX 2080 Ti, NVIDIA 617.14, Windows 10.0.26300, 3840x2160, commit e312386c5883, dropped: yes ```json {"commit":"e312386c5883","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":4416,"ms":15034.272},"presents":203,"frame_ms":{"p50":73.691,"p90":78.017,"p99":83.69,"max":84.466},"gpu_busy_ms_per_present":35.778,"worker_busy_pct":{"queue worker 0x0":97.008},"top_phases_ms_per_frame":{"Driver.Packet":69.777,"Graphics.Draw":52.894,"Driver.Packet.draw":52.574,"Driver.Draw":51.622,"Graphics.Draw.draw_and_resource_release":41.79,"Driver.Draw.shader_compile_and_link":24.74,"Shader.DrawStage":16.056,"Driver.Draw.draw_enqueued":15.792},"owned_draw_counts":{"OwnedDraw.evicted_other":17768},"trace_dropped":true,"trace_dropped_threads":{"queue worker 0x0":{"events_full_after_s":5.665,"events_lost":440056,"totals_full":false},"draw committer":{"events_full_after_s":12.117,"events_lost":63019,"totals_full":false}},"trace":"aps5-trace-e312386c5883-20848.json.gz"} ``` **seconds 200:15** from present 4497: 207 presents, frame p50 72.3 / p90 76.6 / p99 81.1 / max 84.6 ms, GPU busy 35.8 ms per present NVIDIA GeForce RTX 2080 Ti, NVIDIA 617.14, Windows 10.0.26300, 3840x2160, commit 164ac9b078cd, dropped: yes ```json {"commit":"164ac9b078cd","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":4497,"ms":15040.999},"presents":207,"frame_ms":{"p50":72.345,"p90":76.571,"p99":81.078,"max":84.559},"gpu_busy_ms_per_present":35.753,"worker_busy_pct":{"queue worker 0x0":96.797},"top_phases_ms_per_frame":{"Driver.Packet":68.271,"Driver.Packet.draw":51.348,"Graphics.Draw":51.169,"Driver.Draw":50.314,"Graphics.Draw.draw_and_resource_release":40.642,"Driver.Draw.shader_compile_and_link":24.656,"Shader.DrawStage":15.902,"Driver.Draw.draw_enqueued":14.498},"owned_draw_counts":{"OwnedDraw.evicted_other":19589},"trace_dropped":true,"trace_dropped_threads":{"queue worker 0x0":{"events_full_after_s":5.624,"events_lost":451055,"totals_full":false},"draw committer":{"events_full_after_s":12.523,"events_lost":54723,"totals_full":false}},"trace":"aps5-trace-164ac9b078cd-14232.json.gz"} ``` Traces (two runs per zip, each with its `aps5-summary.jsonl`): [m330-main-traces.zip](https://github.com/user-attachments/files/34643249/m330-main-traces.zip) (main `164ac9b078`), [m330-change-traces.zip](https://github.com/user-attachments/files/34643259/m330-change-traces.zip) (this PR `e312386c58`). <details><summary>trace_digest.py, main run 1</summary> **seconds 200:15** from present 4465: 205 presents, frame p50 73.1 / p90 77.4 / p99 82.0 / max 83.4 ms, GPU busy 35.6 ms per present NVIDIA GeForce RTX 2080 Ti, NVIDIA 617.14, Windows 10.0.26300, 3840x2160, commit 164ac9b078cd, dropped: yes ```json {"commit":"164ac9b078cd","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":4465,"ms":15059.647},"presents":205,"frame_ms":{"p50":73.072,"p90":77.381,"p99":82.036,"max":83.356},"gpu_busy_ms_per_present":35.634,"worker_busy_pct":{"queue worker 0x0":96.964},"top_phases_ms_per_frame":{"Driver.Packet":69.194,"Driver.Packet.draw":52.168,"Graphics.Draw":51.695,"Driver.Draw":51.198,"Graphics.Draw.draw_and_resource_release":40.675,"Driver.Draw.shader_compile_and_link":25.09,"Shader.DrawStage":16.308,"Driver.Draw.draw_enqueued":14.965},"owned_draw_counts":{"OwnedDraw.evicted_other":18897},"trace_dropped":true,"trace_dropped_threads":{"queue worker 0x0":{"events_full_after_s":5.476,"events_lost":463498,"totals_full":false},"draw committer":{"events_full_after_s":12.383,"events_lost":58587,"totals_full":false}},"trace":"aps5-trace-164ac9b078cd-9328.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: 463498 events lost; buffer full at 5475.7 ms - draw committer: 58587 events lost; buffer full at 12383.3 ms **Slowest frames** (largest slices inside each, inclusive) - present 4631: 83.4 ms at 12158 ms: Graphics.Draw (draw committer) 47.5, batch (gpu) 39.9, Graphics.Draw.draw_and_resource_release (draw committer) 30.9, VideoOut.Flip (presenter) 10.3 - present 4645: 83.1 ms at 13191 ms: batch (gpu) 37.7, VideoOut.Flip (presenter) 11.4, VideoOut.Flip.present (presenter) 11.2, Driver.Present (presenter) 11.2 - present 4551: 82.0 ms at 6315 ms: Graphics.Draw (draw committer) 47.1, batch (gpu) 35.0, Graphics.Draw.draw_and_resource_release (draw committer) 31.8, VideoOut.Flip (presenter) 9.4 - present 4658: 80.9 ms at 14167 ms: batch (gpu) 38.1, VideoOut.Flip (presenter) 11.3, VideoOut.Flip.present (presenter) 11.2, Driver.Present (presenter) 11.2 - present 4644: 80.7 ms at 13110 ms: batch (gpu) 34.3, VideoOut.Flip (presenter) 9.5, VideoOut.Flip.present (presenter) 9.4, Driver.Present (presenter) 9.4 **Persistent spikes** (frame time above the fastest frame that separates it from a longer frame; one entry per stall, not per frame) - present 4631: 83.4 ms at 12158 ms, persistence 16.5 ms - present 4551: 82.0 ms at 6315 ms, persistence 14.3 ms - present 4467: 80.4 ms at 146 ms, persistence 13.5 ms - present 4645: 83.1 ms at 13191 ms, persistence 12.0 ms - present 4658: 80.9 ms at 14167 ms, persistence 11.9 ms - present 4516: 80.5 ms at 3722 ms, persistence 11.8 ms - present 4493: 77.8 ms at 2046 ms, persistence 9.8 ms - present 4576: 77.6 ms at 8151 ms, persistence 9.6 ms - present 4507: 79.0 ms at 3065 ms, persistence 9.4 ms - present 4604: 77.3 ms at 10191 ms, persistence 8.9 ms **Threads** (ms per frame) | thread | busy | wait | untraced | in slices < 20 us | largest | |---|---|---|---|---|---| | title | 0.4 (0 %) | 9.2 (12 %) | 63.9 | 0.5 | Shader.ResolveGraphicsStagesAbi 0.2, Shader.ResolveGraphicsAbi 0.1 | | queue worker 0x0 | 17.8 (24 %) | 0.0 (0 %) | 55.7 | 44.6 | Driver.Packet 17.1, Driver.EndSubmission 0.7 | | draw committer | 32.5 (44 %) | 0.2 (0 %) | 40.7 | 32.1 | Graphics.Draw 30.0, Recorder.Submit 1.9 | | title | 0.1 (0 %) | 0.0 (0 %) | 73.4 | 0.1 | Shader.ResolveGraphicsStagesAbi 0.0, Shader.ResolveAbi 0.0 | | title | 0.1 (0 %) | 0.0 (0 %) | 73.4 | 0.1 | Shader.ResolveGraphicsStagesAbi 0.0, Shader.ResolveGraphicsAbi 0.0 | | title | 0.1 (0 %) | 0.0 (0 %) | 73.4 | 0.1 | Shader.ResolveGraphicsStagesAbi 0.0, Shader.ResolveAbi 0.0 | | presenter | 1.0 (1 %) | 8.5 (12 %) | 64.0 | 0.0 | VideoOut.Flip 9.4, Driver.Present 0.0 | | title | 0.1 (0 %) | 0.0 (0 %) | 73.4 | 0.1 | Shader.ResolveGraphicsStagesAbi 0.0, Shader.ResolveGraphicsAbi 0.0 | | title | 0.1 (0 %) | 0.0 (0 %) | 73.3 | 0.1 | Shader.ResolveGraphicsStagesAbi 0.0, Shader.ResolveAbi 0.0 | | title | 0.1 (0 %) | 0.0 (0 %) | 73.4 | 0.1 | Shader.ResolveGraphicsStagesAbi 0.0, Shader.ResolveGraphicsAbi 0.0 | | title | 0.1 (0 %) | 0.0 (0 %) | 73.4 | 0.1 | Shader.ResolveAbi 0.0, Shader.ResolveGraphicsAbi 0.0 | | title | 0.1 (0 %) | 0.0 (0 %) | 73.4 | 0.1 | Shader.ResolveGraphicsAbi 0.0, Shader.ResolveAbi 0.0 | | title | 0.1 (0 %) | 0.0 (0 %) | 73.4 | 0.1 | Shader.ResolveGraphicsAbi 0.0, Shader.ResolveAbi 0.0 | | title | 0.1 (0 %) | 0.0 (0 %) | 73.4 | 0.1 | Shader.ResolveGraphicsAbi 0.0, Shader.ResolveGraphicsStagesAbi 0.0 | | title | 0.1 (0 %) | 0.0 (0 %) | 73.4 | 0.1 | Shader.ResolveGraphicsStagesAbi 0.0, Shader.ResolveGraphicsAbi 0.0 | | title | 0.1 (0 %) | 0.0 (0 %) | 73.4 | 0.1 | Shader.ResolveAbi 0.0, Shader.ResolveGraphicsStagesAbi 0.0 | | gpu | 35.5 (48 %) | 0.0 (0 %) | 38.0 | 0.0 | batch 35.5 | **Largest slices** (ms per frame, inclusive, all threads): batch 35.5, Graphics.Draw 30.0, Graphics.Draw.draw_and_resource_release 22.2, Driver.Packet 17.1, Driver.Packet.draw 13.4, Driver.Draw 13.1, VideoOut.Flip 9.4, Driver.Present 9.3, VideoOut.Flip.present 9.2, Recorder.WaitSerial 9.1 **Longest waits** - Recorder.WaitSerial (title) 12.7 ms at 10482 ms, present 4607 - Recorder.WaitSerial (title) 12.4 ms at 10556 ms, present 4608 - Driver.Present.render_fence_wait (presenter) 12.0 ms at 10483 ms, present 4608 - Recorder.WaitSerial (title) 11.8 ms at 10415 ms, present 4606 - Recorder.WaitSerial (title) 11.7 ms at 10191 ms, present 4603 - Recorder.WaitSerial (title) 11.6 ms at 10630 ms, present 4609 - Driver.Present.render_fence_wait (presenter) 11.6 ms at 10556 ms, present 4609 - Recorder.WaitSerial (title) 11.5 ms at 14019 ms, present 4655 - Recorder.WaitSerial (title) 11.4 ms at 9903 ms, present 4599 - Recorder.WaitSerial (title) 11.3 ms at 8824 ms, present 4584 **Largest GPU batches** (GPU ranges inside, and the CPU slices that recorded each, inclusive) - batch 3093: 10.7 ms at 3710 ms, present 4515: GPU no ranges; recorded by Graphics.Draw (draw committer) 0.6, Graphics.Draw.draw_and_resource_release (draw committer) 0.6, Resources.Complete (draw committer) 0.1 - batch 1149: 10.5 ms at 1380 ms, present 4483: 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 6209: 10.2 ms at 7493 ms, present 4566: 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 844: 10.1 ms at 1011 ms, present 4478: 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 8454: 10.0 ms at 10180 ms, present 4603: 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>trace_digest.py, PR run 1</summary> **seconds 200:15** from present 4433: 205 presents, frame p50 72.8 / p90 77.1 / p99 81.1 / max 84.4 ms, GPU busy 36.2 ms per present NVIDIA GeForce RTX 2080 Ti, NVIDIA 617.14, Windows 10.0.26300, 3840x2160, commit e312386c5883, dropped: yes ```json {"commit":"e312386c5883","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":4433,"ms":15003.737},"presents":205,"frame_ms":{"p50":72.802,"p90":77.09,"p99":81.076,"max":84.377},"gpu_busy_ms_per_present":36.244,"worker_busy_pct":{"queue worker 0x0":96.925},"top_phases_ms_per_frame":{"Driver.Packet":68.915,"Driver.Packet.draw":51.909,"Graphics.Draw":51.086,"Driver.Draw":50.881,"Graphics.Draw.draw_and_resource_release":40.518,"Driver.Draw.shader_compile_and_link":25.08,"Shader.DrawStage":16.193,"Driver.Draw.draw_enqueued":14.398},"owned_draw_counts":{"OwnedDraw.evicted_other":18465},"trace_dropped":true,"trace_dropped_threads":{"queue worker 0x0":{"events_full_after_s":5.413,"events_lost":467768,"totals_full":false},"draw committer":{"events_full_after_s":12.289,"events_lost":57947,"totals_full":false}},"trace":"aps5-trace-e312386c5883-2676.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: 467768 events lost; buffer full at 5413.4 ms - draw committer: 57947 events lost; buffer full at 12289.0 ms **Slowest frames** (largest slices inside each, inclusive) - present 4468: 84.4 ms at 2568 ms: Driver.Packet (queue worker 0x0) 58.2, Graphics.Draw (draw committer) 42.8, batch (gpu) 41.8, Driver.Packet.draw (queue worker 0x0) 40.4 - present 4496: 81.5 ms at 4637 ms: Driver.Packet (queue worker 0x0) 56.9, Driver.Packet.draw (queue worker 0x0) 46.5, Graphics.Draw (draw committer) 45.6, Driver.Draw (queue worker 0x0) 45.1 - present 4581: 81.1 ms at 10829 ms: Graphics.Draw (draw committer) 51.1, batch (gpu) 35.9, Graphics.Draw.draw_and_resource_release (draw committer) 30.2, VideoOut.Flip (presenter) 10.6 - present 4619: 80.8 ms at 13591 ms: batch (gpu) 39.1, VideoOut.Flip (presenter) 9.7, VideoOut.Flip.present (presenter) 9.6, Driver.Present (presenter) 9.6 - present 4511: 80.6 ms at 5729 ms: Graphics.Draw (draw committer) 50.2, batch (gpu) 36.0, Graphics.Draw.draw_and_resource_release (draw committer) 27.7, VideoOut.Flip (presenter) 10.2 **Persistent spikes** (frame time above the fastest frame that separates it from a longer frame; one entry per stall, not per frame) - present 4468: 84.4 ms at 2568 ms, persistence 17.7 ms - present 4581: 81.1 ms at 10829 ms, persistence 14.4 ms - present 4619: 80.8 ms at 13591 ms, persistence 13.9 ms - present 4496: 81.5 ms at 4637 ms, persistence 13.3 ms - present 4511: 80.6 ms at 5729 ms, persistence 11.5 ms - present 4634: 80.3 ms at 14707 ms, persistence 10.5 ms - present 4441: 78.6 ms at 585 ms, persistence 8.9 ms - present 4458: 78.6 ms at 1826 ms, persistence 8.6 ms - present 4585: 79.4 ms at 11126 ms, persistence 8.6 ms - present 4480: 79.6 ms at 3461 ms, persistence 8.5 ms **Threads** (ms per frame) | thread | busy | wait | untraced | in slices < 20 us | largest | |---|---|---|---|---|---| | title | 0.3 (0 %) | 10.2 (14 %) | 62.7 | 0.5 | Shader.ResolveGraphicsStagesAbi 0.2, Shader.ResolveGraphicsAbi 0.1 | | queue worker 0x0 | 17.7 (24 %) | 0.0 (0 %) | 55.5 | 44.0 | Driver.Packet 16.9, Driver.EndSubmission 0.7 | | draw committer | 32.1 (44 %) | 0.2 (0 %) | 40.9 | 31.7 | Graphics.Draw 29.6, Recorder.Submit 1.8 | | title | 0.1 (0 %) | 0.0 (0 %) | 73.1 | 0.1 | Shader.ResolveGraphicsStagesAbi 0.0, Shader.ResolveAbi 0.0 | | title | 0.1 (0 %) | 0.0 (0 %) | 73.1 | 0.1 | Shader.ResolveGraphicsAbi 0.0, Shader.ResolveAbi 0.0 | | title | 0.1 (0 %) | 0.0 (0 %) | 73.1 | 0.1 | Shader.ResolveAbi 0.0, Shader.ResolveGraphicsAbi 0.0 | | title | 0.1 (0 %) | 0.0 (0 %) | 73.1 | 0.1 | Shader.ResolveGraphicsStagesAbi 0.0, Shader.ResolveAbi 0.0 | | presenter | 0.9 (1 %) | 9.5 (13 %) | 62.8 | 0.0 | VideoOut.Flip 10.3, Driver.Present 0.0 | | title | 0.1 (0 %) | 0.0 (0 %) | 73.1 | 0.1 | Shader.ResolveGraphicsStagesAbi 0.0, Shader.ResolveAbi 0.0 | | title | 0.1 (0 %) | 0.0 (0 %) | 73.1 | 0.0 | Shader.ResolveAbi 0.0, Shader.ResolveGraphicsStagesAbi 0.0 | | title | 0.1 (0 %) | 0.0 (0 %) | 73.1 | 0.1 | Shader.ResolveGraphicsStagesAbi 0.0, Shader.ResolveAbi 0.0 | | title | 0.1 (0 %) | 0.0 (0 %) | 73.1 | 0.1 | Shader.ResolveGraphicsAbi 0.0, Shader.ResolveGraphicsStagesAbi 0.0 | | title | 0.1 (0 %) | 0.0 (0 %) | 73.1 | 0.1 | Shader.ResolveAbi 0.0, Shader.ResolveGraphicsStagesAbi 0.0 | | title | 0.1 (0 %) | 0.0 (0 %) | 73.1 | 0.1 | Shader.ResolveAbi 0.0, Shader.ResolveGraphicsStagesAbi 0.0 | | title | 0.1 (0 %) | 0.0 (0 %) | 73.1 | 0.1 | Shader.ResolveGraphicsStagesAbi 0.0, Shader.ResolveAbi 0.0 | | title | 0.1 (0 %) | 0.0 (0 %) | 73.1 | 0.1 | Shader.ResolveGraphicsStagesAbi 0.0, Shader.ResolveAbi 0.0 | | gpu | 36.3 (50 %) | 0.0 (0 %) | 36.9 | 0.0 | batch 36.3 | **Largest slices** (ms per frame, inclusive, all threads): batch 36.3, Graphics.Draw 29.6, Graphics.Draw.draw_and_resource_release 21.8, Driver.Packet 16.9, Driver.Packet.draw 13.3, Driver.Draw 12.9, VideoOut.Flip 10.3, Driver.Present 10.3, VideoOut.Flip.present 10.2, Recorder.WaitSerial 10.1 **Longest waits** - Recorder.WaitSerial (title) 12.4 ms at 4493 ms, present 4493 - Recorder.WaitSerial (title) 12.4 ms at 13228 ms, present 4613 - Recorder.WaitSerial (title) 12.4 ms at 13087 ms, present 4611 - Recorder.WaitSerial (title) 12.3 ms at 5583 ms, present 4508 - Recorder.WaitSerial (title) 12.3 ms at 14044 ms, present 4624 - Recorder.WaitSerial (title) 12.3 ms at 216 ms, present 4435 - Recorder.WaitSerial (title) 12.2 ms at 12217 ms, present 4599 - Recorder.WaitSerial (title) 12.2 ms at 11799 ms, present 4593 - Recorder.WaitSerial (title) 12.1 ms at 4564 ms, present 4494 - Recorder.WaitSerial (title) 12.1 ms at 12077 ms, present 4597 **Largest GPU batches** (GPU ranges inside, and the CPU slices that recorded each, inclusive) - batch 3683: 10.6 ms at 4483 ms, present 4493: GPU no ranges; recorded by Vulkan.DrawFromRecipe (draw committer) 0.3, Graphics.DrawWithRecipe (draw committer) 0.3, Graphics.DrawWithRecipe.draw_and_resource_release (draw committer) 0.3, Graphics.Draw (draw committer) 0.1 - batch 3142: 10.4 ms at 3823 ms, present 4484: 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 285: 10.4 ms at 351 ms, present 4437: 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 2476: 10.4 ms at 3013 ms, present 4473: GPU no ranges; recorded by Graphics.Draw (draw committer) 0.6, Graphics.Draw.draw_and_resource_release (draw committer) 0.6, Resources.Complete (draw committer) 0.1 - batch 1802: 10.4 ms at 2191 ms, present 4462: GPU no ranges; recorded by Vulkan.DrawFromRecipe (draw committer) 0.3, Graphics.DrawWithRecipe (draw committer) 0.3, Graphics.DrawWithRecipe.draw_and_resource_release (draw committer) 0.3, Graphics.Draw (draw committer) 0.2 </details> <details><summary>trace_digest.py, PR run 2</summary> **seconds 200:15** from present 4416: 203 presents, frame p50 73.7 / p90 78.0 / p99 83.7 / max 84.5 ms, GPU busy 35.8 ms per present NVIDIA GeForce RTX 2080 Ti, NVIDIA 617.14, Windows 10.0.26300, 3840x2160, commit e312386c5883, dropped: yes ```json {"commit":"e312386c5883","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":4416,"ms":15034.272},"presents":203,"frame_ms":{"p50":73.691,"p90":78.017,"p99":83.69,"max":84.466},"gpu_busy_ms_per_present":35.778,"worker_busy_pct":{"queue worker 0x0":97.008},"top_phases_ms_per_frame":{"Driver.Packet":69.777,"Graphics.Draw":52.894,"Driver.Packet.draw":52.574,"Driver.Draw":51.622,"Graphics.Draw.draw_and_resource_release":41.79,"Driver.Draw.shader_compile_and_link":24.74,"Shader.DrawStage":16.056,"Driver.Draw.draw_enqueued":15.792},"owned_draw_counts":{"OwnedDraw.evicted_other":17768},"trace_dropped":true,"trace_dropped_threads":{"queue worker 0x0":{"events_full_after_s":5.665,"events_lost":440056,"totals_full":false},"draw committer":{"events_full_after_s":12.117,"events_lost":63019,"totals_full":false}},"trace":"aps5-trace-e312386c5883-20848.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: 440056 events lost; buffer full at 5665.4 ms - draw committer: 63019 events lost; buffer full at 12116.7 ms **Slowest frames** (largest slices inside each, inclusive) - present 4466: 84.5 ms at 3684 ms: Driver.Packet (queue worker 0x0) 61.0, Driver.Packet.draw (queue worker 0x0) 49.5, Driver.Draw (queue worker 0x0) 48.3, Graphics.Draw (draw committer) 48.0 - present 4595: 84.1 ms at 13232 ms: batch (gpu) 34.0, VideoOut.Flip (presenter) 8.4, VideoOut.Flip.present (presenter) 8.3, Driver.Present (presenter) 8.3 - present 4501: 83.7 ms at 6243 ms: Graphics.Draw (draw committer) 53.5, batch (gpu) 36.5, Graphics.Draw.draw_and_resource_release (draw committer) 32.5, VideoOut.Flip (presenter) 8.1 - present 4460: 82.5 ms at 3237 ms: Driver.Packet (queue worker 0x0) 59.1, Driver.Packet.draw (queue worker 0x0) 48.8, Graphics.Draw (draw committer) 48.7, Driver.Draw (queue worker 0x0) 47.5 - present 4450: 82.3 ms at 2498 ms: Driver.Packet (queue worker 0x0) 57.3, Graphics.Draw (draw committer) 47.1, Driver.Packet.draw (queue worker 0x0) 45.6, Driver.Draw (queue worker 0x0) 44.3 **Persistent spikes** (frame time above the fastest frame that separates it from a longer frame; one entry per stall, not per frame) - present 4466: 84.5 ms at 3684 ms, persistence 17.5 ms - present 4595: 84.1 ms at 13232 ms, persistence 16.2 ms - present 4501: 83.7 ms at 6243 ms, persistence 15.7 ms - present 4460: 82.5 ms at 3237 ms, persistence 12.7 ms - present 4450: 82.3 ms at 2498 ms, persistence 12.1 ms - present 4520: 80.1 ms at 7655 ms, persistence 10.7 ms - present 4551: 80.6 ms at 9956 ms, persistence 10.2 ms - present 4574: 81.0 ms at 11665 ms, persistence 9.9 ms - present 4615: 78.7 ms at 14725 ms, persistence 8.7 ms - present 4473: 78.4 ms at 4205 ms, persistence 8.7 ms **Threads** (ms per frame) | thread | busy | wait | untraced | in slices < 20 us | largest | |---|---|---|---|---|---| | title | 0.3 (0 %) | 8.9 (12 %) | 64.8 | 0.5 | Shader.ResolveGraphicsStagesAbi 0.1, Shader.ResolveGraphicsAbi 0.1 | | queue worker 0x0 | 18.5 (25 %) | 0.0 (0 %) | 55.6 | 47.0 | Driver.Packet 17.7, Driver.EndSubmission 0.8 | | draw committer | 33.5 (45 %) | 0.2 (0 %) | 40.4 | 31.5 | Graphics.Draw 30.7, Recorder.Submit 2.1 | | title | 0.1 (0 %) | 0.0 (0 %) | 73.9 | 0.1 | Shader.ResolveGraphicsStagesAbi 0.0, Shader.ResolveGraphicsAbi 0.0 | | title | 0.1 (0 %) | 0.0 (0 %) | 74.0 | 0.1 | Shader.ResolveGraphicsStagesAbi 0.0, Shader.ResolveAbi 0.0 | | title | 0.1 (0 %) | 0.0 (0 %) | 74.0 | 0.1 | Shader.ResolveGraphicsStagesAbi 0.0, Shader.ResolveAbi 0.0 | | presenter | 0.9 (1 %) | 8.2 (11 %) | 64.9 | 0.1 | VideoOut.Flip 9.1, Driver.Present 0.1 | | title | 0.1 (0 %) | 0.0 (0 %) | 74.0 | 0.1 | Shader.ResolveGraphicsStagesAbi 0.0, Shader.ResolveGraphicsAbi 0.0 | | title | 0.1 (0 %) | 0.0 (0 %) | 74.0 | 0.1 | Shader.ResolveGraphicsAbi 0.0, Shader.ResolveGraphicsStagesAbi 0.0 | | title | 0.1 (0 %) | 0.0 (0 %) | 74.0 | 0.1 | Shader.ResolveGraphicsStagesAbi 0.0, Shader.ResolveAbi 0.0 | | title | 0.1 (0 %) | 0.0 (0 %) | 74.0 | 0.1 | Shader.ResolveGraphicsStagesAbi 0.0, Shader.ResolveGraphicsAbi 0.0 | | title | 0.1 (0 %) | 0.0 (0 %) | 74.0 | 0.1 | Shader.ResolveGraphicsStagesAbi 0.0, Shader.ResolveGraphicsAbi 0.0 | | title | 0.1 (0 %) | 0.0 (0 %) | 74.0 | 0.1 | Shader.ResolveGraphicsStagesAbi 0.0, Shader.ResolveGraphicsAbi 0.0 | | title | 0.1 (0 %) | 0.0 (0 %) | 73.9 | 0.1 | Shader.ResolveGraphicsStagesAbi 0.0, Shader.ResolveAbi 0.0 | | title | 0.1 (0 %) | 0.0 (0 %) | 74.0 | 0.0 | Shader.ResolveGraphicsAbi 0.0, Shader.ResolveGraphicsStagesAbi 0.0 | | title | 0.1 (0 %) | 0.0 (0 %) | 74.0 | 0.1 | Shader.ResolveAbi 0.0, Shader.ResolveGraphicsStagesAbi 0.0 | | gpu | 35.6 (48 %) | 0.0 (0 %) | 38.5 | 0.0 | batch 35.6 | **Largest slices** (ms per frame, inclusive, all threads): batch 35.6, Graphics.Draw 30.7, Graphics.Draw.draw_and_resource_release 22.5, Driver.Packet 17.7, Driver.Packet.draw 13.8, Driver.Draw 13.5, VideoOut.Flip 9.1, Driver.Present 9.0, VideoOut.Flip.present 8.9, Recorder.WaitSerial 8.9 **Longest waits** - Recorder.WaitSerial (title) 13.1 ms at 2043 ms, present 4443 - Driver.Present.render_fence_wait (presenter) 12.2 ms at 2044 ms, present 4444 - Recorder.WaitSerial (title) 11.3 ms at 9506 ms, present 4544 - Recorder.WaitSerial (title) 11.3 ms at 2348 ms, present 4447 - Recorder.WaitSerial (title) 11.1 ms at 12857 ms, present 4589 - Recorder.WaitSerial (title) 11.0 ms at 1971 ms, present 4442 - Recorder.WaitSerial (title) 11.0 ms at 653 ms, present 4425 - Recorder.WaitSerial (title) 10.9 ms at 8261 ms, present 4527 - Recorder.WaitSerial (title) 10.9 ms at 2199 ms, present 4445 - Recorder.WaitSerial (title) 10.8 ms at 2271 ms, present 4446 **Largest GPU batches** (GPU ranges inside, and the CPU slices that recorded each, inclusive) - batch 1810: 10.8 ms at 2188 ms, present 4445: GPU no ranges; recorded by Graphics.Draw (draw committer) 0.6, Graphics.Draw.draw_and_resource_release (draw committer) 0.6, Resources.Complete (draw committer) 0.1 - batch 10275: 10.4 ms at 12473 ms, present 4584: GPU no ranges; recorded by no CPU slices - batch 3451: 10.2 ms at 4194 ms, present 4472: 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 6258: 9.3 ms at 7572 ms, present 4518: 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 8442: 9.3 ms at 10253 ms, present 4554: 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, Recorder.Reap (draw committer) 0.0 </details> <details><summary>trace_digest.py, main run 2</summary> **seconds 200:15** from present 4497: 207 presents, frame p50 72.3 / p90 76.6 / p99 81.1 / max 84.6 ms, GPU busy 35.8 ms per present NVIDIA GeForce RTX 2080 Ti, NVIDIA 617.14, Windows 10.0.26300, 3840x2160, commit 164ac9b078cd, dropped: yes ```json {"commit":"164ac9b078cd","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":4497,"ms":15040.999},"presents":207,"frame_ms":{"p50":72.345,"p90":76.571,"p99":81.078,"max":84.559},"gpu_busy_ms_per_present":35.753,"worker_busy_pct":{"queue worker 0x0":96.797},"top_phases_ms_per_frame":{"Driver.Packet":68.271,"Driver.Packet.draw":51.348,"Graphics.Draw":51.169,"Driver.Draw":50.314,"Graphics.Draw.draw_and_resource_release":40.642,"Driver.Draw.shader_compile_and_link":24.656,"Shader.DrawStage":15.902,"Driver.Draw.draw_enqueued":14.498},"owned_draw_counts":{"OwnedDraw.evicted_other":19589},"trace_dropped":true,"trace_dropped_threads":{"queue worker 0x0":{"events_full_after_s":5.624,"events_lost":451055,"totals_full":false},"draw committer":{"events_full_after_s":12.523,"events_lost":54723,"totals_full":false}},"trace":"aps5-trace-164ac9b078cd-14232.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: 451055 events lost; buffer full at 5623.8 ms - draw committer: 54723 events lost; buffer full at 12523.1 ms **Slowest frames** (largest slices inside each, inclusive) - present 4609: 84.6 ms at 8111 ms: Graphics.Draw (draw committer) 37.3, batch (gpu) 37.0, Graphics.Draw.draw_and_resource_release (draw committer) 28.7, VideoOut.Flip (presenter) 10.3 - present 4570: 81.1 ms at 5262 ms: Driver.Packet (queue worker 0x0) 58.4, Driver.Packet.draw (queue worker 0x0) 48.4, Driver.Draw (queue worker 0x0) 47.1, Graphics.Draw (draw committer) 39.5 - present 4673: 81.1 ms at 12782 ms: batch (gpu) 35.5, VideoOut.Flip (presenter) 10.0, VideoOut.Flip.present (presenter) 9.8, Driver.Present (presenter) 9.8 - present 4668: 80.6 ms at 12413 ms: Graphics.Draw (draw committer) 46.1, batch (gpu) 36.7, Graphics.Draw.draw_and_resource_release (draw committer) 31.3, VideoOut.Flip (presenter) 8.9 - present 4595: 79.8 ms at 7081 ms: Graphics.Draw (draw committer) 47.4, batch (gpu) 36.1, Graphics.Draw.draw_and_resource_release (draw committer) 30.1, VideoOut.Flip (presenter) 9.0 **Persistent spikes** (frame time above the fastest frame that separates it from a longer frame; one entry per stall, not per frame) - present 4609: 84.6 ms at 8111 ms, persistence 18.5 ms - present 4570: 81.1 ms at 5262 ms, persistence 14.3 ms - present 4673: 81.1 ms at 12782 ms, persistence 13.6 ms - present 4595: 79.8 ms at 7081 ms, persistence 12.8 ms - present 4622: 79.4 ms at 9066 ms, persistence 11.2 ms - present 4498: 77.1 ms at 71 ms, persistence 11.1 ms - present 4664: 79.3 ms at 12115 ms, persistence 10.8 ms - present 4668: 80.6 ms at 12413 ms, persistence 10.4 ms - present 4691: 79.6 ms at 14087 ms, persistence 10.2 ms - present 4650: 78.8 ms at 11112 ms, persistence 9.8 ms **Threads** (ms per frame) | thread | busy | wait | untraced | in slices < 20 us | largest | |---|---|---|---|---|---| | title | 0.3 (0 %) | 9.6 (13 %) | 62.7 | 0.5 | Shader.ResolveGraphicsStagesAbi 0.2, Shader.ResolveGraphicsAbi 0.1 | | queue worker 0x0 | 17.7 (24 %) | 0.0 (0 %) | 54.9 | 46.0 | Driver.Packet 17.0, Driver.EndSubmission 0.8 | | draw committer | 32.4 (45 %) | 0.2 (0 %) | 40.0 | 32.3 | Graphics.Draw 29.9, Recorder.Submit 1.9 | | title | 0.1 (0 %) | 0.0 (0 %) | 72.5 | 0.1 | Shader.ResolveGraphicsStagesAbi 0.0, Shader.ResolveGraphicsAbi 0.0 | | title | 0.1 (0 %) | 0.0 (0 %) | 72.6 | 0.1 | Shader.ResolveGraphicsStagesAbi 0.0, Shader.ResolveGraphicsAbi 0.0 | | title | 0.1 (0 %) | 0.0 (0 %) | 72.5 | 0.1 | Shader.ResolveGraphicsStagesAbi 0.0, Shader.ResolveGraphicsAbi 0.0 | | presenter | 0.9 (1 %) | 8.9 (12 %) | 62.8 | 0.0 | VideoOut.Flip 9.8, Driver.Present 0.0 | | title | 0.1 (0 %) | 0.0 (0 %) | 72.6 | 0.1 | Shader.ResolveAbi 0.0, Shader.ResolveGraphicsStagesAbi 0.0 | | title | 0.1 (0 %) | 0.0 (0 %) | 72.6 | 0.1 | Shader.ResolveGraphicsStagesAbi 0.0, Shader.ResolveGraphicsAbi 0.0 | | title | 0.1 (0 %) | 0.0 (0 %) | 72.6 | 0.1 | Shader.ResolveAbi 0.0, Shader.ResolveGraphicsStagesAbi 0.0 | | title | 0.1 (0 %) | 0.0 (0 %) | 72.5 | 0.1 | Shader.ResolveGraphicsStagesAbi 0.0, Shader.ResolveAbi 0.0 | | title | 0.1 (0 %) | 0.0 (0 %) | 72.6 | 0.1 | Shader.ResolveGraphicsStagesAbi 0.0, Shader.ResolveAbi 0.0 | | title | 0.1 (0 %) | 0.0 (0 %) | 72.6 | 0.1 | Shader.ResolveAbi 0.0, Shader.ResolveGraphicsStagesAbi 0.0 | | title | 0.1 (0 %) | 0.0 (0 %) | 72.6 | 0.1 | Shader.ResolveAbi 0.0, Shader.ResolveGraphicsStagesAbi 0.0 | | title | 0.1 (0 %) | 0.0 (0 %) | 72.6 | 0.1 | Shader.ResolveGraphicsStagesAbi 0.0, Shader.ResolveGraphicsAbi 0.0 | | title | 0.1 (0 %) | 0.0 (0 %) | 72.6 | 0.1 | Shader.ResolveGraphicsStagesAbi 0.0, Shader.ResolveGraphicsAbi 0.0 | | gpu | 35.8 (49 %) | 0.0 (0 %) | 36.9 | 0.0 | batch 35.8 | **Largest slices** (ms per frame, inclusive, all threads): batch 35.8, Graphics.Draw 29.9, Graphics.Draw.draw_and_resource_release 22.5, Driver.Packet 17.0, Driver.Packet.draw 13.3, Driver.Draw 12.9, VideoOut.Flip 9.8, Driver.Present 9.7, VideoOut.Flip.present 9.7, Recorder.WaitSerial 9.6 **Longest waits** - Recorder.WaitSerial (title) 11.8 ms at 13228 ms, present 4678 - Recorder.WaitSerial (title) 11.8 ms at 11547 ms, present 4655 - Recorder.WaitSerial (title) 11.8 ms at 8846 ms, present 4618 - Recorder.WaitSerial (title) 11.8 ms at 8346 ms, present 4611 - Recorder.WaitSerial (title) 11.6 ms at 13369 ms, present 4680 - Recorder.WaitSerial (title) 11.6 ms at 13076 ms, present 4676 - Recorder.WaitSerial (title) 11.5 ms at 2241 ms, present 4527 - Recorder.WaitSerial (title) 11.5 ms at 12195 ms, present 4664 - Recorder.WaitSerial (title) 11.5 ms at 6786 ms, present 4590 - Recorder.WaitSerial (title) 11.4 ms at 2743 ms, present 4534 **Largest GPU batches** (GPU ranges inside, and the CPU slices that recorded each, inclusive) - batch 9823: 10.4 ms at 11745 ms, present 4658: 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 8856: 10.2 ms at 10579 ms, present 4642: GPU no ranges; recorded by Graphics.Draw (draw committer) 0.5, Graphics.Draw.draw_and_resource_release (draw committer) 0.4, Resources.Complete (draw committer) 0.1 - batch 2050: 9.3 ms at 2441 ms, present 4530: GPU no ranges; recorded by Vulkan.DrawFromRecipe (draw committer) 0.3, Graphics.DrawWithRecipe (draw committer) 0.3, Graphics.DrawWithRecipe.draw_and_resource_release (draw committer) 0.3, Graphics.Draw (draw committer) 0.1 - batch 12560: 9.2 ms at 15031 ms, present 4703: GPU no ranges; recorded by no CPU slices - batch 11042: 9.2 ms at 13218 ms, present 4678: GPU no ranges; recorded by no CPU slices </details> ### 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
MarcZX10 commented 2026-11-13 02:51:32 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-13T02:51:32Z.

Review: COMMENTED


Reviewed push constant assembly and fragment output trims — no blocking findings

Nothing blocks this; the points below are optional.

What I ran

  • Head reviewed: b2ca8d4f367756c03541beba37daf2217752d24c (base main, title perf(agc): trim push constant assembly and fragment output lookups).
  • Merged-preview check: not run. The review reads the head commit only.
  • Environment: Linux review host with read access to the head through repo_read.py. No build and no test run.
  • Commands (reader calls, all at the head):
python3 repo_read.py cat core/libs/prx/libSceAgcDriver/Graphics/src/Draw.cpp 1140 1245
python3 repo_read.py search agc_driver_last_fragment_outputs
python3 repo_read.py cat core/libs/prx/libSceAgcDriver/Execution/include/ThreadScratch.hpp 1 120
python3 repo_read.py search "include <optional>" core/libs/prx/libSceAgcDriver/Graphics/src/Draw.cpp
python3 repo_read.py search "include <random>" core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
python3 repo_read.py search depth_fast_clear core/libs/prx/libSceAgcDriver
python3 repo_read.py search _tests.cmake core/libs/prx/libSceAgcDriver
python3 repo_read.py search GLOB core/libs/prx/libSceAgcDriver
python3 repo_read.py cat core/libs/prx/libSceAgcDriver/CMakeLists.txt 689 712
python3 repo_read.py search "include <algorithm>" core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
python3 repo_read.py search "include <map>" core/libs/prx/libSceAgcDriver/tests/Graphics.cpp

Results

Check Result Note
Changed code read against its callers passed No defect found; see Findings
Test target name from tests/execution/*.cpp passed LastFragmentOutputs.cpp maps to agc_driver_last_fragment_outputs_tests
Includes used by the changed code passed <optional>, <random>, <map>, <algorithm> are present
agc_driver_push_constant_assembly not run Needs the graphics test build
agc_driver_last_fragment_outputs and _off not run Needs a Vulkan device
Vulkan validation protocol not run Author-reported only
Trace measurements not run Author-reported; not reviewed

Negative control

Not run. The description reports 10 of 10 broken copies caught. I did not repeat this.

Findings

Blocking

None.

Non-blocking

None.

Sources

Not verified

  • Build, compile and all listed tests: not run here.
  • Performance claims (sampler counts, trace FPS, frame times) and the open-PR overlap scan: author-reported; not checked.
  • The claim that the last-key slot replaces an FLS value and two emulated thread_locals on MinGW: HostThreadSlot.hpp was not read.
  • The agc_driver_last_fragment_outputs run (switch on) is registered by the execution glob loop; I did not read the rest of that loop.
  • Helpers used by LastFragmentOutputs.cpp (PixelPushOffset, DepthFastClearHarness members) were not checked.
  • tests/Graphics.cpp is too large for the review folder. Only its changed hunks (in diff.patch) and its include lines were read.
  • ARCHITECTURE.md and ENVIRONMENT.md: only the changed lines were read.
  • Excluded by rule: none.
  • Files read: all 9 files in files.json reviewed were read through their changed hunks in diff.patch. Draw.cpp was also read at head, lines 1140–1245. No file was read in full.

To get this to a good state

Nothing is required.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5885312306 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/18174#pullrequestreview-5885312306). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-11-13T02:51:32Z. **Review:** COMMENTED --- # Reviewed push constant assembly and fragment output trims — no blocking findings Nothing blocks this; the points below are optional. ## What I ran - Head reviewed: `b2ca8d4f367756c03541beba37daf2217752d24c` (base `main`, title `perf(agc): trim push constant assembly and fragment output lookups`). - Merged-preview check: not run. The review reads the head commit only. - Environment: Linux review host with read access to the head through `repo_read.py`. No build and no test run. - Commands (reader calls, all at the head): ``` python3 repo_read.py cat core/libs/prx/libSceAgcDriver/Graphics/src/Draw.cpp 1140 1245 python3 repo_read.py search agc_driver_last_fragment_outputs python3 repo_read.py cat core/libs/prx/libSceAgcDriver/Execution/include/ThreadScratch.hpp 1 120 python3 repo_read.py search "include <optional>" core/libs/prx/libSceAgcDriver/Graphics/src/Draw.cpp python3 repo_read.py search "include <random>" core/libs/prx/libSceAgcDriver/tests/Graphics.cpp python3 repo_read.py search depth_fast_clear core/libs/prx/libSceAgcDriver python3 repo_read.py search _tests.cmake core/libs/prx/libSceAgcDriver python3 repo_read.py search GLOB core/libs/prx/libSceAgcDriver python3 repo_read.py cat core/libs/prx/libSceAgcDriver/CMakeLists.txt 689 712 python3 repo_read.py search "include <algorithm>" core/libs/prx/libSceAgcDriver/tests/Graphics.cpp python3 repo_read.py search "include <map>" core/libs/prx/libSceAgcDriver/tests/Graphics.cpp ``` ## Results | Check | Result | Note | |---|---|---| | Changed code read against its callers | passed | No defect found; see Findings | | Test target name from `tests/execution/*.cpp` | passed | `LastFragmentOutputs.cpp` maps to `agc_driver_last_fragment_outputs_tests` | | Includes used by the changed code | passed | `<optional>`, `<random>`, `<map>`, `<algorithm>` are present | | `agc_driver_push_constant_assembly` | not run | Needs the graphics test build | | `agc_driver_last_fragment_outputs` and `_off` | not run | Needs a Vulkan device | | Vulkan validation protocol | not run | Author-reported only | | Trace measurements | not run | Author-reported; not reviewed | ## Negative control Not run. The description reports 10 of 10 broken copies caught. I did not repeat this. ## Findings **Blocking** None. **Non-blocking** None. ## Sources - [`AssemblePushConstants`](https://github.com/boykopovar/AnyPS5/blob/b2ca8d4f367756c03541beba37daf2217752d24c/core/libs/prx/libSceAgcDriver/Graphics/include/Shaders.hpp#L83-L99): one bit per DWORD, one `memcpy` per stage, overlap check before the copy. - [`CachedFragmentOutputs`](https://github.com/boykopovar/AnyPS5/blob/b2ca8d4f367756c03541beba37daf2217752d24c/core/libs/prx/libSceAgcDriver/Graphics/src/Draw.cpp#L1181-L1239): last-key lookup on by default unless `APS5_NO_LAST_FRAGMENT_OUTPUTS` is set. The key is remembered only after a successful validation. The memo lock covers the find and the insert. - [Execution test glob and target naming](https://github.com/boykopovar/AnyPS5/blob/b2ca8d4f367756c03541beba37daf2217752d24c/core/libs/prx/libSceAgcDriver/CMakeLists.txt#L691-L703). ## Not verified - Build, compile and all listed tests: not run here. - Performance claims (sampler counts, trace FPS, frame times) and the open-PR overlap scan: author-reported; not checked. - The claim that the last-key slot replaces an FLS value and two emulated `thread_local`s on MinGW: `HostThreadSlot.hpp` was not read. - The `agc_driver_last_fragment_outputs` run (switch on) is registered by the execution glob loop; I did not read the rest of that loop. - Helpers used by `LastFragmentOutputs.cpp` (`PixelPushOffset`, `DepthFastClearHarness` members) were not checked. - `tests/Graphics.cpp` is too large for the review folder. Only its changed hunks (in `diff.patch`) and its include lines were read. - `ARCHITECTURE.md` and `ENVIRONMENT.md`: only the changed lines were read. - Excluded by rule: none. - Files read: all 9 files in `files.json` `reviewed` were read through their changed hunks in `diff.patch`. `Draw.cpp` was also read at head, lines 1140–1245. No file was read in full. ## To get this to a good state Nothing is required.
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!18174
No description provided.