perf(agc): queue a flip submission before holding the title for earlier flip work #18072

Merged
PrivacyOnion merged 1 commit from upstream-pr/18072 into main 2026-11-14 04:27:38 +00:00
PrivacyOnion commented 2026-11-10 09:38:25 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by PrivacyOnion on 2026-11-10T09:38:25Z.


What

A queue-0 submission that carries a flip held the title in Driver::holdFlipBehindWorker until every earlier flip submission had run to its end and its recorded GPU work had completed and been reaped, and only then queued it. The worker had nothing to run during that wait. In a lossless trace of Sniper Ghost Warrior Contracts 2 (PPSA03131), the title waited about 9 ms a frame in Recorder.WaitSerial inside waitFlipWork, while the queue worker, the draw finisher and the draw committer were idle and only the GPU ran.

The submission is now queued as soon as the worker has reached every earlier flip, which is the unchanged first stage of the hold. The title then waits for the earlier flip submissions' work as before, so Submit still returns only after that work completed and was reaped. Each flip submission carries a FlipWork entry linked to the one before it, so the title waits for exactly the earlier submissions even when they finish out of order. CPU flips and the queue0AwaitsTitle early exit are unchanged.

testFlipHoldQueuesHeldSubmission in tests/Flip.cpp keeps the first flip submission's work open and submits a second flip. It checks four things: the title stays held, the second submission is already queued, it does not run ahead of the first, and the title is released once the first completes. Against main it fails with a held flip submission was not queued while the title waited for the previous flip submission.

The bubble only costs time when the GPU tail at the flip is not already covered by CPU waits. Before #15569 the storage flush waits before the flip covered it, and this change was neutral. #15569, now on main, turns those waits into GPU ordering and exposes the bubble, which this change recovers.

Tested

NVIDIA GeForce RTX 5070, driver 616.64, Windows 11 Pro 26200, Release build (GCC 15, Ninja).

Vulkan validation (Khronos validation 1.4.363 loaded), on main 164ac9b078 and on this head:

ANYPS5_REQUIRE_VULKAN=1 ANYPS5_NO_SHADER_CACHE=1 VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation ctest --test-dir build -R "^(agc_driver_flip|agc_driver_flip_compute|agc_driver_flip_stores_small_results|video_out_flip_.*)$" -V
Result
This head 31 of 31 pass, 0 VUID- lines, no was not found but was requested by env var VK_INSTANCE_LAYERS
main 31 of 31 pass, 0 VUID- lines, no was not found but was requested by env var VK_INSTANCE_LAYERS

With VK_LOADER_DEBUG=layer, the loader log of video_out_flip_present shows Insert instance layer "VK_LAYER_KHRONOS_validation". agc_driver_flip drives a test video output and creates no Vulkan instance.

Performance, for the perf label:

  • Scene: PPSA03131 tutorial at 3840x2160, APS5_TRACE_SECONDS=150:60, the same scripted input in every run, on the same machine.
  • Runs alternate between the two builds.
  • Base: main f439f7f3a0 + #17187 + #15569. #17187 is needed to reach the tutorial on main, which otherwise stops on dual-source blending with a MIN or MAX operation is unsupported. #15569 is the change that exposes the bubble. It was merged into main as 07ae6afcee after these runs.
  • B is the same base plus this commit.
run build presents in 60 s p50 p90 p99 GPU busy per present
s13-a1 base 556 107.4 ms 115.0 ms 124.3 ms 24.6 ms
s13-a2 base 556 106.6 ms 116.6 ms 136.2 ms 26.7 ms
s13-a3 base 553 107.7 ms 111.5 ms 125.4 ms 27.1 ms
s13-a4 base 566 105.8 ms 109.4 ms 116.3 ms 25.9 ms
s13-a5 base 551 108.5 ms 111.9 ms 128.8 ms 26.6 ms
s13-b1 this PR 583 101.4 ms 110.4 ms 128.2 ms 24.6 ms
s13-b2 this PR 556 105.9 ms 113.3 ms 154.0 ms 27.0 ms
s13-b3 this PR 553 104.2 ms 118.3 ms 156.1 ms 27.4 ms
s13-b4 this PR 582 102.9 ms 106.2 ms 118.3 ms 26.7 ms
s13-b5 this PR 567 105.6 ms 109.5 ms 122.6 ms 26.6 ms

Mean presents in 60 s: 556.4 on the base, 568.2 with this PR (+2.1 %). Median p50: 107.4 ms against 104.2 ms (-3.0 %).

Every capture reports trace_dropped, because the event buffer was 1024 events per thread. The summary numbers come from the totals and are complete.

An earlier alternated series on ea0a5cdfb4 + #17187 + #15569 gave 578.8 presents in 60 s on the base (6 runs) against 598.3 with this change (7 runs), +3.4 %.

Without #15569, on ea0a5cdfb4 + #17187, the change is neutral: 543, 540 and 502 presents in 60 s without it, against 540, 503 and 518 with it.

tools/trace_digest.py summary lines, base

s13-a1

seconds 150:60 from present 5941: 556 presents, frame p50 107.4 / p90 115.0 / p99 124.3 / max 143.4 ms, GPU busy 24.6 ms per present
NVIDIA GeForce RTX 5070, NVIDIA 616.64, Windows 10.0.26200, 3840x2160, commit 01bbd2855755, dropped: yes

{"commit":"01bbd2855755","dirty":false,"env":{"APS5_NET_DISCONNECTED":"1","APS5_PAD_INPUT_FILE":"<path>","APS5_TRACE_DIR":"<path>","APS5_TRACE_EVENTS":"1024","APS5_TRACE_SECONDS":"150:60","APS5_TRACE_SUMMARY_EVERY":"5"},"gpu":"NVIDIA GeForce RTX 5070","driver":"NVIDIA 616.64","os":"Windows 10.0.26200","cpu":"AMD Ryzen 5 5600 6-Core Processor","cpu_threads":12,"memory_mib":16311,"title_id":"PPSA03131","title":"Sniper Ghost Warrior Contracts 2","content_version":"01.004.000","resolution":"3840x2160","window":{"spec":"seconds 150:60","first_present":5941,"ms":60102.195},"presents":556,"frame_ms":{"p50":107.379,"p90":114.954,"p99":124.339,"max":143.417},"gpu_busy_ms_per_present":24.573,"worker_busy_pct":{"queue worker 0x0":93.322},"top_phases_ms_per_frame":{"Driver.Packet":100.837,"Driver.Packet.draw":59.928,"Driver.Draw":59.114,"Graphics.Draw":57.247,"Graphics.Draw.draw_and_resource_release":42.245,"Driver.Draw.shader_compile_and_link":28.031,"Driver.Packet.dispatch":23.181,"Driver.Dispatch":22.232},"owned_draw_counts":{"OwnedDraw.evicted_other":15296},"trace_dropped":true,"trace_dropped_threads":{"queue worker 0x0":{"events_full_after_s":0.023,"events_lost":2644730,"totals_full":false},"draw committer":{"events_full_after_s":0.042,"events_lost":1243483,"totals_full":false},"presenter":{"events_full_after_s":6.592,"events_lost":8064,"totals_full":false}},"trace":"aps5-trace-01bbd2855755-19636.json.gz"}

s13-a2

