perf(agc): elide a repeated fill of a range that still holds its pattern #10668

Merged
meh7an merged 3 commits from upstream-pr/10668 into main 2026-11-03 22:25:54 +00:00
meh7an commented 2026-10-24 16:12:16 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by meh7an on 2026-10-24T16:12:16Z.


What

Titles often fill the same range with the same pattern again and again, with nothing writing the range in between. On main every such fill is recorded as a vkCmdFillBuffer (or a pattern copy) into the host import. Sonic Origins Plus zero-fills four ranges every frame on its main menu, about 68 MiB per frame. Over one run on the Sonic 2 page that is 7,905 GPU fills (about 134 GB), and the fills cost the boot intro its frame rate as well.

This PR makes VulkanDevice::FillBuffer remember the last fill of each range: its address and size, the 16-byte pattern, the write-tracker generation its MarkWritten returned, the import's HostImportSerial, and GuestMemory::UnwatchSerial. A fill that repeats the remembered one records nothing when all of these hold:

  • No new stamp. UnchangedSince still holds over the range for that generation. CollectWritesUncached runs first, so a CPU store not collected yet counts. Every import writer stamps its blocks: labels, key stores, copies, in-place V# writes, and GPU-direct and shadow write-backs.
  • Same import, watched throughout. The import serial and the unwatch serial are unchanged, so a re-import, or a range that was unwatched in between, fills again.
  • No address-based work in flight (Graphics::LeaseWorkPending, new). BDA stores are stamped only when their batch completes (BdaResources::markWrittenPages), so a BDA dispatch recorded after the remembered fill could still write the range.

The check runs after FillBuffer's sync on copied writers and completion labels, whose stores stamp when they run, and after queued key stores are flushed. Queued label stores stamp when they are queued.

A skipped fill still calls GuestMemory::MarkWritten over its range, as a recorded one does. So everything over the range that revalidates by write stamps behaves as after the store, and only the transfer is gone:

  • a depth surface's OverwrittenInMemory;
  • storage images;
  • unit shadows, which turn stale.

storeBufferFill's steps around the call are unchanged: flushing pending images, discards, and the metadata notes.

  • APS5_NO_FILL_ELISION=1 records every fill, as before.
  • The [fill-sync] line of APS5_PROFILE_DRAW counts the elided fills and their bytes.
  • agc_driver_repeated_fill_elision (new) runs on write-watched memory:
    • A repeat over unchanged bytes records nothing and still stamps its range.
    • The fill is recorded again after a CPU write, after a GPU fill inside the range, and after a driver stamp (the MarkWritten of a write-back).
    • It is also recorded again with another pattern, with another size at the same address, and through a new import after ClearHostImports.
    • With APS5_NO_FILL_ELISION=1 the test fails at the first repeat.
    • The expectation follows the tracker: after the first fill the test asks whether the write watch proves the range unchanged. If it does, repeats must be elided; if not, as where an import leaves the range unwatched (Linux drivers whose host imports resolve write protection), every fill must be recorded, as on main. On Linux it runs main's decided import mode and, when that is "watch", a second pass with imports forced unwatched.

No open PR or main commit elides repeated fills. tools/pr_overlap.py finds no overlapping change. It could not compare 70 PRs, because they conflict with main. Of those, three touch FillBuffer, and they only call it: #2434 and #9898 from tests, #7201 with an added condition.

Tested

Rebased onto main ca0e9557aa (2026-10-27). Same machine: Windows 11 Pro 10.0.26300, NVIDIA GeForce RTX 2080 Ti, driver 617.14, i9-9900K. Sonic Origins Plus (PPSA05324) on the Sonic 3 & Knuckles page of the main menu, main's defaults. main ca0e9557aa against main with this PR (2b395fe86a), both clean builds of the same tree. One warm-up boot, one APS5_PROFILE_GPU=1 boot per build, then two interleaved traced rounds (main, PR, main, PR; APS5_TRACE_SECONDS=200:15, six title FPS readings each).

main this PR
[gputime] fill class per present 13.59 ms (4 fills, 68.3 MiB) none
[gputime] GPU time per present, all ranges, the same six blocks on the page 66.6 ms 56.6 ms
GPU busy per present (ms, round 1 / round 2) 71.2 / 68.0 55.6 / 54.9
frame p50 / p90 / p99 (ms), round 1 64.4 / 105.7 / 128.5 61.8 / 64.7 / 69.0
frame p50 / p90 / p99 (ms), round 2 65.0 / 99.3 / 118.0 63.4 / 69.4 / 86.7
title FPS, median of six readings (round 1 / round 2) 13.88 / 13.85 16.42 / 16.44
  • With this PR the fill class reads 0.00 ms per present over those blocks.
  • All four traces dropped events once the queue worker's event buffer filled, 5.4 to 6.6 s into the window; in three of them the draw committer's buffer filled later too. The phase totals still cover the whole window, and the frame and GPU times in the summary lines do not come from those events.
  • ctest (2655 tests) on main plus this PR: all pass.
  • ctest --test-dir build -R "fill|host_import|dcc_key|label|guest_memory_lifetime|depth_fast_clear" -V with ANYPS5_REQUIRE_VULKAN=1, ANYPS5_NO_SHADER_CACHE=1 and VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation: 54/54 on main, 55/55 on this PR. The extra one is agc_driver_repeated_fill_elision; it reports that the write watch proves the range unchanged, so the repeats are elided. Neither log has was not found but was requested by env var VK_INSTANCE_LAYERS, and neither has a VUID- line.

The digests below come from the first round of each build. All four traces are attached, one zip per round with the main and PR traces.

fill-elision-s3k-ca0e-round1.zip
fill-elision-s3k-ca0e-round2.zip

Sonic 3 & Knuckles page, round 1, main

seconds 200:15 from present 3502: 197 presents, frame p50 64.4 / p90 105.7 / p99 128.5 / max 136.3 ms, GPU busy 71.2 ms per present
NVIDIA GeForce RTX 2080 Ti, NVIDIA 617.14, Windows 10.0.26300, 3840x2160, commit ca0e9557aa, dropped: yes

{"commit":"ca0e9557aab1","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":32684,"title_id":"PPSA05324","title":"Sonic Origins","content_version":"02.002.000","resolution":"3840x2160","window":{"spec":"seconds 200:15","first_present":3502,"ms":15053.064},"presents":197,"frame_ms":{"p50":64.433,"p90":105.724,"p99":128.515,"max":136.284},"gpu_busy_ms_per_present":71.154,"worker_busy_pct":{"queue worker 0x0":97.776},"top_phases_ms_per_frame":{"Driver.Packet":71.134,"Graphics.Draw":59.253,"Driver.Packet.draw":56.58,"Driver.Draw":55.854,"Graphics.Draw.draw_and_resource_release":50.899,"VideoOut.Flip":42.993,"Driver.Present":42.735,"VideoOut.Flip.present":42.72},"trace_dropped":true,"trace_dropped_threads":{"queue worker 0x0":{"events_full_after_s":6.589,"events_lost":332547,"totals_full":false}},"trace":"aps5-trace-ca0e9557aab1-11940.json.gz"}

Slowest frames (largest slices inside each, inclusive)

  • present 3640: 136.3 ms at 10452 ms: batch (gpu) 108.0, Graphics.Draw (draw committer) 103.6, Graphics.Draw.draw_and_resource_release (draw committer) 97.4, VideoOut.Flip (presenter) 68.2
  • present 3592: 128.5 ms at 6853 ms: batch (gpu) 108.3, Graphics.Draw (draw committer) 92.3, Graphics.Draw.draw_and_resource_release (draw committer) 88.3, VideoOut.Flip (presenter) 70.8
  • present 3690: 126.1 ms at 14303 ms: batch (gpu) 95.7, Graphics.Draw (draw committer) 89.5, Graphics.Draw.draw_and_resource_release (draw committer) 84.0, VideoOut.Flip (presenter) 62.3
  • present 3564: 122.6 ms at 4753 ms: batch (gpu) 97.1, Driver.Packet (queue worker 0x0) 95.6, Graphics.Draw (draw committer) 90.0, Driver.Packet.draw (queue worker 0x0) 88.7
  • present 3656: 121.9 ms at 11659 ms: batch (gpu) 97.9, Graphics.Draw (draw committer) 89.3, Graphics.Draw.draw_and_resource_release (draw committer) 84.5, VideoOut.Flip (presenter) 63.7

Threads (ms per frame)

thread busy wait untraced in slices < 20 us largest
title 0.4 (0 %) 0.0 (0 %) 76.0 0.5 Shader.ResolveGraphicsStagesAbi 0.2, Shader.ResolveGraphicsAbi 0.1
queue worker 0x0 22.0 (29 %) 0.0 (0 %) 54.4 54.5 Driver.Packet 20.7, Driver.EndSubmission 1.4
draw committer 43.8 (57 %) 0.4 (0 %) 32.3 39.5 Graphics.Draw 41.9, Recorder.Submit 1.3
title 0.1 (0 %) 0.0 (0 %) 76.3 0.1 Shader.ResolveGraphicsAbi 0.0, Shader.ResolveGraphicsStagesAbi 0.0
title 0.1 (0 %) 0.0 (0 %) 76.3 0.1 Shader.ResolveGraphicsStagesAbi 0.0, Shader.ResolveAbi 0.0
title 0.1 (0 %) 0.0 (0 %) 76.3 0.0 Shader.ResolveGraphicsAbi 0.0, Shader.ResolveAbi 0.0
presenter 0.9 (1 %) 42.1 (55 %) 33.4 0.1 VideoOut.Flip 43.0, Driver.Present 0.0
title 0.1 (0 %) 0.0 (0 %) 76.3 0.1 Shader.ResolveGraphicsAbi 0.0, Shader.ResolveGraphicsStagesAbi 0.0
title 0.1 (0 %) 0.0 (0 %) 76.3 0.0 Shader.ResolveGraphicsAbi 0.0, Shader.ResolveAbi 0.0
title 0.1 (0 %) 0.0 (0 %) 76.3 0.1 Shader.ResolveGraphicsAbi 0.0, Shader.ResolveGraphicsStagesAbi 0.0
title 0.1 (0 %) 0.0 (0 %) 76.3 0.1 Shader.ResolveGraphicsAbi 0.0, Shader.ResolveGraphicsStagesAbi 0.0
title 0.1 (0 %) 0.0 (0 %) 76.3 0.0 Shader.ResolveGraphicsAbi 0.0, Shader.ResolveGraphicsStagesAbi 0.0
title 0.1 (0 %) 0.0 (0 %) 76.3 0.1 Shader.ResolveGraphicsStagesAbi 0.0, Shader.ResolveGraphicsAbi 0.0
title 0.1 (0 %) 0.0 (0 %) 76.3 0.1 Shader.ResolveGraphicsAbi 0.0, Shader.ResolveGraphicsStagesAbi 0.0
title 0.1 (0 %) 0.0 (0 %) 76.3 0.1 Shader.ResolveGraphicsAbi 0.0, Shader.ResolveAbi 0.0
title 0.1 (0 %) 0.0 (0 %) 76.3 0.1 Shader.ResolveGraphicsAbi 0.0, Shader.ResolveGraphicsStagesAbi 0.0
gpu 70.7 (93 %) 0.0 (0 %) 5.7 0.0 batch 70.7

Largest slices (ms per frame, inclusive, all threads): batch 70.7, VideoOut.Flip 43.0, Driver.Present 42.7, VideoOut.Flip.present 42.7, Graphics.Draw 41.9, Driver.Present.render_fence_wait 41.6, Vulkan.Retire 41.6, Vulkan.Retire.wait 41.6, Graphics.Draw.draw_and_resource_release 36.5, Driver.Packet 20.7

Longest waits

  • Driver.Present.render_fence_wait (presenter) 71.2 ms at 9935 ms, present 3633
  • Driver.Present.render_fence_wait (presenter) 70.0 ms at 6854 ms, present 3592
  • Driver.Present.render_fence_wait (presenter) 69.1 ms at 6712 ms, present 3590
  • Driver.Present.render_fence_wait (presenter) 68.1 ms at 10007 ms, present 3634
  • Driver.Present.render_fence_wait (presenter) 67.3 ms at 10452 ms, present 3640
  • Driver.Present.render_fence_wait (presenter) 66.5 ms at 12746 ms, present 3670
  • Driver.Present.render_fence_wait (presenter) 65.7 ms at 12117 ms, present 3662
  • Driver.Present.render_fence_wait (presenter) 65.4 ms at 14944 ms, present 3698
  • Driver.Present.render_fence_wait (presenter) 65.1 ms at 9434 ms, present 3626
  • Driver.Present.render_fence_wait (presenter) 64.7 ms at 10309 ms, present 3638

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

  • batch 2978: 14.8 ms at 3945 ms, present 3552: GPU no ranges; recorded by Graphics.Draw (draw committer) 0.5, Graphics.Draw.draw_and_resource_release (draw committer) 0.5
  • batch 4626: 14.7 ms at 6097 ms, present 3580: GPU no ranges; recorded by Graphics.Draw (draw committer) 0.5, Graphics.Draw.draw_and_resource_release (draw committer) 0.5
  • batch 2623: 14.5 ms at 3505 ms, present 3546: GPU no ranges; recorded by Graphics.Draw (draw committer) 0.4, Graphics.Draw.draw_and_resource_release (draw committer) 0.4
  • batch 6382: 14.4 ms at 8333 ms, present 3610: GPU no ranges; recorded by Graphics.Draw (draw committer) 0.5, Graphics.Draw.draw_and_resource_release (draw committer) 0.5
  • batch 1102: 14.4 ms at 1510 ms, present 3520: GPU no ranges; recorded by Graphics.Draw (draw committer) 0.5, Graphics.Draw.draw_and_resource_release (draw committer) 0.4

Sonic 3 & Knuckles page, round 1, this PR

seconds 200:15 from present 4604: 241 presents, frame p50 61.8 / p90 64.7 / p99 69.0 / max 72.8 ms, GPU busy 55.6 ms per present
NVIDIA GeForce RTX 2080 Ti, NVIDIA 617.14, Windows 10.0.26300, 3840x2160, commit 2b395fe86a, dropped: yes

{"commit":"2b395fe86aa2","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":32684,"title_id":"PPSA05324","title":"Sonic Origins","content_version":"02.002.000","resolution":"3840x2160","window":{"spec":"seconds 200:15","first_present":4604,"ms":15005.245},"presents":241,"frame_ms":{"p50":61.778,"p90":64.694,"p99":68.96,"max":72.793},"gpu_busy_ms_per_present":55.598,"worker_busy_pct":{"queue worker 0x0":97.257},"top_phases_ms_per_frame":{"Driver.Packet":59.672,"Graphics.Draw":46.931,"Driver.Packet.draw":46.191,"Driver.Draw":45.418,"Graphics.Draw.draw_and_resource_release":38.462,"Driver.Draw.shader_compile_and_link":30.335,"VideoOut.Flip":23.901,"Driver.Present":23.774},"trace_dropped":true,"trace_dropped_threads":{"queue worker 0x0":{"events_full_after_s":5.375,"events_lost":457991,"totals_full":false},"draw committer":{"events_full_after_s":12.623,"events_lost":50434,"totals_full":false}},"trace":"aps5-trace-2b395fe86aa2-14420.json.gz"}

Slowest frames (largest slices inside each, inclusive)

  • present 4629: 72.8 ms at 1564 ms: batch (gpu) 55.1, Driver.Packet (queue worker 0x0) 53.5, Graphics.Draw (draw committer) 46.6, Driver.Packet.draw (queue worker 0x0) 45.7
  • present 4794: 70.0 ms at 11842 ms: batch (gpu) 56.6, Graphics.Draw (draw committer) 42.3, VideoOut.Flip (presenter) 25.3, VideoOut.Flip.present (presenter) 25.2
  • present 4656: 69.0 ms at 3250 ms: batch (gpu) 59.2, Driver.Packet (queue worker 0x0) 43.4, Driver.Packet.draw (queue worker 0x0) 35.6, Graphics.Draw (draw committer) 35.4
  • present 4607: 67.7 ms at 182 ms: batch (gpu) 50.6, Driver.Packet (queue worker 0x0) 42.3, Driver.Packet.draw (queue worker 0x0) 34.8, Driver.Draw (queue worker 0x0) 34.3
  • present 4608: 67.6 ms at 250 ms: batch (gpu) 54.6, Driver.Packet (queue worker 0x0) 42.8, Driver.Packet.draw (queue worker 0x0) 34.8, Driver.Draw (queue worker 0x0) 33.6

