Skip to content

perf(agc): build a pipelined draw's resource-cache key before it reaches the committer - #10678

Open
WallisSkill wants to merge 3 commits into
boykopovar:mainfrom
WallisSkill:perf/agc-early-draw-key
Open

WallisSkill wants to merge 3 commits into
boykopovar:mainfrom
WallisSkill:perf/agc-early-draw-key

Conversation

@WallisSkill

@WallisSkill WallisSkill commented Oct 24, 2026 •

Copy link
Copy Markdown
Contributor

What

The draw finisher now builds the resource-cache key of a pipelined draw it finishes (DrawResourceKey, the same inputs resolveDrawResources uses) before it queues the commit, and Driver::commitDraw passes it down through VulkanDevice::Draw and Graphics::Draw. resolveDrawResources uses the key when it was made for the committing device (the key's first words hold the device handle) and builds its own otherwise, as before. The committer runs every draw under the GPU mutex and is the stage the draws wait for in this scene, while the finisher has time to spare. A draw that queue worker 0 finishes itself (no finisher hand-off) leaves the key to the committer as before, so the change never adds work to the worker (head 7b0b45a, after the Planet of Lana measurement in the review).

APS5_NO_EARLY_DRAW_KEY keeps the key on the committer. APS5_VERIFY_EARLY_DRAW_KEY rebuilds it on the committer and requires both keys to be equal; a first-room run and the AGC suite below ran with it and found no difference.

Tested

Windows 11 Pro 10.0.26200, AMD Ryzen 7 9800X3D, NVIDIA GeForce RTX 5070 (driver 616.92), MinGW Release build.

Update, main cccdaa2 (head f32df51): re-measured with the same setup, three interleaved rounds, the arms differing only in libSceAgcDriver.prx: frame p50 52.7 / 53.0 / 52.3 ms on main and 52.8 / 52.3 / 53.3 ms with this change, so the frame-time gain below does not reproduce on current main. The committer still spends about 4.5 ms less per frame in Graphics.Draw (43.4-44.0 against 38.8-39.4 ms) and the finisher about 2 ms more, but queue worker 0 is now the limit (96 % busy in every capture of both arms). The 38 AGC tests pass on this head in plain and pipelined mode with APS5_VERIFY_EARLY_DRAW_KEY=1 (76 of 76), and the validation comparison against cccdaa2 is unchanged (VUID-VkDeviceCreateInfo-pNext-pNext only, 138 on each side, identical per test). The measurements below are from the earlier bases.

Performance: Graveyard Keeper 2 (PPSA35943), the first dungeon room after New game, 1920x1080 window, captured with APS5_TRACE_SECONDS=120:10 and APS5_DRAW_PIPELINE=1 APS5_PIPELINED_DRAWS=256 APS5_PIPELINE_DISPATCH=1 APS5_MIMALLOC=1, no other APS5_TRACE_* or APS5_PROFILE_* switch and no log redirection. Base is main 3fcb5e4; the change was built at 0039a4195, which differs from this branch's head only in the commit message. Each build ran the scene once to warm the caches, then the captures below ran back to back on the same machine; the input came from APS5_PAD_INPUT_FILE (the libScePad command file), so the window was not focused. The trace buffer dropped events at its default size in every capture (dropped: yes); the frame times come from the presents.

  • base-1: seconds 120:10 from present 2344: 148 presents, frame p50 67.3 / p90 72.2 / p99 77.4 / max 78.1 ms, GPU busy 8.9 ms per present
  • base-2: seconds 120:10 from present 2352: 145 presents, frame p50 68.8 / p90 73.7 / p99 77.9 / max 78.2 ms, GPU busy 8.8 ms per present
  • base-3: seconds 120:10 from present 2358: 146 presents, frame p50 68.1 / p90 75.0 / p99 83.9 / max 86.4 ms, GPU busy 8.8 ms per present
  • pr4-1: seconds 120:10 from present 2459: 159 presents, frame p50 62.7 / p90 67.2 / p99 73.6 / max 82.0 ms, GPU busy 9.0 ms per present
  • pr4-3: seconds 120:10 from present 2485: 160 presents, frame p50 62.5 / p90 66.0 / p99 69.6 / max 70.7 ms, GPU busy 8.9 ms per present

Summary lines (main, then this change):

{"commit":"3fcb5e4d7649","dirty":null,"env":{"APS5_DRAW_PIPELINE":"1","APS5_MIMALLOC":"1","APS5_PAD_INPUT_FILE":"<path>","APS5_PIPELINED_DRAWS":"256","APS5_PIPELINE_DISPATCH":"1","APS5_TRACE_DIR":"<path>","APS5_TRACE_SECONDS":"120:10"},"gpu":"NVIDIA GeForce RTX 5070","driver":"NVIDIA 616.92","os":"Windows 10.0.26200","cpu":"AMD Ryzen 7 9800X3D 8-Core Processor","cpu_threads":16,"memory_mib":31908,"title_id":"PPSA35943","title":"Graveyard Keeper 2","content_version":"01.001.000","resolution":"1920x1080","window":{"spec":"seconds 120:10","first_present":2344,"ms":10047.517},"presents":148,"frame_ms":{"p50":67.270,"p90":72.242,"p99":77.354,"max":78.058},"gpu_busy_ms_per_present":8.861,"worker_busy_pct":{"queue worker 0x0":96.438},"top_phases_ms_per_frame":{"Driver.Packet":65.406,"Graphics.Draw":57.908,"Graphics.Draw.draw_and_resource_release":49.344,"Driver.Packet.draw":42.270,"Driver.Draw":41.904,"Driver.DrawFinish":35.172,"Driver.Draw.prepare":32.781,"Driver.DrawFinish.shader_compile_and_link":31.427},"trace_dropped":true,"trace_dropped_threads":{"queue worker 0x0":{"events_full_after_s":6.419,"events_lost":154720,"totals_full":false}},"trace":"aps5-trace-3fcb5e4d7649-48276.json.gz"}
{"commit":"0039a41950a1","dirty":null,"env":{"APS5_DRAW_PIPELINE":"1","APS5_MIMALLOC":"1","APS5_PAD_INPUT_FILE":"<path>","APS5_PIPELINED_DRAWS":"256","APS5_PIPELINE_DISPATCH":"1","APS5_TRACE_DIR":"<path>","APS5_TRACE_SECONDS":"120:10"},"gpu":"NVIDIA GeForce RTX 5070","driver":"NVIDIA 616.92","os":"Windows 10.0.26200","cpu":"AMD Ryzen 7 9800X3D 8-Core Processor","cpu_threads":16,"memory_mib":31908,"title_id":"PPSA35943","title":"Graveyard Keeper 2","content_version":"01.001.000","resolution":"1920x1080","window":{"spec":"seconds 120:10","first_present":2459,"ms":10006.312},"presents":159,"frame_ms":{"p50":62.738,"p90":67.191,"p99":73.602,"max":82.012},"gpu_busy_ms_per_present":8.973,"worker_busy_pct":{"queue worker 0x0":96.247},"top_phases_ms_per_frame":{"Driver.Packet":60.504,"Graphics.Draw":51.029,"Graphics.Draw.draw_and_resource_release":42.879,"Driver.Packet.draw":42.139,"Driver.Draw":41.770,"Driver.DrawFinish":36.897,"Driver.Draw.prepare":34.393,"Driver.DrawFinish.shader_compile_and_link":30.273},"trace_dropped":true,"trace_dropped_threads":{"queue worker 0x0":{"events_full_after_s":5.734,"events_lost":198648,"totals_full":false}},"trace":"aps5-trace-0039a41950a1-49148.json.gz"}

Traces and the other summary lines: https://github.com/WallisSkill/AnyPS5/releases/tag/gk2-perf-traces-2026-10-24 (files gk2-base-* and gk2-pr4-*).

Second measurement, at head 7b0b45a (main cf528e7 as base), same scene and machine, with two launch configurations. pp is the configuration above (APS5_DRAW_PIPELINE=1 APS5_PIPELINED_DRAWS=256 APS5_PIPELINE_DISPATCH=1 APS5_MIMALLOC=1, the finisher on); np drops the three draw pipeline switches, so queue worker 0 finishes every draw and is the limit (98 % busy in every np capture). old is the previous head 4d4b48d, which built the key on whichever thread finished the draw. One warm-up run, then two rounds of np main, np old, np fixed, pp main, pp fixed, interleaved; only libSceAgcDriver.prx differs between them.

frame p50, round 1 / round 2
pp, main 59.4 / 58.1 ms
pp, this head 55.9 / 55.0 ms
np, main 61.0 / 58.9 ms
np, previous head 4d4b48d 58.3 / 56.5 ms
np, this head 60.6 / 58.3 ms
  • ek-pp-main2-1: seconds 120:10 from present 2582: 167 presents, frame p50 59.4 / p90 63.9 / p99 69.2 / max 70.4 ms, GPU busy 8.2 ms per present
  • ek-pp-main2-2: seconds 120:10 from present 2648: 171 presents, frame p50 58.1 / p90 61.7 / p99 67.7 / max 70.8 ms, GPU busy 8.6 ms per present
  • ek-pp-fixed-1: seconds 120:10 from present 2644: 178 presents, frame p50 55.9 / p90 60.0 / p99 65.8 / max 69.9 ms, GPU busy 8.1 ms per present
  • ek-pp-fixed-2: seconds 120:10 from present 2691: 181 presents, frame p50 55.0 / p90 58.7 / p99 68.3 / max 68.9 ms, GPU busy 8.5 ms per present
  • ek-np-main2-1: seconds 120:10 from present 2557: 164 presents, frame p50 61.0 / p90 63.8 / p99 68.2 / max 71.7 ms, GPU busy 8.1 ms per present
  • ek-np-main2-2: seconds 120:10 from present 2670: 169 presents, frame p50 58.9 / p90 62.7 / p99 68.7 / max 68.7 ms, GPU busy 8.4 ms per present
  • ek-np-old-1: seconds 120:10 from present 2617: 171 presents, frame p50 58.3 / p90 61.0 / p99 64.5 / max 65.4 ms, GPU busy 8.1 ms per present
  • ek-np-old-2: seconds 120:10 from present 2680: 176 presents, frame p50 56.5 / p90 59.6 / p99 64.3 / max 66.6 ms, GPU busy 8.5 ms per present
  • ek-np-fixed-1: seconds 120:10 from present 2590: 164 presents, frame p50 60.6 / p90 64.2 / p99 66.8 / max 68.0 ms, GPU busy 8.1 ms per present
  • ek-np-fixed-2: seconds 120:10 from present 2641: 171 presents, frame p50 58.3 / p90 61.7 / p99 66.8 / max 67.8 ms, GPU busy 8.6 ms per present

Summary lines of the pp pair:

{"commit":"cf528e78c6c8","dirty":null,"env":{"APS5_DRAW_PIPELINE":"1","APS5_MIMALLOC":"1","APS5_PAD_INPUT_FILE":"<path>","APS5_PIPELINED_DRAWS":"256","APS5_PIPELINE_DISPATCH":"1","APS5_TRACE_DIR":"<path>","APS5_TRACE_SECONDS":"120:10"},"gpu":"NVIDIA GeForce RTX 5070","driver":"NVIDIA 616.92","os":"Windows 10.0.26200","cpu":"AMD Ryzen 7 9800X3D 8-Core Processor","cpu_threads":16,"memory_mib":31908,"title_id":"PPSA35943","title":"Graveyard Keeper 2","content_version":"01.001.000","resolution":"1920x1080","window":{"spec":"seconds 120:10","first_present":2582,"ms":10022.136},"presents":167,"frame_ms":{"p50":59.443,"p90":63.864,"p99":69.202,"max":70.419},"gpu_busy_ms_per_present":8.153,"worker_busy_pct":{"queue worker 0x0":96.375},"top_phases_ms_per_frame":{"Driver.Packet":57.775,"Graphics.Draw":51.418,"Graphics.Draw.draw_and_resource_release":43.756,"Driver.Packet.draw":37.369,"Driver.Draw":37.035,"Driver.DrawFinish":32.035,"Driver.Draw.prepare":29.601,"Driver.DrawFinish.shader_compile_and_link":28.782},"trace_dropped":true,"trace_dropped_threads":{"queue worker 0x0":{"events_full_after_s":8.674,"events_lost":37548,"totals_full":false}},"trace":"aps5-trace-cf528e78c6c8-22008.json.gz"}
{"commit":"7b0b45a52101","dirty":null,"env":{"APS5_DRAW_PIPELINE":"1","APS5_MIMALLOC":"1","APS5_PAD_INPUT_FILE":"<path>","APS5_PIPELINED_DRAWS":"256","APS5_PIPELINE_DISPATCH":"1","APS5_TRACE_DIR":"<path>","APS5_TRACE_SECONDS":"120:10"},"gpu":"NVIDIA GeForce RTX 5070","driver":"NVIDIA 616.92","os":"Windows 10.0.26200","cpu":"AMD Ryzen 7 9800X3D 8-Core Processor","cpu_threads":16,"memory_mib":31908,"title_id":"PPSA35943","title":"Graveyard Keeper 2","content_version":"01.001.000","resolution":"1920x1080","window":{"spec":"seconds 120:10","first_present":2644,"ms":10037.288},"presents":178,"frame_ms":{"p50":55.885,"p90":60.024,"p99":65.750,"max":69.923},"gpu_busy_ms_per_present":8.118,"worker_busy_pct":{"queue worker 0x0":96.141},"top_phases_ms_per_frame":{"Driver.Packet":54.149,"Graphics.Draw":45.583,"Driver.Packet.draw":38.391,"Graphics.Draw.draw_and_resource_release":38.222,"Driver.Draw":38.051,"Driver.DrawFinish":34.184,"Driver.Draw.prepare":31.822,"Driver.DrawFinish.shader_compile_and_link":28.210},"trace_dropped":true,"trace_dropped_threads":{"queue worker 0x0":{"events_full_after_s":7.670,"events_lost":82083,"totals_full":false}},"trace":"aps5-trace-7b0b45a52101-37168.json.gz"}

With the finisher the change still takes about 5 % off the frame. Without it this head matches main, as intended. In this title the previous head was faster there too (the committer is close to the limit as well), but in the Planet of Lana scene from the review it cost about 1 ms per frame on the worker, so the key now stays off the worker everywhere. Traces and summary lines: files gk2-ek-* in the release.

Tests: 38 AGC driver tests (draw pipeline, finisher, label order, vertex fetch, vertex table read order, draw cache, depth and DCC cases) in plain and APS5_DRAW_PIPELINE=1 APS5_PIPELINED_DRAWS=32 APS5_PIPELINE_DISPATCH=1 modes with ANYPS5_NO_SHADER_CACHE=1: 76 of 76 pass, run with APS5_VERIFY_EARLY_DRAW_KEY=1, at 4d4b48d and again at 7b0b45a. The branch is rebased onto main cf528e7. main now passes a DrawTraceContext through Driver::commitDraw, VulkanDevice::Draw and Graphics::Draw (and PreparedDraw::trace); the key goes after it in each of those signatures, the pipelined commit captures both trace and writablePrograms from main and adds contentKey, and VulkanDevice::Draw keeps main's traceDraws switch. DrawResourceContentKey still builds the key from the same DrawResourceKey inputs as resolveDrawResources (indexBytes is indexCount * indexSize in both), which APS5_VERIFY_EARLY_DRAW_KEY=1 checks on every draw of the suite. The captures above are from the first head 0039a4195.

Validation: the same 38 AGC driver tests ran on main cf528e7 and on this head (rebased onto it) with VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation, ANYPS5_NO_SHADER_CACHE=1, ANYPS5_REQUIRE_VULKAN=1, APS5_DRAW_PIPELINE=1 APS5_PIPELINED_DRAWS=32 APS5_PIPELINE_DISPATCH=1 and VK_LOADER_DEBUG=layer. The layer is the VkLayer_khronos_validation.dll that Steam ships in bin/cef/cef.win64, registered through VK_ADD_LAYER_PATH with its own manifest; every test that creates a device logs Inserted device layer "VK_LAYER_KHRONOS_validation" (31 of 38; the other 7 make no Vulkan device), and no log contains was not found but was requested by env var VK_INSTANCE_LAYERS. All 38 pass on both. The only validation message on either side is VUID-VkDeviceCreateInfo-pNext-pNext, 132 times on main and 132 times on this head, the same count in each test (this layer build predates some device-creation structures the driver chains); no VUID is new. The comparison was repeated at 7b0b45a with the same result.

Digests of a paired capture (the release holds every trace and summary line):

trace_digest.py of ek-pp-main2-1
python3 tools/trace_digest.py gk2-ek-pp-main2-1-aps5-trace-cf528e78c6c8-22008.json.gz --summary gk2-ek-pp-main2-1-summary.json

seconds 120:10 from present 2582: 167 presents, frame p50 59.4 / p90 63.9 / p99 69.2 / max 70.4 ms, GPU busy 8.2 ms per present
NVIDIA GeForce RTX 5070, NVIDIA 616.92, Windows 10.0.26200, 1920x1080, commit cf528e7, dropped: yes

{"commit":"cf528e78c6c8","dirty":null,"env":{"APS5_DRAW_PIPELINE":"1","APS5_MIMALLOC":"1","APS5_PAD_INPUT_FILE":"<path>","APS5_PIPELINED_DRAWS":"256","APS5_PIPELINE_DISPATCH":"1","APS5_TRACE_DIR":"<path>","APS5_TRACE_SECONDS":"120:10"},"gpu":"NVIDIA GeForce RTX 5070","driver":"NVIDIA 616.92","os":"Windows 10.0.26200","cpu":"AMD Ryzen 7 9800X3D 8-Core Processor","cpu_threads":16,"memory_mib":31908,"title_id":"PPSA35943","title":"Graveyard Keeper 2","content_version":"01.001.000","resolution":"1920x1080","window":{"spec":"seconds 120:10","first_present":2582,"ms":10022.136},"presents":167,"frame_ms":{"p50":59.443,"p90":63.864,"p99":69.202,"max":70.419},"gpu_busy_ms_per_present":8.153,"worker_busy_pct":{"queue worker 0x0":96.375},"top_phases_ms_per_frame":{"Driver.Packet":57.775,"Graphics.Draw":51.418,"Graphics.Draw.draw_and_resource_release":43.756,"Driver.Packet.draw":37.369,"Driver.Draw":37.035,"Driver.DrawFinish":32.035,"Driver.Draw.prepare":29.601,"Driver.DrawFinish.shader_compile_and_link":28.782},"trace_dropped":true,"trace_dropped_threads":{"queue worker 0x0":{"events_full_after_s":8.674,"events_lost":37548,"totals_full":false}},"trace":"aps5-trace-cf528e78c6c8-22008.json.gz"}

Slowest frames (largest slices inside each, inclusive)

  • present 2611: 70.4 ms at 1760 ms: Driver.Packet (queue worker 0x0) 46.6, Graphics.Draw (draw committer) 42.1, Graphics.Draw.draw_and_resource_release (draw committer) 31.9, Driver.Packet.draw (queue worker 0x0) 27.2
  • present 2691: 69.2 ms at 6487 ms: Driver.Packet (queue worker 0x0) 48.7, Graphics.Draw (draw committer) 43.6, Graphics.Draw.draw_and_resource_release (draw committer) 33.4, Driver.Packet.draw (queue worker 0x0) 25.7
  • present 2610: 68.8 ms at 1691 ms: Driver.Packet (queue worker 0x0) 43.6, Graphics.Draw (draw committer) 38.6, Graphics.Draw.draw_and_resource_release (draw committer) 30.1, Driver.Packet.draw (queue worker 0x0) 24.6
  • present 2716: 68.3 ms at 8014 ms: Driver.Packet (queue worker 0x0) 43.6, Graphics.Draw (draw committer) 40.7, Graphics.Draw.draw_and_resource_release (draw committer) 32.4, Driver.Packet.dispatch (queue worker 0x0) 19.9
  • present 2701: 68.3 ms at 7105 ms: Driver.Packet (queue worker 0x0) 48.5, Graphics.Draw (draw committer) 38.5, Graphics.Draw.draw_and_resource_release (draw committer) 30.5, Driver.Packet.draw (queue worker 0x0) 23.4

Threads (ms per frame)

thread busy wait untraced in slices < 20 us largest
queue worker 0x0 26.9 (45 %) 0.0 (0 %) 33.1 93.6 Driver.Packet 26.8, Driver.EndSubmission 0.1
draw committer 32.7 (54 %) 0.2 (0 %) 27.1 48.8 Graphics.Draw 31.7, Recorder.Submit 1.0
presenter 0.4 (1 %) 0.0 (0 %) 59.6 0.1 VideoOut.Flip 0.4, Driver.Present 0.0
title 0.3 (0 %) 0.0 (0 %) 59.7 0.2 Shader.ResolveGraphicsAbi 0.1, Shader.ResolveGraphicsStagesAbi 0.1
title 0.2 (0 %) 0.0 (0 %) 59.8 0.1 Shader.ResolveGraphicsAbi 0.1, Shader.ResolveGraphicsStagesAbi 0.0
title 0.0 (0 %) 0.0 (0 %) 60.0 0.0 Shader.ResolveGraphicsAbi 0.0, Shader.ResolveAbi 0.0
draw finisher 6.5 (11 %) 0.0 (0 %) 53.5 102.5 Driver.DrawFinish 6.5
title 0.2 (0 %) 0.0 (0 %) 59.8 0.1 Shader.ResolveGraphicsAbi 0.1, Shader.ResolveGraphicsStagesAbi 0.1
title 0.2 (0 %) 0.0 (0 %) 59.8 0.1 Shader.ResolveGraphicsAbi 0.1, Shader.ResolveGraphicsStagesAbi 0.1
title 0.2 (0 %) 0.0 (0 %) 59.8 0.1 Shader.ResolveGraphicsAbi 0.1, Shader.ResolveAbi 0.1
title 0.2 (0 %) 0.0 (0 %) 59.8 0.1 Shader.ResolveGraphicsAbi 0.1, Shader.ResolveGraphicsStagesAbi 0.1
title 0.2 (0 %) 0.0 (0 %) 59.8 0.1 Shader.ResolveGraphicsAbi 0.1, Shader.ResolveGraphicsStagesAbi 0.1
title 0.2 (0 %) 0.0 (0 %) 59.8 0.1 Shader.ResolveGraphicsStagesAbi 0.1, Shader.ResolveAbi 0.1
title 0.2 (0 %) 0.0 (0 %) 59.8 0.1 Shader.ResolveGraphicsAbi 0.1, Shader.ResolveGraphicsStagesAbi 0.1
title 0.2 (0 %) 0.0 (0 %) 59.8 0.1 Shader.ResolveGraphicsAbi 0.1, Shader.ResolveGraphicsStagesAbi 0.1
title 0.2 (0 %) 0.0 (0 %) 59.8 0.1 Shader.ResolveGraphicsAbi 0.1, Shader.ResolveGraphicsStagesAbi 0.1
title 0.2 (0 %) 0.0 (0 %) 59.8 0.1 Shader.ResolveGraphicsAbi 0.1, Shader.ResolveGraphicsStagesAbi 0.1
title 0.2 (0 %) 0.0 (0 %) 59.8 0.1 Shader.ResolveGraphicsAbi 0.1, Shader.ResolveGraphicsStagesAbi 0.1
title 0.2 (0 %) 0.0 (0 %) 59.8 0.1 Shader.ResolveGraphicsAbi 0.1, Shader.ResolveGraphicsStagesAbi 0.1
gpu 8.2 (14 %) 0.0 (0 %) 51.9 0.0 batch 8.2

Largest slices (ms per frame, inclusive, all threads): Graphics.Draw 31.7, Driver.Packet 26.8, Graphics.Draw.draw_and_resource_release 25.4, Driver.Packet.draw 12.1, Driver.Packet.dispatch 11.8, Driver.Dispatch 11.8, Driver.Draw 11.6, batch 8.2, Driver.DrawFinish 6.5, Recorder.Sync 6.2

Longest waits

  • GpuMutex.wait.end (draw committer) 0.8 ms at 2184 ms, present 2618
  • GpuMutex.wait.end (draw committer) 0.6 ms at 1830 ms, present 2612
  • GpuMutex.wait.end (draw committer) 0.5 ms at 6487 ms, present 2691
  • GpuMutex.wait.end (draw committer) 0.5 ms at 184 ms, present 2585
  • GpuMutex.wait.end (draw committer) 0.4 ms at 8701 ms, present 2727
  • GpuMutex.wait.end (draw committer) 0.4 ms at 3586 ms, present 2642
  • GpuMutex.wait.end (draw committer) 0.4 ms at 6363 ms, present 2689
  • GpuMutex.wait.end (draw committer) 0.4 ms at 9843 ms, present 2746
  • GpuMutex.wait.end (draw committer) 0.4 ms at 1392 ms, present 2605
  • GpuMutex.wait.end (draw committer) 0.3 ms at 7414 ms, present 2706

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

  • batch 7687: 1.0 ms at 7707 ms, present 2710: GPU no ranges; recorded by Recorder.Sync (draw committer) 1.1, Graphics.Draw (draw committer) 0.7, Graphics.Draw.draw_and_resource_release (draw committer) 0.4, Recorder.Submit (draw committer) 0.0
  • batch 2383: 1.0 ms at 2417 ms, present 2621: GPU no ranges; recorded by Recorder.Sync (draw committer) 1.1, Graphics.Draw (draw committer) 0.5, Graphics.Draw.draw_and_resource_release (draw committer) 0.3, Recorder.Submit (draw committer) 0.0
  • batch 7270: 0.8 ms at 7294 ms, present 2703: GPU no ranges; recorded by Recorder.Sync (draw committer) 0.9, Graphics.Draw (draw committer) 0.5, Graphics.Draw.draw_and_resource_release (draw committer) 0.3, Recorder.Submit (draw committer) 0.0
  • batch 953: 0.8 ms at 965 ms, present 2597: GPU no ranges; recorded by Recorder.Sync (draw committer) 0.9, Graphics.Draw (draw committer) 0.7, Graphics.Draw.draw_and_resource_release (draw committer) 0.4, Recorder.Submit (draw committer) 0.0
  • batch 6319: 0.8 ms at 6305 ms, present 2687: GPU no ranges; recorded by Recorder.Sync (draw committer) 0.9, Graphics.Draw (draw committer) 0.5, Graphics.Draw.draw_and_resource_release (draw committer) 0.3, Recorder.Submit (draw committer) 0.0
trace_digest.py of ek-pp-fixed-1
python3 tools/trace_digest.py gk2-ek-pp-fixed-1-aps5-trace-7b0b45a52101-37168.json.gz --summary gk2-ek-pp-fixed-1-summary.json

seconds 120:10 from present 2644: 178 presents, frame p50 55.9 / p90 60.0 / p99 65.8 / max 69.9 ms, GPU busy 8.1 ms per present
NVIDIA GeForce RTX 5070, NVIDIA 616.92, Windows 10.0.26200, 1920x1080, commit 7b0b45a, dropped: yes

{"commit":"7b0b45a52101","dirty":null,"env":{"APS5_DRAW_PIPELINE":"1","APS5_MIMALLOC":"1","APS5_PAD_INPUT_FILE":"<path>","APS5_PIPELINED_DRAWS":"256","APS5_PIPELINE_DISPATCH":"1","APS5_TRACE_DIR":"<path>","APS5_TRACE_SECONDS":"120:10"},"gpu":"NVIDIA GeForce RTX 5070","driver":"NVIDIA 616.92","os":"Windows 10.0.26200","cpu":"AMD Ryzen 7 9800X3D 8-Core Processor","cpu_threads":16,"memory_mib":31908,"title_id":"PPSA35943","title":"Graveyard Keeper 2","content_version":"01.001.000","resolution":"1920x1080","window":{"spec":"seconds 120:10","first_present":2644,"ms":10037.288},"presents":178,"frame_ms":{"p50":55.885,"p90":60.024,"p99":65.75,"max":69.923},"gpu_busy_ms_per_present":8.118,"worker_busy_pct":{"queue worker 0x0":96.141},"top_phases_ms_per_frame":{"Driver.Packet":54.149,"Graphics.Draw":45.583,"Driver.Packet.draw":38.391,"Graphics.Draw.draw_and_resource_release":38.222,"Driver.Draw":38.051,"Driver.DrawFinish":34.184,"Driver.Draw.prepare":31.822,"Driver.DrawFinish.shader_compile_and_link":28.21},"trace_dropped":true,"trace_dropped_threads":{"queue worker 0x0":{"events_full_after_s":7.67,"events_lost":82083,"totals_full":false}},"trace":"aps5-trace-7b0b45a52101-37168.json.gz"}

Slowest frames (largest slices inside each, inclusive)

  • present 2674: 69.9 ms at 1683 ms: Driver.Packet (queue worker 0x0) 48.7, Graphics.Draw (draw committer) 35.9, Driver.Packet.draw (queue worker 0x0) 34.5, Driver.Draw (queue worker 0x0) 33.9
  • present 2693: 65.7 ms at 2764 ms: Driver.Packet (queue worker 0x0) 40.4, Graphics.Draw (draw committer) 33.0, Graphics.Draw.draw_and_resource_release (draw committer) 26.2, Driver.Packet.draw (queue worker 0x0) 25.3
  • present 2773: 65.5 ms at 7280 ms: Driver.Packet (queue worker 0x0) 42.8, Graphics.Draw (draw committer) 37.0, Graphics.Draw.draw_and_resource_release (draw committer) 29.6, Driver.Packet.draw (queue worker 0x0) 25.4
  • present 2666: 63.7 ms at 1217 ms: Driver.Packet (queue worker 0x0) 39.4, Graphics.Draw (draw committer) 33.2, Graphics.Draw.draw_and_resource_release (draw committer) 27.2, Driver.Packet.draw (queue worker 0x0) 24.6
  • present 2731: 63.4 ms at 4933 ms: Driver.Packet (queue worker 0x0) 36.2, Graphics.Draw (draw committer) 30.4, Graphics.Draw.draw_and_resource_release (draw committer) 24.4, Driver.Packet.draw (queue worker 0x0) 21.9

Threads (ms per frame)

thread busy wait untraced in slices < 20 us largest
queue worker 0x0 21.0 (37 %) 0.0 (0 %) 35.4 82.6 Driver.Packet 21.0, Driver.EndSubmission 0.0
draw committer 27.5 (49 %) 0.2 (0 %) 28.6 45.4 Graphics.Draw 26.6, Recorder.Submit 0.9
presenter 0.4 (1 %) 0.0 (0 %) 56.0 0.1 VideoOut.Flip 0.4, Driver.Present 0.0
title 0.3 (0 %) 0.0 (0 %) 56.1 0.2 Shader.ResolveGraphicsAbi 0.1, Shader.ResolveGraphicsStagesAbi 0.1
title 0.2 (0 %) 0.0 (0 %) 56.2 0.1 Shader.ResolveGraphicsAbi 0.1, Shader.ResolveAbi 0.1
title 0.0 (0 %) 0.0 (0 %) 56.4 0.0 Shader.ResolveAbi 0.0, Shader.ResolveGraphicsAbi 0.0
draw finisher 8.4 (15 %) 0.0 (0 %) 48.0 104.8 Driver.DrawFinish 8.4
title 0.2 (0 %) 0.0 (0 %) 56.2 0.1 Shader.ResolveGraphicsAbi 0.1, Shader.ResolveGraphicsStagesAbi 0.1
title 0.2 (0 %) 0.0 (0 %) 56.2 0.1 Shader.ResolveGraphicsAbi 0.1, Shader.ResolveGraphicsStagesAbi 0.1
title 0.2 (0 %) 0.0 (0 %) 56.2 0.1 Shader.ResolveGraphicsAbi 0.1, Shader.ResolveAbi 0.1
title 0.2 (0 %) 0.0 (0 %) 56.2 0.1 Shader.ResolveGraphicsAbi 0.1, Shader.ResolveGraphicsStagesAbi 0.1
title 0.2 (0 %) 0.0 (0 %) 56.2 0.1 Shader.ResolveGraphicsAbi 0.1, Shader.ResolveAbi 0.1
title 0.2 (0 %) 0.0 (0 %) 56.2 0.0 Shader.ResolveGraphicsAbi 0.1, Shader.ResolveAbi 0.1
title 0.2 (0 %) 0.0 (0 %) 56.2 0.1 Shader.ResolveGraphicsAbi 0.1, Shader.ResolveGraphicsStagesAbi 0.1
title 0.2 (0 %) 0.0 (0 %) 56.2 0.1 Shader.ResolveGraphicsAbi 0.1, Shader.ResolveGraphicsStagesAbi 0.1
title 0.2 (0 %) 0.0 (0 %) 56.2 0.1 Shader.ResolveGraphicsAbi 0.1, Shader.ResolveGraphicsStagesAbi 0.1
title 0.2 (0 %) 0.0 (0 %) 56.2 0.0 Shader.ResolveGraphicsAbi 0.1, Shader.ResolveAbi 0.1
title 0.2 (0 %) 0.0 (0 %) 56.2 0.1 Shader.ResolveGraphicsAbi 0.1, Shader.ResolveAbi 0.1
title 0.2 (0 %) 0.0 (0 %) 56.2 0.1 Shader.ResolveGraphicsAbi 0.1, Shader.ResolveGraphicsStagesAbi 0.1
gpu 8.1 (14 %) 0.0 (0 %) 48.3 0.0 batch 8.1

Largest slices (ms per frame, inclusive, all threads): Graphics.Draw 26.6, Graphics.Draw.draw_and_resource_release 22.2, Driver.Packet 21.0, Driver.Packet.draw 11.5, Driver.Draw 11.1, Driver.DrawFinish 8.4, batch 8.1, Driver.Packet.dispatch 7.1, Driver.Dispatch 7.1, Recorder.Sync 6.2

Longest waits

  • GpuMutex.wait.end (draw committer) 0.7 ms at 1161 ms, present 2665
  • GpuMutex.wait.end (draw committer) 0.7 ms at 1809 ms, present 2676
  • GpuMutex.wait.end (draw committer) 0.6 ms at 8531 ms, present 2795
  • GpuMutex.wait.end (draw committer) 0.4 ms at 2212 ms, present 2683
  • GpuMutex.wait.end (draw committer) 0.4 ms at 6792 ms, present 2764
  • GpuMutex.wait.end (draw committer) 0.4 ms at 7346 ms, present 2774
  • GpuMutex.wait.end (draw committer) 0.4 ms at 9656 ms, present 2815
  • GpuMutex.wait.end (draw committer) 0.4 ms at 3559 ms, present 2707
  • GpuMutex.wait.end (draw committer) 0.4 ms at 9872 ms, present 2819
  • GpuMutex.wait.end (draw committer) 0.4 ms at 2039 ms, present 2680

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

  • batch 955: 1.0 ms at 880 ms, present 2659: GPU no ranges; recorded by Recorder.Sync (draw committer) 1.1, Graphics.Draw (draw committer) 0.5, Graphics.Draw.draw_and_resource_release (draw committer) 0.3, Recorder.Submit (draw committer) 0.0
  • batch 4424: 1.0 ms at 4180 ms, present 2717: GPU no ranges; recorded by Recorder.Sync (draw committer) 1.0, Graphics.Draw (draw committer) 0.4, Graphics.Draw.draw_and_resource_release (draw committer) 0.2, Recorder.Submit (draw committer) 0.0
  • batch 1495: 1.0 ms at 1392 ms, present 2668: GPU no ranges; recorded by Recorder.Sync (draw committer) 1.1, Graphics.Draw (draw committer) 0.6, Graphics.Draw.draw_and_resource_release (draw committer) 0.5, Resources.Complete (draw committer) 0.3
  • batch 8855: 0.8 ms at 8365 ms, present 2791: GPU no ranges; recorded by Recorder.Sync (draw committer) 0.9, Graphics.Draw (draw committer) 0.5, Graphics.Draw.draw_and_resource_release (draw committer) 0.4, Recorder.Submit (draw committer) 0.0
  • batch 6459: 0.8 ms at 6133 ms, present 2751: GPU no ranges; recorded by Graphics.Draw (draw committer) 1.0, Recorder.Sync (draw committer) 0.9, Graphics.Draw.draw_and_resource_release (draw committer) 0.8, Graphics.Draw.validate (draw committer) 0.1
trace_digest.py of base-1
python3 tools/trace_digest.py gk2-base-1-aps5-trace-3fcb5e4d7649-48276.json.gz --summary gk2-base-1-summary.json

seconds 120:10 from present 2344: 148 presents, frame p50 67.3 / p90 72.2 / p99 77.4 / max 78.1 ms, GPU busy 8.9 ms per present
NVIDIA GeForce RTX 5070, NVIDIA 616.92, Windows 10.0.26200, 1920x1080, commit 3fcb5e4, dropped: yes

{"commit":"3fcb5e4d7649","dirty":null,"env":{"APS5_DRAW_PIPELINE":"1","APS5_MIMALLOC":"1","APS5_PAD_INPUT_FILE":"<path>","APS5_PIPELINED_DRAWS":"256","APS5_PIPELINE_DISPATCH":"1","APS5_TRACE_DIR":"<path>","APS5_TRACE_SECONDS":"120:10"},"gpu":"NVIDIA GeForce RTX 5070","driver":"NVIDIA 616.92","os":"Windows 10.0.26200","cpu":"AMD Ryzen 7 9800X3D 8-Core Processor","cpu_threads":16,"memory_mib":31908,"title_id":"PPSA35943","title":"Graveyard Keeper 2","content_version":"01.001.000","resolution":"1920x1080","window":{"spec":"seconds 120:10","first_present":2344,"ms":10047.517},"presents":148,"frame_ms":{"p50":67.27,"p90":72.242,"p99":77.354,"max":78.058},"gpu_busy_ms_per_present":8.861,"worker_busy_pct":{"queue worker 0x0":96.438},"top_phases_ms_per_frame":{"Driver.Packet":65.406,"Graphics.Draw":57.908,"Graphics.Draw.draw_and_resource_release":49.344,"Driver.Packet.draw":42.27,"Driver.Draw":41.904,"Driver.DrawFinish":35.172,"Driver.Draw.prepare":32.781,"Driver.DrawFinish.shader_compile_and_link":31.427},"trace_dropped":true,"trace_dropped_threads":{"queue worker 0x0":{"events_full_after_s":6.419,"events_lost":154720,"totals_full":false}},"trace":"aps5-trace-3fcb5e4d7649-48276.json.gz"}

Slowest frames (largest slices inside each, inclusive)

  • present 2391: 78.1 ms at 3171 ms: Driver.Packet (queue worker 0x0) 55.9, Graphics.Draw (draw committer) 50.4, Graphics.Draw.draw_and_resource_release (draw committer) 38.9, Driver.Packet.draw (queue worker 0x0) 33.9
  • present 2474: 77.4 ms at 8842 ms: Graphics.Draw (draw committer) 50.2, Graphics.Draw.draw_and_resource_release (draw committer) 38.9, Driver.DrawFinish (draw finisher) 15.3, Driver.DrawFinish.shader_compile_and_link (draw finisher) 9.9
  • present 2375: 77.3 ms at 2068 ms: Driver.Packet (queue worker 0x0) 55.5, Graphics.Draw (draw committer) 49.9, Graphics.Draw.draw_and_resource_release (draw committer) 38.2, Driver.Packet.draw (queue worker 0x0) 33.9
  • present 2415: 75.7 ms at 4810 ms: Driver.Packet (queue worker 0x0) 53.5, Graphics.Draw (draw committer) 47.6, Graphics.Draw.draw_and_resource_release (draw committer) 36.8, Driver.Packet.draw (queue worker 0x0) 32.8
  • present 2444: 75.0 ms at 6808 ms: Graphics.Draw (draw committer) 48.7, Graphics.Draw.draw_and_resource_release (draw committer) 39.0, Driver.DrawFinish (draw finisher) 12.3, batch (gpu) 9.5

Threads (ms per frame)

thread busy wait untraced in slices < 20 us largest
queue worker 0x0 27.3 (40 %) 0.0 (0 %) 40.6 62.0 Driver.Packet 27.3, Driver.EndSubmission 0.0
draw committer 40.7 (60 %) 0.3 (1 %) 26.9 47.7 Graphics.Draw 39.5, Recorder.Submit 1.2
presenter 0.5 (1 %) 0.0 (0 %) 67.4 0.1 VideoOut.Flip 0.5, Driver.Present 0.0
title 0.3 (0 %) 0.0 (0 %) 67.5 0.2 Shader.ResolveGraphicsAbi 0.1, Shader.ResolveAbi 0.1
title 0.2 (0 %) 0.0 (0 %) 67.7 0.1 Shader.ResolveGraphicsAbi 0.1, Shader.ResolveGraphicsStagesAbi 0.1
title 0.0 (0 %) 0.0 (0 %) 67.8 0.0 Shader.ResolveGraphicsAbi 0.0, Shader.ResolveGraphicsStagesAbi 0.0
draw finisher 10.8 (16 %) 0.0 (0 %) 57.1 104.4 Driver.DrawFinish 10.8
title 0.2 (0 %) 0.0 (0 %) 67.7 0.1 Shader.ResolveGraphicsAbi 0.1, Shader.ResolveGraphicsStagesAbi 0.1
title 0.2 (0 %) 0.0 (0 %) 67.6 0.1 Shader.ResolveGraphicsAbi 0.1, Shader.ResolveAbi 0.1
title 0.2 (0 %) 0.0 (0 %) 67.7 0.1 Shader.ResolveGraphicsAbi 0.1, Shader.ResolveAbi 0.1
title 0.2 (0 %) 0.0 (0 %) 67.7 0.1 Shader.ResolveGraphicsAbi 0.1, Shader.ResolveGraphicsStagesAbi 0.1
title 0.2 (0 %) 0.0 (0 %) 67.7 0.1 Shader.ResolveGraphicsAbi 0.1, Shader.ResolveGraphicsStagesAbi 0.1
title 0.2 (0 %) 0.0 (0 %) 67.7 0.1 Shader.ResolveGraphicsAbi 0.1, Shader.ResolveAbi 0.1
title 0.3 (0 %) 0.0 (0 %) 67.6 0.1 Shader.ResolveGraphicsAbi 0.1, Shader.ResolveGraphicsStagesAbi 0.1
title 0.2 (0 %) 0.0 (0 %) 67.6 0.1 Shader.ResolveGraphicsAbi 0.1, Shader.ResolveGraphicsStagesAbi 0.1
title 0.2 (0 %) 0.0 (0 %) 67.6 0.1 Shader.ResolveGraphicsAbi 0.1, Shader.ResolveAbi 0.1
title 0.2 (0 %) 0.0 (0 %) 67.7 0.1 Shader.ResolveGraphicsAbi 0.1, Shader.ResolveGraphicsStagesAbi 0.1
title 0.2 (0 %) 0.0 (0 %) 67.6 0.1 Shader.ResolveGraphicsAbi 0.1, Shader.ResolveGraphicsStagesAbi 0.1
title 0.2 (0 %) 0.0 (0 %) 67.6 0.1 Shader.ResolveGraphicsAbi 0.1, Shader.ResolveGraphicsStagesAbi 0.1
gpu 8.9 (13 %) 0.0 (0 %) 59.0 0.0 batch 8.9

Largest slices (ms per frame, inclusive, all threads): Graphics.Draw 39.5, Graphics.Draw.draw_and_resource_release 31.0, Driver.Packet 27.3, Driver.Packet.draw 14.8, Driver.Draw 14.4, Driver.DrawFinish 10.8, Driver.Packet.dispatch 10.1, Driver.Dispatch 10.0, batch 8.9, Driver.DrawFinish.shader_compile_and_link 7.7

Longest waits

  • Driver.Present.render_fence_wait (presenter) 1.6 ms at 7692 ms, present 2457
  • GpuMutex.wait.end (draw committer) 0.8 ms at 8709 ms, present 2472
  • GpuMutex.wait.end (draw committer) 0.7 ms at 6666 ms, present 2442
  • GpuMutex.wait.end (draw committer) 0.6 ms at 7956 ms, present 2461
  • GpuMutex.wait.end (draw committer) 0.5 ms at 6037 ms, present 2433
  • GpuMutex.wait.end (draw committer) 0.5 ms at 5086 ms, present 2419
  • GpuMutex.wait.end (draw committer) 0.5 ms at 7623 ms, present 2456
  • GpuMutex.wait.end (draw committer) 0.5 ms at 6524 ms, present 2440
  • GpuMutex.wait.end (draw committer) 0.5 ms at 2760 ms, present 2385
  • GpuMutex.wait.end (draw committer) 0.5 ms at 6312 ms, present 2437

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

  • batch 2479: 1.1 ms at 2825 ms, present 2385: GPU no ranges; recorded by Recorder.Sync (draw committer) 1.3, Graphics.Draw (draw committer) 0.5, Graphics.Draw.draw_and_resource_release (draw committer) 0.4, Recorder.Submit (draw committer) 0.1
  • batch 2302: 1.1 ms at 2621 ms, present 2382: GPU no ranges; recorded by Recorder.Sync (draw committer) 1.3, Graphics.Draw (draw committer) 0.7, Graphics.Draw.draw_and_resource_release (draw committer) 0.5, Graphics.Draw.validate (draw committer) 0.0
  • batch 6150: 1.1 ms at 7088 ms, present 2447: GPU no ranges; recorded by Recorder.Sync (draw committer) 1.3, Graphics.Draw (draw committer) 0.7, Graphics.Draw.draw_and_resource_release (draw committer) 0.4, Recorder.Submit (draw committer) 0.0
  • batch 5142: 1.1 ms at 5891 ms, present 2430: GPU no ranges; recorded by Recorder.Sync (draw committer) 1.3, Graphics.Draw (draw committer) 0.8, Graphics.Draw.draw_and_resource_release (draw committer) 0.5, Recorder.Submit (draw committer) 0.0
  • batch 2951: 1.1 ms at 3385 ms, present 2393: GPU no ranges; recorded by Recorder.Sync (draw committer) 1.2, Graphics.Draw (draw committer) 0.6, Graphics.Draw.draw_and_resource_release (draw committer) 0.4, Recorder.Submit (draw committer) 0.0
trace_digest.py of pr4-1
python3 tools/trace_digest.py gk2-pr4-1-aps5-trace-0039a41950a1-49148.json.gz --summary gk2-pr4-1-summary.json

seconds 120:10 from present 2459: 159 presents, frame p50 62.7 / p90 67.2 / p99 73.6 / max 82.0 ms, GPU busy 9.0 ms per present
NVIDIA GeForce RTX 5070, NVIDIA 616.92, Windows 10.0.26200, 1920x1080, commit 0039a41950a1, dropped: yes

{"commit":"0039a41950a1","dirty":null,"env":{"APS5_DRAW_PIPELINE":"1","APS5_MIMALLOC":"1","APS5_PAD_INPUT_FILE":"<path>","APS5_PIPELINED_DRAWS":"256","APS5_PIPELINE_DISPATCH":"1","APS5_TRACE_DIR":"<path>","APS5_TRACE_SECONDS":"120:10"},"gpu":"NVIDIA GeForce RTX 5070","driver":"NVIDIA 616.92","os":"Windows 10.0.26200","cpu":"AMD Ryzen 7 9800X3D 8-Core Processor","cpu_threads":16,"memory_mib":31908,"title_id":"PPSA35943","title":"Graveyard Keeper 2","content_version":"01.001.000","resolution":"1920x1080","window":{"spec":"seconds 120:10","first_present":2459,"ms":10006.312},"presents":159,"frame_ms":{"p50":62.738,"p90":67.191,"p99":73.602,"max":82.012},"gpu_busy_ms_per_present":8.973,"worker_busy_pct":{"queue worker 0x0":96.247},"top_phases_ms_per_frame":{"Driver.Packet":60.504,"Graphics.Draw":51.029,"Graphics.Draw.draw_and_resource_release":42.879,"Driver.Packet.draw":42.139,"Driver.Draw":41.77,"Driver.DrawFinish":36.897,"Driver.Draw.prepare":34.393,"Driver.DrawFinish.shader_compile_and_link":30.273},"trace_dropped":true,"trace_dropped_threads":{"queue worker 0x0":{"events_full_after_s":5.734,"events_lost":198648,"totals_full":false}},"trace":"aps5-trace-0039a41950a1-49148.json.gz"}

Slowest frames (largest slices inside each, inclusive)

  • present 2588: 82.0 ms at 8121 ms: Graphics.Draw (draw committer) 44.1, Graphics.Draw.draw_and_resource_release (draw committer) 35.9, Driver.DrawFinish (draw finisher) 28.8, Driver.DrawFinish.shader_compile_and_link (draw finisher) 19.6
  • present 2539: 73.6 ms at 5024 ms: Driver.Packet (queue worker 0x0) 51.3, Graphics.Draw (draw committer) 37.7, Driver.Packet.draw (queue worker 0x0) 37.4, Driver.Draw (queue worker 0x0) 36.8
  • present 2536: 69.9 ms at 4817 ms: Driver.Packet (queue worker 0x0) 48.9, Graphics.Draw (draw committer) 39.3, Graphics.Draw.draw_and_resource_release (draw committer) 31.2, Driver.Packet.draw (queue worker 0x0) 26.9
  • present 2538: 69.6 ms at 4954 ms: Driver.Packet (queue worker 0x0) 46.3, Graphics.Draw (draw committer) 40.2, Graphics.Draw.draw_and_resource_release (draw committer) 32.3, Driver.Packet.draw (queue worker 0x0) 28.9
  • present 2542: 69.2 ms at 5228 ms: Driver.Packet (queue worker 0x0) 44.1, Graphics.Draw (draw committer) 35.2, Graphics.Draw.draw_and_resource_release (draw committer) 29.0, Driver.Packet.draw (queue worker 0x0) 27.6

Threads (ms per frame)

thread busy wait untraced in slices < 20 us largest
queue worker 0x0 21.7 (34 %) 0.0 (0 %) 41.2 54.3 Driver.Packet 21.7, Driver.EndSubmission 0.0
draw committer 33.6 (53 %) 0.3 (1 %) 29.0 45.9 Graphics.Draw 32.4, Recorder.Submit 1.1
presenter 0.5 (1 %) 0.0 (0 %) 62.4 0.1 VideoOut.Flip 0.5, Driver.Present 0.0
title 0.3 (1 %) 0.0 (0 %) 62.6 0.2 Shader.ResolveGraphicsAbi 0.1, Shader.ResolveGraphicsStagesAbi 0.1
title 0.2 (0 %) 0.0 (0 %) 62.7 0.1 Shader.ResolveAbi 0.1, Shader.ResolveGraphicsAbi 0.1
draw finisher 14.3 (23 %) 0.0 (0 %) 48.6 103.5 Driver.DrawFinish 14.3
title 0.1 (0 %) 0.0 (0 %) 62.9 0.0 Shader.ResolveGraphicsAbi 0.0, Shader.ResolveAbi 0.0
title 0.2 (0 %) 0.0 (0 %) 62.7 0.1 Shader.ResolveGraphicsAbi 0.1, Shader.ResolveAbi 0.1
title 0.3 (0 %) 0.0 (0 %) 62.7 0.1 Shader.ResolveGraphicsAbi 0.1, Shader.ResolveGraphicsStagesAbi 0.1
title 0.2 (0 %) 0.0 (0 %) 62.7 0.1 Shader.ResolveGraphicsAbi 0.1, Shader.ResolveGraphicsStagesAbi 0.1
title 0.2 (0 %) 0.0 (0 %) 62.7 0.1 Shader.ResolveGraphicsAbi 0.1, Shader.ResolveGraphicsStagesAbi 0.1
title 0.2 (0 %) 0.0 (0 %) 62.7 0.1 Shader.ResolveGraphicsAbi 0.1, Shader.ResolveGraphicsStagesAbi 0.1
title 0.2 (0 %) 0.0 (0 %) 62.7 0.1 Shader.ResolveGraphicsAbi 0.1, Shader.ResolveAbi 0.1
title 0.2 (0 %) 0.0 (0 %) 62.7 0.0 Shader.ResolveGraphicsAbi 0.1, Shader.ResolveAbi 0.1
title 0.2 (0 %) 0.0 (0 %) 62.7 0.1 Shader.ResolveGraphicsAbi 0.1, Shader.ResolveGraphicsStagesAbi 0.1
title 0.2 (0 %) 0.0 (0 %) 62.7 0.1 Shader.ResolveGraphicsAbi 0.1, Shader.ResolveGraphicsStagesAbi 0.1
title 0.2 (0 %) 0.0 (0 %) 62.7 0.1 Shader.ResolveGraphicsAbi 0.1, Shader.ResolveGraphicsStagesAbi 0.1
title 0.2 (0 %) 0.0 (0 %) 62.7 0.1 Shader.ResolveGraphicsAbi 0.1, Shader.ResolveAbi 0.1
title 0.2 (0 %) 0.0 (0 %) 62.7 0.1 Shader.ResolveGraphicsAbi 0.1, Shader.ResolveAbi 0.1
gpu 9.0 (14 %) 0.0 (0 %) 54.0 0.0 batch 9.0

Largest slices (ms per frame, inclusive, all threads): Graphics.Draw 32.4, Graphics.Draw.draw_and_resource_release 26.5, Driver.Packet 21.7, Driver.DrawFinish 14.3, Driver.Packet.draw 13.1, Driver.Draw 12.7, batch 9.0, Recorder.Sync 7.4, Driver.DrawFinish.shader_compile_and_link 7.3, Driver.Draw.prepare 6.7

Longest waits

  • GpuMutex.wait.end (draw committer) 0.9 ms at 9151 ms, present 2604
  • GpuMutex.wait.end (draw committer) 0.8 ms at 2748 ms, present 2503
  • GpuMutex.wait.end (draw committer) 0.8 ms at 1713 ms, present 2486
  • GpuMutex.wait.end (draw committer) 0.6 ms at 6135 ms, present 2556
  • GpuMutex.wait.end (draw committer) 0.6 ms at 3672 ms, present 2518
  • GpuMutex.wait.end (draw committer) 0.6 ms at 6199 ms, present 2557
  • GpuMutex.wait.end (draw committer) 0.6 ms at 439 ms, present 2466
  • GpuMutex.wait.end (draw committer) 0.6 ms at 5228 ms, present 2542
  • GpuMutex.wait.end (draw committer) 0.6 ms at 249 ms, present 2463
  • GpuMutex.wait.end (draw committer) 0.5 ms at 560 ms, present 2468

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

  • batch 8442: 1.2 ms at 8897 ms, present 2599: GPU no ranges; recorded by Recorder.Sync (draw committer) 1.3, Graphics.Draw (draw committer) 0.7, Graphics.Draw.draw_and_resource_release (draw committer) 0.4, Recorder.Submit (draw committer) 0.0
  • batch 1073: 1.2 ms at 1137 ms, present 2476: GPU no ranges; recorded by Recorder.Sync (draw committer) 1.3, Graphics.Draw (draw committer) 0.6, Graphics.Draw.draw_and_resource_release (draw committer) 0.3, Recorder.Submit (draw committer) 0.0
  • batch 833: 1.1 ms at 879 ms, present 2472: GPU no ranges; recorded by Recorder.Sync (draw committer) 1.3, Graphics.Draw (draw committer) 1.1, Graphics.Draw.draw_and_resource_release (draw committer) 0.5, Recorder.Submit (draw committer) 0.0
  • batch 1193: 1.1 ms at 1268 ms, present 2478: GPU no ranges; recorded by Recorder.Sync (draw committer) 1.3, Graphics.Draw (draw committer) 0.8, Graphics.Draw.draw_and_resource_release (draw committer) 0.6, Graphics.Draw.validate (draw committer) 0.0
  • batch 5091: 1.1 ms at 5360 ms, present 2543: GPU no ranges; recorded by Recorder.Sync (draw committer) 1.3, Graphics.Draw (draw committer) 0.6, Graphics.Draw.draw_and_resource_release (draw committer) 0.3, Recorder.Submit (draw committer) 0.0

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, driver 616.92, Windows 11 Pro 10.0.26200
  • AI-assisted: yes

🤖 Generated with Claude Code

@MarcZX10 MarcZX10 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The early-key path appears to preserve the existing fallback when the device marker does not match, and the verification mode compares the precomputed key with the committer-side calculation. I cannot approve this AGC change yet because the repository's AGC validation rule requires the same focused tests on main and this head with ANYPS5_REQUIRE_VULKAN=1, ANYPS5_NO_SHADER_CACHE=1, and VK_LAYER_KHRONOS_validation, then a comparison confirming no new VUIDs. The PR reports the validation layer is unavailable and gives branch test counts only. Please attach both runs from a layer-equipped machine/GPU (including confirmation the layer was actually loaded), or explain what supported validation route can satisfy the rule.

The contribution guide also requires tools/trace_digest.py output for performance claims. The release has the traces and per-capture JSON summary assets; please include the digest output for the paired captures (or the prescribed report output). I downloaded the base-1 and pr4-1 trace assets and confirmed the digester reads them; it reports 147 and 158 frames, respectively, but no summary line was found when run against the release asset layout.

This head currently conflicts with main in Draw.cpp (GitHub also reports DIRTY) and conflicts with open #10677 in that same file; the two PRs currently say Depends on: none. Please rebase/resolve the main conflict and coordinate landing order with #10677's author, then record the dependency on the checklist. The overlap is substantive: current main captures writablePrograms in finishDraw, while this branch retains programs; integrating both needs an explicit resolution that preserves the current-main behavior and the early-key change.

@github-actions github-actions Bot added the needs rebase Conflicts with main, rebase needed label Oct 24, 2026
@github-actions

github-actions Bot commented Oct 24, 2026 •

Copy link
Copy Markdown

Some comparisons could not be completed because a pull request conflicts with the base branch. Review these shared files manually before concluding that there is no overlap.

Pull request Shared files not compared
PR 1368 core/libs/prx/libSceAgcDriver/Graphics/src/Draw.cpp
PR 1395 core/libs/prx/libSceAgcDriver/Execution/include/VulkanDevice.hpp
core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
core/libs/prx/libSceAgcDriver/Graphics/src/Draw.cpp
PR 1896 core/libs/prx/libSceAgcDriver/Execution/src/Driver/Draw/Draw.cpp
docs/dev/ENVIRONMENT.md
PR 2434 core/libs/prx/libSceAgcDriver/Execution/include/VulkanDevice.hpp
core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
PR 4040 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
PR 4448 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
PR 4472 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
docs/dev/ENVIRONMENT.md
PR 4847 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
PR 5021 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
PR 5609 core/libs/prx/libSceAgcDriver/Execution/include/Driver/Driver.hpp
core/libs/prx/libSceAgcDriver/Execution/src/Driver/Draw/Draw.cpp
core/libs/prx/libSceAgcDriver/Graphics/src/Draw.cpp
PR 5925 core/libs/prx/libSceAgcDriver/Execution/include/Driver/Driver.hpp
core/libs/prx/libSceAgcDriver/Execution/include/VulkanDevice.hpp
core/libs/prx/libSceAgcDriver/Execution/src/Driver/Draw/Draw.cpp
core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
core/libs/prx/libSceAgcDriver/Graphics/include/Draw.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/Draw.cpp
PR 6146 core/libs/prx/libSceAgcDriver/Execution/include/VulkanDevice.hpp
core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
PR 6186 docs/dev/ENVIRONMENT.md
PR 6188 core/libs/prx/libSceAgcDriver/Execution/include/Driver/Driver.hpp
core/libs/prx/libSceAgcDriver/Execution/include/VulkanDevice.hpp
core/libs/prx/libSceAgcDriver/Execution/src/Driver/Draw/Draw.cpp
core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
core/libs/prx/libSceAgcDriver/Graphics/include/Draw.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/Draw.cpp
PR 6290 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
PR 6782 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
PR 6804 core/libs/prx/libSceAgcDriver/Execution/include/Driver/Driver.hpp
core/libs/prx/libSceAgcDriver/Execution/include/VulkanDevice.hpp
core/libs/prx/libSceAgcDriver/Execution/src/Driver/Draw/Draw.cpp
core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
PR 6924 docs/dev/ENVIRONMENT.md
PR 6987 core/libs/prx/libSceAgcDriver/Graphics/src/Draw.cpp
PR 6989 core/libs/prx/libSceAgcDriver/Graphics/src/Draw.cpp
PR 6995 core/libs/prx/libSceAgcDriver/Graphics/src/Draw.cpp
PR 7002 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
core/libs/prx/libSceAgcDriver/Graphics/src/Draw.cpp
PR 7085 core/libs/prx/libSceAgcDriver/Graphics/src/Draw.cpp
PR 7256 core/libs/prx/libSceAgcDriver/Graphics/src/Draw.cpp
PR 7275 core/libs/prx/libSceAgcDriver/Execution/include/Driver/Driver.hpp
core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
core/libs/prx/libSceAgcDriver/Graphics/src/Draw.cpp
PR 7369 core/libs/prx/libSceAgcDriver/Execution/include/Driver/Driver.hpp
core/libs/prx/libSceAgcDriver/Execution/include/VulkanDevice.hpp
core/libs/prx/libSceAgcDriver/Execution/src/Driver/Draw/Draw.cpp
core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
core/libs/prx/libSceAgcDriver/Graphics/src/Draw.cpp
PR 7449 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
docs/dev/ENVIRONMENT.md
PR 7457 docs/dev/ENVIRONMENT.md
PR 7464 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
PR 7514 docs/dev/ENVIRONMENT.md
PR 7604 docs/dev/ENVIRONMENT.md
PR 7622 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
PR 7642 core/libs/prx/libSceAgcDriver/Execution/include/Driver/Driver.hpp
core/libs/prx/libSceAgcDriver/Execution/include/VulkanDevice.hpp
core/libs/prx/libSceAgcDriver/Execution/src/Driver/Draw/Draw.cpp
core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
core/libs/prx/libSceAgcDriver/Graphics/src/Draw.cpp
docs/dev/ENVIRONMENT.md
PR 7643 core/libs/prx/libSceAgcDriver/Execution/include/VulkanDevice.hpp
core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
docs/dev/ENVIRONMENT.md
PR 7668 core/libs/prx/libSceAgcDriver/Graphics/src/Draw.cpp
PR 8004 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
docs/dev/ENVIRONMENT.md
PR 8212 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
PR 8246 core/libs/prx/libSceAgcDriver/Graphics/src/Draw.cpp
docs/dev/ENVIRONMENT.md
PR 8484 docs/dev/ENVIRONMENT.md
PR 9012 docs/dev/ENVIRONMENT.md
PR 9020 core/libs/prx/libSceAgcDriver/Graphics/src/Draw.cpp
PR 9248 core/libs/prx/libSceAgcDriver/Execution/include/Driver/Driver.hpp
core/libs/prx/libSceAgcDriver/Execution/src/Driver/Draw/Draw.cpp
docs/dev/ENVIRONMENT.md
PR 9289 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
docs/dev/ENVIRONMENT.md
PR 9335 core/libs/prx/libSceAgcDriver/Execution/include/Driver/Driver.hpp
core/libs/prx/libSceAgcDriver/Execution/src/Driver/Draw/Draw.cpp
core/libs/prx/libSceAgcDriver/Graphics/src/Draw.cpp
PR 9345 docs/dev/ENVIRONMENT.md
PR 9356 core/libs/prx/libSceAgcDriver/Execution/include/VulkanDevice.hpp
core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
core/libs/prx/libSceAgcDriver/Graphics/include/Draw.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/Draw.cpp
docs/dev/ENVIRONMENT.md
PR 9387 core/libs/prx/libSceAgcDriver/Execution/include/VulkanDevice.hpp
core/libs/prx/libSceAgcDriver/Execution/src/Driver/Draw/Draw.cpp
core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
core/libs/prx/libSceAgcDriver/Graphics/include/Draw.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/Draw.cpp
docs/dev/ENVIRONMENT.md
PR 9508 core/libs/prx/libSceAgcDriver/Execution/include/Driver/Driver.hpp
core/libs/prx/libSceAgcDriver/Execution/include/VulkanDevice.hpp
core/libs/prx/libSceAgcDriver/Execution/src/Driver/Draw/Draw.cpp
core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
core/libs/prx/libSceAgcDriver/Graphics/src/Draw.cpp
docs/dev/ENVIRONMENT.md
PR 9676 docs/dev/ENVIRONMENT.md
PR 9712 core/libs/prx/libSceAgcDriver/Graphics/src/Draw.cpp
docs/dev/ENVIRONMENT.md
PR 9748 core/libs/prx/libSceAgcDriver/Graphics/src/Draw.cpp
PR 9852 core/libs/prx/libSceAgcDriver/Graphics/src/Draw.cpp
docs/dev/ENVIRONMENT.md
PR 9875 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
core/libs/prx/libSceAgcDriver/Graphics/include/Draw.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/Draw.cpp
docs/dev/ENVIRONMENT.md
PR 9897 core/libs/prx/libSceAgcDriver/Graphics/include/Draw.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/Draw.cpp
PR 9915 core/libs/prx/libSceAgcDriver/Graphics/src/Draw.cpp
PR 10043 core/libs/prx/libSceAgcDriver/Execution/include/VulkanDevice.hpp
core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
docs/dev/ENVIRONMENT.md
PR 10193 core/libs/prx/libSceAgcDriver/Execution/include/Driver/Driver.hpp
core/libs/prx/libSceAgcDriver/Execution/include/VulkanDevice.hpp
core/libs/prx/libSceAgcDriver/Execution/src/Driver/Draw/Draw.cpp
core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
core/libs/prx/libSceAgcDriver/Graphics/src/Draw.cpp
docs/dev/ENVIRONMENT.md
PR 10351 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
core/libs/prx/libSceAgcDriver/Graphics/include/Draw.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/Draw.cpp
PR 10359 core/libs/prx/libSceAgcDriver/Execution/include/Driver/Driver.hpp
core/libs/prx/libSceAgcDriver/Execution/src/Driver/Draw/Draw.cpp
PR 10442 core/libs/prx/libSceAgcDriver/Execution/include/VulkanDevice.hpp
core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
core/libs/prx/libSceAgcDriver/Graphics/src/Draw.cpp
docs/dev/ENVIRONMENT.md
PR 10443 docs/dev/ENVIRONMENT.md
PR 10497 core/libs/prx/libSceAgcDriver/Graphics/src/Draw.cpp
PR 10652 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
PR 10757 docs/dev/ENVIRONMENT.md
PR 10867 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
PR 11346 core/libs/prx/libSceAgcDriver/Execution/include/Driver/Driver.hpp
PR 11435 core/libs/prx/libSceAgcDriver/Execution/include/Driver/Driver.hpp
core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
docs/dev/ENVIRONMENT.md
PR 11436 core/libs/prx/libSceAgcDriver/Execution/include/Driver/Driver.hpp
core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
docs/dev/ENVIRONMENT.md
PR 11452 core/libs/prx/libSceAgcDriver/Graphics/include/Draw.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/Draw.cpp
PR 11483 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
PR 11551 core/libs/prx/libSceAgcDriver/Graphics/src/Draw.cpp
PR 11825 core/libs/prx/libSceAgcDriver/Graphics/src/Draw.cpp
PR 12172 core/libs/prx/libSceAgcDriver/Execution/include/Driver/Driver.hpp
PR 12324 docs/dev/ENVIRONMENT.md
PR 12544 docs/dev/ENVIRONMENT.md
PR 12565 core/libs/prx/libSceAgcDriver/Execution/include/Driver/Driver.hpp
PR 12567 core/libs/prx/libSceAgcDriver/Execution/include/Driver/Driver.hpp
PR 12568 core/libs/prx/libSceAgcDriver/Execution/include/Driver/Driver.hpp
PR 12745 docs/dev/ENVIRONMENT.md
PR 12746 docs/dev/ENVIRONMENT.md
PR 12828 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
PR 12840 core/libs/prx/libSceAgcDriver/Execution/include/VulkanDevice.hpp
core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
docs/dev/ENVIRONMENT.md
PR 12848 docs/dev/ENVIRONMENT.md
PR 12849 docs/dev/ENVIRONMENT.md
PR 12855 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
PR 12863 docs/dev/ENVIRONMENT.md
PR 12895 docs/dev/ENVIRONMENT.md
PR 12904 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
PR 12930 docs/dev/ENVIRONMENT.md
PR 12944 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
PR 12970 docs/dev/ENVIRONMENT.md
PR 13147 core/libs/prx/libSceAgcDriver/Graphics/src/Draw.cpp
PR 13148 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
core/libs/prx/libSceAgcDriver/Graphics/src/Draw.cpp
PR 13263 docs/dev/ENVIRONMENT.md
PR 13486 core/libs/prx/libSceAgcDriver/Execution/include/Driver/Driver.hpp
core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
core/libs/prx/libSceAgcDriver/Graphics/src/Draw.cpp
docs/dev/ENVIRONMENT.md
PR 13707 docs/dev/ENVIRONMENT.md
PR 13793 core/libs/prx/libSceAgcDriver/Graphics/include/Draw.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/Draw.cpp
docs/dev/ENVIRONMENT.md
PR 13809 core/libs/prx/libSceAgcDriver/Graphics/include/Draw.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/Draw.cpp
docs/dev/ENVIRONMENT.md
PR 13863 core/libs/prx/libSceAgcDriver/Execution/include/VulkanDevice.hpp
core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
core/libs/prx/libSceAgcDriver/Graphics/src/Draw.cpp
docs/dev/ENVIRONMENT.md
PR 13920 core/libs/prx/libSceAgcDriver/Execution/include/VulkanDevice.hpp
core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
core/libs/prx/libSceAgcDriver/Graphics/src/Draw.cpp
docs/dev/ENVIRONMENT.md
PR 13928 core/libs/prx/libSceAgcDriver/Execution/include/Driver/Driver.hpp
core/libs/prx/libSceAgcDriver/Execution/include/VulkanDevice.hpp
core/libs/prx/libSceAgcDriver/Execution/src/Driver/Draw/Draw.cpp
core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
core/libs/prx/libSceAgcDriver/Graphics/src/Draw.cpp
docs/dev/ENVIRONMENT.md
PR 13929 core/libs/prx/libSceAgcDriver/Execution/include/Driver/Driver.hpp
core/libs/prx/libSceAgcDriver/Execution/include/VulkanDevice.hpp
core/libs/prx/libSceAgcDriver/Execution/src/Driver/Draw/Draw.cpp
core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
core/libs/prx/libSceAgcDriver/Graphics/src/Draw.cpp
docs/dev/ENVIRONMENT.md
PR 13984 core/libs/prx/libSceAgcDriver/Execution/include/Driver/Driver.hpp
PR 14032 core/libs/prx/libSceAgcDriver/Graphics/include/Draw.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/Draw.cpp
PR 14051 core/libs/prx/libSceAgcDriver/Graphics/src/Draw.cpp
docs/dev/ENVIRONMENT.md
PR 14076 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
PR 14217 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
PR 14218 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
PR 14260 docs/dev/ENVIRONMENT.md
PR 14262 docs/dev/ENVIRONMENT.md
PR 14344 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
docs/dev/ENVIRONMENT.md
PR 14367 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
docs/dev/ENVIRONMENT.md
PR 14709 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
PR 14794 core/libs/prx/libSceAgcDriver/Execution/src/Driver/Draw/Draw.cpp
docs/dev/ENVIRONMENT.md
PR 14871 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
PR 14944 core/libs/prx/libSceAgcDriver/Graphics/src/Draw.cpp
PR 15015 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
docs/dev/ENVIRONMENT.md
PR 15059 docs/dev/ENVIRONMENT.md
PR 15136 core/libs/prx/libSceAgcDriver/Execution/include/Driver/Driver.hpp
core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
docs/dev/ENVIRONMENT.md
PR 15169 core/libs/prx/libSceAgcDriver/Execution/include/VulkanDevice.hpp
core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
docs/dev/ENVIRONMENT.md
PR 15181 docs/dev/ENVIRONMENT.md
PR 15327 core/libs/prx/libSceAgcDriver/Graphics/src/Draw.cpp
PR 15343 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
core/libs/prx/libSceAgcDriver/Graphics/src/Draw.cpp
PR 15417 docs/dev/ENVIRONMENT.md
PR 15455 core/libs/prx/libSceAgcDriver/Execution/include/Driver/Driver.hpp
core/libs/prx/libSceAgcDriver/Execution/src/Driver/Draw/Draw.cpp
PR 15456 core/libs/prx/libSceAgcDriver/Execution/include/Driver/Driver.hpp
core/libs/prx/libSceAgcDriver/Execution/src/Driver/Draw/Draw.cpp
core/libs/prx/libSceAgcDriver/Graphics/src/Draw.cpp
docs/dev/ENVIRONMENT.md
PR 15520 docs/dev/ENVIRONMENT.md
PR 15529 docs/dev/ENVIRONMENT.md
PR 15548 core/libs/prx/libSceAgcDriver/Execution/include/VulkanDevice.hpp
core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
core/libs/prx/libSceAgcDriver/Graphics/include/Draw.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/Draw.cpp
docs/dev/ENVIRONMENT.md
PR 15569 docs/dev/ENVIRONMENT.md
PR 15570 core/libs/prx/libSceAgcDriver/Graphics/src/Draw.cpp
docs/dev/ENVIRONMENT.md
PR 15572 core/libs/prx/libSceAgcDriver/Graphics/src/Draw.cpp
docs/dev/ENVIRONMENT.md
PR 15671 docs/dev/ENVIRONMENT.md
PR 15674 docs/dev/ENVIRONMENT.md
PR 15719 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
docs/dev/ENVIRONMENT.md
PR 15738 docs/dev/ENVIRONMENT.md
PR 15840 core/libs/prx/libSceAgcDriver/Graphics/src/Draw.cpp
PR 15845 core/libs/prx/libSceAgcDriver/Execution/include/Driver/Driver.hpp
PR 15859 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
PR 15917 core/libs/prx/libSceAgcDriver/Execution/include/VulkanDevice.hpp
core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
docs/dev/ENVIRONMENT.md
PR 15918 docs/dev/ENVIRONMENT.md
PR 15919 docs/dev/ENVIRONMENT.md
PR 15941 core/libs/prx/libSceAgcDriver/Graphics/src/Draw.cpp
PR 15974 docs/dev/ENVIRONMENT.md
PR 15986 core/libs/prx/libSceAgcDriver/Graphics/src/Draw.cpp
PR 16013 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
PR 16086 core/libs/prx/libSceAgcDriver/Graphics/src/Draw.cpp
PR 16115 core/libs/prx/libSceAgcDriver/Graphics/src/Draw.cpp
docs/dev/ENVIRONMENT.md
PR 16116 docs/dev/ENVIRONMENT.md
PR 16204 core/libs/prx/libSceAgcDriver/Execution/include/Driver/Driver.hpp
PR 16217 docs/dev/ENVIRONMENT.md
PR 16252 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
PR 16286 docs/dev/ENVIRONMENT.md
PR 16294 docs/dev/ENVIRONMENT.md
PR 16363 core/libs/prx/libSceAgcDriver/Graphics/src/Draw.cpp
PR 16371 docs/dev/ENVIRONMENT.md
PR 16372 docs/dev/ENVIRONMENT.md
PR 16413 core/libs/prx/libSceAgcDriver/Execution/src/Driver/Draw/Draw.cpp
PR 16422 core/libs/prx/libSceAgcDriver/Execution/src/Driver/Draw/Draw.cpp
PR 16427 docs/dev/ENVIRONMENT.md
PR 16474 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp

@github-actions github-actions Bot added docs agc libSceAgc* labels Oct 24, 2026
@WallisSkill
WallisSkill force-pushed the perf/agc-early-draw-key branch from dd04c54 to f0d6652 Compare October 24, 2026 17:44
@WallisSkill

Copy link
Copy Markdown
Contributor Author

Thanks for the review. Addressed:

  • Rebase. Rebased onto main 137a8fa. The pipelined commit lambda in Execution/src/Driver/Draw/Draw.cpp now keeps main's writablePrograms capture and adds contentKey beside it; nothing else from main is dropped. The 38 AGC tests pass on the rebased head in plain and pipelined modes with APS5_VERIFY_EARLY_DRAW_KEY=1 (76 of 76).
  • Validation runs. The same 38 tests ran on main 137a8fa and on this head with VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation, ANYPS5_NO_SHADER_CACHE=1, ANYPS5_REQUIRE_VULKAN=1 and VK_LOADER_DEBUG=layer; each device-creating test logs Inserted device layer "VK_LAYER_KHRONOS_validation", none reports was not found but was requested, all pass, and the only message on either side is VUID-VkDeviceCreateInfo-pNext-pNext with identical counts per test (126 each). Details are in the Tested section.
  • Digest. The description now holds the full trace_digest.py output of base-1 and pr4-1; with the release files run it with --summary gk2-<capture>-summary.json.
  • perf(agc): check a mid-decode vertex table store against the queued write set and the retired items' writes #10677. perf(agc): check a mid-decode vertex table store against the queued write set and the retired items' writes #10677 does not touch Graphics/src/Draw.cpp or Execution/src/Driver/Draw/Draw.cpp; git merge-tree of the two heads reports no conflict, so Depends on stays none (noted on the checklist).

@github-actions github-actions Bot removed the needs rebase Conflicts with main, rebase needed label Oct 24, 2026

@MarcZX10 MarcZX10 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed exact head f0d6652d3b0f82d2effe59697c0b8be4fc0362b0. The early key is built from the same draw inputs and carries the originating device handle; the commit path falls back to recomputing it if the active device differs, and the verification mode compares it against the committer-side key. The author reports 76/76 focused AGC tests passing with key verification enabled, plus the same 38 tests on main and this head with Vulkan validation confirmed loaded and no new VUIDs. The paired performance report now includes trace_digest.py summaries and trace assets. Current hosted conventions, labels, eligibility and report checks pass; product CI jobs are skipped by policy.

@github-actions github-actions Bot added the needs rebase Conflicts with main, rebase needed label Oct 24, 2026
@MarcZX10

Copy link
Copy Markdown
Contributor

The branch is now marked DIRTY against current main. I checked the merge read-only with git merge-tree; it conflicts in Driver.hpp, VulkanDevice.hpp, Execution/src/Driver/Draw/Draw.cpp, Execution/src/VulkanDevice.cpp, Graphics/include/Draw.hpp and Graphics/src/Draw.cpp. Please rebase onto current main, preserve the early-key changes alongside the newer draw/recorder paths, then rerun the focused validation comparison on the rebased head. The previous test results were against 137a8fab8, so they do not validate this newer integration state.

@WallisSkill
WallisSkill force-pushed the perf/agc-early-draw-key branch from f0d6652 to 4d4b48d Compare October 25, 2026 00:17
@WallisSkill

Copy link
Copy Markdown
Contributor Author

Rebased onto main cf528e7 (head 4d4b48d).

  • Conflicts. All six came from main threading a DrawTraceContext through Driver::commitDraw, VulkanDevice::Draw, Graphics::Draw and PreparedDraw. The key now goes after trace in each signature; the pipelined commit keeps main's trace and writablePrograms captures and adds contentKey; VulkanDevice::Draw keeps main's traceDraws switch. Nothing from main is dropped. The early key is still built from the same DrawResourceKey inputs resolveDrawResources uses.
  • Tests on the rebased head. The 38 AGC tests pass in plain and pipelined modes with APS5_VERIFY_EARLY_DRAW_KEY=1 (76 of 76), so every precomputed key in the suite equals the committer's.
  • Validation, redone against cf528e7. Same 38 tests on main cf528e7 and on 4d4b48d with VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation, ANYPS5_REQUIRE_VULKAN=1, ANYPS5_NO_SHADER_CACHE=1 and VK_LOADER_DEBUG=layer: the layer is inserted in all 31 device-creating tests on both, all 38 pass on both, and the only message is VUID-VkDeviceCreateInfo-pNext-pNext, 132 on each side with identical per-test counts. No new VUID.
  • git merge-tree of this head and perf(agc): check a mid-decode vertex table store against the queued write set and the retired items' writes #10677 still reports no conflict. The Tested section is updated.

@github-actions github-actions Bot removed the needs rebase Conflicts with main, rebase needed label Oct 25, 2026
@oneandonlydean oneandonlydean self-assigned this Oct 25, 2026
@imellag

imellag commented Oct 25, 2026

Copy link
Copy Markdown
Contributor

A data point from a title that is bound by the queue worker rather than by the committer, in case it helps decide the default.

Planet of Lana (PPSA19450), Apple M4 Pro, macOS 27.0.1, x86-64 under Rosetta 2, MoltenVK 1.4.2, default driver settings (no APS5_DRAW_PIPELINE, so queue worker 0 builds the key). main doesn't run titles on macOS yet, so the base is a local macOS tree on main 83694b3 (#8658's macOS port plus #8477, #9263, #9193, #9746, #9737, #10062, #6926 and #9406), and I ported this PR's head 4d4b48da58 onto it by hand. The trace and draw-pipeline signatures differ there, and the key code itself is unchanged. Scripted New Game start, no input after the menu, 120 s runs, measured from 85 s with APS5_TRACE_SUMMARY_EVERY=10:

fps frame p50 Driver.Packet per frame
base 28.56, 28.09, 28.78 33.7-35 ms 29-30 ms
this PR 27.79, 27.81 34.7-35.4 ms 30 ms

In this scene the queue worker translates for about 29 of the 34 ms of a frame, and it is what paces the title. Moving the key onto it adds about 1 ms per frame there (29 to 30 ms, rounded), so the change is neutral to about 2% slower. The difference is close to the run-to-run spread. In titles where the committer is the limit, as in your Graveyard Keeper 2 scene, the trade goes the other way. So APS5_NO_EARLY_DRAW_KEY may be worth keeping documented as the switch for worker-bound titles.

One run with APS5_VERIFY_EARLY_DRAW_KEY=1 over the same 120 s found no key that differed from the committer's.

AI-assisted: yes

@WallisSkill

Copy link
Copy Markdown
Contributor Author

@imellag thanks, that is exactly the case I had not measured. 7b0b45a builds the early key only on the draw finisher; a draw that queue worker 0 finishes itself leaves the key to the committer as before, so the change no longer puts anything on the worker.

Re-measured on Graveyard Keeper 2 against main cf528e7, interleaved, two rounds each (frame p50):

main previous head 4d4b48d 7b0b45a
finisher on (APS5_DRAW_PIPELINE=1 APS5_PIPELINED_DRAWS=256 APS5_PIPELINE_DISPATCH=1) 59.4 / 58.1 ms – 55.9 / 55.0 ms
no draw pipeline switches (worker 0 at 98 %) 61.0 / 58.9 ms 58.3 / 56.5 ms 60.6 / 58.3 ms

With the finisher the gain stays (about 5 %); without it the new head matches main. In this title the previous head happened to help in the worker-bound configuration too, since the committer is close to its limit as well, but your scene shows it can cost the worker, so keeping the key off the worker is the safer default. APS5_NO_EARLY_DRAW_KEY stays documented.

The AGC suite passes again at 7b0b45a in plain and pipelined modes with APS5_VERIFY_EARLY_DRAW_KEY=1 (76 of 76), and the validation comparison against main is unchanged (only VUID-VkDeviceCreateInfo-pNext-pNext, 132 on each side, identical per test). The description has the new table, summary lines and digests; the traces are in the release as gk2-ek-*.

@babyhuey

babyhuey commented Oct 25, 2026 •

Copy link
Copy Markdown
Contributor

Linux run of this head 7b0b45a5210, merged onto main a7a2eece499 (clean merge, local only), with the selection CI's skipped Linux product job uses: anyps5-build CI image (Ubuntu 24.04, GCC 13, Release, BUILD_TESTING=ON), lavapipe with ANYPS5_REQUIRE_VULKAN=1 GALLIUM_OVERRIDE_CPU_CAPS=avx. The tree was configured fresh after the merge, then select_tests.py select / ninja -f select.ninja selected / --target libs / select_tests.py ctest --timeout 120.

  • Selected 1442 tests: all pass.

Edited: the first version of this comment reported 23 failures and called them lavapipe-only AGC tests that also fail on main. That was wrong. My container ran with Docker's default seccomp profile, which blocks userfaultfd, so the write-watch tests failed on main and on this PR alike. With --security-opt seccomp=unconfined, main passes all 2,274 tests and this head passes all 1442 selected tests, so those tests are now actually covered.

AI-assisted: yes (Claude Code)

@JJenkx

JJenkx commented Oct 26, 2026

Copy link
Copy Markdown
Contributor

Additional Linux/AMD correctness check for exact PR head 7b0b45a52101d4e9feae7154e69c23826b5d1818:

  • Release build on the Radeon RX 6650 XT / RADV 26.2.4. Private ArcRunner prerequisite integration c247fcd7706681e34363743f582c9c8053bd358b, then this PR merged cleanly as da60fcffb931c631f3efc0d78978187b4f03c5d9. This is an integration comparison, not vanilla-main bring-up.
  • Same nine focused draw-cache, relocation, user-word and predicated-label ordering tests on baseline and candidate, three executions each: 54/54 passed, 84 confirmed Khronos layer insertions, no skips or VUID- errors. Both arms used APS5_DRAW_PIPELINE=1, APS5_VERIFY_EARLY_DRAW_KEY=1, ANYPS5_REQUIRE_VULKAN=1, ANYPS5_NO_SHADER_CACHE=1 and actual VK_LAYER_KHRONOS_validation. The predicated-label ordering fixtures are CPU-only; they do not create a Vulkan device.
  • ArcRunner PPSA21406 reached the saved doorway gameplay scene with the early-key verifier and validation enabled. Normal window close at 220 seconds returned 0, with no early-key mismatch or VUID, and runtime/config/kernel settings restored. The native run confirmed two layer insertions.

No performance claim: this native run had validation/verifier overhead and disabled shader caches. Its pink foreground palette also differs from the earlier blue/cyan baseline capture. An initial harness attempt lacked its menu reference images and did not reach gameplay; it was rejected, fixed with a reference-image preflight, and repeated before the result above.

Paired fixture logs, exact build pins and native receipt · SHA-256 ae6d3717a6729768f2c0a73040e3e07cca7fc15dda779b79eb94acbf3a675cea.

@oneandonlydean

Copy link
Copy Markdown
Collaborator

@JJenkx Thanks for the AMD run with the verifier and validation layer on. No early-key mismatch on a real title is good to see.

WallisSkill and others added 2 commits October 28, 2026 09:13
…hes the committer

The thread that finishes a pipelined draw (the draw finisher, or queue
worker 0) now builds the draw's resource-cache key from the same
stages, state and parameters, and the commit uses it when it was made
for the committing device. Graveyard Keeper 2, first dungeon room,
APS5_PIPELINED_DRAWS 256: frame p50 67.3-68.8 ms on main, 62.5-63.8 ms
with this change. APS5_NO_EARLY_DRAW_KEY keeps the key on the
committer; APS5_VERIFY_EARLY_DRAW_KEY rebuilds it there and requires
both to match.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A draw that queue worker 0 finishes itself (the draw pipeline without the
finisher hand-off) built the resource-cache key on the worker before queueing
the commit. In a title paced by the worker that moved about 1 ms per frame onto
the slowest thread. The key is now built early only on the draw finisher,
which runs beside the worker; every other draw leaves it to the committer as
before.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@WallisSkill
WallisSkill force-pushed the perf/agc-early-draw-key branch from 7b0b45a to f32df51 Compare October 28, 2026 03:06
@github-actions github-actions Bot removed the needs rebase Conflicts with main, rebase needed label Oct 28, 2026
@WallisSkill

Copy link
Copy Markdown
Contributor Author

Rebased onto main cccdaa2 (head f32df51) to clear the conflict in Graphics/src/Draw.cpp: main added drawTessellationGeometry right above Graphics::Draw, and this branch adds DrawResourceContentKey there and the contentKey parameter to Draw. The resolution keeps both; the two inner Draw calls of the tessellation path pass no key (the parameter defaults to nullptr), so that path builds its key on the committer as before.

On the rebased head:

  • the 38 AGC driver tests in plain and pipelined mode with APS5_VERIFY_EARLY_DRAW_KEY=1: 76 of 76 pass;
  • the validation comparison against main cccdaa2 (same setup as in the description): all 38 pass on both, the layer is inserted in the 31 tests that create a device, and the only message is VUID-VkDeviceCreateInfo-pNext-pNext, 138 on each side with the same count per test.

I also re-measured, since main moved a lot: Graveyard Keeper 2, first dungeon room, APS5_DRAW_PIPELINE=1 APS5_PIPELINED_DRAWS=256 APS5_PIPELINE_DISPATCH=1 APS5_MIMALLOC=1, APS5_TRACE_SECONDS=120:10, the two arms differing only in libSceAgcDriver.prx, interleaved, three rounds.

frame p50 (ms), rounds 1 / 2 / 3 Graphics.Draw on the committer (ms per frame) Driver.DrawFinish (ms per frame)
main cccdaa2 52.7 / 53.0 / 52.3 43.4 / 44.0 / 43.5 31.6 / 31.2 / 31.1
this head f32df51 52.8 / 52.3 / 53.3 39.1 / 38.8 / 39.4 33.6 / 33.2 / 33.7

The change still moves the key off the committer (about 4.5 ms less Graphics.Draw per frame, 2 ms more on the finisher), but on current main it no longer changes the frame time in this scene: the frame went from 59 to 52 ms since cf528e7, and queue worker 0 is now the limit (96 % busy in every capture of both arms), not the committer. So the 5 % in the description is not reproducible on today's main; I've marked that in the description. It still helps where the committer is the limit, as it was here on cf528e7, and it costs nothing measurable where it isn't. If you'd rather not take a change whose gain depends on the scene, I'm fine with closing it.

AI-assisted: yes (Claude Code)

@github-actions github-actions Bot added the needs rebase Conflicts with main, rebase needed label Oct 28, 2026
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@WallisSkill

Copy link
Copy Markdown
Contributor Author

The branch conflicted with main again, so I merged main bb04a4f into it (head bdd2497). It is a merge commit this time rather than a rebase, so the two reviewed commits stay as they were.

The conflict was with 2b349ff (the draw shape memo). main added a std::uint64_t shape parameter to Graphics::Draw, VulkanDevice::Draw and Driver::commitDraw, and this branch adds const std::vector<std::uint32_t>* contentKey in the same place. The resolution keeps both, shape first and then contentKey:

  • the pipelined commit lambda captures both shape = tail.shapeKey and the finisher-built contentKey, and passes both on;
  • PreparedDraw holds both members;
  • every other call keeps main's arguments and leaves contentKey at its nullptr default, so those draws build their key on the committer as before.

On the merged head, Windows 11 Pro, MinGW GCC Release, RTX 5070 (616.92):

  • the 38 AGC driver tests in plain and pipelined mode: 76 of 76 pass. They pass again with APS5_VERIFY_EARLY_DRAW_KEY=1 (76 of 76) and with APS5_VERIFY_SHAPE_MEMO=1 (76 of 76), since both features now run on the same draws;
  • validation on the same 38 tests against main bb04a4f, built in the same tree: every test passes on both, and the per-test summaries are identical. The layer is inserted in the 31 tests that create a device, and the only message is VUID-VkDeviceCreateInfo-pNext-pNext, 141 times on each side.

The performance situation is the one in my last comment. On current main the committer is not the limit in Graveyard Keeper 2, so I'm still fine with closing this if you'd rather not take it.

AI-assisted: yes (Claude Code)

@github-actions github-actions Bot removed the needs rebase Conflicts with main, rebase needed label Oct 29, 2026
@TechLevelZero

TechLevelZero commented Oct 30, 2026 •

Copy link
Copy Markdown
Contributor

✅ NVIDIA GPU test: passed

PR head bdd2497 merged onto main f6232fc · tested 2026-11-03 07:44 UTC · 26 min

GPU NVIDIA RTX 2000 Ada Generation, driver 595.99.02, Vulkan 1.4.329
Host Ubuntu 26.04.1 LTS, kernel 7.0.0-38-generic, container ubuntu:24.04
Logs build and test logs for this run
Build ✅ passed (Release, -DANYPS5_ENABLE_SPIRV_TOOLS=ON)
Tests ✅ 2,674 passed · 6 failed (0 new, 3 also fail on main, 3 unstable on main) · 49 skipped (ANYPS5_REQUIRE_VULKAN=1)
Test setup CPU-only tests without a GPU; GPU tests (and any CPU-only test that failed or skipped without one) once on the GPU with VK_LAYER_KHRONOS_validation and ANYPS5_NO_SHADER_CACHE=1; main ran the same way
Test selection 2,729 of 3,743 tests run: the ones this change can reach, chosen by tools/select_tests.py from main's build graph
Vulkan validation ✅ no new validation IDs vs main (934 tests run on the GPU)
Slow tests (>30 s, GPU tests timed with validation layers) ⚠️ agc_driver_pipeline_journal 120.1 s
Unstable on main (3, these also failed in recent main runs on this machine; not counted against this PR)
agc_driver_pipeline_journal: failed in 4 of the last 10 main runs
agc_submit_progress: failed in 6 of the last 10 main runs
agc_submit_progress_no_timeline: failed in 5 of the last 10 main runs
Failing on main too (3, not counted against this PR)
agc_driver_image_table
guest_mmap_executable
guest_socket_options_multicast
Validation IDs already present on main (4 IDs in 525 tests)
VUID-VkDeviceCreateInfo-pNext-pNext (525 tests): agc_driver, agc_driver_address_passes, agc_driver_alias_copy_label, agc_driver_alpha_to_coverage, agc_driver_array_layer_target, agc_driver_bc_block_copy, agc_driver_bda_anchor_reads, agc_driver_bda_span_reads, and 517 more
VUID-vkCmdCopyImage-srcImage-01548 (8 tests): agc_driver_depth_clear_hle, agc_driver_depth_plane_buffer_memory, agc_driver_depth_plane_partial_store, agc_driver_depth_plane_sampling, agc_driver_depth_storage_dispatch, agc_driver_depth_surface_from_storage, agc_driver_dispatch_move_depth, agc_driver_stencil_null_feedback
VUID-vkCmdCopyImage-srcImage-01551 (8 tests): agc_driver_depth_clear_hle, agc_driver_depth_plane_buffer_memory, agc_driver_depth_plane_partial_store, agc_driver_depth_plane_sampling, agc_driver_depth_storage_dispatch, agc_driver_depth_surface_from_storage, agc_driver_dispatch_move_depth, agc_driver_stencil_null_feedback
VUID-VkPipelineColorBlendStateCreateInfo-pAttachments-00605 (1 test): agc_driver_srgb8_color_target
Skipped (49)
agc_driver_bda_reads_shadowed_results: skipped, the device reports watched host memory written when it imports or reads it
agc_driver_bda_reads_shadowed_results_per_build: skipped, the device reports watched host memory written when it imports or reads it
agc_driver_sample_order_grid_reference: skipped, the device does not keep depth drawn at custom sample locations at those locations, even after a transition that names them: the composite of uniform renders holds the guest's depth in 0 of 3005 sloped samples, so no path can be compared with it bit for bit
agc_driver_scattered_runs: skipped, host imports are unavailable: /dev/udmabuf is not accessible
agc_driver_sparse_dma_buf_import: skipped, host imports are unavailable: /dev/udmabuf is not accessible
agc_driver_stencil_ref_export: skipped, the device lacks VK_EXT_shader_stencil_export
agc_driver_vertex_elected_atomic_max: skipped, the device runs vertex programs in subgroups, so they keep their cross-lane reductions
agc_host_import_sparse: skipped, host imports are unavailable: /dev/udmabuf is not accessible
agc_import_settle_initial_dcc: skipped, the device has no deferred settle of host imports: imports under 1 MiB wait for one only on Windows
agc_unit_shadow_completion_store: skipped, the device reports watched host memory written when it imports or reads it
guest_http_uri_locale: 
guest_net_ctl: skipped, the host has no IPv4 address
guest_video_out_color_space: skipped, no display or Vulkan device: SDL_InitSubSystem(VIDEO | GAMECONTROLLER) failed: wayland,x11 not available
guest_video_out_hdr: skipped, no display or Vulkan device: SDL_InitSubSystem(VIDEO | GAMECONTROLLER) failed: wayland,x11 not available
guest_video_out_high_frame_rate: skipped, no display or Vulkan device: SDL_InitSubSystem(VIDEO | GAMECONTROLLER) failed: wayland,x11 not available
guest_video_out_output_mode: skipped, no display or Vulkan device: SDL_InitSubSystem(VIDEO | GAMECONTROLLER) failed: wayland,x11 not available
guest_video_out_resolution_status: skipped, no display or Vulkan device: SDL_InitSubSystem(VIDEO | GAMECONTROLLER) failed: wayland,x11 not available
guest_video_out_wqhd_detection: skipped, no display or Vulkan device: SDL_InitSubSystem(VIDEO | GAMECONTROLLER) failed: wayland,x11 not available
video_out_flip_aftergpu: skipped, no display or Vulkan device: DisplayWindow: Vulkan support is either not configured in SDL or not available in current SDL video driver (offscreen) or platform
video_out_flip_backtoback: skipped, no display or Vulkan device: DisplayWindow: Vulkan support is either not configured in SDL or not available in current SDL video driver (offscreen) or platform
video_out_flip_controls: skipped, no display or Vulkan device: DisplayWindow: Vulkan support is either not configured in SDL or not available in current SDL video driver (offscreen) or platform
video_out_flip_cpuflip: skipped, no display or Vulkan device: DisplayWindow: Vulkan support is either not configured in SDL or not available in current SDL video driver (offscreen) or platform
video_out_flip_cpuflip_in_order: skipped, no display or Vulkan device: DisplayWindow: Vulkan support is either not configured in SDL or not available in current SDL video driver (offscreen) or platform
video_out_flip_dcc: skipped, no display or Vulkan device: DisplayWindow: Vulkan support is either not configured in SDL or not available in current SDL video driver (offscreen) or platform
video_out_flip_deferred: skipped, no display or Vulkan device: DisplayWindow: Vulkan support is either not configured in SDL or not available in current SDL video driver (offscreen) or platform
video_out_flip_eop: skipped, no display or Vulkan device: DisplayWindow: Vulkan support is either not configured in SDL or not available in current SDL video driver (offscreen) or platform
video_out_flip_eop_aftergpu: skipped, no display or Vulkan device: DisplayWindow: Vulkan support is either not configured in SDL or not available in current SDL video driver
Reproduce
git fetch origin bdd24973c9a3e65ca0037f6e9cdc0da45c0945a4 f6232fcfda70644495273f6b8dd88cf0603463d6
git checkout f6232fcfda70644495273f6b8dd88cf0603463d6 && git merge --no-ff bdd24973c9a3e65ca0037f6e9cdc0da45c0945a4
git submodule update --init --recursive
cmake -S . -B build -G Ninja -DCMAKE_BUILD_TYPE=Release -DBUILD_TESTING=ON -DANYPS5_ENABLE_SPIRV_TOOLS=ON
cmake --build build && cmake --build build --target libs
VK_DRIVER_FILES=/nonexistent/icd.json ctest --test-dir build -E '^(agc|shader|recompiler|videoout|video_out|guest_video_out|vulkan)|gpu' --timeout 120 --parallel 32 --output-on-failure
ANYPS5_REQUIRE_VULKAN=1 ANYPS5_NO_SHADER_CACHE=1 VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation \
  ctest --test-dir build -R '^(agc|shader|recompiler|videoout|video_out|guest_video_out|vulkan)|gpu' --timeout 120 --parallel 4 --output-on-failure
# failures are then re-run alone: --timeout 360 --parallel 2; new validation IDs: the test alone, twice, --parallel 1

Automated build and test on a contributor's NVIDIA machine; it does not replace upstream CI. A new comment is posted for each new push. Full logs.

@MarcZX10

Copy link
Copy Markdown
Contributor

Re-checked — new head, current frame-time gain not demonstrated

The exact head bdd24973c9a3e65ca0037f6e9cdc0da45c0945a4 merges cleanly onto current main 102c4f95a24d97dd7d000fb1830f26c103d03342, and the source checks pass, but the latest matched report on main cccdaa273 shows overlapping frame p50 values of 52.3–53.3 ms across the two arms.

I ran git diff --check upstream/main...refs/review/pr-10678-current (clean), python3 tools/check_conventions.py --base upstream/main --head refs/review/pr-10678-current (passed), and git merge-tree --write-tree upstream/main refs/review/pr-10678-current (clean tree 536dd1ab7fe830d5bb58ead4be76a7f89fe6571b). The author-reported results still show less Graphics.Draw time, but no end-to-end frame-time gain on that newer baseline. The new NVIDIA report passes on the same PR head merged onto older base f6fddd6; I did not run a local build, AGC tests, or performance capture. NVIDIA report

A matched capture against current main 102c4f95a24d97dd7d000fb1830f26c103d03342 would show whether the result changed after the latest main updates. I have not submitted an approval on this new head.

chitters2004 pushed a commit to chitters2004/AnyPS5 that referenced this pull request Nov 1, 2026
chitters2004 pushed a commit to chitters2004/AnyPS5 that referenced this pull request Nov 1, 2026
…and main

Merge johandavidcm's feat/agc-draw-prepare-ahead (4c1af4f, with boykopovar#10678)
for the Windows A/B measurement. The prepared-ahead fragment outputs,
stages and vertex layout and the early resource key feed planDraw. An
adopted pipeline takes precedence over main's shape memo. Main's shape
parameter is kept ahead of contentKey and ahead in every Draw signature.
The pipelined summary keeps main's separate read-range field.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011mLh2dBi2gkidDMAs7CY9u
@vingelvatten

Copy link
Copy Markdown
Contributor

@WallisSkill #14051 (the draw-side step 2 from #7895) builds the resource key in a new planDraw step of prepareDraw, so it touches the same lines as this PR's contentKey plumbing, and @MarcZX10 asked both PRs to agree on an order. Our proposal: #14051 lands first, since it is a refactor with no behaviour change, and this PR then shrinks to passing the finisher's key into planDraw and taking it when KeyForDevice matches, about ten lines instead of the parameter through Draw and resolveDrawResources; I am happy to write that rebase for you when the time comes. If you would rather land first, say so and #14051 rebases onto this one instead and takes Depends on: #10678. Either way nothing of yours is lost.

@TripyFox

TripyFox commented Nov 4, 2026

Copy link
Copy Markdown
Contributor

One more data point on the frame-time question, from ASTRO BOT (PPSA21567 01.019.000) at Crash Site (-lvl hub_crashsite). On this machine and scene the change shows no measurable frame-time gain. The key check also stays clean.

Run presents / 10 s frame p50 p99 GPU busy / present
base, round 1 129.9 76.84 88.44 61.32
base + #10678, round 1 128.7 77.70 88.77 62.67
base, round 2 131.3 76.22 90.17 60.80
base + #10678, round 2 132.2 75.55 93.33 60.75

Frame p50 moves by +0.9 ms in round 1 and −0.7 ms in round 2, so the difference changes sign between rounds and stays inside the run-to-run spread. Pooling the 38 intervals per arm gives a median difference of +0.3 ms, with a bootstrap 95 % interval of −0.8 to +1.2 ms. The phases move in the expected direction but only slightly: Graphics.Draw −0.8 ms/frame and Graphics.Draw.draw_and_resource_release −0.9. The frame here is limited by the queue workers (two at ~100 % busy, dominated by Driver.Packet.memory_wait), not by key building.

Verification: I ran 150 s at the same scene with APS5_VERIFY_EARLY_DRAW_KEY=1, on the same tree plus #15682. It logged no "differs from the commit" message and no crash, assert or device loss. Frame p50 was 72.3 ms, in line with the timed runs.

AI-assisted: yes (Claude Code)

@oneandonlydean

Copy link
Copy Markdown
Collaborator

Hi @WallisSkill, thanks for keeping this branch current. It conflicts with main again, in core/libs/prx/libSceAgcDriver/Graphics/src/Draw.cpp and docs/dev/ENVIRONMENT.md, so it can't be merged as it stands.

Two things would move it forward:

  1. Please rebase (or merge main) so it is mergeable again, keeping the early-key changes alongside the newer draw and recorder code.
  2. Please add a matched main-vs-PR pair on the rebased head that shows a gain, same title, scene and machine, with both aps5-summary.jsonl lines.

The reason for the second point: the runs we have so far don't show a gain. In @MarcZX10's re-check of bdd24973c9 the frame p50 values of the two arms overlap (52.3 to 53.3 ms), and @TripyFox measured PPSA21567 at 4K on an RTX 5090 and saw no measurable frame-time difference. The key check stays clean in all of them, so correctness isn't the question; it is only whether this removes enough per-draw work to show up. If a pair on the rebased head still shows no gain, we would close this as not demonstrated rather than keep it open. If you have a scene where the key build is a larger share of the frame, that is the one to measure.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agc libSceAgc* docs needs rebase Conflicts with main, rebase needed perf Performance change

Projects

None yet

Development

Successfully merging this pull request may close these issues.

9 participants