seconds 150:60 from present 5924: 556 presents, frame p50 106.6 / p90 116.6 / p99 136.2 / max 166.2 ms, GPU busy 26.7 ms per present
NVIDIA GeForce RTX 5070, NVIDIA 616.64, Windows 10.0.26200, 3840x2160, commit 01bbd2855755, dropped: yes

{"commit":"01bbd2855755","dirty":false,"env":{"APS5_NET_DISCONNECTED":"1","APS5_PAD_INPUT_FILE":"<path>","APS5_TRACE_DIR":"<path>","APS5_TRACE_EVENTS":"1024","APS5_TRACE_SECONDS":"150:60","APS5_TRACE_SUMMARY_EVERY":"5"},"gpu":"NVIDIA GeForce RTX 5070","driver":"NVIDIA 616.64","os":"Windows 10.0.26200","cpu":"AMD Ryzen 5 5600 6-Core Processor","cpu_threads":12,"memory_mib":16311,"title_id":"PPSA03131","title":"Sniper Ghost Warrior Contracts 2","content_version":"01.004.000","resolution":"3840x2160","window":{"spec":"seconds 150:60","first_present":5924,"ms":60101.699},"presents":556,"frame_ms":{"p50":106.588,"p90":116.568,"p99":136.208,"max":166.241},"gpu_busy_ms_per_present":26.666,"worker_busy_pct":{"queue worker 0x0":92.575},"top_phases_ms_per_frame":{"Driver.Packet":100.032,"Driver.Packet.draw":58.921,"Driver.Draw":58.153,"Graphics.Draw":56.488,"Graphics.Draw.draw_and_resource_release":41.593,"Driver.Draw.shader_compile_and_link":26.843,"Driver.Packet.dispatch":23.124,"Driver.Dispatch":22.115},"owned_draw_counts":{"OwnedDraw.evicted_other":13981},"trace_dropped":true,"trace_dropped_threads":{"queue worker 0x0":{"events_full_after_s":0.025,"events_lost":2523345,"totals_full":false},"draw committer":{"events_full_after_s":0.037,"events_lost":1219675,"totals_full":false},"presenter":{"events_full_after_s":6.956,"events_lost":7901,"totals_full":false}},"trace":"aps5-trace-01bbd2855755-31304.json.gz"}

s13-a3

seconds 150:60 from present 5952: 553 presents, frame p50 107.7 / p90 111.5 / p99 125.4 / max 247.8 ms, GPU busy 27.1 ms per present
NVIDIA GeForce RTX 5070, NVIDIA 616.64, Windows 10.0.26200, 3840x2160, commit 01bbd2855755, dropped: yes

{"commit":"01bbd2855755","dirty":false,"env":{"APS5_NET_DISCONNECTED":"1","APS5_PAD_INPUT_FILE":"<path>","APS5_TRACE_DIR":"<path>","APS5_TRACE_EVENTS":"1024","APS5_TRACE_SECONDS":"150:60","APS5_TRACE_SUMMARY_EVERY":"5"},"gpu":"NVIDIA GeForce RTX 5070","driver":"NVIDIA 616.64","os":"Windows 10.0.26200","cpu":"AMD Ryzen 5 5600 6-Core Processor","cpu_threads":12,"memory_mib":16311,"title_id":"PPSA03131","title":"Sniper Ghost Warrior Contracts 2","content_version":"01.004.000","resolution":"3840x2160","window":{"spec":"seconds 150:60","first_present":5952,"ms":60058.727},"presents":553,"frame_ms":{"p50":107.721,"p90":111.517,"p99":125.399,"max":247.809},"gpu_busy_ms_per_present":27.07,"worker_busy_pct":{"queue worker 0x0":91.247},"top_phases_ms_per_frame":{"Driver.Packet":99.063,"Driver.Packet.draw":59.356,"Driver.Draw":58.601,"Graphics.Draw":57.856,"Graphics.Draw.draw_and_resource_release":42.696,"Driver.Draw.shader_compile_and_link":26.839,"Driver.Draw.draw_enqueued":21.849,"Driver.Packet.dispatch":21.769},"owned_draw_counts":{"OwnedDraw.evicted_other":14100},"trace_dropped":true,"trace_dropped_threads":{"queue worker 0x0":{"events_full_after_s":0.023,"events_lost":2574218,"totals_full":false},"draw committer":{"events_full_after_s":0.036,"events_lost":1262470,"totals_full":false},"presenter":{"events_full_after_s":6.83,"events_lost":7915,"totals_full":false}},"trace":"aps5-trace-01bbd2855755-31104.json.gz"}

s13-a4

seconds 150:60 from present 6034: 566 presents, frame p50 105.8 / p90 109.4 / p99 116.3 / max 141.3 ms, GPU busy 25.9 ms per present
NVIDIA GeForce RTX 5070, NVIDIA 616.64, Windows 10.0.26200, 3840x2160, commit 01bbd2855755, dropped: yes

{"commit":"01bbd2855755","dirty":false,"env":{"APS5_NET_DISCONNECTED":"1","APS5_PAD_INPUT_FILE":"<path>","APS5_TRACE_DIR":"<path>","APS5_TRACE_EVENTS":"1024","APS5_TRACE_SECONDS":"150:60","APS5_TRACE_SUMMARY_EVERY":"5"},"gpu":"NVIDIA GeForce RTX 5070","driver":"NVIDIA 616.64","os":"Windows 10.0.26200","cpu":"AMD Ryzen 5 5600 6-Core Processor","cpu_threads":12,"memory_mib":16311,"title_id":"PPSA03131","title":"Sniper Ghost Warrior Contracts 2","content_version":"01.004.000","resolution":"3840x2160","window":{"spec":"seconds 150:60","first_present":6034,"ms":60048.392},"presents":566,"frame_ms":{"p50":105.837,"p90":109.439,"p99":116.258,"max":141.302},"gpu_busy_ms_per_present":25.912,"worker_busy_pct":{"queue worker 0x0":91.997},"top_phases_ms_per_frame":{"Driver.Packet":97.566,"Driver.Packet.draw":58.134,"Driver.Draw":57.425,"Graphics.Draw":56.985,"Graphics.Draw.draw_and_resource_release":42.047,"Driver.Draw.shader_compile_and_link":25.644,"Driver.Draw.draw_enqueued":22.183,"Driver.Packet.dispatch":21.64},"owned_draw_counts":{"OwnedDraw.evicted_other":15856},"trace_dropped":true,"trace_dropped_threads":{"queue worker 0x0":{"events_full_after_s":0.022,"events_lost":2609082,"totals_full":false},"draw committer":{"events_full_after_s":0.039,"events_lost":1278113,"totals_full":false},"presenter":{"events_full_after_s":7.058,"events_lost":7609,"totals_full":false}},"trace":"aps5-trace-01bbd2855755-31184.json.gz"}

s13-a5

seconds 150:60 from present 6005: 551 presents, frame p50 108.5 / p90 111.9 / p99 128.8 / max 165.0 ms, GPU busy 26.6 ms per present
NVIDIA GeForce RTX 5070, NVIDIA 616.64, Windows 10.0.26200, 3840x2160, commit 01bbd2855755, dropped: yes