Threads (ms per frame)

thread busy wait untraced in slices < 20 us largest
title 0.4 (1 %) 0.0 (0 %) 61.9 0.5 Shader.ResolveGraphicsStagesAbi 0.2, Shader.ResolveGraphicsAbi 0.1
queue worker 0x0 12.8 (21 %) 0.0 (0 %) 49.5 45.7 Driver.Packet 12.5, Driver.EndSubmission 0.3
draw committer 26.3 (42 %) 0.1 (0 %) 35.9 33.9 Graphics.Draw 24.6, Recorder.Submit 1.1
title 0.1 (0 %) 0.0 (0 %) 62.1 0.1 Shader.ResolveGraphicsAbi 0.1, Shader.ResolveGraphicsStagesAbi 0.0
title 0.1 (0 %) 0.0 (0 %) 62.1 0.1 Shader.ResolveGraphicsAbi 0.0, Shader.ResolveGraphicsStagesAbi 0.0
presenter 0.8 (1 %) 23.1 (37 %) 38.3 0.0 VideoOut.Flip 23.9, Driver.Present 0.0
title 0.1 (0 %) 0.0 (0 %) 62.1 0.1 Shader.ResolveGraphicsAbi 0.0, Shader.ResolveGraphicsStagesAbi 0.0
title 0.1 (0 %) 0.0 (0 %) 62.2 0.1 Shader.ResolveGraphicsStagesAbi 0.0, Shader.ResolveGraphicsAbi 0.0
title 0.1 (0 %) 0.0 (0 %) 62.1 0.1 Shader.ResolveGraphicsAbi 0.0, Shader.ResolveAbi 0.0
title 0.1 (0 %) 0.0 (0 %) 62.1 0.1 Shader.ResolveGraphicsAbi 0.0, Shader.ResolveGraphicsStagesAbi 0.0
title 0.1 (0 %) 0.0 (0 %) 62.1 0.1 Shader.ResolveGraphicsAbi 0.0, Shader.ResolveGraphicsStagesAbi 0.0
title 0.1 (0 %) 0.0 (0 %) 62.1 0.1 Shader.ResolveGraphicsAbi 0.0, Shader.ResolveGraphicsStagesAbi 0.0
title 0.1 (0 %) 0.0 (0 %) 62.1 0.1 Shader.ResolveGraphicsAbi 0.0, Shader.ResolveGraphicsStagesAbi 0.0
title 0.1 (0 %) 0.0 (0 %) 62.1 0.1 Shader.ResolveGraphicsAbi 0.1, Shader.ResolveGraphicsStagesAbi 0.0
title 0.1 (0 %) 0.0 (0 %) 62.1 0.1 Shader.ResolveGraphicsAbi 0.0, Shader.ResolveGraphicsStagesAbi 0.0
title 0.1 (0 %) 0.0 (0 %) 62.1 0.1 Shader.ResolveGraphicsAbi 0.0, Shader.ResolveGraphicsStagesAbi 0.0
gpu 55.6 (89 %) 0.0 (0 %) 6.7 0.0 batch 55.6

Largest slices (ms per frame, inclusive, all threads): batch 55.6, Graphics.Draw 24.6, VideoOut.Flip 23.9, Driver.Present 23.8, VideoOut.Flip.present 23.7, Driver.Present.render_fence_wait 22.9, Vulkan.Retire 22.9, Vulkan.Retire.wait 22.9, Graphics.Draw.draw_and_resource_release 19.8, Driver.Packet 12.5

Longest waits

  • Driver.Present.render_fence_wait (presenter) 30.8 ms at 13522 ms, present 4821
  • Driver.Present.render_fence_wait (presenter) 30.7 ms at 13584 ms, present 4822
  • Driver.Present.render_fence_wait (presenter) 29.4 ms at 13643 ms, present 4823
  • Driver.Present.render_fence_wait (presenter) 28.7 ms at 9483 ms, present 4756
  • Driver.Present.render_fence_wait (presenter) 28.2 ms at 9850 ms, present 4762
  • Driver.Present.render_fence_wait (presenter) 27.9 ms at 14698 ms, present 4840
  • Driver.Present.render_fence_wait (presenter) 27.8 ms at 10466 ms, present 4772
  • Driver.Present.render_fence_wait (presenter) 27.5 ms at 9545 ms, present 4757
  • Driver.Present.render_fence_wait (presenter) 27.2 ms at 14639 ms, present 4839
  • Driver.Present.render_fence_wait (presenter) 27.1 ms at 8802 ms, present 4745

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

  • batch 810: 14.6 ms at 870 ms, present 4617: GPU no ranges; recorded by Graphics.Draw (draw committer) 0.4, Graphics.Draw.draw_and_resource_release (draw committer) 0.4
  • batch 4040: 14.5 ms at 4310 ms, present 4672: GPU no ranges; recorded by Graphics.Draw (draw committer) 0.5, Graphics.Draw.draw_and_resource_release (draw committer) 0.5
  • batch 5555: 14.5 ms at 5923 ms, present 4698: GPU no ranges; recorded by Graphics.Draw (draw committer) 0.5, Graphics.Draw.draw_and_resource_release (draw committer) 0.5
  • batch 3040: 14.3 ms at 3243 ms, present 4655: GPU no ranges; recorded by Graphics.Draw (draw committer) 0.5, Graphics.Draw.draw_and_resource_release (draw committer) 0.5
  • batch 7437: 14.3 ms at 7925 ms, present 4730: GPU no ranges; recorded by Graphics.Draw (draw committer) 0.4, Graphics.Draw.draw_and_resource_release (draw committer) 0.4

Before the rebase. The measurements below were taken on main c9b2660d56.

Windows 11 Pro 10.0.26300, NVIDIA GeForce RTX 2080 Ti, driver 617.14, i9-9900K, on main c9b2660d56. Sonic Origins Plus (PPSA05324), main's defaults (no APS5_* opt-ins).

Boot intro, 5-20 s after launch, one boot per build (APS5_TRACE_SECONDS=5:15):

presents in 15 s frame p50 / p90 (ms) GPU busy per present (ms)
main 650 (43 FPS) 22.0 / 34.4 22.8
this PR 899 (60 FPS) 16.7 / 16.9 11.2

The intro reaches the 60 Hz cap: VideoOut.Flip.vblank_wait becomes the presenter's largest phase.

Sonic 2 page of the main menu. Two interleaved traced rounds per build after one warm-up boot each (APS5_TRACE_SECONDS=200:15):

frame p50 (ms) GPU busy per present (ms) Driver.Packet (ms/frame) title FPS readings (median of six)
main 79.9 / 88.1 67.8 / 69.8 79.3 / 92.7 13.33 / 13.20
this PR 80.0 / 79.7 58.1 / 57.8 80.1 / 81.9 13.06 / 12.63
  • GPU. GPU busy per present drops by about 15 %. The queue worker is about 97 % busy in every round, so this page's frame time stays bound by it.
  • The title's own FPS readings come out lower on this PR in both rounds. They are taken about 80-100 s after launch, before the traced window; inside the traced window the frame times match.
    • The elision's own cost, from APS5_PROFILE_DRAW, is about 30 µs per fill. The [fill-sync] decide, record and notes phases total 229 ms over 7,905 fills, about 0.1 ms per frame.
    • I have not found what else would lower the early readings, so they are reported as measured.
  • Profiled run. An APS5_PROFILE_DRAW=1 run of this PR on the same page elided 7,626 of 7,905 fills (about 130 GB not stored).
  • Same image. Full window captures of every reading render the same scene on both builds.

Tests

  • ctest (2119 tests) on main plus this PR: everything passes except agc_driver_sample_order, agc_driver_sample_order_grid_reference and agc_driver_sample_order_recipe_depth_locations, which fail the same way on plain main on this machine.
  • ctest --test-dir build -R "fill|host_import|dcc_key|label|guest_memory_lifetime|depth_fast_clear" -V with ANYPS5_REQUIRE_VULKAN=1, ANYPS5_NO_SHADER_CACHE=1 and VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation: 54/54 on main, 55/55 on this PR (the extra one is agc_driver_repeated_fill_elision). Neither log has was not found but was requested by env var VK_INSTANCE_LAYERS, and neither has a VUID- line.

The digests below come from the intro boots and from the first Sonic 2 round of each build. All six traces are attached: two Sonic 2 rounds per build, and one intro boot per build.

fill-elision-intro.zip
fill-elision-s2-round1.zip
fill-elision-s2-round2.zip

Boot intro, main

seconds 5:15 from present 199: 650 presents, frame p50 22.0 / p90 34.4 / p99 44.7 / max 46.6 ms, GPU busy 22.8 ms per present
NVIDIA GeForce RTX 2080 Ti, NVIDIA 617.14, Windows 10.0.26300, 3840x2160, commit c9b2660d56, dropped: no