{"commit":"01bbd2855755","dirty":false,"env":{"APS5_NET_DISCONNECTED":"1","APS5_PAD_INPUT_FILE":"<path>","APS5_TRACE_DIR":"<path>","APS5_TRACE_EVENTS":"1024","APS5_TRACE_SECONDS":"150:60","APS5_TRACE_SUMMARY_EVERY":"5"},"gpu":"NVIDIA GeForce RTX 5070","driver":"NVIDIA 616.64","os":"Windows 10.0.26200","cpu":"AMD Ryzen 5 5600 6-Core Processor","cpu_threads":12,"memory_mib":16311,"title_id":"PPSA03131","title":"Sniper Ghost Warrior Contracts 2","content_version":"01.004.000","resolution":"3840x2160","window":{"spec":"seconds 150:60","first_present":6005,"ms":60069.51},"presents":551,"frame_ms":{"p50":108.45,"p90":111.914,"p99":128.804,"max":165.003},"gpu_busy_ms_per_present":26.57,"worker_busy_pct":{"queue worker 0x0":91.336},"top_phases_ms_per_frame":{"Driver.Packet":99.535,"Driver.Packet.draw":59.077,"Driver.Draw":58.317,"Graphics.Draw":58.282,"Graphics.Draw.draw_and_resource_release":43.111,"Driver.Draw.shader_compile_and_link":24.818,"Driver.Draw.draw_enqueued":23.553,"Driver.Packet.dispatch":22.314},"owned_draw_counts":{"OwnedDraw.evicted_other":15154},"trace_dropped":true,"trace_dropped_threads":{"queue worker 0x0":{"events_full_after_s":0.024,"events_lost":2557590,"totals_full":false},"draw committer":{"events_full_after_s":0.036,"events_lost":1268850,"totals_full":false},"presenter":{"events_full_after_s":7.027,"events_lost":7858,"totals_full":false}},"trace":"aps5-trace-01bbd2855755-10060.json.gz"}
tools/trace_digest.py summary lines, this PR

s13-b1

seconds 150:60 from present 6170: 583 presents, frame p50 101.4 / p90 110.4 / p99 128.2 / max 139.7 ms, GPU busy 24.6 ms per present
NVIDIA GeForce RTX 5070, NVIDIA 616.64, Windows 10.0.26200, 3840x2160, commit 102c4050d89e, dropped: yes

{"commit":"102c4050d89e","dirty":false,"env":{"APS5_NET_DISCONNECTED":"1","APS5_PAD_INPUT_FILE":"<path>","APS5_TRACE_DIR":"<path>","APS5_TRACE_EVENTS":"1024","APS5_TRACE_SECONDS":"150:60","APS5_TRACE_SUMMARY_EVERY":"5"},"gpu":"NVIDIA GeForce RTX 5070","driver":"NVIDIA 616.64","os":"Windows 10.0.26200","cpu":"AMD Ryzen 5 5600 6-Core Processor","cpu_threads":12,"memory_mib":16311,"title_id":"PPSA03131","title":"Sniper Ghost Warrior Contracts 2","content_version":"01.004.000","resolution":"3840x2160","window":{"spec":"seconds 150:60","first_present":6170,"ms":60011.888},"presents":583,"frame_ms":{"p50":101.392,"p90":110.377,"p99":128.185,"max":139.685},"gpu_busy_ms_per_present":24.571,"worker_busy_pct":{"queue worker 0x0":96.795},"top_phases_ms_per_frame":{"Driver.Packet":99.596,"Driver.Packet.draw":61.176,"Driver.Draw":60.4,"Graphics.Draw":55.642,"Graphics.Draw.draw_and_resource_release":40.875,"Driver.Draw.shader_compile_and_link":37.314,"Driver.Packet.dispatch":22.257,"Driver.Dispatch":21.358},"owned_draw_counts":{"OwnedDraw.evicted_other":15062},"trace_dropped":true,"trace_dropped_threads":{"queue worker 0x0":{"events_full_after_s":0.017,"events_lost":2958162,"totals_full":false},"draw committer":{"events_full_after_s":0.034,"events_lost":1258106,"totals_full":false},"presenter":{"events_full_after_s":6.152,"events_lost":8630,"totals_full":false}},"trace":"aps5-trace-102c4050d89e-7596.json.gz"}

s13-b2

seconds 150:60 from present 6156: 556 presents, frame p50 105.9 / p90 113.3 / p99 154.0 / max 220.2 ms, GPU busy 27.0 ms per present
NVIDIA GeForce RTX 5070, NVIDIA 616.64, Windows 10.0.26200, 3840x2160, commit 102c4050d89e, dropped: yes

{"commit":"102c4050d89e","dirty":false,"env":{"APS5_NET_DISCONNECTED":"1","APS5_PAD_INPUT_FILE":"<path>","APS5_TRACE_DIR":"<path>","APS5_TRACE_EVENTS":"1024","APS5_TRACE_SECONDS":"150:60","APS5_TRACE_SUMMARY_EVERY":"5"},"gpu":"NVIDIA GeForce RTX 5070","driver":"NVIDIA 616.64","os":"Windows 10.0.26200","cpu":"AMD Ryzen 5 5600 6-Core Processor","cpu_threads":12,"memory_mib":16311,"title_id":"PPSA03131","title":"Sniper Ghost Warrior Contracts 2","content_version":"01.004.000","resolution":"3840x2160","window":{"spec":"seconds 150:60","first_present":6156,"ms":60005.182},"presents":556,"frame_ms":{"p50":105.92,"p90":113.305,"p99":154.033,"max":220.202},"gpu_busy_ms_per_present":27.019,"worker_busy_pct":{"queue worker 0x0":96.838},"top_phases_ms_per_frame":{"Driver.Packet":104.47,"Driver.Packet.draw":62.573,"Driver.Draw":61.793,"Graphics.Draw":59.389,"Graphics.Draw.draw_and_resource_release":43.759,"Driver.Draw.shader_compile_and_link":28.994,"Driver.Packet.dispatch":23.269,"Driver.Dispatch":22.294},"owned_draw_counts":{"OwnedDraw.evicted_other":14597},"trace_dropped":true,"trace_dropped_threads":{"queue worker 0x0":{"events_full_after_s":0.018,"events_lost":2680771,"totals_full":false},"draw committer":{"events_full_after_s":0.033,"events_lost":1269024,"totals_full":false},"presenter":{"events_full_after_s":6.552,"events_lost":8042,"totals_full":false}},"trace":"aps5-trace-102c4050d89e-22408.json.gz"}

s13-b3

seconds 150:60 from present 6146: 553 presents, frame p50 104.2 / p90 118.3 / p99 156.1 / max 751.6 ms, GPU busy 27.4 ms per present
NVIDIA GeForce RTX 5070, NVIDIA 616.64, Windows 10.0.26200, 3840x2160, commit 102c4050d89e, dropped: yes