{"commit":"c9b2660d5636","dirty":false,"env":{"APS5_TRACE_DIR":"<path>","APS5_TRACE_SECONDS":"5: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":32684,"title_id":"PPSA05324","title":"Sonic Origins","content_version":"02.002.000","resolution":"3840x2160","window":{"spec":"seconds 5:15","first_present":199,"ms":15015.992},"presents":650,"frame_ms":{"p50":21.982,"p90":34.449,"p99":44.732,"max":46.607},"gpu_busy_ms_per_present":22.809,"worker_busy_pct":{"queue worker 0x0":87.653},"top_phases_ms_per_frame":{"VideoOut.Flip":21.037,"Driver.Present":20.666,"VideoOut.Flip.present":20.637,"Driver.Packet":20.216,"Driver.Present.render_fence_wait":18.718,"Vulkan.Retire":18.715,"Vulkan.Retire.wait":18.699,"Driver.Packet.pipeline_drain":9.644},"trace_dropped":false,"trace":"aps5-trace-c9b2660d5636-33676.json.gz"}

Slowest frames (largest slices inside each, inclusive)

  • present 544: 46.6 ms at 7942 ms: batch (gpu) 45.6, Driver.Packet (queue worker 0x0) 38.4, Driver.Packet.pipeline_drain (queue worker 0x0) 36.2, Graphics.Draw (draw committer) 35.4
  • present 502: 46.5 ms at 6906 ms: batch (gpu) 45.7, Driver.Packet (queue worker 0x0) 39.4, Driver.Packet.pipeline_drain (queue worker 0x0) 37.4, Graphics.Draw (draw committer) 36.5
  • present 402: 46.4 ms at 4407 ms: batch (gpu) 45.5, Driver.Packet (queue worker 0x0) 39.4, Driver.Packet.pipeline_drain (queue worker 0x0) 36.9, Graphics.Draw (draw committer) 36.2
  • present 626: 46.3 ms at 9960 ms: batch (gpu) 45.3, Driver.Packet (queue worker 0x0) 39.1, Driver.Packet.pipeline_drain (queue worker 0x0) 36.7, Graphics.Draw (draw committer) 35.8
  • present 592: 46.2 ms at 9126 ms: batch (gpu) 45.4, Driver.Packet (queue worker 0x0) 37.9, Driver.Packet.pipeline_drain (queue worker 0x0) 35.4, Graphics.Draw (draw committer) 34.7

Threads (ms per frame)

thread busy wait untraced in slices < 20 us largest
title 0.0 (0 %) 0.0 (0 %) 23.1 0.2 Shader.ResolveGraphicsStagesAbi 0.0, Shader.ResolveAbi 0.0
shader prepare 0.0 (0 %) 0.0 (0 %) 23.1 0.0 Shader.PrepareArtifact 0.0
shader prepare 0.0 (0 %) 0.0 (0 %) 23.1 0.0 Shader.PrepareArtifact 0.0
shader prepare 0.0 (0 %) 0.0 (0 %) 23.1 0.0 Shader.PrepareArtifact 0.0
shader prepare 0.0 (0 %) 0.0 (0 %) 23.1 0.0 Vulkan.GraphicsPipelinePrebuild 0.0
queue worker 0x0 19.3 (83 %) 2.7 (12 %) 1.1 3.1 Driver.Packet 19.3, Driver.Completion 0.0
draw committer 9.4 (41 %) 0.1 (0 %) 13.6 0.3 Graphics.Draw 8.7, Vulkan.DrawFromRecipe 0.3
title 0.0 (0 %) 0.0 (0 %) 23.1 0.0 Shader.ResolveGraphicsStagesAbi 0.0, Shader.ResolveGraphicsAbi 0.0
title 0.0 (0 %) 0.0 (0 %) 23.1 0.0 Shader.ResolveGraphicsStagesAbi 0.0, Shader.ResolveAbi 0.0
title 0.0 (0 %) 0.0 (0 %) 23.1 0.0 Shader.ResolveGraphicsStagesAbi 0.0, Shader.ResolveGraphicsAbi 0.0
title 0.0 (0 %) 0.0 (0 %) 23.1 0.0 Shader.ResolveGraphicsStagesAbi 0.0, Shader.ResolveAbi 0.0
presenter 0.6 (3 %) 20.4 (88 %) 2.0 0.0 VideoOut.Flip 21.0, Driver.Present 0.0
title 0.0 (0 %) 0.0 (0 %) 23.1 0.0 Shader.ResolveGraphicsStagesAbi 0.0, Shader.ResolveAbi 0.0
title 0.0 (0 %) 0.0 (0 %) 23.1 0.0 Shader.ResolveGraphicsStagesAbi 0.0, Shader.ResolveAbi 0.0
title 0.0 (0 %) 0.0 (0 %) 23.1 0.0 Shader.ResolveGraphicsStagesAbi 0.0, Shader.ResolveAbi 0.0
title 0.0 (0 %) 0.0 (0 %) 23.1 0.0 Shader.ResolveGraphicsStagesAbi 0.0, Shader.ResolveGraphicsAbi 0.0
title 0.0 (0 %) 0.0 (0 %) 23.1 0.0 Shader.ResolveGraphicsStagesAbi 0.0, Shader.ResolveAbi 0.0
title 0.0 (0 %) 0.0 (0 %) 23.1 0.0 Shader.ResolveGraphicsStagesAbi 0.0, Shader.ResolveAbi 0.0
title 0.0 (0 %) 0.0 (0 %) 23.1 0.0 Shader.ResolveGraphicsStagesAbi 0.0, Shader.ResolveGraphicsAbi 0.0
title 0.0 (0 %) 0.0 (0 %) 23.1 0.0 Shader.ResolveGraphicsStagesAbi 0.0, Shader.ResolveAbi 0.0
title 0.0 (0 %) 0.0 (0 %) 23.1 0.0 Shader.Register 0.0
gpu 22.8 (99 %) 0.0 (0 %) 0.3 0.0 batch 22.8

Largest slices (ms per frame, inclusive, all threads): batch 22.8, VideoOut.Flip 21.0, Driver.Present 20.7, VideoOut.Flip.present 20.6, Driver.Packet 19.3, Driver.Present.render_fence_wait 18.7, Vulkan.Retire 18.7, Vulkan.Retire.wait 18.7, Driver.Packet.pipeline_drain 9.4, Graphics.Draw 8.7

Longest waits

  • Driver.Present.render_fence_wait (presenter) 33.9 ms at 976 ms, present 244
  • Driver.Present.gpu_mutex_wait (presenter) 32.4 ms at 1085 ms, present 249
  • Driver.Present.gpu_mutex_wait (presenter) 32.0 ms at 12820 ms, present 748
  • Driver.Present.gpu_mutex_wait (presenter) 31.9 ms at 13382 ms, present 774
  • Driver.Present.gpu_mutex_wait (presenter) 31.9 ms at 1042 ms, present 247
  • Driver.Present.gpu_mutex_wait (presenter) 30.0 ms at 1653 ms, present 275
  • Driver.Present.gpu_mutex_wait (presenter) 26.3 ms at 12480 ms, present 732
  • Driver.Present.gpu_mutex_wait (presenter) 26.2 ms at 1135 ms, present 251
  • Driver.Present.render_fence_wait (presenter) 24.8 ms at 10574 ms, present 651
  • Driver.Present.render_fence_wait (presenter) 24.7 ms at 7891 ms, present 542

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

  • batch 2008: 11.4 ms at 1822 ms, present 282: GPU no ranges; recorded by Driver.Packet (queue worker 0x0) 0.6, Driver.Packet.pipeline_drain (queue worker 0x0) 0.3, Driver.Packet.dispatch (queue worker 0x0) 0.2, Driver.Packet.draw (queue worker 0x0) 0.1
  • batch 1863: 11.3 ms at 1693 ms, present 276: GPU no ranges; recorded by Driver.Packet (queue worker 0x0) 0.6, Driver.Packet.pipeline_drain (queue worker 0x0) 0.3, Driver.Packet.dispatch (queue worker 0x0) 0.2, Driver.Packet.draw (queue worker 0x0) 0.1
  • batch 14109: 11.3 ms at 13382 ms, present 773: GPU no ranges; recorded by Driver.Packet (queue worker 0x0) 0.6, Driver.Packet.pipeline_drain (queue worker 0x0) 0.3, Driver.Packet.dispatch (queue worker 0x0) 0.1, Driver.Packet.draw (queue worker 0x0) 0.1
  • batch 4884: 11.2 ms at 4414 ms, present 402: GPU no ranges; recorded by Driver.Packet (queue worker 0x0) 0.6, Driver.Packet.pipeline_drain (queue worker 0x0) 0.3, Driver.Packet.dispatch (queue worker 0x0) 0.1, Driver.Packet.draw (queue worker 0x0) 0.1
  • batch 1140: 11.2 ms at 1042 ms, present 246: GPU no ranges; recorded by Driver.Packet (queue worker 0x0) 0.6, Driver.Packet.pipeline_drain (queue worker 0x0) 0.3, Driver.Packet.dispatch (queue worker 0x0) 0.1, Driver.Packet.draw (queue worker 0x0) 0.1

Boot intro, this PR

seconds 5:15 from present 256: 899 presents, frame p50 16.7 / p90 16.9 / p99 17.6 / max 37.5 ms, GPU busy 11.2 ms per present
NVIDIA GeForce RTX 2080 Ti, NVIDIA 617.14, Windows 10.0.26300, 3840x2160, commit b70c1d2a8f06, dropped: no

{"commit":"b70c1d2a8f06","dirty":false,"env":{"APS5_TRACE_DIR":"<path>","APS5_TRACE_SECONDS":"5: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":32684,"title_id":"PPSA05324","title":"Sonic Origins","content_version":"02.002.000","resolution":"3840x2160","window":{"spec":"seconds 5:15","first_present":256,"ms":15013.595},"presents":899,"frame_ms":{"p50":16.684,"p90":16.934,"p99":17.556,"max":37.537},"gpu_busy_ms_per_present":11.188,"worker_busy_pct":{"queue worker 0x0":92.134},"top_phases_ms_per_frame":{"VideoOut.Flip":16.245,"Driver.Packet":15.331,"VideoOut.Flip.vblank_wait":10.692,"Driver.Packet.rendering_wait":8.691,"Driver.Present":5.463,"VideoOut.Flip.present":5.45,"Driver.Packet.pipeline_drain":3.737,"Graphics.Draw":2.936},"trace_dropped":false,"trace":"aps5-trace-b70c1d2a8f06-20220.json.gz"}

Slowest frames (largest slices inside each, inclusive)

  • present 406: 37.5 ms at 2501 ms: VideoOut.Flip (presenter) 37.4, VideoOut.Flip.present (presenter) 37.3, Driver.Present (presenter) 37.3, Driver.Packet (queue worker 0x0) 37.3
  • present 636: 21.6 ms at 6360 ms: Driver.Packet (queue worker 0x0) 15.5, batch (gpu) 13.1, Driver.Packet.pipeline_drain (queue worker 0x0) 11.6, Graphics.Draw (draw committer) 10.6
  • present 638: 20.6 ms at 6398 ms: batch (gpu) 13.3, Driver.Packet (queue worker 0x0) 12.8, Driver.Packet.pipeline_drain (queue worker 0x0) 9.9, Graphics.Draw (draw committer) 9.1
  • present 620: 20.0 ms at 6088 ms: VideoOut.Flip (presenter) 20.0, batch (gpu) 18.0, Driver.Packet (queue worker 0x0) 16.0, VideoOut.Flip.vblank_wait (presenter) 14.7
  • present 635: 19.4 ms at 6340 ms: batch (gpu) 14.1, Driver.Packet (queue worker 0x0) 13.9, Driver.Packet.pipeline_drain (queue worker 0x0) 10.9, Graphics.Draw (draw committer) 9.8

Threads (ms per frame)

thread busy wait untraced in slices < 20 us largest
title 0.0 (0 %) 0.0 (0 %) 16.7 0.2 Shader.ResolveGraphicsStagesAbi 0.0, Shader.ResolveAbi 0.0
shader prepare 0.0 (0 %) 0.0 (0 %) 16.7 0.0 Shader.PrepareArtifact 0.0
shader prepare 0.0 (0 %) 0.0 (0 %) 16.7 0.0 Shader.PrepareArtifact 0.0
shader prepare 0.0 (0 %) 0.0 (0 %) 16.7 0.0 Shader.PrepareArtifact 0.0
shader prepare 0.0 (0 %) 0.0 (0 %) 16.7 0.0 Vulkan.GraphicsPipelinePrebuild 0.0
queue worker 0x0 5.7 (34 %) 9.8 (59 %) 1.2 3.4 Driver.Packet 14.4, Driver.EndSubmission 0.0
draw committer 3.7 (22 %) 0.0 (0 %) 13.0 0.3 Graphics.Draw 2.9, Recorder.Submit 0.4
title 0.0 (0 %) 0.0 (0 %) 16.7 0.0 Shader.ResolveGraphicsStagesAbi 0.0, Shader.ResolveAbi 0.0
title 0.0 (0 %) 0.0 (0 %) 16.7 0.0 Shader.ResolveGraphicsStagesAbi 0.0, Shader.ResolveAbi 0.0
title 0.0 (0 %) 0.0 (0 %) 16.7 0.0 Shader.ResolveGraphicsStagesAbi 0.0, Shader.ResolveAbi 0.0
title 0.0 (0 %) 0.0 (0 %) 16.7 0.0 Shader.ResolveGraphicsStagesAbi 0.0, Shader.ResolveAbi 0.0
presenter 0.4 (3 %) 15.8 (95 %) 0.4 0.1 VideoOut.Flip 16.2, Driver.Present 0.0
title 0.0 (0 %) 0.0 (0 %) 16.7 0.0 Shader.ResolveGraphicsStagesAbi 0.0, Shader.ResolveAbi 0.0
title 0.0 (0 %) 0.0 (0 %) 16.7 0.0 Shader.ResolveGraphicsStagesAbi 0.0, Shader.ResolveAbi 0.0
title 0.0 (0 %) 0.0 (0 %) 16.7 0.0 Shader.ResolveGraphicsStagesAbi 0.0, Shader.ResolveAbi 0.0
title 0.0 (0 %) 0.0 (0 %) 16.7 0.0 Shader.ResolveGraphicsStagesAbi 0.0, Shader.ResolveGraphicsAbi 0.0
title 0.0 (0 %) 0.0 (0 %) 16.7 0.0 Shader.ResolveGraphicsStagesAbi 0.0, Shader.ResolveAbi 0.0
title 0.0 (0 %) 0.0 (0 %) 16.7 0.0 Shader.ResolveGraphicsStagesAbi 0.0, Shader.ResolveGraphicsAbi 0.0
title 0.0 (0 %) 0.0 (0 %) 16.7 0.0 Shader.ResolveGraphicsStagesAbi 0.0, Shader.ResolveAbi 0.0
title 0.0 (0 %) 0.0 (0 %) 16.7 0.0 Shader.ResolveGraphicsStagesAbi 0.0, Shader.ResolveGraphicsAbi 0.0
title 0.0 (0 %) 0.0 (0 %) 16.7 0.0 Shader.Register 0.0
gpu 11.2 (67 %) 0.0 (0 %) 5.5 0.0 batch 11.2

Largest slices (ms per frame, inclusive, all threads): VideoOut.Flip 16.2, Driver.Packet 14.4, batch 11.2, VideoOut.Flip.vblank_wait 10.7, Driver.Packet.rendering_wait 8.7, Driver.Present 5.5, VideoOut.Flip.present 5.4, Driver.Packet.pipeline_drain 3.6, Graphics.Draw 2.9, Graphics.Draw.draw_and_resource_release 2.8

Longest waits

  • VideoOut.Flip.vblank_wait (presenter) 17.0 ms at 8040 ms, present 737
  • VideoOut.Flip.vblank_wait (presenter) 16.9 ms at 8558 ms, present 768
  • VideoOut.Flip.vblank_wait (presenter) 16.9 ms at 11444 ms, present 941
  • VideoOut.Flip.vblank_wait (presenter) 16.9 ms at 7907 ms, present 729
  • VideoOut.Flip.vblank_wait (presenter) 16.8 ms at 10343 ms, present 875
  • VideoOut.Flip.vblank_wait (presenter) 16.7 ms at 10960 ms, present 912
  • VideoOut.Flip.vblank_wait (presenter) 16.6 ms at 9792 ms, present 842
  • VideoOut.Flip.vblank_wait (presenter) 16.6 ms at 9725 ms, present 838
  • VideoOut.Flip.vblank_wait (presenter) 16.6 ms at 13846 ms, present 1085
  • VideoOut.Flip.vblank_wait (presenter) 16.6 ms at 12411 ms, present 999

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

  • batch 3168: 9.1 ms at 2542 ms, present 407: GPU no ranges; recorded by Driver.Packet (queue worker 0x0) 30.5, Driver.Packet.pipeline_drain (queue worker 0x0) 8.5, Driver.Packet.draw (queue worker 0x0) 0.5, Driver.Draw (queue worker 0x0) 0.5
  • batch 15005: 6.8 ms at 10980 ms, present 913: GPU no ranges; recorded by Graphics.Draw (draw committer) 1.7, Graphics.Draw.draw_and_resource_release (draw committer) 1.6, Resources.Complete (draw committer) 0.7, Vulkan.DrawFromRecipe (draw committer) 0.2
  • batch 3744: 6.6 ms at 2915 ms, present 429: GPU no ranges; recorded by Driver.Packet (queue worker 0x0) 0.6, Driver.Packet.pipeline_drain (queue worker 0x0) 0.3, Driver.Packet.dispatch (queue worker 0x0) 0.2, Driver.Packet.draw (queue worker 0x0) 0.1
  • batch 3696: 6.6 ms at 2883 ms, present 427: GPU no ranges; recorded by Driver.Packet (queue worker 0x0) 0.5, Driver.Packet.pipeline_drain (queue worker 0x0) 0.3, Driver.Packet.dispatch (queue worker 0x0) 0.2, Driver.Dispatch (queue worker 0x0) 0.1
  • batch 14920: 6.6 ms at 10915 ms, present 909: GPU no ranges; recorded by Graphics.Draw (draw committer) 0.7, Graphics.Draw.draw_and_resource_release (draw committer) 0.7, Vulkan.DrawFromRecipe (draw committer) 0.2, Graphics.DrawWithRecipe (draw committer) 0.2
Sonic 2 page, round 1, main

seconds 200:15 from present 3576: 184 presents, frame p50 79.9 / p90 85.4 / p99 111.1 / max 112.5 ms, GPU busy 67.8 ms per present
NVIDIA GeForce RTX 2080 Ti, NVIDIA 617.14, Windows 10.0.26300, 3840x2160, commit c9b2660d56, dropped: yes

{"commit":"c9b2660d5636","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":32684,"title_id":"PPSA05324","title":"Sonic Origins","content_version":"02.002.000","resolution":"3840x2160","window":{"spec":"seconds 200:15","first_present":3576,"ms":15029.553},"presents":184,"frame_ms":{"p50":79.936,"p90":85.384,"p99":111.058,"max":112.54},"gpu_busy_ms_per_present":67.818,"worker_busy_pct":{"queue worker 0x0":97.158},"top_phases_ms_per_frame":{"Driver.Packet":79.292,"Driver.Packet.draw":61.176,"Graphics.Draw":60.242,"Driver.Draw":60.204,"Graphics.Draw.draw_and_resource_release":49.782,"Driver.Draw.shader_compile_and_link":40.183,"Shader.DrawStage":29.316,"VideoOut.Flip":27.28},"trace_dropped":true,"trace_dropped_threads":{"queue worker 0x0":{"events_full_after_s":5.808,"events_lost":418770,"totals_full":false},"draw committer":{"events_full_after_s":12.958,"events_lost":42737,"totals_full":false}},"trace":"aps5-trace-c9b2660d5636-24044.json.gz"}

Slowest frames (largest slices inside each, inclusive)

  • present 3741: 112.5 ms at 13441 ms: batch (gpu) 68.5, VideoOut.Flip (presenter) 27.5, VideoOut.Flip.present (presenter) 27.4, Driver.Present (presenter) 27.4
  • present 3625: 111.1 ms at 4002 ms: Driver.Packet (queue worker 0x0) 70.6, batch (gpu) 68.6, Driver.Packet.draw (queue worker 0x0) 61.3, Graphics.Draw (draw committer) 60.8
  • present 3615: 110.2 ms at 3166 ms: Driver.Packet (queue worker 0x0) 68.5, batch (gpu) 68.0, Graphics.Draw (draw committer) 62.5, Driver.Packet.draw (queue worker 0x0) 59.2
  • present 3645: 107.6 ms at 5666 ms: Driver.Packet (queue worker 0x0) 69.1, batch (gpu) 67.8, Graphics.Draw (draw committer) 60.8, Driver.Packet.draw (queue worker 0x0) 59.2
  • present 3667: 106.7 ms at 7488 ms: batch (gpu) 68.1, Graphics.Draw (draw committer) 62.5, Graphics.Draw.draw_and_resource_release (draw committer) 57.6, VideoOut.Flip (presenter) 28.1

Threads (ms per frame)

thread busy wait untraced in slices < 20 us largest
title 0.7 (1 %) 0.0 (0 %) 81.0 0.6 Shader.ResolveGraphicsAbi 0.3, Shader.ResolveGraphicsStagesAbi 0.2
queue worker 0x0 16.3 (20 %) 0.0 (0 %) 65.4 74.1 Driver.Packet 16.3, Driver.EndSubmission 0.0
draw committer 30.9 (38 %) 0.5 (1 %) 50.2 49.6 Graphics.Draw 29.4, Recorder.Submit 1.1
title 0.2 (0 %) 0.0 (0 %) 81.5 0.1 Shader.ResolveGraphicsAbi 0.1, Shader.ResolveGraphicsStagesAbi 0.1
title 0.2 (0 %) 0.0 (0 %) 81.5 0.1 Shader.ResolveGraphicsAbi 0.1, Shader.ResolveGraphicsStagesAbi 0.1
title 0.2 (0 %) 0.0 (0 %) 81.5 0.1 Shader.ResolveGraphicsAbi 0.1, Shader.ResolveGraphicsStagesAbi 0.1
title 0.2 (0 %) 0.0 (0 %) 81.5 0.1 Shader.ResolveGraphicsAbi 0.1, Shader.ResolveGraphicsStagesAbi 0.1
presenter 0.6 (1 %) 26.7 (33 %) 54.3 0.0 VideoOut.Flip 27.3, Driver.Present 0.1
title 0.2 (0 %) 0.0 (0 %) 81.4 0.1 Shader.ResolveGraphicsAbi 0.1, Shader.ResolveGraphicsStagesAbi 0.1
title 0.2 (0 %) 0.0 (0 %) 81.5 0.1 Shader.ResolveGraphicsAbi 0.1, Shader.ResolveGraphicsStagesAbi 0.1
title 0.2 (0 %) 0.0 (0 %) 81.5 0.1 Shader.ResolveGraphicsAbi 0.1, Shader.ResolveGraphicsStagesAbi 0.1
title 0.2 (0 %) 0.0 (0 %) 81.5 0.1 Shader.ResolveGraphicsAbi 0.1, Shader.ResolveGraphicsStagesAbi 0.1
title 0.2 (0 %) 0.0 (0 %) 81.5 0.1 Shader.ResolveGraphicsAbi 0.1, Shader.ResolveAbi 0.1
title 0.2 (0 %) 0.0 (0 %) 81.5 0.1 Shader.ResolveGraphicsAbi 0.1, Shader.ResolveGraphicsStagesAbi 0.1
title 0.2 (0 %) 0.0 (0 %) 81.5 0.1 Shader.ResolveGraphicsAbi 0.1, Shader.ResolveGraphicsStagesAbi 0.1
title 0.2 (0 %) 0.0 (0 %) 81.4 0.1 Shader.ResolveGraphicsAbi 0.1, Shader.ResolveGraphicsStagesAbi 0.1
gpu 67.8 (83 %) 0.0 (0 %) 13.9 0.0 batch 67.8

Largest slices (ms per frame, inclusive, all threads): batch 67.8, Graphics.Draw 29.4, VideoOut.Flip 27.3, Driver.Present 27.2, VideoOut.Flip.present 27.1, Driver.Present.render_fence_wait 26.7, Vulkan.Retire 26.7, Vulkan.Retire.wait 26.7, Graphics.Draw.draw_and_resource_release 24.4, Driver.Packet 16.3

Longest waits

  • Driver.Present.render_fence_wait (presenter) 30.7 ms at 844 ms, present 3586
  • Driver.Present.render_fence_wait (presenter) 30.4 ms at 11446 ms, present 3716
  • Driver.Present.render_fence_wait (presenter) 30.2 ms at 12727 ms, present 3732
  • Driver.Present.render_fence_wait (presenter) 30.0 ms at 922 ms, present 3587
  • Driver.Present.render_fence_wait (presenter) 29.9 ms at 765 ms, present 3585
  • Driver.Present.render_fence_wait (presenter) 29.6 ms at 14450 ms, present 3753
  • Driver.Present.render_fence_wait (presenter) 29.5 ms at 14042 ms, present 3748
  • Driver.Present.render_fence_wait (presenter) 29.5 ms at 14944 ms, present 3759
  • Driver.Present.render_fence_wait (presenter) 29.1 ms at 14862 ms, present 3758
  • Driver.Present.render_fence_wait (presenter) 29.1 ms at 10412 ms, present 3703

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

  • batch 10148: 13.7 ms at 11607 ms, present 3717: GPU no ranges; recorded by no CPU slices
  • batch 12569: 13.6 ms at 14364 ms, present 3751: GPU no ranges; recorded by no CPU slices
  • batch 1711: 13.6 ms at 1980 ms, present 3599: GPU no ranges; recorded by Driver.Packet (queue worker 0x0) 1.1, Driver.Packet.dispatch (queue worker 0x0) 0.6, Driver.Dispatch (queue worker 0x0) 0.6, Vulkan.Dispatch (queue worker 0x0) 0.3
  • batch 11145: 13.2 ms at 12726 ms, present 3731: GPU no ranges; recorded by no CPU slices
  • batch 9862: 13.2 ms at 11289 ms, present 3713: GPU no ranges; recorded by no CPU slices
Sonic 2 page, round 1, this PR

seconds 200:15 from present 4136: 182 presents, frame p50 80.0 / p90 91.9 / p99 102.2 / max 110.8 ms, GPU busy 58.1 ms per present
NVIDIA GeForce RTX 2080 Ti, NVIDIA 617.14, Windows 10.0.26300, 3840x2160, commit b70c1d2a8f06, dropped: yes

{"commit":"b70c1d2a8f06","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":32684,"title_id":"PPSA05324","title":"Sonic Origins","content_version":"02.002.000","resolution":"3840x2160","window":{"spec":"seconds 200:15","first_present":4136,"ms":15008.569},"presents":182,"frame_ms":{"p50":80.017,"p90":91.933,"p99":102.182,"max":110.763},"gpu_busy_ms_per_present":58.127,"worker_busy_pct":{"queue worker 0x0":97.214},"top_phases_ms_per_frame":{"Driver.Packet":80.1,"Driver.Packet.draw":62.228,"Driver.Draw":61.216,"Graphics.Draw":61.185,"Graphics.Draw.draw_and_resource_release":50.791,"Driver.Draw.shader_compile_and_link":41.903,"Shader.DrawStage":32.416,"VideoOut.Flip":23.087},"trace_dropped":true,"trace_dropped_threads":{"queue worker 0x0":{"events_full_after_s":5.968,"events_lost":388834,"totals_full":false},"draw committer":{"events_full_after_s":12.865,"events_lost":42388,"totals_full":false}},"trace":"aps5-trace-b70c1d2a8f06-31164.json.gz"}

Slowest frames (largest slices inside each, inclusive)

  • present 4179: 110.8 ms at 3517 ms: Driver.Packet (queue worker 0x0) 79.7, Graphics.Draw (draw committer) 72.5, Driver.Packet.draw (queue worker 0x0) 69.6, Driver.Draw (queue worker 0x0) 68.7
  • present 4149: 102.2 ms at 1048 ms: Driver.Packet (queue worker 0x0) 64.9, batch (gpu) 59.0, Driver.Packet.draw (queue worker 0x0) 54.7, Graphics.Draw (draw committer) 54.4
  • present 4191: 101.5 ms at 4520 ms: Driver.Packet (queue worker 0x0) 59.8, batch (gpu) 56.5, Graphics.Draw (draw committer) 52.5, Driver.Packet.draw (queue worker 0x0) 50.6
  • present 4308: 100.5 ms at 14176 ms: batch (gpu) 59.3, VideoOut.Flip (presenter) 25.3, VideoOut.Flip.present (presenter) 25.2, Driver.Present (presenter) 25.2
  • present 4301: 100.2 ms at 13580 ms: batch (gpu) 56.5, VideoOut.Flip (presenter) 23.0, VideoOut.Flip.present (presenter) 22.8, Driver.Present (presenter) 22.8

Threads (ms per frame)

thread busy wait untraced in slices < 20 us largest
title 0.6 (1 %) 0.0 (0 %) 81.8 0.6 Shader.ResolveGraphicsAbi 0.2, Shader.ResolveGraphicsStagesAbi 0.2
queue worker 0x0 16.2 (20 %) 0.0 (0 %) 66.3 81.5 Driver.Packet 16.2, Driver.EndSubmission 0.0
draw committer 32.1 (39 %) 0.4 (1 %) 50.0 49.0 Graphics.Draw 30.4, Recorder.Submit 1.2
title 0.2 (0 %) 0.0 (0 %) 82.3 0.1 Shader.ResolveGraphicsAbi 0.1, Shader.ResolveGraphicsStagesAbi 0.1
title 0.2 (0 %) 0.0 (0 %) 82.3 0.1 Shader.ResolveGraphicsAbi 0.1, Shader.ResolveAbi 0.1
title 0.2 (0 %) 0.0 (0 %) 82.3 0.1 Shader.ResolveGraphicsAbi 0.1, Shader.ResolveGraphicsStagesAbi 0.1
title 0.2 (0 %) 0.0 (0 %) 82.3 0.1 Shader.ResolveGraphicsAbi 0.1, Shader.ResolveGraphicsStagesAbi 0.1
presenter 0.6 (1 %) 22.5 (27 %) 59.3 0.0 VideoOut.Flip 23.1, Driver.Present 0.1
title 0.2 (0 %) 0.0 (0 %) 82.3 0.1 Shader.ResolveGraphicsAbi 0.1, Shader.ResolveGraphicsStagesAbi 0.1
title 0.2 (0 %) 0.0 (0 %) 82.3 0.1 Shader.ResolveGraphicsAbi 0.1, Shader.ResolveGraphicsStagesAbi 0.1
title 0.2 (0 %) 0.0 (0 %) 82.2 0.1 Shader.ResolveGraphicsAbi 0.1, Shader.ResolveGraphicsStagesAbi 0.1
title 0.2 (0 %) 0.0 (0 %) 82.3 0.1 Shader.ResolveGraphicsAbi 0.1, Shader.ResolveGraphicsStagesAbi 0.1
title 0.2 (0 %) 0.0 (0 %) 82.3 0.1 Shader.ResolveGraphicsAbi 0.1, Shader.ResolveGraphicsStagesAbi 0.1
title 0.2 (0 %) 0.0 (0 %) 82.2 0.1 Shader.ResolveGraphicsAbi 0.1, Shader.ResolveGraphicsStagesAbi 0.1
title 0.2 (0 %) 0.0 (0 %) 82.3 0.1 Shader.ResolveGraphicsAbi 0.1, Shader.ResolveGraphicsStagesAbi 0.1
title 0.2 (0 %) 0.0 (0 %) 82.3 0.1 Shader.ResolveGraphicsAbi 0.1, Shader.ResolveGraphicsStagesAbi 0.1
gpu 58.1 (70 %) 0.0 (0 %) 24.4 0.0 batch 58.1

Largest slices (ms per frame, inclusive, all threads): batch 58.1, Graphics.Draw 30.4, Graphics.Draw.draw_and_resource_release 25.0, VideoOut.Flip 23.1, Driver.Present 23.0, VideoOut.Flip.present 22.9, Driver.Present.render_fence_wait 22.5, Vulkan.Retire 22.5, Vulkan.Retire.wait 22.5, Driver.Packet 16.2

Longest waits

  • Driver.Present.render_fence_wait (presenter) 27.5 ms at 12760 ms, present 4291
  • Driver.Present.render_fence_wait (presenter) 26.5 ms at 9035 ms, present 4246
  • Driver.Present.render_fence_wait (presenter) 26.0 ms at 11512 ms, present 4276
  • Driver.Present.render_fence_wait (presenter) 26.0 ms at 12681 ms, present 4290
  • Driver.Present.render_fence_wait (presenter) 25.9 ms at 12842 ms, present 4292
  • Driver.Present.render_fence_wait (presenter) 25.8 ms at 13762 ms, present 4303
  • Driver.Present.render_fence_wait (presenter) 25.8 ms at 13681 ms, present 4302
  • Driver.Present.render_fence_wait (presenter) 25.8 ms at 13841 ms, present 4304
  • Driver.Present.render_fence_wait (presenter) 25.6 ms at 11258 ms, present 4273
  • Driver.Present.render_fence_wait (presenter) 25.5 ms at 9836 ms, present 4256

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

  • batch 8323: 14.1 ms at 9507 ms, present 4251: GPU no ranges; recorded by no CPU slices
  • batch 59: 14.1 ms at 73 ms, present 4136: GPU no ranges; recorded by Driver.Packet (queue worker 0x0) 1.3, Driver.Packet.dispatch (queue worker 0x0) 0.6, Driver.Dispatch (queue worker 0x0) 0.6, Driver.Packet.pipeline_drain (queue worker 0x0) 0.4
  • batch 3443: 13.9 ms at 3939 ms, present 4183: GPU no ranges; recorded by Driver.Packet (queue worker 0x0) 1.3, Driver.Packet.dispatch (queue worker 0x0) 0.6, Driver.Dispatch (queue worker 0x0) 0.5, Driver.Packet.pipeline_drain (queue worker 0x0) 0.4
  • batch 12905: 13.9 ms at 14843 ms, present 4315: GPU no ranges; recorded by no CPU slices
  • batch 10621: 13.8 ms at 12176 ms, present 4283: GPU no ranges; recorded by Graphics.Draw (draw committer) 0.8, Graphics.Draw.draw_and_resource_release (draw committer) 0.8, Resources.Prepare (draw committer) 0.1, Recorder.Submit (draw committer) 0.1

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 Pro 10.0.26300
  • AI-assisted: yes
<!-- greyfinch-sync:boykopovar/AnyPS5:issue:4996990021 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/10668). Originally posted by [meh7an](https://github.com/meh7an) on 2026-10-24T16:12:16Z. --- ### What Titles often fill the same range with the same pattern again and again, with nothing writing the range in between. On `main` every such fill is recorded as a `vkCmdFillBuffer` (or a pattern copy) into the host import. Sonic Origins Plus zero-fills four ranges every frame on its main menu, about 68 MiB per frame. Over one run on the Sonic 2 page that is 7,905 GPU fills (about 134 GB), and the fills cost the boot intro its frame rate as well. This PR makes `VulkanDevice::FillBuffer` remember the last fill of each range: its address and size, the 16-byte pattern, the write-tracker generation its `MarkWritten` returned, the import's `HostImportSerial`, and `GuestMemory::UnwatchSerial`. A fill that repeats the remembered one records nothing when all of these hold: - **No new stamp.** `UnchangedSince` still holds over the range for that generation. `CollectWritesUncached` runs first, so a CPU store not collected yet counts. Every import writer stamps its blocks: labels, key stores, copies, in-place V# writes, and GPU-direct and shadow write-backs. - **Same import, watched throughout.** The import serial and the unwatch serial are unchanged, so a re-import, or a range that was unwatched in between, fills again. - **No address-based work in flight** (`Graphics::LeaseWorkPending`, new). BDA stores are stamped only when their batch completes (`BdaResources::markWrittenPages`), so a BDA dispatch recorded after the remembered fill could still write the range. The check runs after `FillBuffer`'s sync on copied writers and completion labels, whose stores stamp when they run, and after queued key stores are flushed. Queued label stores stamp when they are queued. A skipped fill still calls `GuestMemory::MarkWritten` over its range, as a recorded one does. So everything over the range that revalidates by write stamps behaves as after the store, and only the transfer is gone: - a depth surface's `OverwrittenInMemory`; - storage images; - unit shadows, which turn stale. `storeBufferFill`'s steps around the call are unchanged: flushing pending images, discards, and the metadata notes. - `APS5_NO_FILL_ELISION=1` records every fill, as before. - The `[fill-sync]` line of `APS5_PROFILE_DRAW` counts the elided fills and their bytes. - `agc_driver_repeated_fill_elision` (new) runs on write-watched memory: - A repeat over unchanged bytes records nothing and still stamps its range. - The fill is recorded again after a CPU write, after a GPU fill inside the range, and after a driver stamp (the `MarkWritten` of a write-back). - It is also recorded again with another pattern, with another size at the same address, and through a new import after `ClearHostImports`. - With `APS5_NO_FILL_ELISION=1` the test fails at the first repeat. - The expectation follows the tracker: after the first fill the test asks whether the write watch proves the range unchanged. If it does, repeats must be elided; if not, as where an import leaves the range unwatched (Linux drivers whose host imports resolve write protection), every fill must be recorded, as on `main`. On Linux it runs `main`'s decided import mode and, when that is "watch", a second pass with imports forced unwatched. No open PR or `main` commit elides repeated fills. `tools/pr_overlap.py` finds no overlapping change. It could not compare 70 PRs, because they conflict with `main`. Of those, three touch `FillBuffer`, and they only call it: #2434 and #9898 from tests, #7201 with an added condition. ### Tested **Rebased onto `main` ca0e9557aa (2026-10-27).** Same machine: Windows 11 Pro 10.0.26300, NVIDIA GeForce RTX 2080 Ti, driver 617.14, i9-9900K. Sonic Origins Plus (PPSA05324) on the Sonic 3 & Knuckles page of the main menu, `main`'s defaults. `main` ca0e9557aa against `main` with this PR (2b395fe86a), both clean builds of the same tree. One warm-up boot, one `APS5_PROFILE_GPU=1` boot per build, then two interleaved traced rounds (`main`, PR, `main`, PR; `APS5_TRACE_SECONDS=200:15`, six title FPS readings each). | | `main` | this PR | |---|---|---| | `[gputime]` fill class per present | 13.59 ms (4 fills, 68.3 MiB) | none | | `[gputime]` GPU time per present, all ranges, the same six blocks on the page | 66.6 ms | 56.6 ms | | GPU busy per present (ms, round 1 / round 2) | 71.2 / 68.0 | 55.6 / 54.9 | | frame p50 / p90 / p99 (ms), round 1 | 64.4 / 105.7 / 128.5 | 61.8 / 64.7 / 69.0 | | frame p50 / p90 / p99 (ms), round 2 | 65.0 / 99.3 / 118.0 | 63.4 / 69.4 / 86.7 | | title FPS, median of six readings (round 1 / round 2) | 13.88 / 13.85 | 16.42 / 16.44 | - With this PR the fill class reads 0.00 ms per present over those blocks. - All four traces dropped events once the queue worker's event buffer filled, 5.4 to 6.6 s into the window; in three of them the draw committer's buffer filled later too. The phase totals still cover the whole window, and the frame and GPU times in the summary lines do not come from those events. - `ctest` (2655 tests) on `main` plus this PR: all pass. - `ctest --test-dir build -R "fill|host_import|dcc_key|label|guest_memory_lifetime|depth_fast_clear" -V` with `ANYPS5_REQUIRE_VULKAN=1`, `ANYPS5_NO_SHADER_CACHE=1` and `VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation`: 54/54 on `main`, 55/55 on this PR. The extra one is `agc_driver_repeated_fill_elision`; it reports that the write watch proves the range unchanged, so the repeats are elided. Neither log has `was not found but was requested by env var VK_INSTANCE_LAYERS`, and neither has a `VUID-` line. The digests below come from the first round of each build. All four traces are attached, one zip per round with the `main` and PR traces. [fill-elision-s3k-ca0e-round1.zip](https://github.com/user-attachments/files/34027493/fill-elision-s3k-ca0e-round1.zip) [fill-elision-s3k-ca0e-round2.zip](https://github.com/user-attachments/files/34027509/fill-elision-s3k-ca0e-round2.zip) **Sonic 3 & Knuckles page, round 1, main** **seconds 200:15** from present 3502: 197 presents, frame p50 64.4 / p90 105.7 / p99 128.5 / max 136.3 ms, GPU busy 71.2 ms per present NVIDIA GeForce RTX 2080 Ti, NVIDIA 617.14, Windows 10.0.26300, 3840x2160, commit ca0e9557aab1, dropped: yes ```json {"commit":"ca0e9557aab1","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":32684,"title_id":"PPSA05324","title":"Sonic Origins","content_version":"02.002.000","resolution":"3840x2160","window":{"spec":"seconds 200:15","first_present":3502,"ms":15053.064},"presents":197,"frame_ms":{"p50":64.433,"p90":105.724,"p99":128.515,"max":136.284},"gpu_busy_ms_per_present":71.154,"worker_busy_pct":{"queue worker 0x0":97.776},"top_phases_ms_per_frame":{"Driver.Packet":71.134,"Graphics.Draw":59.253,"Driver.Packet.draw":56.58,"Driver.Draw":55.854,"Graphics.Draw.draw_and_resource_release":50.899,"VideoOut.Flip":42.993,"Driver.Present":42.735,"VideoOut.Flip.present":42.72},"trace_dropped":true,"trace_dropped_threads":{"queue worker 0x0":{"events_full_after_s":6.589,"events_lost":332547,"totals_full":false}},"trace":"aps5-trace-ca0e9557aab1-11940.json.gz"} ``` **Slowest frames** (largest slices inside each, inclusive) - present 3640: 136.3 ms at 10452 ms: batch (gpu) 108.0, Graphics.Draw (draw committer) 103.6, Graphics.Draw.draw_and_resource_release (draw committer) 97.4, VideoOut.Flip (presenter) 68.2 - present 3592: 128.5 ms at 6853 ms: batch (gpu) 108.3, Graphics.Draw (draw committer) 92.3, Graphics.Draw.draw_and_resource_release (draw committer) 88.3, VideoOut.Flip (presenter) 70.8 - present 3690: 126.1 ms at 14303 ms: batch (gpu) 95.7, Graphics.Draw (draw committer) 89.5, Graphics.Draw.draw_and_resource_release (draw committer) 84.0, VideoOut.Flip (presenter) 62.3 - present 3564: 122.6 ms at 4753 ms: batch (gpu) 97.1, Driver.Packet (queue worker 0x0) 95.6, Graphics.Draw (draw committer) 90.0, Driver.Packet.draw (queue worker 0x0) 88.7 - present 3656: 121.9 ms at 11659 ms: batch (gpu) 97.9, Graphics.Draw (draw committer) 89.3, Graphics.Draw.draw_and_resource_release (draw committer) 84.5, VideoOut.Flip (presenter) 63.7 **Threads** (ms per frame) | thread | busy | wait | untraced | in slices < 20 us | largest | |---|---|---|---|---|---| | title | 0.4 (0 %) | 0.0 (0 %) | 76.0 | 0.5 | Shader.ResolveGraphicsStagesAbi 0.2, Shader.ResolveGraphicsAbi 0.1 | | queue worker 0x0 | 22.0 (29 %) | 0.0 (0 %) | 54.4 | 54.5 | Driver.Packet 20.7, Driver.EndSubmission 1.4 | | draw committer | 43.8 (57 %) | 0.4 (0 %) | 32.3 | 39.5 | Graphics.Draw 41.9, Recorder.Submit 1.3 | | title | 0.1 (0 %) | 0.0 (0 %) | 76.3 | 0.1 | Shader.ResolveGraphicsAbi 0.0, Shader.ResolveGraphicsStagesAbi 0.0 | | title | 0.1 (0 %) | 0.0 (0 %) | 76.3 | 0.1 | Shader.ResolveGraphicsStagesAbi 0.0, Shader.ResolveAbi 0.0 | | title | 0.1 (0 %) | 0.0 (0 %) | 76.3 | 0.0 | Shader.ResolveGraphicsAbi 0.0, Shader.ResolveAbi 0.0 | | presenter | 0.9 (1 %) | 42.1 (55 %) | 33.4 | 0.1 | VideoOut.Flip 43.0, Driver.Present 0.0 | | title | 0.1 (0 %) | 0.0 (0 %) | 76.3 | 0.1 | Shader.ResolveGraphicsAbi 0.0, Shader.ResolveGraphicsStagesAbi 0.0 | | title | 0.1 (0 %) | 0.0 (0 %) | 76.3 | 0.0 | Shader.ResolveGraphicsAbi 0.0, Shader.ResolveAbi 0.0 | | title | 0.1 (0 %) | 0.0 (0 %) | 76.3 | 0.1 | Shader.ResolveGraphicsAbi 0.0, Shader.ResolveGraphicsStagesAbi 0.0 | | title | 0.1 (0 %) | 0.0 (0 %) | 76.3 | 0.1 | Shader.ResolveGraphicsAbi 0.0, Shader.ResolveGraphicsStagesAbi 0.0 | | title | 0.1 (0 %) | 0.0 (0 %) | 76.3 | 0.0 | Shader.ResolveGraphicsAbi 0.0, Shader.ResolveGraphicsStagesAbi 0.0 | | title | 0.1 (0 %) | 0.0 (0 %) | 76.3 | 0.1 | Shader.ResolveGraphicsStagesAbi 0.0, Shader.ResolveGraphicsAbi 0.0 | | title | 0.1 (0 %) | 0.0 (0 %) | 76.3 | 0.1 | Shader.ResolveGraphicsAbi 0.0, Shader.ResolveGraphicsStagesAbi 0.0 | | title | 0.1 (0 %) | 0.0 (0 %) | 76.3 | 0.1 | Shader.ResolveGraphicsAbi 0.0, Shader.ResolveAbi 0.0 | | title | 0.1 (0 %) | 0.0 (0 %) | 76.3 | 0.1 | Shader.ResolveGraphicsAbi 0.0, Shader.ResolveGraphicsStagesAbi 0.0 | | gpu | 70.7 (93 %) | 0.0 (0 %) | 5.7 | 0.0 | batch 70.7 | **Largest slices** (ms per frame, inclusive, all threads): batch 70.7, VideoOut.Flip 43.0, Driver.Present 42.7, VideoOut.Flip.present 42.7, Graphics.Draw 41.9, Driver.Present.render_fence_wait 41.6, Vulkan.Retire 41.6, Vulkan.Retire.wait 41.6, Graphics.Draw.draw_and_resource_release 36.5, Driver.Packet 20.7 **Longest waits** - Driver.Present.render_fence_wait (presenter) 71.2 ms at 9935 ms, present 3633 - Driver.Present.render_fence_wait (presenter) 70.0 ms at 6854 ms, present 3592 - Driver.Present.render_fence_wait (presenter) 69.1 ms at 6712 ms, present 3590 - Driver.Present.render_fence_wait (presenter) 68.1 ms at 10007 ms, present 3634 - Driver.Present.render_fence_wait (presenter) 67.3 ms at 10452 ms, present 3640 - Driver.Present.render_fence_wait (presenter) 66.5 ms at 12746 ms, present 3670 - Driver.Present.render_fence_wait (presenter) 65.7 ms at 12117 ms, present 3662 - Driver.Present.render_fence_wait (presenter) 65.4 ms at 14944 ms, present 3698 - Driver.Present.render_fence_wait (presenter) 65.1 ms at 9434 ms, present 3626 - Driver.Present.render_fence_wait (presenter) 64.7 ms at 10309 ms, present 3638 **Largest GPU batches** (GPU ranges inside, and the CPU slices that recorded each, inclusive) - batch 2978: 14.8 ms at 3945 ms, present 3552: GPU no ranges; recorded by Graphics.Draw (draw committer) 0.5, Graphics.Draw.draw_and_resource_release (draw committer) 0.5 - batch 4626: 14.7 ms at 6097 ms, present 3580: GPU no ranges; recorded by Graphics.Draw (draw committer) 0.5, Graphics.Draw.draw_and_resource_release (draw committer) 0.5 - batch 2623: 14.5 ms at 3505 ms, present 3546: GPU no ranges; recorded by Graphics.Draw (draw committer) 0.4, Graphics.Draw.draw_and_resource_release (draw committer) 0.4 - batch 6382: 14.4 ms at 8333 ms, present 3610: GPU no ranges; recorded by Graphics.Draw (draw committer) 0.5, Graphics.Draw.draw_and_resource_release (draw committer) 0.5 - batch 1102: 14.4 ms at 1510 ms, present 3520: GPU no ranges; recorded by Graphics.Draw (draw committer) 0.5, Graphics.Draw.draw_and_resource_release (draw committer) 0.4 **Sonic 3 & Knuckles page, round 1, this PR** **seconds 200:15** from present 4604: 241 presents, frame p50 61.8 / p90 64.7 / p99 69.0 / max 72.8 ms, GPU busy 55.6 ms per present NVIDIA GeForce RTX 2080 Ti, NVIDIA 617.14, Windows 10.0.26300, 3840x2160, commit 2b395fe86aa2, dropped: yes ```json {"commit":"2b395fe86aa2","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":32684,"title_id":"PPSA05324","title":"Sonic Origins","content_version":"02.002.000","resolution":"3840x2160","window":{"spec":"seconds 200:15","first_present":4604,"ms":15005.245},"presents":241,"frame_ms":{"p50":61.778,"p90":64.694,"p99":68.96,"max":72.793},"gpu_busy_ms_per_present":55.598,"worker_busy_pct":{"queue worker 0x0":97.257},"top_phases_ms_per_frame":{"Driver.Packet":59.672,"Graphics.Draw":46.931,"Driver.Packet.draw":46.191,"Driver.Draw":45.418,"Graphics.Draw.draw_and_resource_release":38.462,"Driver.Draw.shader_compile_and_link":30.335,"VideoOut.Flip":23.901,"Driver.Present":23.774},"trace_dropped":true,"trace_dropped_threads":{"queue worker 0x0":{"events_full_after_s":5.375,"events_lost":457991,"totals_full":false},"draw committer":{"events_full_after_s":12.623,"events_lost":50434,"totals_full":false}},"trace":"aps5-trace-2b395fe86aa2-14420.json.gz"} ``` **Slowest frames** (largest slices inside each, inclusive) - present 4629: 72.8 ms at 1564 ms: batch (gpu) 55.1, Driver.Packet (queue worker 0x0) 53.5, Graphics.Draw (draw committer) 46.6, Driver.Packet.draw (queue worker 0x0) 45.7 - present 4794: 70.0 ms at 11842 ms: batch (gpu) 56.6, Graphics.Draw (draw committer) 42.3, VideoOut.Flip (presenter) 25.3, VideoOut.Flip.present (presenter) 25.2 - present 4656: 69.0 ms at 3250 ms: batch (gpu) 59.2, Driver.Packet (queue worker 0x0) 43.4, Driver.Packet.draw (queue worker 0x0) 35.6, Graphics.Draw (draw committer) 35.4 - present 4607: 67.7 ms at 182 ms: batch (gpu) 50.6, Driver.Packet (queue worker 0x0) 42.3, Driver.Packet.draw (queue worker 0x0) 34.8, Driver.Draw (queue worker 0x0) 34.3 - present 4608: 67.6 ms at 250 ms: batch (gpu) 54.6, Driver.Packet (queue worker 0x0) 42.8, Driver.Packet.draw (queue worker 0x0) 34.8, Driver.Draw (queue worker 0x0) 33.6 **Threads** (ms per frame) | thread | busy | wait | untraced | in slices < 20 us | largest | |---|---|---|---|---|---| | title | 0.4 (1 %) | 0.0 (0 %) | 61.9 | 0.5 | Shader.ResolveGraphicsStagesAbi 0.2, Shader.ResolveGraphicsAbi 0.1 | | queue worker 0x0 | 12.8 (21 %) | 0.0 (0 %) | 49.5 | 45.7 | Driver.Packet 12.5, Driver.EndSubmission 0.3 | | draw committer | 26.3 (42 %) | 0.1 (0 %) | 35.9 | 33.9 | Graphics.Draw 24.6, Recorder.Submit 1.1 | | title | 0.1 (0 %) | 0.0 (0 %) | 62.1 | 0.1 | Shader.ResolveGraphicsAbi 0.1, Shader.ResolveGraphicsStagesAbi 0.0 | | title | 0.1 (0 %) | 0.0 (0 %) | 62.1 | 0.1 | Shader.ResolveGraphicsAbi 0.0, Shader.ResolveGraphicsStagesAbi 0.0 | | presenter | 0.8 (1 %) | 23.1 (37 %) | 38.3 | 0.0 | VideoOut.Flip 23.9, Driver.Present 0.0 | | title | 0.1 (0 %) | 0.0 (0 %) | 62.1 | 0.1 | Shader.ResolveGraphicsAbi 0.0, Shader.ResolveGraphicsStagesAbi 0.0 | | title | 0.1 (0 %) | 0.0 (0 %) | 62.2 | 0.1 | Shader.ResolveGraphicsStagesAbi 0.0, Shader.ResolveGraphicsAbi 0.0 | | title | 0.1 (0 %) | 0.0 (0 %) | 62.1 | 0.1 | Shader.ResolveGraphicsAbi 0.0, Shader.ResolveAbi 0.0 | | title | 0.1 (0 %) | 0.0 (0 %) | 62.1 | 0.1 | Shader.ResolveGraphicsAbi 0.0, Shader.ResolveGraphicsStagesAbi 0.0 | | title | 0.1 (0 %) | 0.0 (0 %) | 62.1 | 0.1 | Shader.ResolveGraphicsAbi 0.0, Shader.ResolveGraphicsStagesAbi 0.0 | | title | 0.1 (0 %) | 0.0 (0 %) | 62.1 | 0.1 | Shader.ResolveGraphicsAbi 0.0, Shader.ResolveGraphicsStagesAbi 0.0 | | title | 0.1 (0 %) | 0.0 (0 %) | 62.1 | 0.1 | Shader.ResolveGraphicsAbi 0.0, Shader.ResolveGraphicsStagesAbi 0.0 | | title | 0.1 (0 %) | 0.0 (0 %) | 62.1 | 0.1 | Shader.ResolveGraphicsAbi 0.1, Shader.ResolveGraphicsStagesAbi 0.0 | | title | 0.1 (0 %) | 0.0 (0 %) | 62.1 | 0.1 | Shader.ResolveGraphicsAbi 0.0, Shader.ResolveGraphicsStagesAbi 0.0 | | title | 0.1 (0 %) | 0.0 (0 %) | 62.1 | 0.1 | Shader.ResolveGraphicsAbi 0.0, Shader.ResolveGraphicsStagesAbi 0.0 | | gpu | 55.6 (89 %) | 0.0 (0 %) | 6.7 | 0.0 | batch 55.6 | **Largest slices** (ms per frame, inclusive, all threads): batch 55.6, Graphics.Draw 24.6, VideoOut.Flip 23.9, Driver.Present 23.8, VideoOut.Flip.present 23.7, Driver.Present.render_fence_wait 22.9, Vulkan.Retire 22.9, Vulkan.Retire.wait 22.9, Graphics.Draw.draw_and_resource_release 19.8, Driver.Packet 12.5 **Longest waits** - Driver.Present.render_fence_wait (presenter) 30.8 ms at 13522 ms, present 4821 - Driver.Present.render_fence_wait (presenter) 30.7 ms at 13584 ms, present 4822 - Driver.Present.render_fence_wait (presenter) 29.4 ms at 13643 ms, present 4823 - Driver.Present.render_fence_wait (presenter) 28.7 ms at 9483 ms, present 4756 - Driver.Present.render_fence_wait (presenter) 28.2 ms at 9850 ms, present 4762 - Driver.Present.render_fence_wait (presenter) 27.9 ms at 14698 ms, present 4840 - Driver.Present.render_fence_wait (presenter) 27.8 ms at 10466 ms, present 4772 - Driver.Present.render_fence_wait (presenter) 27.5 ms at 9545 ms, present 4757 - Driver.Present.render_fence_wait (presenter) 27.2 ms at 14639 ms, present 4839 - Driver.Present.render_fence_wait (presenter) 27.1 ms at 8802 ms, present 4745 **Largest GPU batches** (GPU ranges inside, and the CPU slices that recorded each, inclusive) - batch 810: 14.6 ms at 870 ms, present 4617: GPU no ranges; recorded by Graphics.Draw (draw committer) 0.4, Graphics.Draw.draw_and_resource_release (draw committer) 0.4 - batch 4040: 14.5 ms at 4310 ms, present 4672: GPU no ranges; recorded by Graphics.Draw (draw committer) 0.5, Graphics.Draw.draw_and_resource_release (draw committer) 0.5 - batch 5555: 14.5 ms at 5923 ms, present 4698: GPU no ranges; recorded by Graphics.Draw (draw committer) 0.5, Graphics.Draw.draw_and_resource_release (draw committer) 0.5 - batch 3040: 14.3 ms at 3243 ms, present 4655: GPU no ranges; recorded by Graphics.Draw (draw committer) 0.5, Graphics.Draw.draw_and_resource_release (draw committer) 0.5 - batch 7437: 14.3 ms at 7925 ms, present 4730: GPU no ranges; recorded by Graphics.Draw (draw committer) 0.4, Graphics.Draw.draw_and_resource_release (draw committer) 0.4 **Before the rebase.** The measurements below were taken on `main` c9b2660d56. Windows 11 Pro 10.0.26300, NVIDIA GeForce RTX 2080 Ti, driver 617.14, i9-9900K, on `main` c9b2660d56. Sonic Origins Plus (PPSA05324), `main`'s defaults (no `APS5_*` opt-ins). **Boot intro**, 5-20 s after launch, one boot per build (`APS5_TRACE_SECONDS=5:15`): | | presents in 15 s | frame p50 / p90 (ms) | GPU busy per present (ms) | |---|---|---|---| | `main` | 650 (43 FPS) | 22.0 / 34.4 | 22.8 | | this PR | 899 (60 FPS) | 16.7 / 16.9 | 11.2 | The intro reaches the 60 Hz cap: `VideoOut.Flip.vblank_wait` becomes the presenter's largest phase. **Sonic 2 page of the main menu.** Two interleaved traced rounds per build after one warm-up boot each (`APS5_TRACE_SECONDS=200:15`): | | frame p50 (ms) | GPU busy per present (ms) | `Driver.Packet` (ms/frame) | title FPS readings (median of six) | |---|---|---|---|---| | `main` | 79.9 / 88.1 | 67.8 / 69.8 | 79.3 / 92.7 | 13.33 / 13.20 | | this PR | 80.0 / 79.7 | 58.1 / 57.8 | 80.1 / 81.9 | 13.06 / 12.63 | - **GPU.** GPU busy per present drops by about 15 %. The queue worker is about 97 % busy in every round, so this page's frame time stays bound by it. - **The title's own FPS readings come out lower on this PR in both rounds.** They are taken about 80-100 s after launch, before the traced window; inside the traced window the frame times match. - The elision's own cost, from `APS5_PROFILE_DRAW`, is about 30 µs per fill. The `[fill-sync]` decide, record and notes phases total 229 ms over 7,905 fills, about 0.1 ms per frame. - I have not found what else would lower the early readings, so they are reported as measured. - **Profiled run.** An `APS5_PROFILE_DRAW=1` run of this PR on the same page elided 7,626 of 7,905 fills (about 130 GB not stored). - **Same image.** Full window captures of every reading render the same scene on both builds. **Tests** - `ctest` (2119 tests) on `main` plus this PR: everything passes except `agc_driver_sample_order`, `agc_driver_sample_order_grid_reference` and `agc_driver_sample_order_recipe_depth_locations`, which fail the same way on plain `main` on this machine. - `ctest --test-dir build -R "fill|host_import|dcc_key|label|guest_memory_lifetime|depth_fast_clear" -V` with `ANYPS5_REQUIRE_VULKAN=1`, `ANYPS5_NO_SHADER_CACHE=1` and `VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation`: 54/54 on `main`, 55/55 on this PR (the extra one is `agc_driver_repeated_fill_elision`). Neither log has `was not found but was requested by env var VK_INSTANCE_LAYERS`, and neither has a `VUID-` line. The digests below come from the intro boots and from the first Sonic 2 round of each build. All six traces are attached: two Sonic 2 rounds per build, and one intro boot per build. [fill-elision-intro.zip](https://github.com/user-attachments/files/33908617/fill-elision-intro.zip) [fill-elision-s2-round1.zip](https://github.com/user-attachments/files/33908622/fill-elision-s2-round1.zip) [fill-elision-s2-round2.zip](https://github.com/user-attachments/files/33908626/fill-elision-s2-round2.zip) **Boot intro, main** **seconds 5:15** from present 199: 650 presents, frame p50 22.0 / p90 34.4 / p99 44.7 / max 46.6 ms, GPU busy 22.8 ms per present NVIDIA GeForce RTX 2080 Ti, NVIDIA 617.14, Windows 10.0.26300, 3840x2160, commit c9b2660d5636, dropped: no ```json {"commit":"c9b2660d5636","dirty":false,"env":{"APS5_TRACE_DIR":"<path>","APS5_TRACE_SECONDS":"5: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":32684,"title_id":"PPSA05324","title":"Sonic Origins","content_version":"02.002.000","resolution":"3840x2160","window":{"spec":"seconds 5:15","first_present":199,"ms":15015.992},"presents":650,"frame_ms":{"p50":21.982,"p90":34.449,"p99":44.732,"max":46.607},"gpu_busy_ms_per_present":22.809,"worker_busy_pct":{"queue worker 0x0":87.653},"top_phases_ms_per_frame":{"VideoOut.Flip":21.037,"Driver.Present":20.666,"VideoOut.Flip.present":20.637,"Driver.Packet":20.216,"Driver.Present.render_fence_wait":18.718,"Vulkan.Retire":18.715,"Vulkan.Retire.wait":18.699,"Driver.Packet.pipeline_drain":9.644},"trace_dropped":false,"trace":"aps5-trace-c9b2660d5636-33676.json.gz"} ``` **Slowest frames** (largest slices inside each, inclusive) - present 544: 46.6 ms at 7942 ms: batch (gpu) 45.6, Driver.Packet (queue worker 0x0) 38.4, Driver.Packet.pipeline_drain (queue worker 0x0) 36.2, Graphics.Draw (draw committer) 35.4 - present 502: 46.5 ms at 6906 ms: batch (gpu) 45.7, Driver.Packet (queue worker 0x0) 39.4, Driver.Packet.pipeline_drain (queue worker 0x0) 37.4, Graphics.Draw (draw committer) 36.5 - present 402: 46.4 ms at 4407 ms: batch (gpu) 45.5, Driver.Packet (queue worker 0x0) 39.4, Driver.Packet.pipeline_drain (queue worker 0x0) 36.9, Graphics.Draw (draw committer) 36.2 - present 626: 46.3 ms at 9960 ms: batch (gpu) 45.3, Driver.Packet (queue worker 0x0) 39.1, Driver.Packet.pipeline_drain (queue worker 0x0) 36.7, Graphics.Draw (draw committer) 35.8 - present 592: 46.2 ms at 9126 ms: batch (gpu) 45.4, Driver.Packet (queue worker 0x0) 37.9, Driver.Packet.pipeline_drain (queue worker 0x0) 35.4, Graphics.Draw (draw committer) 34.7 **Threads** (ms per frame) | thread | busy | wait | untraced | in slices < 20 us | largest | |---|---|---|---|---|---| | title | 0.0 (0 %) | 0.0 (0 %) | 23.1 | 0.2 | Shader.ResolveGraphicsStagesAbi 0.0, Shader.ResolveAbi 0.0 | | shader prepare | 0.0 (0 %) | 0.0 (0 %) | 23.1 | 0.0 | Shader.PrepareArtifact 0.0 | | shader prepare | 0.0 (0 %) | 0.0 (0 %) | 23.1 | 0.0 | Shader.PrepareArtifact 0.0 | | shader prepare | 0.0 (0 %) | 0.0 (0 %) | 23.1 | 0.0 | Shader.PrepareArtifact 0.0 | | shader prepare | 0.0 (0 %) | 0.0 (0 %) | 23.1 | 0.0 | Vulkan.GraphicsPipelinePrebuild 0.0 | | queue worker 0x0 | 19.3 (83 %) | 2.7 (12 %) | 1.1 | 3.1 | Driver.Packet 19.3, Driver.Completion 0.0 | | draw committer | 9.4 (41 %) | 0.1 (0 %) | 13.6 | 0.3 | Graphics.Draw 8.7, Vulkan.DrawFromRecipe 0.3 | | title | 0.0 (0 %) | 0.0 (0 %) | 23.1 | 0.0 | Shader.ResolveGraphicsStagesAbi 0.0, Shader.ResolveGraphicsAbi 0.0 | | title | 0.0 (0 %) | 0.0 (0 %) | 23.1 | 0.0 | Shader.ResolveGraphicsStagesAbi 0.0, Shader.ResolveAbi 0.0 | | title | 0.0 (0 %) | 0.0 (0 %) | 23.1 | 0.0 | Shader.ResolveGraphicsStagesAbi 0.0, Shader.ResolveGraphicsAbi 0.0 | | title | 0.0 (0 %) | 0.0 (0 %) | 23.1 | 0.0 | Shader.ResolveGraphicsStagesAbi 0.0, Shader.ResolveAbi 0.0 | | presenter | 0.6 (3 %) | 20.4 (88 %) | 2.0 | 0.0 | VideoOut.Flip 21.0, Driver.Present 0.0 | | title | 0.0 (0 %) | 0.0 (0 %) | 23.1 | 0.0 | Shader.ResolveGraphicsStagesAbi 0.0, Shader.ResolveAbi 0.0 | | title | 0.0 (0 %) | 0.0 (0 %) | 23.1 | 0.0 | Shader.ResolveGraphicsStagesAbi 0.0, Shader.ResolveAbi 0.0 | | title | 0.0 (0 %) | 0.0 (0 %) | 23.1 | 0.0 | Shader.ResolveGraphicsStagesAbi 0.0, Shader.ResolveAbi 0.0 | | title | 0.0 (0 %) | 0.0 (0 %) | 23.1 | 0.0 | Shader.ResolveGraphicsStagesAbi 0.0, Shader.ResolveGraphicsAbi 0.0 | | title | 0.0 (0 %) | 0.0 (0 %) | 23.1 | 0.0 | Shader.ResolveGraphicsStagesAbi 0.0, Shader.ResolveAbi 0.0 | | title | 0.0 (0 %) | 0.0 (0 %) | 23.1 | 0.0 | Shader.ResolveGraphicsStagesAbi 0.0, Shader.ResolveAbi 0.0 | | title | 0.0 (0 %) | 0.0 (0 %) | 23.1 | 0.0 | Shader.ResolveGraphicsStagesAbi 0.0, Shader.ResolveGraphicsAbi 0.0 | | title | 0.0 (0 %) | 0.0 (0 %) | 23.1 | 0.0 | Shader.ResolveGraphicsStagesAbi 0.0, Shader.ResolveAbi 0.0 | | title | 0.0 (0 %) | 0.0 (0 %) | 23.1 | 0.0 | Shader.Register 0.0 | | gpu | 22.8 (99 %) | 0.0 (0 %) | 0.3 | 0.0 | batch 22.8 | **Largest slices** (ms per frame, inclusive, all threads): batch 22.8, VideoOut.Flip 21.0, Driver.Present 20.7, VideoOut.Flip.present 20.6, Driver.Packet 19.3, Driver.Present.render_fence_wait 18.7, Vulkan.Retire 18.7, Vulkan.Retire.wait 18.7, Driver.Packet.pipeline_drain 9.4, Graphics.Draw 8.7 **Longest waits** - Driver.Present.render_fence_wait (presenter) 33.9 ms at 976 ms, present 244 - Driver.Present.gpu_mutex_wait (presenter) 32.4 ms at 1085 ms, present 249 - Driver.Present.gpu_mutex_wait (presenter) 32.0 ms at 12820 ms, present 748 - Driver.Present.gpu_mutex_wait (presenter) 31.9 ms at 13382 ms, present 774 - Driver.Present.gpu_mutex_wait (presenter) 31.9 ms at 1042 ms, present 247 - Driver.Present.gpu_mutex_wait (presenter) 30.0 ms at 1653 ms, present 275 - Driver.Present.gpu_mutex_wait (presenter) 26.3 ms at 12480 ms, present 732 - Driver.Present.gpu_mutex_wait (presenter) 26.2 ms at 1135 ms, present 251 - Driver.Present.render_fence_wait (presenter) 24.8 ms at 10574 ms, present 651 - Driver.Present.render_fence_wait (presenter) 24.7 ms at 7891 ms, present 542 **Largest GPU batches** (GPU ranges inside, and the CPU slices that recorded each, inclusive) - batch 2008: 11.4 ms at 1822 ms, present 282: GPU no ranges; recorded by Driver.Packet (queue worker 0x0) 0.6, Driver.Packet.pipeline_drain (queue worker 0x0) 0.3, Driver.Packet.dispatch (queue worker 0x0) 0.2, Driver.Packet.draw (queue worker 0x0) 0.1 - batch 1863: 11.3 ms at 1693 ms, present 276: GPU no ranges; recorded by Driver.Packet (queue worker 0x0) 0.6, Driver.Packet.pipeline_drain (queue worker 0x0) 0.3, Driver.Packet.dispatch (queue worker 0x0) 0.2, Driver.Packet.draw (queue worker 0x0) 0.1 - batch 14109: 11.3 ms at 13382 ms, present 773: GPU no ranges; recorded by Driver.Packet (queue worker 0x0) 0.6, Driver.Packet.pipeline_drain (queue worker 0x0) 0.3, Driver.Packet.dispatch (queue worker 0x0) 0.1, Driver.Packet.draw (queue worker 0x0) 0.1 - batch 4884: 11.2 ms at 4414 ms, present 402: GPU no ranges; recorded by Driver.Packet (queue worker 0x0) 0.6, Driver.Packet.pipeline_drain (queue worker 0x0) 0.3, Driver.Packet.dispatch (queue worker 0x0) 0.1, Driver.Packet.draw (queue worker 0x0) 0.1 - batch 1140: 11.2 ms at 1042 ms, present 246: GPU no ranges; recorded by Driver.Packet (queue worker 0x0) 0.6, Driver.Packet.pipeline_drain (queue worker 0x0) 0.3, Driver.Packet.dispatch (queue worker 0x0) 0.1, Driver.Packet.draw (queue worker 0x0) 0.1 **Boot intro, this PR** **seconds 5:15** from present 256: 899 presents, frame p50 16.7 / p90 16.9 / p99 17.6 / max 37.5 ms, GPU busy 11.2 ms per present NVIDIA GeForce RTX 2080 Ti, NVIDIA 617.14, Windows 10.0.26300, 3840x2160, commit b70c1d2a8f06, dropped: no ```json {"commit":"b70c1d2a8f06","dirty":false,"env":{"APS5_TRACE_DIR":"<path>","APS5_TRACE_SECONDS":"5: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":32684,"title_id":"PPSA05324","title":"Sonic Origins","content_version":"02.002.000","resolution":"3840x2160","window":{"spec":"seconds 5:15","first_present":256,"ms":15013.595},"presents":899,"frame_ms":{"p50":16.684,"p90":16.934,"p99":17.556,"max":37.537},"gpu_busy_ms_per_present":11.188,"worker_busy_pct":{"queue worker 0x0":92.134},"top_phases_ms_per_frame":{"VideoOut.Flip":16.245,"Driver.Packet":15.331,"VideoOut.Flip.vblank_wait":10.692,"Driver.Packet.rendering_wait":8.691,"Driver.Present":5.463,"VideoOut.Flip.present":5.45,"Driver.Packet.pipeline_drain":3.737,"Graphics.Draw":2.936},"trace_dropped":false,"trace":"aps5-trace-b70c1d2a8f06-20220.json.gz"} ``` **Slowest frames** (largest slices inside each, inclusive) - present 406: 37.5 ms at 2501 ms: VideoOut.Flip (presenter) 37.4, VideoOut.Flip.present (presenter) 37.3, Driver.Present (presenter) 37.3, Driver.Packet (queue worker 0x0) 37.3 - present 636: 21.6 ms at 6360 ms: Driver.Packet (queue worker 0x0) 15.5, batch (gpu) 13.1, Driver.Packet.pipeline_drain (queue worker 0x0) 11.6, Graphics.Draw (draw committer) 10.6 - present 638: 20.6 ms at 6398 ms: batch (gpu) 13.3, Driver.Packet (queue worker 0x0) 12.8, Driver.Packet.pipeline_drain (queue worker 0x0) 9.9, Graphics.Draw (draw committer) 9.1 - present 620: 20.0 ms at 6088 ms: VideoOut.Flip (presenter) 20.0, batch (gpu) 18.0, Driver.Packet (queue worker 0x0) 16.0, VideoOut.Flip.vblank_wait (presenter) 14.7 - present 635: 19.4 ms at 6340 ms: batch (gpu) 14.1, Driver.Packet (queue worker 0x0) 13.9, Driver.Packet.pipeline_drain (queue worker 0x0) 10.9, Graphics.Draw (draw committer) 9.8 **Threads** (ms per frame) | thread | busy | wait | untraced | in slices < 20 us | largest | |---|---|---|---|---|---| | title | 0.0 (0 %) | 0.0 (0 %) | 16.7 | 0.2 | Shader.ResolveGraphicsStagesAbi 0.0, Shader.ResolveAbi 0.0 | | shader prepare | 0.0 (0 %) | 0.0 (0 %) | 16.7 | 0.0 | Shader.PrepareArtifact 0.0 | | shader prepare | 0.0 (0 %) | 0.0 (0 %) | 16.7 | 0.0 | Shader.PrepareArtifact 0.0 | | shader prepare | 0.0 (0 %) | 0.0 (0 %) | 16.7 | 0.0 | Shader.PrepareArtifact 0.0 | | shader prepare | 0.0 (0 %) | 0.0 (0 %) | 16.7 | 0.0 | Vulkan.GraphicsPipelinePrebuild 0.0 | | queue worker 0x0 | 5.7 (34 %) | 9.8 (59 %) | 1.2 | 3.4 | Driver.Packet 14.4, Driver.EndSubmission 0.0 | | draw committer | 3.7 (22 %) | 0.0 (0 %) | 13.0 | 0.3 | Graphics.Draw 2.9, Recorder.Submit 0.4 | | title | 0.0 (0 %) | 0.0 (0 %) | 16.7 | 0.0 | Shader.ResolveGraphicsStagesAbi 0.0, Shader.ResolveAbi 0.0 | | title | 0.0 (0 %) | 0.0 (0 %) | 16.7 | 0.0 | Shader.ResolveGraphicsStagesAbi 0.0, Shader.ResolveAbi 0.0 | | title | 0.0 (0 %) | 0.0 (0 %) | 16.7 | 0.0 | Shader.ResolveGraphicsStagesAbi 0.0, Shader.ResolveAbi 0.0 | | title | 0.0 (0 %) | 0.0 (0 %) | 16.7 | 0.0 | Shader.ResolveGraphicsStagesAbi 0.0, Shader.ResolveAbi 0.0 | | presenter | 0.4 (3 %) | 15.8 (95 %) | 0.4 | 0.1 | VideoOut.Flip 16.2, Driver.Present 0.0 | | title | 0.0 (0 %) | 0.0 (0 %) | 16.7 | 0.0 | Shader.ResolveGraphicsStagesAbi 0.0, Shader.ResolveAbi 0.0 | | title | 0.0 (0 %) | 0.0 (0 %) | 16.7 | 0.0 | Shader.ResolveGraphicsStagesAbi 0.0, Shader.ResolveAbi 0.0 | | title | 0.0 (0 %) | 0.0 (0 %) | 16.7 | 0.0 | Shader.ResolveGraphicsStagesAbi 0.0, Shader.ResolveAbi 0.0 | | title | 0.0 (0 %) | 0.0 (0 %) | 16.7 | 0.0 | Shader.ResolveGraphicsStagesAbi 0.0, Shader.ResolveGraphicsAbi 0.0 | | title | 0.0 (0 %) | 0.0 (0 %) | 16.7 | 0.0 | Shader.ResolveGraphicsStagesAbi 0.0, Shader.ResolveAbi 0.0 | | title | 0.0 (0 %) | 0.0 (0 %) | 16.7 | 0.0 | Shader.ResolveGraphicsStagesAbi 0.0, Shader.ResolveGraphicsAbi 0.0 | | title | 0.0 (0 %) | 0.0 (0 %) | 16.7 | 0.0 | Shader.ResolveGraphicsStagesAbi 0.0, Shader.ResolveAbi 0.0 | | title | 0.0 (0 %) | 0.0 (0 %) | 16.7 | 0.0 | Shader.ResolveGraphicsStagesAbi 0.0, Shader.ResolveGraphicsAbi 0.0 | | title | 0.0 (0 %) | 0.0 (0 %) | 16.7 | 0.0 | Shader.Register 0.0 | | gpu | 11.2 (67 %) | 0.0 (0 %) | 5.5 | 0.0 | batch 11.2 | **Largest slices** (ms per frame, inclusive, all threads): VideoOut.Flip 16.2, Driver.Packet 14.4, batch 11.2, VideoOut.Flip.vblank_wait 10.7, Driver.Packet.rendering_wait 8.7, Driver.Present 5.5, VideoOut.Flip.present 5.4, Driver.Packet.pipeline_drain 3.6, Graphics.Draw 2.9, Graphics.Draw.draw_and_resource_release 2.8 **Longest waits** - VideoOut.Flip.vblank_wait (presenter) 17.0 ms at 8040 ms, present 737 - VideoOut.Flip.vblank_wait (presenter) 16.9 ms at 8558 ms, present 768 - VideoOut.Flip.vblank_wait (presenter) 16.9 ms at 11444 ms, present 941 - VideoOut.Flip.vblank_wait (presenter) 16.9 ms at 7907 ms, present 729 - VideoOut.Flip.vblank_wait (presenter) 16.8 ms at 10343 ms, present 875 - VideoOut.Flip.vblank_wait (presenter) 16.7 ms at 10960 ms, present 912 - VideoOut.Flip.vblank_wait (presenter) 16.6 ms at 9792 ms, present 842 - VideoOut.Flip.vblank_wait (presenter) 16.6 ms at 9725 ms, present 838 - VideoOut.Flip.vblank_wait (presenter) 16.6 ms at 13846 ms, present 1085 - VideoOut.Flip.vblank_wait (presenter) 16.6 ms at 12411 ms, present 999 **Largest GPU batches** (GPU ranges inside, and the CPU slices that recorded each, inclusive) - batch 3168: 9.1 ms at 2542 ms, present 407: GPU no ranges; recorded by Driver.Packet (queue worker 0x0) 30.5, Driver.Packet.pipeline_drain (queue worker 0x0) 8.5, Driver.Packet.draw (queue worker 0x0) 0.5, Driver.Draw (queue worker 0x0) 0.5 - batch 15005: 6.8 ms at 10980 ms, present 913: GPU no ranges; recorded by Graphics.Draw (draw committer) 1.7, Graphics.Draw.draw_and_resource_release (draw committer) 1.6, Resources.Complete (draw committer) 0.7, Vulkan.DrawFromRecipe (draw committer) 0.2 - batch 3744: 6.6 ms at 2915 ms, present 429: GPU no ranges; recorded by Driver.Packet (queue worker 0x0) 0.6, Driver.Packet.pipeline_drain (queue worker 0x0) 0.3, Driver.Packet.dispatch (queue worker 0x0) 0.2, Driver.Packet.draw (queue worker 0x0) 0.1 - batch 3696: 6.6 ms at 2883 ms, present 427: GPU no ranges; recorded by Driver.Packet (queue worker 0x0) 0.5, Driver.Packet.pipeline_drain (queue worker 0x0) 0.3, Driver.Packet.dispatch (queue worker 0x0) 0.2, Driver.Dispatch (queue worker 0x0) 0.1 - batch 14920: 6.6 ms at 10915 ms, present 909: GPU no ranges; recorded by Graphics.Draw (draw committer) 0.7, Graphics.Draw.draw_and_resource_release (draw committer) 0.7, Vulkan.DrawFromRecipe (draw committer) 0.2, Graphics.DrawWithRecipe (draw committer) 0.2 <details><summary>Sonic 2 page, round 1, main</summary> **seconds 200:15** from present 3576: 184 presents, frame p50 79.9 / p90 85.4 / p99 111.1 / max 112.5 ms, GPU busy 67.8 ms per present NVIDIA GeForce RTX 2080 Ti, NVIDIA 617.14, Windows 10.0.26300, 3840x2160, commit c9b2660d5636, dropped: yes ```json {"commit":"c9b2660d5636","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":32684,"title_id":"PPSA05324","title":"Sonic Origins","content_version":"02.002.000","resolution":"3840x2160","window":{"spec":"seconds 200:15","first_present":3576,"ms":15029.553},"presents":184,"frame_ms":{"p50":79.936,"p90":85.384,"p99":111.058,"max":112.54},"gpu_busy_ms_per_present":67.818,"worker_busy_pct":{"queue worker 0x0":97.158},"top_phases_ms_per_frame":{"Driver.Packet":79.292,"Driver.Packet.draw":61.176,"Graphics.Draw":60.242,"Driver.Draw":60.204,"Graphics.Draw.draw_and_resource_release":49.782,"Driver.Draw.shader_compile_and_link":40.183,"Shader.DrawStage":29.316,"VideoOut.Flip":27.28},"trace_dropped":true,"trace_dropped_threads":{"queue worker 0x0":{"events_full_after_s":5.808,"events_lost":418770,"totals_full":false},"draw committer":{"events_full_after_s":12.958,"events_lost":42737,"totals_full":false}},"trace":"aps5-trace-c9b2660d5636-24044.json.gz"} ``` **Slowest frames** (largest slices inside each, inclusive) - present 3741: 112.5 ms at 13441 ms: batch (gpu) 68.5, VideoOut.Flip (presenter) 27.5, VideoOut.Flip.present (presenter) 27.4, Driver.Present (presenter) 27.4 - present 3625: 111.1 ms at 4002 ms: Driver.Packet (queue worker 0x0) 70.6, batch (gpu) 68.6, Driver.Packet.draw (queue worker 0x0) 61.3, Graphics.Draw (draw committer) 60.8 - present 3615: 110.2 ms at 3166 ms: Driver.Packet (queue worker 0x0) 68.5, batch (gpu) 68.0, Graphics.Draw (draw committer) 62.5, Driver.Packet.draw (queue worker 0x0) 59.2 - present 3645: 107.6 ms at 5666 ms: Driver.Packet (queue worker 0x0) 69.1, batch (gpu) 67.8, Graphics.Draw (draw committer) 60.8, Driver.Packet.draw (queue worker 0x0) 59.2 - present 3667: 106.7 ms at 7488 ms: batch (gpu) 68.1, Graphics.Draw (draw committer) 62.5, Graphics.Draw.draw_and_resource_release (draw committer) 57.6, VideoOut.Flip (presenter) 28.1 **Threads** (ms per frame) | thread | busy | wait | untraced | in slices < 20 us | largest | |---|---|---|---|---|---| | title | 0.7 (1 %) | 0.0 (0 %) | 81.0 | 0.6 | Shader.ResolveGraphicsAbi 0.3, Shader.ResolveGraphicsStagesAbi 0.2 | | queue worker 0x0 | 16.3 (20 %) | 0.0 (0 %) | 65.4 | 74.1 | Driver.Packet 16.3, Driver.EndSubmission 0.0 | | draw committer | 30.9 (38 %) | 0.5 (1 %) | 50.2 | 49.6 | Graphics.Draw 29.4, Recorder.Submit 1.1 | | title | 0.2 (0 %) | 0.0 (0 %) | 81.5 | 0.1 | Shader.ResolveGraphicsAbi 0.1, Shader.ResolveGraphicsStagesAbi 0.1 | | title | 0.2 (0 %) | 0.0 (0 %) | 81.5 | 0.1 | Shader.ResolveGraphicsAbi 0.1, Shader.ResolveGraphicsStagesAbi 0.1 | | title | 0.2 (0 %) | 0.0 (0 %) | 81.5 | 0.1 | Shader.ResolveGraphicsAbi 0.1, Shader.ResolveGraphicsStagesAbi 0.1 | | title | 0.2 (0 %) | 0.0 (0 %) | 81.5 | 0.1 | Shader.ResolveGraphicsAbi 0.1, Shader.ResolveGraphicsStagesAbi 0.1 | | presenter | 0.6 (1 %) | 26.7 (33 %) | 54.3 | 0.0 | VideoOut.Flip 27.3, Driver.Present 0.1 | | title | 0.2 (0 %) | 0.0 (0 %) | 81.4 | 0.1 | Shader.ResolveGraphicsAbi 0.1, Shader.ResolveGraphicsStagesAbi 0.1 | | title | 0.2 (0 %) | 0.0 (0 %) | 81.5 | 0.1 | Shader.ResolveGraphicsAbi 0.1, Shader.ResolveGraphicsStagesAbi 0.1 | | title | 0.2 (0 %) | 0.0 (0 %) | 81.5 | 0.1 | Shader.ResolveGraphicsAbi 0.1, Shader.ResolveGraphicsStagesAbi 0.1 | | title | 0.2 (0 %) | 0.0 (0 %) | 81.5 | 0.1 | Shader.ResolveGraphicsAbi 0.1, Shader.ResolveGraphicsStagesAbi 0.1 | | title | 0.2 (0 %) | 0.0 (0 %) | 81.5 | 0.1 | Shader.ResolveGraphicsAbi 0.1, Shader.ResolveAbi 0.1 | | title | 0.2 (0 %) | 0.0 (0 %) | 81.5 | 0.1 | Shader.ResolveGraphicsAbi 0.1, Shader.ResolveGraphicsStagesAbi 0.1 | | title | 0.2 (0 %) | 0.0 (0 %) | 81.5 | 0.1 | Shader.ResolveGraphicsAbi 0.1, Shader.ResolveGraphicsStagesAbi 0.1 | | title | 0.2 (0 %) | 0.0 (0 %) | 81.4 | 0.1 | Shader.ResolveGraphicsAbi 0.1, Shader.ResolveGraphicsStagesAbi 0.1 | | gpu | 67.8 (83 %) | 0.0 (0 %) | 13.9 | 0.0 | batch 67.8 | **Largest slices** (ms per frame, inclusive, all threads): batch 67.8, Graphics.Draw 29.4, VideoOut.Flip 27.3, Driver.Present 27.2, VideoOut.Flip.present 27.1, Driver.Present.render_fence_wait 26.7, Vulkan.Retire 26.7, Vulkan.Retire.wait 26.7, Graphics.Draw.draw_and_resource_release 24.4, Driver.Packet 16.3 **Longest waits** - Driver.Present.render_fence_wait (presenter) 30.7 ms at 844 ms, present 3586 - Driver.Present.render_fence_wait (presenter) 30.4 ms at 11446 ms, present 3716 - Driver.Present.render_fence_wait (presenter) 30.2 ms at 12727 ms, present 3732 - Driver.Present.render_fence_wait (presenter) 30.0 ms at 922 ms, present 3587 - Driver.Present.render_fence_wait (presenter) 29.9 ms at 765 ms, present 3585 - Driver.Present.render_fence_wait (presenter) 29.6 ms at 14450 ms, present 3753 - Driver.Present.render_fence_wait (presenter) 29.5 ms at 14042 ms, present 3748 - Driver.Present.render_fence_wait (presenter) 29.5 ms at 14944 ms, present 3759 - Driver.Present.render_fence_wait (presenter) 29.1 ms at 14862 ms, present 3758 - Driver.Present.render_fence_wait (presenter) 29.1 ms at 10412 ms, present 3703 **Largest GPU batches** (GPU ranges inside, and the CPU slices that recorded each, inclusive) - batch 10148: 13.7 ms at 11607 ms, present 3717: GPU no ranges; recorded by no CPU slices - batch 12569: 13.6 ms at 14364 ms, present 3751: GPU no ranges; recorded by no CPU slices - batch 1711: 13.6 ms at 1980 ms, present 3599: GPU no ranges; recorded by Driver.Packet (queue worker 0x0) 1.1, Driver.Packet.dispatch (queue worker 0x0) 0.6, Driver.Dispatch (queue worker 0x0) 0.6, Vulkan.Dispatch (queue worker 0x0) 0.3 - batch 11145: 13.2 ms at 12726 ms, present 3731: GPU no ranges; recorded by no CPU slices - batch 9862: 13.2 ms at 11289 ms, present 3713: GPU no ranges; recorded by no CPU slices </details> <details><summary>Sonic 2 page, round 1, this PR</summary> **seconds 200:15** from present 4136: 182 presents, frame p50 80.0 / p90 91.9 / p99 102.2 / max 110.8 ms, GPU busy 58.1 ms per present NVIDIA GeForce RTX 2080 Ti, NVIDIA 617.14, Windows 10.0.26300, 3840x2160, commit b70c1d2a8f06, dropped: yes ```json {"commit":"b70c1d2a8f06","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":32684,"title_id":"PPSA05324","title":"Sonic Origins","content_version":"02.002.000","resolution":"3840x2160","window":{"spec":"seconds 200:15","first_present":4136,"ms":15008.569},"presents":182,"frame_ms":{"p50":80.017,"p90":91.933,"p99":102.182,"max":110.763},"gpu_busy_ms_per_present":58.127,"worker_busy_pct":{"queue worker 0x0":97.214},"top_phases_ms_per_frame":{"Driver.Packet":80.1,"Driver.Packet.draw":62.228,"Driver.Draw":61.216,"Graphics.Draw":61.185,"Graphics.Draw.draw_and_resource_release":50.791,"Driver.Draw.shader_compile_and_link":41.903,"Shader.DrawStage":32.416,"VideoOut.Flip":23.087},"trace_dropped":true,"trace_dropped_threads":{"queue worker 0x0":{"events_full_after_s":5.968,"events_lost":388834,"totals_full":false},"draw committer":{"events_full_after_s":12.865,"events_lost":42388,"totals_full":false}},"trace":"aps5-trace-b70c1d2a8f06-31164.json.gz"} ``` **Slowest frames** (largest slices inside each, inclusive) - present 4179: 110.8 ms at 3517 ms: Driver.Packet (queue worker 0x0) 79.7, Graphics.Draw (draw committer) 72.5, Driver.Packet.draw (queue worker 0x0) 69.6, Driver.Draw (queue worker 0x0) 68.7 - present 4149: 102.2 ms at 1048 ms: Driver.Packet (queue worker 0x0) 64.9, batch (gpu) 59.0, Driver.Packet.draw (queue worker 0x0) 54.7, Graphics.Draw (draw committer) 54.4 - present 4191: 101.5 ms at 4520 ms: Driver.Packet (queue worker 0x0) 59.8, batch (gpu) 56.5, Graphics.Draw (draw committer) 52.5, Driver.Packet.draw (queue worker 0x0) 50.6 - present 4308: 100.5 ms at 14176 ms: batch (gpu) 59.3, VideoOut.Flip (presenter) 25.3, VideoOut.Flip.present (presenter) 25.2, Driver.Present (presenter) 25.2 - present 4301: 100.2 ms at 13580 ms: batch (gpu) 56.5, VideoOut.Flip (presenter) 23.0, VideoOut.Flip.present (presenter) 22.8, Driver.Present (presenter) 22.8 **Threads** (ms per frame) | thread | busy | wait | untraced | in slices < 20 us | largest | |---|---|---|---|---|---| | title | 0.6 (1 %) | 0.0 (0 %) | 81.8 | 0.6 | Shader.ResolveGraphicsAbi 0.2, Shader.ResolveGraphicsStagesAbi 0.2 | | queue worker 0x0 | 16.2 (20 %) | 0.0 (0 %) | 66.3 | 81.5 | Driver.Packet 16.2, Driver.EndSubmission 0.0 | | draw committer | 32.1 (39 %) | 0.4 (1 %) | 50.0 | 49.0 | Graphics.Draw 30.4, Recorder.Submit 1.2 | | title | 0.2 (0 %) | 0.0 (0 %) | 82.3 | 0.1 | Shader.ResolveGraphicsAbi 0.1, Shader.ResolveGraphicsStagesAbi 0.1 | | title | 0.2 (0 %) | 0.0 (0 %) | 82.3 | 0.1 | Shader.ResolveGraphicsAbi 0.1, Shader.ResolveAbi 0.1 | | title | 0.2 (0 %) | 0.0 (0 %) | 82.3 | 0.1 | Shader.ResolveGraphicsAbi 0.1, Shader.ResolveGraphicsStagesAbi 0.1 | | title | 0.2 (0 %) | 0.0 (0 %) | 82.3 | 0.1 | Shader.ResolveGraphicsAbi 0.1, Shader.ResolveGraphicsStagesAbi 0.1 | | presenter | 0.6 (1 %) | 22.5 (27 %) | 59.3 | 0.0 | VideoOut.Flip 23.1, Driver.Present 0.1 | | title | 0.2 (0 %) | 0.0 (0 %) | 82.3 | 0.1 | Shader.ResolveGraphicsAbi 0.1, Shader.ResolveGraphicsStagesAbi 0.1 | | title | 0.2 (0 %) | 0.0 (0 %) | 82.3 | 0.1 | Shader.ResolveGraphicsAbi 0.1, Shader.ResolveGraphicsStagesAbi 0.1 | | title | 0.2 (0 %) | 0.0 (0 %) | 82.2 | 0.1 | Shader.ResolveGraphicsAbi 0.1, Shader.ResolveGraphicsStagesAbi 0.1 | | title | 0.2 (0 %) | 0.0 (0 %) | 82.3 | 0.1 | Shader.ResolveGraphicsAbi 0.1, Shader.ResolveGraphicsStagesAbi 0.1 | | title | 0.2 (0 %) | 0.0 (0 %) | 82.3 | 0.1 | Shader.ResolveGraphicsAbi 0.1, Shader.ResolveGraphicsStagesAbi 0.1 | | title | 0.2 (0 %) | 0.0 (0 %) | 82.2 | 0.1 | Shader.ResolveGraphicsAbi 0.1, Shader.ResolveGraphicsStagesAbi 0.1 | | title | 0.2 (0 %) | 0.0 (0 %) | 82.3 | 0.1 | Shader.ResolveGraphicsAbi 0.1, Shader.ResolveGraphicsStagesAbi 0.1 | | title | 0.2 (0 %) | 0.0 (0 %) | 82.3 | 0.1 | Shader.ResolveGraphicsAbi 0.1, Shader.ResolveGraphicsStagesAbi 0.1 | | gpu | 58.1 (70 %) | 0.0 (0 %) | 24.4 | 0.0 | batch 58.1 | **Largest slices** (ms per frame, inclusive, all threads): batch 58.1, Graphics.Draw 30.4, Graphics.Draw.draw_and_resource_release 25.0, VideoOut.Flip 23.1, Driver.Present 23.0, VideoOut.Flip.present 22.9, Driver.Present.render_fence_wait 22.5, Vulkan.Retire 22.5, Vulkan.Retire.wait 22.5, Driver.Packet 16.2 **Longest waits** - Driver.Present.render_fence_wait (presenter) 27.5 ms at 12760 ms, present 4291 - Driver.Present.render_fence_wait (presenter) 26.5 ms at 9035 ms, present 4246 - Driver.Present.render_fence_wait (presenter) 26.0 ms at 11512 ms, present 4276 - Driver.Present.render_fence_wait (presenter) 26.0 ms at 12681 ms, present 4290 - Driver.Present.render_fence_wait (presenter) 25.9 ms at 12842 ms, present 4292 - Driver.Present.render_fence_wait (presenter) 25.8 ms at 13762 ms, present 4303 - Driver.Present.render_fence_wait (presenter) 25.8 ms at 13681 ms, present 4302 - Driver.Present.render_fence_wait (presenter) 25.8 ms at 13841 ms, present 4304 - Driver.Present.render_fence_wait (presenter) 25.6 ms at 11258 ms, present 4273 - Driver.Present.render_fence_wait (presenter) 25.5 ms at 9836 ms, present 4256 **Largest GPU batches** (GPU ranges inside, and the CPU slices that recorded each, inclusive) - batch 8323: 14.1 ms at 9507 ms, present 4251: GPU no ranges; recorded by no CPU slices - batch 59: 14.1 ms at 73 ms, present 4136: GPU no ranges; recorded by Driver.Packet (queue worker 0x0) 1.3, Driver.Packet.dispatch (queue worker 0x0) 0.6, Driver.Dispatch (queue worker 0x0) 0.6, Driver.Packet.pipeline_drain (queue worker 0x0) 0.4 - batch 3443: 13.9 ms at 3939 ms, present 4183: GPU no ranges; recorded by Driver.Packet (queue worker 0x0) 1.3, Driver.Packet.dispatch (queue worker 0x0) 0.6, Driver.Dispatch (queue worker 0x0) 0.5, Driver.Packet.pipeline_drain (queue worker 0x0) 0.4 - batch 12905: 13.9 ms at 14843 ms, present 4315: GPU no ranges; recorded by no CPU slices - batch 10621: 13.8 ms at 12176 ms, present 4283: GPU no ranges; recorded by Graphics.Draw (draw committer) 0.8, Graphics.Draw.draw_and_resource_release (draw committer) 0.8, Resources.Prepare (draw committer) 0.1, Recorder.Submit (draw committer) 0.1 </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 Pro 10.0.26300 - [x] AI-assisted: yes
MarcZX10 commented 2026-10-24 16:17:26 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-24T16:17:26Z.

Review: APPROVED


Reviewed the complete diff at b70c1d2a8f06c3448e5e26b5f4c9ee5106918632. The elision predicate is scoped to an exact address/size/pattern and requires the same host import and unchanged watch epoch; it collects uncached writes before comparing generations. I traced the write-order cases: queued DCC key stores are flushed before the cache check, copied writers and completion labels are synchronized earlier in FillBuffer, tracked GPU/label writes stamp their ranges, and deferred BDA lease work blocks elision. The normal fill path still records its pending-write note and generation, and the hit advances the generation while relying on the prior fill's still-pending write note where needed. Context loss clears the cache. The regression covers CPU/GPU overwrite, metadata stamp, pattern/size changes and import replacement.\n\nDirect local checks: and All conventions checks passed. pass. I attempted a focused local CMake configuration, but this checkout cannot configure the full test tree because the SDL2 submodule has no CMakeLists and SDL lacks XRandR support; so I could not independently run the new Vulkan test here. The PR reports paired validation-layer test runs (54/54 main, 55/55 change, no missing-layer diagnostic or VUID) and the paired performance traces, with the product-suite failures matching on main and the change. Hosted eligibility, conventions, intake, labels and report pass; platform/product build jobs are skipped by repository policy.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5638924534 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/10668#pullrequestreview-5638924534). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-10-24T16:17:26Z. **Review:** APPROVED --- Reviewed the complete diff at b70c1d2a8f06c3448e5e26b5f4c9ee5106918632. The elision predicate is scoped to an exact address/size/pattern and requires the same host import and unchanged watch epoch; it collects uncached writes before comparing generations. I traced the write-order cases: queued DCC key stores are flushed before the cache check, copied writers and completion labels are synchronized earlier in FillBuffer, tracked GPU/label writes stamp their ranges, and deferred BDA lease work blocks elision. The normal fill path still records its pending-write note and generation, and the hit advances the generation while relying on the prior fill's still-pending write note where needed. Context loss clears the cache. The regression covers CPU/GPU overwrite, metadata stamp, pattern/size changes and import replacement.\n\nDirect local checks: and All conventions checks passed. pass. I attempted a focused local CMake configuration, but this checkout cannot configure the full test tree because the SDL2 submodule has no CMakeLists and SDL lacks XRandR support; so I could not independently run the new Vulkan test here. The PR reports paired validation-layer test runs (54/54 main, 55/55 change, no missing-layer diagnostic or VUID) and the paired performance traces, with the product-suite failures matching on main and the change. Hosted eligibility, conventions, intake, labels and report pass; platform/product build jobs are skipped by repository policy.
MarcZX10 commented 2026-10-24 20:21:45 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-24T20:21:45Z.

Review: APPROVED


Follow-up review of head c141ccb4253cbea11782bc721ad7458c266fc4a1. The test now derives whether repeat fills should be elided from the tracker after the first synchronized fill and checks recorded repeats when the write watch cannot prove unchanged contents. On Linux it additionally runs the forced-unwatched import mode when the normal decision is watched, so the RADV-reported case is represented without assuming an optimization that main does not provide there. The failure reported on b70c1d2a8 was in that prior test assumption; the author has asked the reporter to rerun the corrected head, which is still pending. Focused hosted tests are skipped under repository policy, so this approval is based on code/test review plus the existing Windows/NVIDIA and Windows/RDNA1 reports, not a claimed RADV rerun. Eligibility, conventions, labels and report passed.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5639806819 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/10668#pullrequestreview-5639806819). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-10-24T20:21:45Z. **Review:** APPROVED --- Follow-up review of head c141ccb4253cbea11782bc721ad7458c266fc4a1. The test now derives whether repeat fills should be elided from the tracker after the first synchronized fill and checks recorded repeats when the write watch cannot prove unchanged contents. On Linux it additionally runs the forced-unwatched import mode when the normal decision is watched, so the RADV-reported case is represented without assuming an optimization that main does not provide there. The failure reported on b70c1d2a8 was in that prior test assumption; the author has asked the reporter to rerun the corrected head, which is still pending. Focused hosted tests are skipped under repository policy, so this approval is based on code/test review plus the existing Windows/NVIDIA and Windows/RDNA1 reports, not a claimed RADV rerun. Eligibility, conventions, labels and report passed.
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!10668
No description provided.