{"commit":"102c4050d89e","dirty":false,"env":{"APS5_NET_DISCONNECTED":"1","APS5_PAD_INPUT_FILE":"<path>","APS5_TRACE_DIR":"<path>","APS5_TRACE_EVENTS":"1024","APS5_TRACE_SECONDS":"150:60","APS5_TRACE_SUMMARY_EVERY":"5"},"gpu":"NVIDIA GeForce RTX 5070","driver":"NVIDIA 616.64","os":"Windows 10.0.26200","cpu":"AMD Ryzen 5 5600 6-Core Processor","cpu_threads":12,"memory_mib":16311,"title_id":"PPSA03131","title":"Sniper Ghost Warrior Contracts 2","content_version":"01.004.000","resolution":"3840x2160","window":{"spec":"seconds 150:60","first_present":6146,"ms":60033.303},"presents":553,"frame_ms":{"p50":104.227,"p90":118.331,"p99":156.148,"max":751.62},"gpu_busy_ms_per_present":27.385,"worker_busy_pct":{"queue worker 0x0":95.938},"top_phases_ms_per_frame":{"Driver.Packet":104.111,"Driver.Packet.draw":61.714,"Driver.Draw":60.942,"Graphics.Draw":59.077,"Graphics.Draw.draw_and_resource_release":43.482,"Driver.Draw.shader_compile_and_link":27.185,"Driver.Packet.dispatch":23.486,"Driver.Draw.draw_enqueued":23.389},"owned_draw_counts":{"OwnedDraw.evicted_other":16415},"trace_dropped":true,"trace_dropped_threads":{"queue worker 0x0":{"events_full_after_s":0.018,"events_lost":2623138,"totals_full":false},"draw committer":{"events_full_after_s":0.033,"events_lost":1254923,"totals_full":false},"presenter":{"events_full_after_s":6.436,"events_lost":8018,"totals_full":false}},"trace":"aps5-trace-102c4050d89e-6620.json.gz"}

s13-b4

seconds 150:60 from present 6147: 582 presents, frame p50 102.9 / p90 106.2 / p99 118.3 / max 143.4 ms, GPU busy 26.7 ms per present
NVIDIA GeForce RTX 5070, NVIDIA 616.64, Windows 10.0.26200, 3840x2160, commit 102c4050d89e, dropped: yes

{"commit":"102c4050d89e","dirty":false,"env":{"APS5_NET_DISCONNECTED":"1","APS5_PAD_INPUT_FILE":"<path>","APS5_TRACE_DIR":"<path>","APS5_TRACE_EVENTS":"1024","APS5_TRACE_SECONDS":"150:60","APS5_TRACE_SUMMARY_EVERY":"5"},"gpu":"NVIDIA GeForce RTX 5070","driver":"NVIDIA 616.64","os":"Windows 10.0.26200","cpu":"AMD Ryzen 5 5600 6-Core Processor","cpu_threads":12,"memory_mib":16311,"title_id":"PPSA03131","title":"Sniper Ghost Warrior Contracts 2","content_version":"01.004.000","resolution":"3840x2160","window":{"spec":"seconds 150:60","first_present":6147,"ms":60044.109},"presents":582,"frame_ms":{"p50":102.903,"p90":106.182,"p99":118.274,"max":143.373},"gpu_busy_ms_per_present":26.678,"worker_busy_pct":{"queue worker 0x0":96.797},"top_phases_ms_per_frame":{"Driver.Packet":99.823,"Driver.Packet.draw":59.081,"Driver.Draw":58.298,"Graphics.Draw":57.487,"Graphics.Draw.draw_and_resource_release":42.398,"Driver.Draw.shader_compile_and_link":28.323,"Driver.Packet.dispatch":22.382,"Driver.Dispatch":21.439},"owned_draw_counts":{"OwnedDraw.evicted_other":14428},"trace_dropped":true,"trace_dropped_threads":{"queue worker 0x0":{"events_full_after_s":0.019,"events_lost":2774736,"totals_full":false},"draw committer":{"events_full_after_s":0.033,"events_lost":1309501,"totals_full":false},"presenter":{"events_full_after_s":6.395,"events_lost":8440,"totals_full":false}},"trace":"aps5-trace-102c4050d89e-28272.json.gz"}

s13-b5

seconds 150:60 from present 4116: 567 presents, frame p50 105.6 / p90 109.5 / p99 122.6 / max 165.9 ms, GPU busy 26.6 ms per present
NVIDIA GeForce RTX 5070, NVIDIA 616.64, Windows 10.0.26200, 3840x2160, commit 102c4050d89e, dropped: yes

{"commit":"102c4050d89e","dirty":false,"env":{"APS5_NET_DISCONNECTED":"1","APS5_PAD_INPUT_FILE":"<path>","APS5_TRACE_DIR":"<path>","APS5_TRACE_EVENTS":"1024","APS5_TRACE_SECONDS":"150:60","APS5_TRACE_SUMMARY_EVERY":"5"},"gpu":"NVIDIA GeForce RTX 5070","driver":"NVIDIA 616.64","os":"Windows 10.0.26200","cpu":"AMD Ryzen 5 5600 6-Core Processor","cpu_threads":12,"memory_mib":16311,"title_id":"PPSA03131","title":"Sniper Ghost Warrior Contracts 2","content_version":"01.004.000","resolution":"3840x2160","window":{"spec":"seconds 150:60","first_present":4116,"ms":60077.884},"presents":567,"frame_ms":{"p50":105.628,"p90":109.471,"p99":122.642,"max":165.882},"gpu_busy_ms_per_present":26.579,"worker_busy_pct":{"queue worker 0x0":96.914},"top_phases_ms_per_frame":{"Driver.Packet":102.65,"Driver.Packet.draw":61.213,"Driver.Draw":60.445,"Graphics.Draw":57.994,"Graphics.Draw.draw_and_resource_release":42.815,"Driver.Draw.shader_compile_and_link":30.942,"Driver.Packet.dispatch":23.663,"Driver.Dispatch":22.714},"owned_draw_counts":{"OwnedDraw.evicted_other":14790},"trace_dropped":true,"trace_dropped_threads":{"queue worker 0x0":{"events_full_after_s":0.02,"events_lost":2754387,"totals_full":false},"draw committer":{"events_full_after_s":0.033,"events_lost":1279521,"totals_full":false},"presenter":{"events_full_after_s":6.644,"events_lost":8212,"totals_full":false}},"trace":"aps5-trace-102c4050d89e-18108.json.gz"}

Launch: the CI Games intro was captured frame by frame with APS5_DUMP_FRAMES_EVERY=1 in three launches with this change. None showed black or missing frames. main shows intermittent fully black frames during that intro without this change, in 2 of 3 launches. That flicker is a separate issue that I did not investigate here. This PR does not claim to fix it.

Overlap: tools/pr_overlap.py fails closed, because 54 open PRs that share these files conflict with main. I compared their diffs by hand: none changes holdFlipBehindWorker, waitFlipWork, flipWorkOpen, flipWorkSerial or FlipHold. #17279 conflicts textually in four adjacent hunks: the FlipHold struct, the Driver.hpp declarations and fields, and releaseFlipHold next to finishFlipWork. The two changes are independent. #17279 orders the direct CPU flip hand-over, and this one changes when a GPU flip submission is queued. Whichever lands second keeps both sides.

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 5070, NVIDIA 616.64, Windows 11 Pro 26200
  • AI-assisted: yes
<!-- greyfinch-sync:boykopovar/AnyPS5:issue:5239080780 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/18072). Originally posted by [PrivacyOnion](https://github.com/PrivacyOnion) on 2026-11-10T09:38:25Z. --- ### What A queue-0 submission that carries a flip held the title in `Driver::holdFlipBehindWorker` until every earlier flip submission had run to its end and its recorded GPU work had completed and been reaped, and only then queued it. The worker had nothing to run during that wait. In a lossless trace of Sniper Ghost Warrior Contracts 2 (PPSA03131), the title waited about 9 ms a frame in `Recorder.WaitSerial` inside `waitFlipWork`, while the queue worker, the draw finisher and the draw committer were idle and only the GPU ran. The submission is now queued as soon as the worker has reached every earlier flip, which is the unchanged first stage of the hold. The title then waits for the earlier flip submissions' work as before, so `Submit` still returns only after that work completed and was reaped. Each flip submission carries a `FlipWork` entry linked to the one before it, so the title waits for exactly the earlier submissions even when they finish out of order. CPU flips and the `queue0AwaitsTitle` early exit are unchanged. `testFlipHoldQueuesHeldSubmission` in `tests/Flip.cpp` keeps the first flip submission's work open and submits a second flip. It checks four things: the title stays held, the second submission is already queued, it does not run ahead of the first, and the title is released once the first completes. Against `main` it fails with `a held flip submission was not queued while the title waited for the previous flip submission`. The bubble only costs time when the GPU tail at the flip is not already covered by CPU waits. Before #15569 the storage flush waits before the flip covered it, and this change was neutral. #15569, now on `main`, turns those waits into GPU ordering and exposes the bubble, which this change recovers. ### Tested NVIDIA GeForce RTX 5070, driver 616.64, Windows 11 Pro 26200, Release build (GCC 15, Ninja). **Vulkan validation** (Khronos validation 1.4.363 loaded), on `main` 164ac9b078 and on this head: ``` ANYPS5_REQUIRE_VULKAN=1 ANYPS5_NO_SHADER_CACHE=1 VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation ctest --test-dir build -R "^(agc_driver_flip|agc_driver_flip_compute|agc_driver_flip_stores_small_results|video_out_flip_.*)$" -V ``` | | Result | |---|---| | This head | 31 of 31 pass, 0 `VUID-` lines, no `was not found but was requested by env var VK_INSTANCE_LAYERS` | | main | 31 of 31 pass, 0 `VUID-` lines, no `was not found but was requested by env var VK_INSTANCE_LAYERS` | With `VK_LOADER_DEBUG=layer`, the loader log of `video_out_flip_present` shows `Insert instance layer "VK_LAYER_KHRONOS_validation"`. `agc_driver_flip` drives a test video output and creates no Vulkan instance. **Performance**, for the `perf` label: - Scene: PPSA03131 tutorial at 3840x2160, `APS5_TRACE_SECONDS=150:60`, the same scripted input in every run, on the same machine. - Runs alternate between the two builds. - Base: `main` f439f7f3a0 + #17187 + #15569. #17187 is needed to reach the tutorial on `main`, which otherwise stops on `dual-source blending with a MIN or MAX operation is unsupported`. #15569 is the change that exposes the bubble. It was merged into `main` as 07ae6afcee after these runs. - B is the same base plus this commit. | run | build | presents in 60 s | p50 | p90 | p99 | GPU busy per present | |---|---|---|---|---|---|---| | s13-a1 | base | 556 | 107.4 ms | 115.0 ms | 124.3 ms | 24.6 ms | | s13-a2 | base | 556 | 106.6 ms | 116.6 ms | 136.2 ms | 26.7 ms | | s13-a3 | base | 553 | 107.7 ms | 111.5 ms | 125.4 ms | 27.1 ms | | s13-a4 | base | 566 | 105.8 ms | 109.4 ms | 116.3 ms | 25.9 ms | | s13-a5 | base | 551 | 108.5 ms | 111.9 ms | 128.8 ms | 26.6 ms | | s13-b1 | this PR | 583 | 101.4 ms | 110.4 ms | 128.2 ms | 24.6 ms | | s13-b2 | this PR | 556 | 105.9 ms | 113.3 ms | 154.0 ms | 27.0 ms | | s13-b3 | this PR | 553 | 104.2 ms | 118.3 ms | 156.1 ms | 27.4 ms | | s13-b4 | this PR | 582 | 102.9 ms | 106.2 ms | 118.3 ms | 26.7 ms | | s13-b5 | this PR | 567 | 105.6 ms | 109.5 ms | 122.6 ms | 26.6 ms | Mean presents in 60 s: 556.4 on the base, 568.2 with this PR (+2.1 %). Median p50: 107.4 ms against 104.2 ms (-3.0 %). Every capture reports `trace_dropped`, because the event buffer was 1024 events per thread. The summary numbers come from the totals and are complete. An earlier alternated series on ea0a5cdfb4 + #17187 + #15569 gave 578.8 presents in 60 s on the base (6 runs) against 598.3 with this change (7 runs), +3.4 %. Without #15569, on ea0a5cdfb4 + #17187, the change is neutral: 543, 540 and 502 presents in 60 s without it, against 540, 503 and 518 with it. <details><summary>tools/trace_digest.py summary lines, base</summary> **s13-a1** **seconds 150:60** from present 5941: 556 presents, frame p50 107.4 / p90 115.0 / p99 124.3 / max 143.4 ms, GPU busy 24.6 ms per present NVIDIA GeForce RTX 5070, NVIDIA 616.64, Windows 10.0.26200, 3840x2160, commit 01bbd2855755, dropped: yes ```json {"commit":"01bbd2855755","dirty":false,"env":{"APS5_NET_DISCONNECTED":"1","APS5_PAD_INPUT_FILE":"<path>","APS5_TRACE_DIR":"<path>","APS5_TRACE_EVENTS":"1024","APS5_TRACE_SECONDS":"150:60","APS5_TRACE_SUMMARY_EVERY":"5"},"gpu":"NVIDIA GeForce RTX 5070","driver":"NVIDIA 616.64","os":"Windows 10.0.26200","cpu":"AMD Ryzen 5 5600 6-Core Processor","cpu_threads":12,"memory_mib":16311,"title_id":"PPSA03131","title":"Sniper Ghost Warrior Contracts 2","content_version":"01.004.000","resolution":"3840x2160","window":{"spec":"seconds 150:60","first_present":5941,"ms":60102.195},"presents":556,"frame_ms":{"p50":107.379,"p90":114.954,"p99":124.339,"max":143.417},"gpu_busy_ms_per_present":24.573,"worker_busy_pct":{"queue worker 0x0":93.322},"top_phases_ms_per_frame":{"Driver.Packet":100.837,"Driver.Packet.draw":59.928,"Driver.Draw":59.114,"Graphics.Draw":57.247,"Graphics.Draw.draw_and_resource_release":42.245,"Driver.Draw.shader_compile_and_link":28.031,"Driver.Packet.dispatch":23.181,"Driver.Dispatch":22.232},"owned_draw_counts":{"OwnedDraw.evicted_other":15296},"trace_dropped":true,"trace_dropped_threads":{"queue worker 0x0":{"events_full_after_s":0.023,"events_lost":2644730,"totals_full":false},"draw committer":{"events_full_after_s":0.042,"events_lost":1243483,"totals_full":false},"presenter":{"events_full_after_s":6.592,"events_lost":8064,"totals_full":false}},"trace":"aps5-trace-01bbd2855755-19636.json.gz"} ``` **s13-a2** **seconds 150:60** from present 5924: 556 presents, frame p50 106.6 / p90 116.6 / p99 136.2 / max 166.2 ms, GPU busy 26.7 ms per present NVIDIA GeForce RTX 5070, NVIDIA 616.64, Windows 10.0.26200, 3840x2160, commit 01bbd2855755, dropped: yes ```json {"commit":"01bbd2855755","dirty":false,"env":{"APS5_NET_DISCONNECTED":"1","APS5_PAD_INPUT_FILE":"<path>","APS5_TRACE_DIR":"<path>","APS5_TRACE_EVENTS":"1024","APS5_TRACE_SECONDS":"150:60","APS5_TRACE_SUMMARY_EVERY":"5"},"gpu":"NVIDIA GeForce RTX 5070","driver":"NVIDIA 616.64","os":"Windows 10.0.26200","cpu":"AMD Ryzen 5 5600 6-Core Processor","cpu_threads":12,"memory_mib":16311,"title_id":"PPSA03131","title":"Sniper Ghost Warrior Contracts 2","content_version":"01.004.000","resolution":"3840x2160","window":{"spec":"seconds 150:60","first_present":5924,"ms":60101.699},"presents":556,"frame_ms":{"p50":106.588,"p90":116.568,"p99":136.208,"max":166.241},"gpu_busy_ms_per_present":26.666,"worker_busy_pct":{"queue worker 0x0":92.575},"top_phases_ms_per_frame":{"Driver.Packet":100.032,"Driver.Packet.draw":58.921,"Driver.Draw":58.153,"Graphics.Draw":56.488,"Graphics.Draw.draw_and_resource_release":41.593,"Driver.Draw.shader_compile_and_link":26.843,"Driver.Packet.dispatch":23.124,"Driver.Dispatch":22.115},"owned_draw_counts":{"OwnedDraw.evicted_other":13981},"trace_dropped":true,"trace_dropped_threads":{"queue worker 0x0":{"events_full_after_s":0.025,"events_lost":2523345,"totals_full":false},"draw committer":{"events_full_after_s":0.037,"events_lost":1219675,"totals_full":false},"presenter":{"events_full_after_s":6.956,"events_lost":7901,"totals_full":false}},"trace":"aps5-trace-01bbd2855755-31304.json.gz"} ``` **s13-a3** **seconds 150:60** from present 5952: 553 presents, frame p50 107.7 / p90 111.5 / p99 125.4 / max 247.8 ms, GPU busy 27.1 ms per present NVIDIA GeForce RTX 5070, NVIDIA 616.64, Windows 10.0.26200, 3840x2160, commit 01bbd2855755, dropped: yes ```json {"commit":"01bbd2855755","dirty":false,"env":{"APS5_NET_DISCONNECTED":"1","APS5_PAD_INPUT_FILE":"<path>","APS5_TRACE_DIR":"<path>","APS5_TRACE_EVENTS":"1024","APS5_TRACE_SECONDS":"150:60","APS5_TRACE_SUMMARY_EVERY":"5"},"gpu":"NVIDIA GeForce RTX 5070","driver":"NVIDIA 616.64","os":"Windows 10.0.26200","cpu":"AMD Ryzen 5 5600 6-Core Processor","cpu_threads":12,"memory_mib":16311,"title_id":"PPSA03131","title":"Sniper Ghost Warrior Contracts 2","content_version":"01.004.000","resolution":"3840x2160","window":{"spec":"seconds 150:60","first_present":5952,"ms":60058.727},"presents":553,"frame_ms":{"p50":107.721,"p90":111.517,"p99":125.399,"max":247.809},"gpu_busy_ms_per_present":27.07,"worker_busy_pct":{"queue worker 0x0":91.247},"top_phases_ms_per_frame":{"Driver.Packet":99.063,"Driver.Packet.draw":59.356,"Driver.Draw":58.601,"Graphics.Draw":57.856,"Graphics.Draw.draw_and_resource_release":42.696,"Driver.Draw.shader_compile_and_link":26.839,"Driver.Draw.draw_enqueued":21.849,"Driver.Packet.dispatch":21.769},"owned_draw_counts":{"OwnedDraw.evicted_other":14100},"trace_dropped":true,"trace_dropped_threads":{"queue worker 0x0":{"events_full_after_s":0.023,"events_lost":2574218,"totals_full":false},"draw committer":{"events_full_after_s":0.036,"events_lost":1262470,"totals_full":false},"presenter":{"events_full_after_s":6.83,"events_lost":7915,"totals_full":false}},"trace":"aps5-trace-01bbd2855755-31104.json.gz"} ``` **s13-a4** **seconds 150:60** from present 6034: 566 presents, frame p50 105.8 / p90 109.4 / p99 116.3 / max 141.3 ms, GPU busy 25.9 ms per present NVIDIA GeForce RTX 5070, NVIDIA 616.64, Windows 10.0.26200, 3840x2160, commit 01bbd2855755, dropped: yes ```json {"commit":"01bbd2855755","dirty":false,"env":{"APS5_NET_DISCONNECTED":"1","APS5_PAD_INPUT_FILE":"<path>","APS5_TRACE_DIR":"<path>","APS5_TRACE_EVENTS":"1024","APS5_TRACE_SECONDS":"150:60","APS5_TRACE_SUMMARY_EVERY":"5"},"gpu":"NVIDIA GeForce RTX 5070","driver":"NVIDIA 616.64","os":"Windows 10.0.26200","cpu":"AMD Ryzen 5 5600 6-Core Processor","cpu_threads":12,"memory_mib":16311,"title_id":"PPSA03131","title":"Sniper Ghost Warrior Contracts 2","content_version":"01.004.000","resolution":"3840x2160","window":{"spec":"seconds 150:60","first_present":6034,"ms":60048.392},"presents":566,"frame_ms":{"p50":105.837,"p90":109.439,"p99":116.258,"max":141.302},"gpu_busy_ms_per_present":25.912,"worker_busy_pct":{"queue worker 0x0":91.997},"top_phases_ms_per_frame":{"Driver.Packet":97.566,"Driver.Packet.draw":58.134,"Driver.Draw":57.425,"Graphics.Draw":56.985,"Graphics.Draw.draw_and_resource_release":42.047,"Driver.Draw.shader_compile_and_link":25.644,"Driver.Draw.draw_enqueued":22.183,"Driver.Packet.dispatch":21.64},"owned_draw_counts":{"OwnedDraw.evicted_other":15856},"trace_dropped":true,"trace_dropped_threads":{"queue worker 0x0":{"events_full_after_s":0.022,"events_lost":2609082,"totals_full":false},"draw committer":{"events_full_after_s":0.039,"events_lost":1278113,"totals_full":false},"presenter":{"events_full_after_s":7.058,"events_lost":7609,"totals_full":false}},"trace":"aps5-trace-01bbd2855755-31184.json.gz"} ``` **s13-a5** **seconds 150:60** from present 6005: 551 presents, frame p50 108.5 / p90 111.9 / p99 128.8 / max 165.0 ms, GPU busy 26.6 ms per present NVIDIA GeForce RTX 5070, NVIDIA 616.64, Windows 10.0.26200, 3840x2160, commit 01bbd2855755, dropped: yes ```json {"commit":"01bbd2855755","dirty":false,"env":{"APS5_NET_DISCONNECTED":"1","APS5_PAD_INPUT_FILE":"<path>","APS5_TRACE_DIR":"<path>","APS5_TRACE_EVENTS":"1024","APS5_TRACE_SECONDS":"150:60","APS5_TRACE_SUMMARY_EVERY":"5"},"gpu":"NVIDIA GeForce RTX 5070","driver":"NVIDIA 616.64","os":"Windows 10.0.26200","cpu":"AMD Ryzen 5 5600 6-Core Processor","cpu_threads":12,"memory_mib":16311,"title_id":"PPSA03131","title":"Sniper Ghost Warrior Contracts 2","content_version":"01.004.000","resolution":"3840x2160","window":{"spec":"seconds 150:60","first_present":6005,"ms":60069.51},"presents":551,"frame_ms":{"p50":108.45,"p90":111.914,"p99":128.804,"max":165.003},"gpu_busy_ms_per_present":26.57,"worker_busy_pct":{"queue worker 0x0":91.336},"top_phases_ms_per_frame":{"Driver.Packet":99.535,"Driver.Packet.draw":59.077,"Driver.Draw":58.317,"Graphics.Draw":58.282,"Graphics.Draw.draw_and_resource_release":43.111,"Driver.Draw.shader_compile_and_link":24.818,"Driver.Draw.draw_enqueued":23.553,"Driver.Packet.dispatch":22.314},"owned_draw_counts":{"OwnedDraw.evicted_other":15154},"trace_dropped":true,"trace_dropped_threads":{"queue worker 0x0":{"events_full_after_s":0.024,"events_lost":2557590,"totals_full":false},"draw committer":{"events_full_after_s":0.036,"events_lost":1268850,"totals_full":false},"presenter":{"events_full_after_s":7.027,"events_lost":7858,"totals_full":false}},"trace":"aps5-trace-01bbd2855755-10060.json.gz"} ``` </details> <details><summary>tools/trace_digest.py summary lines, this PR</summary> **s13-b1** **seconds 150:60** from present 6170: 583 presents, frame p50 101.4 / p90 110.4 / p99 128.2 / max 139.7 ms, GPU busy 24.6 ms per present NVIDIA GeForce RTX 5070, NVIDIA 616.64, Windows 10.0.26200, 3840x2160, commit 102c4050d89e, dropped: yes ```json {"commit":"102c4050d89e","dirty":false,"env":{"APS5_NET_DISCONNECTED":"1","APS5_PAD_INPUT_FILE":"<path>","APS5_TRACE_DIR":"<path>","APS5_TRACE_EVENTS":"1024","APS5_TRACE_SECONDS":"150:60","APS5_TRACE_SUMMARY_EVERY":"5"},"gpu":"NVIDIA GeForce RTX 5070","driver":"NVIDIA 616.64","os":"Windows 10.0.26200","cpu":"AMD Ryzen 5 5600 6-Core Processor","cpu_threads":12,"memory_mib":16311,"title_id":"PPSA03131","title":"Sniper Ghost Warrior Contracts 2","content_version":"01.004.000","resolution":"3840x2160","window":{"spec":"seconds 150:60","first_present":6170,"ms":60011.888},"presents":583,"frame_ms":{"p50":101.392,"p90":110.377,"p99":128.185,"max":139.685},"gpu_busy_ms_per_present":24.571,"worker_busy_pct":{"queue worker 0x0":96.795},"top_phases_ms_per_frame":{"Driver.Packet":99.596,"Driver.Packet.draw":61.176,"Driver.Draw":60.4,"Graphics.Draw":55.642,"Graphics.Draw.draw_and_resource_release":40.875,"Driver.Draw.shader_compile_and_link":37.314,"Driver.Packet.dispatch":22.257,"Driver.Dispatch":21.358},"owned_draw_counts":{"OwnedDraw.evicted_other":15062},"trace_dropped":true,"trace_dropped_threads":{"queue worker 0x0":{"events_full_after_s":0.017,"events_lost":2958162,"totals_full":false},"draw committer":{"events_full_after_s":0.034,"events_lost":1258106,"totals_full":false},"presenter":{"events_full_after_s":6.152,"events_lost":8630,"totals_full":false}},"trace":"aps5-trace-102c4050d89e-7596.json.gz"} ``` **s13-b2** **seconds 150:60** from present 6156: 556 presents, frame p50 105.9 / p90 113.3 / p99 154.0 / max 220.2 ms, GPU busy 27.0 ms per present NVIDIA GeForce RTX 5070, NVIDIA 616.64, Windows 10.0.26200, 3840x2160, commit 102c4050d89e, dropped: yes ```json {"commit":"102c4050d89e","dirty":false,"env":{"APS5_NET_DISCONNECTED":"1","APS5_PAD_INPUT_FILE":"<path>","APS5_TRACE_DIR":"<path>","APS5_TRACE_EVENTS":"1024","APS5_TRACE_SECONDS":"150:60","APS5_TRACE_SUMMARY_EVERY":"5"},"gpu":"NVIDIA GeForce RTX 5070","driver":"NVIDIA 616.64","os":"Windows 10.0.26200","cpu":"AMD Ryzen 5 5600 6-Core Processor","cpu_threads":12,"memory_mib":16311,"title_id":"PPSA03131","title":"Sniper Ghost Warrior Contracts 2","content_version":"01.004.000","resolution":"3840x2160","window":{"spec":"seconds 150:60","first_present":6156,"ms":60005.182},"presents":556,"frame_ms":{"p50":105.92,"p90":113.305,"p99":154.033,"max":220.202},"gpu_busy_ms_per_present":27.019,"worker_busy_pct":{"queue worker 0x0":96.838},"top_phases_ms_per_frame":{"Driver.Packet":104.47,"Driver.Packet.draw":62.573,"Driver.Draw":61.793,"Graphics.Draw":59.389,"Graphics.Draw.draw_and_resource_release":43.759,"Driver.Draw.shader_compile_and_link":28.994,"Driver.Packet.dispatch":23.269,"Driver.Dispatch":22.294},"owned_draw_counts":{"OwnedDraw.evicted_other":14597},"trace_dropped":true,"trace_dropped_threads":{"queue worker 0x0":{"events_full_after_s":0.018,"events_lost":2680771,"totals_full":false},"draw committer":{"events_full_after_s":0.033,"events_lost":1269024,"totals_full":false},"presenter":{"events_full_after_s":6.552,"events_lost":8042,"totals_full":false}},"trace":"aps5-trace-102c4050d89e-22408.json.gz"} ``` **s13-b3** **seconds 150:60** from present 6146: 553 presents, frame p50 104.2 / p90 118.3 / p99 156.1 / max 751.6 ms, GPU busy 27.4 ms per present NVIDIA GeForce RTX 5070, NVIDIA 616.64, Windows 10.0.26200, 3840x2160, commit 102c4050d89e, dropped: yes ```json {"commit":"102c4050d89e","dirty":false,"env":{"APS5_NET_DISCONNECTED":"1","APS5_PAD_INPUT_FILE":"<path>","APS5_TRACE_DIR":"<path>","APS5_TRACE_EVENTS":"1024","APS5_TRACE_SECONDS":"150:60","APS5_TRACE_SUMMARY_EVERY":"5"},"gpu":"NVIDIA GeForce RTX 5070","driver":"NVIDIA 616.64","os":"Windows 10.0.26200","cpu":"AMD Ryzen 5 5600 6-Core Processor","cpu_threads":12,"memory_mib":16311,"title_id":"PPSA03131","title":"Sniper Ghost Warrior Contracts 2","content_version":"01.004.000","resolution":"3840x2160","window":{"spec":"seconds 150:60","first_present":6146,"ms":60033.303},"presents":553,"frame_ms":{"p50":104.227,"p90":118.331,"p99":156.148,"max":751.62},"gpu_busy_ms_per_present":27.385,"worker_busy_pct":{"queue worker 0x0":95.938},"top_phases_ms_per_frame":{"Driver.Packet":104.111,"Driver.Packet.draw":61.714,"Driver.Draw":60.942,"Graphics.Draw":59.077,"Graphics.Draw.draw_and_resource_release":43.482,"Driver.Draw.shader_compile_and_link":27.185,"Driver.Packet.dispatch":23.486,"Driver.Draw.draw_enqueued":23.389},"owned_draw_counts":{"OwnedDraw.evicted_other":16415},"trace_dropped":true,"trace_dropped_threads":{"queue worker 0x0":{"events_full_after_s":0.018,"events_lost":2623138,"totals_full":false},"draw committer":{"events_full_after_s":0.033,"events_lost":1254923,"totals_full":false},"presenter":{"events_full_after_s":6.436,"events_lost":8018,"totals_full":false}},"trace":"aps5-trace-102c4050d89e-6620.json.gz"} ``` **s13-b4** **seconds 150:60** from present 6147: 582 presents, frame p50 102.9 / p90 106.2 / p99 118.3 / max 143.4 ms, GPU busy 26.7 ms per present NVIDIA GeForce RTX 5070, NVIDIA 616.64, Windows 10.0.26200, 3840x2160, commit 102c4050d89e, dropped: yes ```json {"commit":"102c4050d89e","dirty":false,"env":{"APS5_NET_DISCONNECTED":"1","APS5_PAD_INPUT_FILE":"<path>","APS5_TRACE_DIR":"<path>","APS5_TRACE_EVENTS":"1024","APS5_TRACE_SECONDS":"150:60","APS5_TRACE_SUMMARY_EVERY":"5"},"gpu":"NVIDIA GeForce RTX 5070","driver":"NVIDIA 616.64","os":"Windows 10.0.26200","cpu":"AMD Ryzen 5 5600 6-Core Processor","cpu_threads":12,"memory_mib":16311,"title_id":"PPSA03131","title":"Sniper Ghost Warrior Contracts 2","content_version":"01.004.000","resolution":"3840x2160","window":{"spec":"seconds 150:60","first_present":6147,"ms":60044.109},"presents":582,"frame_ms":{"p50":102.903,"p90":106.182,"p99":118.274,"max":143.373},"gpu_busy_ms_per_present":26.678,"worker_busy_pct":{"queue worker 0x0":96.797},"top_phases_ms_per_frame":{"Driver.Packet":99.823,"Driver.Packet.draw":59.081,"Driver.Draw":58.298,"Graphics.Draw":57.487,"Graphics.Draw.draw_and_resource_release":42.398,"Driver.Draw.shader_compile_and_link":28.323,"Driver.Packet.dispatch":22.382,"Driver.Dispatch":21.439},"owned_draw_counts":{"OwnedDraw.evicted_other":14428},"trace_dropped":true,"trace_dropped_threads":{"queue worker 0x0":{"events_full_after_s":0.019,"events_lost":2774736,"totals_full":false},"draw committer":{"events_full_after_s":0.033,"events_lost":1309501,"totals_full":false},"presenter":{"events_full_after_s":6.395,"events_lost":8440,"totals_full":false}},"trace":"aps5-trace-102c4050d89e-28272.json.gz"} ``` **s13-b5** **seconds 150:60** from present 4116: 567 presents, frame p50 105.6 / p90 109.5 / p99 122.6 / max 165.9 ms, GPU busy 26.6 ms per present NVIDIA GeForce RTX 5070, NVIDIA 616.64, Windows 10.0.26200, 3840x2160, commit 102c4050d89e, dropped: yes ```json {"commit":"102c4050d89e","dirty":false,"env":{"APS5_NET_DISCONNECTED":"1","APS5_PAD_INPUT_FILE":"<path>","APS5_TRACE_DIR":"<path>","APS5_TRACE_EVENTS":"1024","APS5_TRACE_SECONDS":"150:60","APS5_TRACE_SUMMARY_EVERY":"5"},"gpu":"NVIDIA GeForce RTX 5070","driver":"NVIDIA 616.64","os":"Windows 10.0.26200","cpu":"AMD Ryzen 5 5600 6-Core Processor","cpu_threads":12,"memory_mib":16311,"title_id":"PPSA03131","title":"Sniper Ghost Warrior Contracts 2","content_version":"01.004.000","resolution":"3840x2160","window":{"spec":"seconds 150:60","first_present":4116,"ms":60077.884},"presents":567,"frame_ms":{"p50":105.628,"p90":109.471,"p99":122.642,"max":165.882},"gpu_busy_ms_per_present":26.579,"worker_busy_pct":{"queue worker 0x0":96.914},"top_phases_ms_per_frame":{"Driver.Packet":102.65,"Driver.Packet.draw":61.213,"Driver.Draw":60.445,"Graphics.Draw":57.994,"Graphics.Draw.draw_and_resource_release":42.815,"Driver.Draw.shader_compile_and_link":30.942,"Driver.Packet.dispatch":23.663,"Driver.Dispatch":22.714},"owned_draw_counts":{"OwnedDraw.evicted_other":14790},"trace_dropped":true,"trace_dropped_threads":{"queue worker 0x0":{"events_full_after_s":0.02,"events_lost":2754387,"totals_full":false},"draw committer":{"events_full_after_s":0.033,"events_lost":1279521,"totals_full":false},"presenter":{"events_full_after_s":6.644,"events_lost":8212,"totals_full":false}},"trace":"aps5-trace-102c4050d89e-18108.json.gz"} ``` </details> **Launch:** the CI Games intro was captured frame by frame with `APS5_DUMP_FRAMES_EVERY=1` in three launches with this change. None showed black or missing frames. `main` shows intermittent fully black frames during that intro without this change, in 2 of 3 launches. That flicker is a separate issue that I did not investigate here. This PR does not claim to fix it. **Overlap:** `tools/pr_overlap.py` fails closed, because 54 open PRs that share these files conflict with `main`. I compared their diffs by hand: none changes `holdFlipBehindWorker`, `waitFlipWork`, `flipWorkOpen`, `flipWorkSerial` or `FlipHold`. #17279 conflicts textually in four adjacent hunks: the `FlipHold` struct, the `Driver.hpp` declarations and fields, and `releaseFlipHold` next to `finishFlipWork`. The two changes are independent. #17279 orders the direct CPU flip hand-over, and this one changes when a GPU flip submission is queued. Whichever lands second keeps both sides. ### 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 5070, NVIDIA 616.64, Windows 11 Pro 26200 - [x] AI-assisted: yes
Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
boykopovar/AnyPS5!18072
No description provided.