Skip to content

perf(agc): wait only for CPU-stored completion labels when completing CPU writes - #11847

Closed
SP4C3B4R-8 wants to merge 1 commit into
boykopovar:mainfrom
SP4C3B4R-8:perf/revalidate-completion-labels
Closed

SP4C3B4R-8 wants to merge 1 commit into
boykopovar:mainfrom
SP4C3B4R-8:perf/revalidate-completion-labels

Conversation

@SP4C3B4R-8

@SP4C3B4R-8 SP4C3B4R-8 commented Oct 27, 2026 •

Copy link
Copy Markdown
Contributor

What

CompletePendingCpuWrites synced through a range whenever any label was pending inside it (Recorder::PendingLabelIn) and some completion label was pending anywhere. A label the GPU stores in the stream is ordered before the range's next GPU use like any other recorded write, so it does not need a CPU-side wait. The check now uses Recorder::CompletionLabelIn (labels the CPU stores at completion), the same check VulkanDevice already uses for RecordedWritesSettled, WriteLabelOnGpu and completionStoresOver. A GPU-stored label that a CPU write-back overlaps is marked behind its completion (NoteWrittenBack) and still makes the range wait.

At ASTRO BOT's Crash Site the old check fired from ShaderResources::revalidateFull on queue worker 0 for a 184 MiB imported buffer region holding GPU-stored labels: about 5 ms per frame of worker 0 blocked on the GPU, and worker 0 is the busiest thread there (the GPU waits on it).

New test completionLabelWaitTests (in agc_recorder_completion_labels and the full recorder run): a GPU-stored label beside a pending CPU-stored one does not make its range wait; after a write-back over it, it does; a CPU-stored label still does. It fails on main ("a label the GPU stores in the stream made a bound range wait").

Tested

Windows 11 Pro 10.0.26300, Ryzen 7 7800X3D, RTX 5070 Ti (NVIDIA 621.01).

  • ctest --test-dir build -R agc_recorder_completion_labels -V with ANYPS5_REQUIRE_VULKAN=1, ANYPS5_NO_SHADER_CACHE=1, VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation: passes on this branch, fails on main at the new check; no VUID- lines and no missing-layer line in either log.
  • ASTRO BOT (PPSA21567) -lvl hub_crashsite, standing still, warm shader cache, APS5_NO_LABEL_READBACK_STORE=1 in both arms (the label readback store is a separate cost, see Astro Bot (PPSA21564) #357), 60 s steady window from the window-title FPS counter, runs alternated after one warm-up run on main:
run main 5bc8403 this PR
1 10.44 11.08
2 10.45 10.87

About +5%. On an earlier main (26 October) with a debug probe on the sync sites, worker 0's waits at this call went from 11 s to 0.4 s per run, and frame dumps matched main.

  • Capture pair, same session, APS5_TRACE_SECONDS=230:4, both builds clean, default settings and APS5_NO_LABEL_READBACK_STORE=1 (digests and test logs in the comments). Frame p50: default 124.4 (main) / 119.0 (PR) ms, not a measurable change because the label readback store bounds the frame there; store off 96.8 / 92.5 ms (-4.5 %).
{"commit":"5bc84038c490","dirty":false,"env":{"APS5_HOST_IMPORT_MIB":"20480","APS5_NO_SNAPSHOT_CHECK":"1","APS5_TRACE_EVENTS":"1048576","APS5_TRACE_SECONDS":"230:4"},"gpu":"NVIDIA GeForce RTX 5070 Ti","driver":"NVIDIA 621.01","os":"Windows 10.0.26300","cpu":"AMD Ryzen 7 7800X3D 8-Core Processor","cpu_threads":16,"memory_mib":31801,"title_id":"PPSA21567","title":"ASTRO BOT","content_version":"01.018.000","resolution":"3840x2160","window":{"spec":"seconds 230:4","first_present":3094,"ms":4019.977},"presents":32,"frame_ms":{"p50":124.377,"p90":137.555,"p99":140.586,"max":140.586},"gpu_busy_ms_per_present":86.966,"worker_busy_pct":{"queue worker 0x0":98.817,"queue worker 0x40":98.066,"queue worker 0x48":97.025,"queue worker 0x46":3.976},"top_phases_ms_per_frame":{"Driver.Packet":373.014,"Driver.Packet.memory_wait":215.712,"Driver.Packet.draw":73.313,"Driver.Draw":72.836,"Graphics.Draw":60.339,"Graphics.Draw.draw_and_resource_release":47.025,"Driver.Packet.dispatch":37.602,"Driver.Draw.shader_compile_and_link":35.104},"trace_dropped":false,"trace":"aps5-trace-5bc84038c490-12636.json.gz"}
{"commit":"c6cd87042e9c","dirty":false,"env":{"APS5_HOST_IMPORT_MIB":"20480","APS5_NO_SNAPSHOT_CHECK":"1","APS5_TRACE_EVENTS":"1048576","APS5_TRACE_SECONDS":"230:4"},"gpu":"NVIDIA GeForce RTX 5070 Ti","driver":"NVIDIA 621.01","os":"Windows 10.0.26300","cpu":"AMD Ryzen 7 7800X3D 8-Core Processor","cpu_threads":16,"memory_mib":31801,"title_id":"PPSA21567","title":"ASTRO BOT","content_version":"01.018.000","resolution":"3840x2160","window":{"spec":"seconds 230:4","first_present":3417,"ms":4068.531},"presents":33,"frame_ms":{"p50":118.951,"p90":135.168,"p99":139.592,"max":139.592},"gpu_busy_ms_per_present":91.86,"worker_busy_pct":{"queue worker 0x0":98.767,"queue worker 0x40":97.994,"queue worker 0x48":99.95,"queue worker 0x46":4.423},"top_phases_ms_per_frame":{"Driver.Packet":370.019,"Driver.Packet.memory_wait":211.995,"Driver.Packet.draw":71.689,"Driver.Draw":71.186,"Graphics.Draw":60.957,"Graphics.Draw.draw_and_resource_release":47.341,"Driver.Draw.shader_compile_and_link":35.9,"Shader.DrawStage":30.021},"trace_dropped":false,"trace":"aps5-trace-c6cd87042e9c-16740.json.gz"}
{"commit":"5bc84038c490","dirty":false,"env":{"APS5_HOST_IMPORT_MIB":"20480","APS5_NO_LABEL_READBACK_STORE":"1","APS5_NO_SNAPSHOT_CHECK":"1","APS5_TRACE_EVENTS":"1048576","APS5_TRACE_SECONDS":"230:4"},"gpu":"NVIDIA GeForce RTX 5070 Ti","driver":"NVIDIA 621.01","os":"Windows 10.0.26300","cpu":"AMD Ryzen 7 7800X3D 8-Core Processor","cpu_threads":16,"memory_mib":31801,"title_id":"PPSA21567","title":"ASTRO BOT","content_version":"01.018.000","resolution":"3840x2160","window":{"spec":"seconds 230:4","first_present":5033,"ms":4014.018},"presents":41,"frame_ms":{"p50":96.841,"p90":104.346,"p99":118.709,"max":118.709},"gpu_busy_ms_per_present":62.486,"worker_busy_pct":{"queue worker 0x0":98.358,"queue worker 0x40":97.722,"queue worker 0x48":93.317,"queue worker 0x46":4.138},"top_phases_ms_per_frame":{"Driver.Packet":286.937,"Driver.Packet.memory_wait":169.64,"Driver.Packet.draw":61.36,"Driver.Draw":60.87,"Graphics.Draw":60.716,"Graphics.Draw.draw_and_resource_release":47.395,"Driver.Draw.shader_compile_and_link":37.02,"Shader.DrawStage":31.123},"trace_dropped":false,"trace":"aps5-trace-5bc84038c490-23824.json.gz"}
{"commit":"c6cd87042e9c","dirty":false,"env":{"APS5_HOST_IMPORT_MIB":"20480","APS5_NO_LABEL_READBACK_STORE":"1","APS5_NO_SNAPSHOT_CHECK":"1","APS5_TRACE_EVENTS":"1048576","APS5_TRACE_SECONDS":"230:4"},"gpu":"NVIDIA GeForce RTX 5070 Ti","driver":"NVIDIA 621.01","os":"Windows 10.0.26300","cpu":"AMD Ryzen 7 7800X3D 8-Core Processor","cpu_threads":16,"memory_mib":31801,"title_id":"PPSA21567","title":"ASTRO BOT","content_version":"01.018.000","resolution":"3840x2160","window":{"spec":"seconds 230:4","first_present":6452,"ms":4015.058},"presents":43,"frame_ms":{"p50":92.467,"p90":97.209,"p99":139.608,"max":139.608},"gpu_busy_ms_per_present":63.197,"worker_busy_pct":{"queue worker 0x0":98.42,"queue worker 0x40":98.342,"queue worker 0x48":95.149,"queue worker 0x46":2.224},"top_phases_ms_per_frame":{"Driver.Packet":274.268,"Driver.Packet.memory_wait":160.576,"Graphics.Draw":62.152,"Driver.Packet.draw":61.001,"Driver.Draw":60.518,"Graphics.Draw.draw_and_resource_release":48.616,"Driver.Draw.shader_compile_and_link":38.351,"Shader.DrawStage":32.076},"trace_dropped":false,"trace":"aps5-trace-c6cd87042e9c-11716.json.gz"}

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 Ti, driver 621.01, Windows 11 Pro 10.0.26300
  • AI-assisted: yes

🤖 Generated with Claude Code

… CPU writes

CompletePendingCpuWrites synced through any pending label inside the range
(PendingLabelIn) whenever some completion label was pending anywhere. A label
the GPU stores in the stream is ordered before the range's next GPU use like
any other recorded write, so only labels the CPU stores at completion
(CompletionLabelIn, as VulkanDevice already uses for its own completion
checks) need the wait. A GPU-stored label under a CPU write-back is still
marked behind its completion and still waits.

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

Copy link
Copy Markdown

This pull request is labeled perf, so it needs the summary line of a capture on main and one with the change, from the same title, scene and machine, as the Performance report form asks. Please paste both aps5-summary.jsonl lines, attach the two traces and add the output of tools/trace_digest.py.

@oneandonlydean

Copy link
Copy Markdown
Collaborator

@SP4C3B4R-8 thanks, the change itself looks right: CompletePendingCpuWrites now uses the same CompletionLabelIn check VulkanDevice uses elsewhere, write-back over a GPU label still waits, and the test covers it.

For the performance claim, CONTRIBUTING.md asks for the paired evidence in the PR. Could you attach the summary lines (JSONL) and traces or a digest for both arms, plus the raw validation logs you mention? Both of the current FPS-counter pairs also ran with APS5_NO_LABEL_READBACK_STORE=1; a pair with default settings would show the gain on the path players actually use. We'll also run it through our own Astro Bot gate.

@github-actions

github-actions Bot commented Oct 27, 2026 •

Copy link
Copy Markdown

Other open pull requests touch the same code. Merging one will break the other, or both implement the same thing. If this one builds on them, list them in Depends on.

Pull request Conflicting files (lines on main) Same exports Same new files
PR 12840 core/libs/prx/libSceAgcDriver/tests/Recorder.cpp L14628, L14870

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/tests/Recorder.cpp
PR 1395 core/libs/prx/libSceAgcDriver/tests/Recorder.cpp
PR 5021 core/libs/prx/libSceAgcDriver/tests/Recorder.cpp
PR 5925 core/libs/prx/libSceAgcDriver/tests/Recorder.cpp
PR 6186 core/libs/prx/libSceAgcDriver/tests/Recorder.cpp
PR 6187 core/libs/prx/libSceAgcDriver/tests/Recorder.cpp
PR 6188 core/libs/prx/libSceAgcDriver/tests/Recorder.cpp
PR 6192 core/libs/prx/libSceAgcDriver/tests/Recorder.cpp
PR 6209 core/libs/prx/libSceAgcDriver/tests/Recorder.cpp
PR 6970 core/libs/prx/libSceAgcDriver/tests/Recorder.cpp
PR 7002 core/libs/prx/libSceAgcDriver/tests/Recorder.cpp
PR 7085 core/libs/prx/libSceAgcDriver/tests/Recorder.cpp
PR 7457 core/libs/prx/libSceAgcDriver/tests/Recorder.cpp
PR 7604 core/libs/prx/libSceAgcDriver/tests/Recorder.cpp
PR 7642 core/libs/prx/libSceAgcDriver/tests/Recorder.cpp
PR 8484 core/libs/prx/libSceAgcDriver/tests/Recorder.cpp
PR 8707 core/libs/prx/libSceAgcDriver/tests/Recorder.cpp
PR 9289 core/libs/prx/libSceAgcDriver/tests/Recorder.cpp
PR 9508 core/libs/prx/libSceAgcDriver/tests/Recorder.cpp
PR 9712 core/libs/prx/libSceAgcDriver/tests/Recorder.cpp
PR 9898 core/libs/prx/libSceAgcDriver/tests/Recorder.cpp
PR 10049 core/libs/prx/libSceAgcDriver/tests/Recorder.cpp
PR 10193 core/libs/prx/libSceAgcDriver/tests/Recorder.cpp
PR 10442 core/libs/prx/libSceAgcDriver/tests/Recorder.cpp
PR 10920 core/libs/prx/libSceAgcDriver/tests/Recorder.cpp
PR 11485 core/libs/prx/libSceAgcDriver/tests/Recorder.cpp
PR 13044 core/libs/prx/libSceAgcDriver/tests/Recorder.cpp
PR 13486 core/libs/prx/libSceAgcDriver/tests/Recorder.cpp
PR 13793 core/libs/prx/libSceAgcDriver/tests/Recorder.cpp
PR 13809 core/libs/prx/libSceAgcDriver/tests/Recorder.cpp
PR 13863 core/libs/prx/libSceAgcDriver/tests/Recorder.cpp
PR 13920 core/libs/prx/libSceAgcDriver/tests/Recorder.cpp
PR 13928 core/libs/prx/libSceAgcDriver/tests/Recorder.cpp
PR 13929 core/libs/prx/libSceAgcDriver/tests/Recorder.cpp
PR 14261 core/libs/prx/libSceAgcDriver/tests/Recorder.cpp
PR 14262 core/libs/prx/libSceAgcDriver/tests/Recorder.cpp
PR 15136 core/libs/prx/libSceAgcDriver/tests/Recorder.cpp
PR 15169 core/libs/prx/libSceAgcDriver/tests/Recorder.cpp

@SP4C3B4R-8

SP4C3B4R-8 commented Oct 28, 2026 •

Copy link
Copy Markdown
Contributor Author

@oneandonlydean here is the paired evidence, from one session on the same machine (Ryzen 7 7800X3D, RTX 5070 Ti, NVIDIA 621.01, Windows 11 10.0.26300, 3840x2160), ASTRO BOT -lvl hub_crashsite, standing still, warm shader cache. Arms: main 5bc8403 and this PR c6cd870, both built clean (dirty: false); runs alternated; capture APS5_TRACE_SECONDS=230:4 (the level is stable from about 200 s).

setting arm frame p50 (ms) GPU busy per present (ms) worker 0 busy (ms per frame) FPS counter, 90 s steady
default main 124.4 87.0 103.1 8.06
default this PR 119.0 91.9 99.3 8.25
APS5_NO_LABEL_READBACK_STORE=1 main 96.8 62.5 75.6 10.40
APS5_NO_LABEL_READBACK_STORE=1 this PR 92.5 63.2 69.4 10.93

With default settings the gain is not measurable: worker 0 saves about 4 ms per frame, but the frame is bound by the label readback store (Driver.Packet.memory_wait and about 87 ms of GPU per present), not by worker 0. One more default pair with a locally patched main build (dirty, not counted) gave 8.29 against 7.80, i.e. within the noise. With the store off, worker 0 is the wall and the PR gives -4.5 % frame p50 and +5 % on the counter, as in the description.

Summary lines (also added to the description):

{"commit":"5bc84038c490","dirty":false,"env":{"APS5_HOST_IMPORT_MIB":"20480","APS5_NO_SNAPSHOT_CHECK":"1","APS5_TRACE_EVENTS":"1048576","APS5_TRACE_SECONDS":"230:4"},"gpu":"NVIDIA GeForce RTX 5070 Ti","driver":"NVIDIA 621.01","os":"Windows 10.0.26300","cpu":"AMD Ryzen 7 7800X3D 8-Core Processor","cpu_threads":16,"memory_mib":31801,"title_id":"PPSA21567","title":"ASTRO BOT","content_version":"01.018.000","resolution":"3840x2160","window":{"spec":"seconds 230:4","first_present":3094,"ms":4019.977},"presents":32,"frame_ms":{"p50":124.377,"p90":137.555,"p99":140.586,"max":140.586},"gpu_busy_ms_per_present":86.966,"worker_busy_pct":{"queue worker 0x0":98.817,"queue worker 0x40":98.066,"queue worker 0x48":97.025,"queue worker 0x46":3.976},"top_phases_ms_per_frame":{"Driver.Packet":373.014,"Driver.Packet.memory_wait":215.712,"Driver.Packet.draw":73.313,"Driver.Draw":72.836,"Graphics.Draw":60.339,"Graphics.Draw.draw_and_resource_release":47.025,"Driver.Packet.dispatch":37.602,"Driver.Draw.shader_compile_and_link":35.104},"trace_dropped":false,"trace":"aps5-trace-5bc84038c490-12636.json.gz"}
{"commit":"c6cd87042e9c","dirty":false,"env":{"APS5_HOST_IMPORT_MIB":"20480","APS5_NO_SNAPSHOT_CHECK":"1","APS5_TRACE_EVENTS":"1048576","APS5_TRACE_SECONDS":"230:4"},"gpu":"NVIDIA GeForce RTX 5070 Ti","driver":"NVIDIA 621.01","os":"Windows 10.0.26300","cpu":"AMD Ryzen 7 7800X3D 8-Core Processor","cpu_threads":16,"memory_mib":31801,"title_id":"PPSA21567","title":"ASTRO BOT","content_version":"01.018.000","resolution":"3840x2160","window":{"spec":"seconds 230:4","first_present":3417,"ms":4068.531},"presents":33,"frame_ms":{"p50":118.951,"p90":135.168,"p99":139.592,"max":139.592},"gpu_busy_ms_per_present":91.86,"worker_busy_pct":{"queue worker 0x0":98.767,"queue worker 0x40":97.994,"queue worker 0x48":99.95,"queue worker 0x46":4.423},"top_phases_ms_per_frame":{"Driver.Packet":370.019,"Driver.Packet.memory_wait":211.995,"Driver.Packet.draw":71.689,"Driver.Draw":71.186,"Graphics.Draw":60.957,"Graphics.Draw.draw_and_resource_release":47.341,"Driver.Draw.shader_compile_and_link":35.9,"Shader.DrawStage":30.021},"trace_dropped":false,"trace":"aps5-trace-c6cd87042e9c-16740.json.gz"}
{"commit":"5bc84038c490","dirty":false,"env":{"APS5_HOST_IMPORT_MIB":"20480","APS5_NO_LABEL_READBACK_STORE":"1","APS5_NO_SNAPSHOT_CHECK":"1","APS5_TRACE_EVENTS":"1048576","APS5_TRACE_SECONDS":"230:4"},"gpu":"NVIDIA GeForce RTX 5070 Ti","driver":"NVIDIA 621.01","os":"Windows 10.0.26300","cpu":"AMD Ryzen 7 7800X3D 8-Core Processor","cpu_threads":16,"memory_mib":31801,"title_id":"PPSA21567","title":"ASTRO BOT","content_version":"01.018.000","resolution":"3840x2160","window":{"spec":"seconds 230:4","first_present":5033,"ms":4014.018},"presents":41,"frame_ms":{"p50":96.841,"p90":104.346,"p99":118.709,"max":118.709},"gpu_busy_ms_per_present":62.486,"worker_busy_pct":{"queue worker 0x0":98.358,"queue worker 0x40":97.722,"queue worker 0x48":93.317,"queue worker 0x46":4.138},"top_phases_ms_per_frame":{"Driver.Packet":286.937,"Driver.Packet.memory_wait":169.64,"Driver.Packet.draw":61.36,"Driver.Draw":60.87,"Graphics.Draw":60.716,"Graphics.Draw.draw_and_resource_release":47.395,"Driver.Draw.shader_compile_and_link":37.02,"Shader.DrawStage":31.123},"trace_dropped":false,"trace":"aps5-trace-5bc84038c490-23824.json.gz"}
{"commit":"c6cd87042e9c","dirty":false,"env":{"APS5_HOST_IMPORT_MIB":"20480","APS5_NO_LABEL_READBACK_STORE":"1","APS5_NO_SNAPSHOT_CHECK":"1","APS5_TRACE_EVENTS":"1048576","APS5_TRACE_SECONDS":"230:4"},"gpu":"NVIDIA GeForce RTX 5070 Ti","driver":"NVIDIA 621.01","os":"Windows 10.0.26300","cpu":"AMD Ryzen 7 7800X3D 8-Core Processor","cpu_threads":16,"memory_mib":31801,"title_id":"PPSA21567","title":"ASTRO BOT","content_version":"01.018.000","resolution":"3840x2160","window":{"spec":"seconds 230:4","first_present":6452,"ms":4015.058},"presents":43,"frame_ms":{"p50":92.467,"p90":97.209,"p99":139.608,"max":139.608},"gpu_busy_ms_per_present":63.197,"worker_busy_pct":{"queue worker 0x0":98.42,"queue worker 0x40":98.342,"queue worker 0x48":95.149,"queue worker 0x46":2.224},"top_phases_ms_per_frame":{"Driver.Packet":274.268,"Driver.Packet.memory_wait":160.576,"Graphics.Draw":62.152,"Driver.Packet.draw":61.001,"Driver.Draw":60.518,"Graphics.Draw.draw_and_resource_release":48.616,"Driver.Draw.shader_compile_and_link":38.351,"Shader.DrawStage":32.076},"trace_dropped":false,"trace":"aps5-trace-c6cd87042e9c-11716.json.gz"}
trace_digest.py, default, main 5bc8403

seconds 230:4 from present 3094: 32 presents, frame p50 124.4 / p90 137.6 / p99 140.6 / max 140.6 ms, GPU busy 87.0 ms per present
NVIDIA GeForce RTX 5070 Ti, NVIDIA 621.01, Windows 10.0.26300, 3840x2160, commit 5bc8403, dropped: no

{"commit":"5bc84038c490","dirty":false,"env":{"APS5_HOST_IMPORT_MIB":"20480","APS5_NO_SNAPSHOT_CHECK":"1","APS5_TRACE_EVENTS":"1048576","APS5_TRACE_SECONDS":"230:4"},"gpu":"NVIDIA GeForce RTX 5070 Ti","driver":"NVIDIA 621.01","os":"Windows 10.0.26300","cpu":"AMD Ryzen 7 7800X3D 8-Core Processor","cpu_threads":16,"memory_mib":31801,"title_id":"PPSA21567","title":"ASTRO BOT","content_version":"01.018.000","resolution":"3840x2160","window":{"spec":"seconds 230:4","first_present":3094,"ms":4019.977},"presents":32,"frame_ms":{"p50":124.377,"p90":137.555,"p99":140.586,"max":140.586},"gpu_busy_ms_per_present":86.966,"worker_busy_pct":{"queue worker 0x0":98.817,"queue worker 0x40":98.066,"queue worker 0x48":97.025,"queue worker 0x46":3.976},"top_phases_ms_per_frame":{"Driver.Packet":373.014,"Driver.Packet.memory_wait":215.712,"Driver.Packet.draw":73.313,"Driver.Draw":72.836,"Graphics.Draw":60.339,"Graphics.Draw.draw_and_resource_release":47.025,"Driver.Packet.dispatch":37.602,"Driver.Draw.shader_compile_and_link":35.104},"trace_dropped":false,"trace":"aps5-trace-5bc84038c490-12636.json.gz"}

Slowest frames (largest slices inside each, inclusive)

  • present 3122: 140.6 ms at 3493 ms: Driver.Packet (queue worker 0x48) 139.6, Driver.Packet (queue worker 0x40) 139.2, Driver.WorkerWait (queue worker 0x46) 134.5, Driver.Packet.memory_wait (queue worker 0x48) 130.4
  • present 3105: 140.3 ms at 1361 ms: Driver.Packet (queue worker 0x40) 139.7, Driver.Packet (queue worker 0x48) 139.3, Driver.WorkerWait (queue worker 0x46) 134.6, Driver.Packet.memory_wait (queue worker 0x48) 129.6
  • present 3110: 138.6 ms at 2015 ms: Driver.Packet (queue worker 0x40) 138.0, Driver.Packet (queue worker 0x48) 137.6, Driver.WorkerWait (queue worker 0x46) 133.0, Driver.Packet.memory_wait (queue worker 0x48) 128.3
  • present 3119: 137.6 ms at 3110 ms: Driver.Packet (queue worker 0x40) 136.9, Driver.Packet (queue worker 0x48) 136.6, Driver.WorkerWait (queue worker 0x46) 131.9, Driver.Packet.memory_wait (queue worker 0x48) 126.8
  • present 3103: 137.3 ms at 1102 ms: Driver.Packet (queue worker 0x48) 137.2, Driver.Packet (queue worker 0x40) 136.7, Driver.WorkerWait (queue worker 0x46) 131.3, Driver.Packet.memory_wait (queue worker 0x48) 126.4

Threads (ms per frame)

thread busy wait untraced in slices < 20 us largest
queue worker 0x0 103.1 (82 %) 3.7 (3 %) 18.8 102.4 Driver.Packet 106.7, Driver.EndSubmission 0.1
title 0.0 (0 %) 0.0 (0 %) 125.6 0.1 Shader.ResolveGraphicsStagesAbi 0.0, Shader.ResolveGraphicsAbi 0.0
title 0.1 (0 %) 0.0 (0 %) 125.5 0.7 Shader.ResolveGraphicsStagesAbi 0.1, Shader.ResolveGraphicsAbi 0.0
title 0.1 (0 %) 0.0 (0 %) 125.5 0.3 Shader.ResolveGraphicsStagesAbi 0.1, Shader.ResolveGraphicsAbi 0.0
title 0.1 (0 %) 0.0 (0 %) 125.5 0.6 Shader.ResolveGraphicsStagesAbi 0.1, Shader.ResolveGraphicsAbi 0.0
queue worker 0x40 13.7 (11 %) 109.0 (87 %) 2.8 2.7 Driver.Packet 122.6, Driver.EndSubmission 0.1
draw committer 57.6 (46 %) 18.2 (14 %) 49.9 36.0 Graphics.Draw 45.9, Recorder.Sync 8.7
queue worker 0x48 10.2 (8 %) 111.7 (89 %) 3.8 0.2 Driver.Packet 121.0, Driver.EndSubmission 0.8
presenter 0.8 (1 %) 0.9 (1 %) 123.9 0.1 VideoOut.Flip 1.0, Driver.Present 0.7
queue worker 0x46 1.9 (1 %) 122.8 (98 %) 1.0 0.8 Driver.Packet 4.8, Driver.EndSubmission 0.0
title 0.1 (0 %) 0.0 (0 %) 125.5 0.3 Shader.ResolveGraphicsStagesAbi 0.1
gpu 89.9 (72 %) 0.0 (0 %) 35.7 0.0 batch 89.9

Largest slices (ms per frame, inclusive, all threads): Driver.Packet 355.1, Driver.Packet.memory_wait 215.7, Driver.WorkerWait 119.6, Driver.WorkerWait.dequeue_order 113.7, batch 89.9, Driver.Packet.draw 62.3, Driver.Draw 61.9, Graphics.Draw 46.5

Longest waits

  • Driver.WorkerWait (queue worker 0x46) 208.5 ms at 368 ms, present 3097
  • Driver.WorkerWait (queue worker 0x46) 160.7 ms at 85 ms, present 3094
  • Driver.WorkerWait (queue worker 0x46) 137.3 ms at 1978 ms, present 3109
  • Driver.WorkerWait (queue worker 0x46) 136.2 ms at 3460 ms, present 3121
  • Driver.WorkerWait (queue worker 0x46) 134.2 ms at 3077 ms, present 3118
  • Driver.WorkerWait (queue worker 0x46) 133.0 ms at 1330 ms, present 3104
  • Driver.WorkerWait (queue worker 0x46) 131.3 ms at 1070 ms, present 3102
  • Driver.WorkerWait (queue worker 0x46) 130.2 ms at 1469 ms, present 3105

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

  • batch 5109: 22.4 ms at 3922 ms, present 3125: GPU no ranges; recorded by Graphics.Draw (draw committer) 0.1, Graphics.Draw.draw_and_resource_release (draw committer) 0.1, Recorder.Submit (draw committer) 0.0
  • batch 169: 22.2 ms at 153 ms, present 3095: GPU no ranges; recorded by Graphics.Draw (draw committer) 0.1, Graphics.Draw.draw_and_resource_release (draw committer) 0.1, Recorder.Submit (draw committer) 0.0
  • batch 491: 22.2 ms at 396 ms, present 3097: GPU no ranges; recorded by Graphics.Draw (draw committer) 0.1, Graphics.Draw.draw_and_resource_release (draw committer) 0.1, Recorder.Submit (draw committer) 0.0
  • batch 4623: 21.7 ms at 3530 ms, present 3122: GPU no ranges; recorded by Recorder.Sync (draw committer) 21.8, Graphics.Draw (draw committer) 0.1, Graphics.Draw.draw_and_resource_release (draw committer) 0.1, Recorder.Submit (draw committer) 0.0
  • batch 1819: 21.6 ms at 1397 ms, present 3105: GPU no ranges; recorded by Recorder.Sync (draw committer) 21.7, Graphics.Draw (draw committer) 0.1, Graphics.Draw.draw_and_resource_release (draw committer) 0.1, Recorder.Submit (draw committer) 0.0
trace_digest.py, default, this PR

seconds 230:4 from present 3417: 33 presents, frame p50 119.0 / p90 135.2 / p99 139.6 / max 139.6 ms, GPU busy 91.9 ms per present
NVIDIA GeForce RTX 5070 Ti, NVIDIA 621.01, Windows 10.0.26300, 3840x2160, commit c6cd870, dropped: no

{"commit":"c6cd87042e9c","dirty":false,"env":{"APS5_HOST_IMPORT_MIB":"20480","APS5_NO_SNAPSHOT_CHECK":"1","APS5_TRACE_EVENTS":"1048576","APS5_TRACE_SECONDS":"230:4"},"gpu":"NVIDIA GeForce RTX 5070 Ti","driver":"NVIDIA 621.01","os":"Windows 10.0.26300","cpu":"AMD Ryzen 7 7800X3D 8-Core Processor","cpu_threads":16,"memory_mib":31801,"title_id":"PPSA21567","title":"ASTRO BOT","content_version":"01.018.000","resolution":"3840x2160","window":{"spec":"seconds 230:4","first_present":3417,"ms":4068.531},"presents":33,"frame_ms":{"p50":118.951,"p90":135.168,"p99":139.592,"max":139.592},"gpu_busy_ms_per_present":91.86,"worker_busy_pct":{"queue worker 0x0":98.767,"queue worker 0x40":97.994,"queue worker 0x48":99.95,"queue worker 0x46":4.423},"top_phases_ms_per_frame":{"Driver.Packet":370.019,"Driver.Packet.memory_wait":211.995,"Driver.Packet.draw":71.689,"Driver.Draw":71.186,"Graphics.Draw":60.957,"Graphics.Draw.draw_and_resource_release":47.341,"Driver.Draw.shader_compile_and_link":35.9,"Shader.DrawStage":30.021},"trace_dropped":false,"trace":"aps5-trace-c6cd87042e9c-16740.json.gz"}

Slowest frames (largest slices inside each, inclusive)

  • present 3433: 139.6 ms at 1947 ms: Driver.WorkerWait (queue worker 0x46) 139.6, Driver.Packet (queue worker 0x40) 139.1, Driver.Packet (queue worker 0x48) 138.6, Driver.WorkerWait.dequeue_order (queue worker 0x46) 137.5
  • present 3443: 137.9 ms at 3187 ms: Driver.Packet (queue worker 0x40) 137.4, Driver.Packet (queue worker 0x48) 136.8, Driver.WorkerWait (queue worker 0x46) 131.9, Driver.Packet.memory_wait (queue worker 0x48) 126.9
  • present 3421: 135.9 ms at 468 ms: Driver.Packet (queue worker 0x40) 135.4, Driver.Packet (queue worker 0x48) 134.8, Driver.WorkerWait (queue worker 0x46) 129.8, Driver.Packet.memory_wait (queue worker 0x48) 125.1
  • present 3424: 135.2 ms at 853 ms: Driver.Packet (queue worker 0x40) 134.7, Driver.Packet (queue worker 0x48) 134.1, Driver.Packet.memory_wait (queue worker 0x48) 124.5, Driver.WorkerWait (queue worker 0x46) 123.1
  • present 3426: 135.0 ms at 1101 ms: Driver.Packet (queue worker 0x40) 134.4, Driver.Packet (queue worker 0x48) 134.0, Driver.WorkerWait (queue worker 0x46) 131.2, Driver.WorkerWait.dequeue_order (queue worker 0x46) 127.7

Threads (ms per frame)

thread busy wait untraced in slices < 20 us largest
queue worker 0x0 99.3 (81 %) 5.0 (4 %) 19.0 103.0 Driver.Packet 104.1, Driver.EndSubmission 0.1
title 0.1 (0 %) 0.0 (0 %) 123.2 0.1 Shader.ResolveGraphicsStagesAbi 0.0, Shader.ResolveGraphicsAbi 0.0
title 0.1 (0 %) 0.0 (0 %) 123.2 0.7 Shader.ResolveGraphicsStagesAbi 0.1, Shader.ResolveGraphicsAbi 0.0
title 0.1 (0 %) 0.0 (0 %) 123.2 0.3 Shader.ResolveGraphicsStagesAbi 0.1, Shader.ResolveGraphicsAbi 0.0
title 0.1 (0 %) 0.0 (0 %) 123.2 0.6 Shader.ResolveGraphicsStagesAbi 0.1, Shader.ResolveAbi 0.0
queue worker 0x40 11.4 (9 %) 109.1 (88 %) 2.9 2.5 Driver.Packet 120.3, Driver.EndSubmission 0.1
draw committer 60.3 (49 %) 15.5 (13 %) 47.5 37.2 Graphics.Draw 46.0, Recorder.Sync 11.4
queue worker 0x48 10.2 (8 %) 109.8 (89 %) 3.3 0.2 Driver.Packet 119.1, Driver.EndSubmission 0.9
presenter 0.8 (1 %) 0.1 (0 %) 122.3 0.1 VideoOut.Flip 0.9, Driver.Present 0.0
queue worker 0x46 2.1 (2 %) 117.7 (95 %) 3.5 0.8 Driver.Packet 5.2, Driver.EndSubmission 0.1
title 0.1 (0 %) 0.0 (0 %) 123.2 0.3 Shader.ResolveGraphicsStagesAbi 0.1
gpu 92.2 (75 %) 0.0 (0 %) 31.1 0.0 batch 92.2

Largest slices (ms per frame, inclusive, all threads): Driver.Packet 348.8, Driver.Packet.memory_wait 208.8, Driver.WorkerWait 114.5, Driver.WorkerWait.dequeue_order 106.2, batch 92.2, Driver.Packet.draw 60.5, Driver.Draw 60.1, Graphics.Draw 46.7

Longest waits

  • Driver.WorkerWait (queue worker 0x46) 201.2 ms at 865 ms, present 3424
  • Driver.WorkerWait (queue worker 0x46) 168.9 ms at 1918 ms, present 3432
  • Driver.WorkerWait (queue worker 0x46) 164.6 ms at 689 ms, present 3422
  • Driver.WorkerWait (queue worker 0x46) 162.4 ms at 2284 ms, present 3435
  • Driver.WorkerWait (queue worker 0x46) 150.0 ms at 2616 ms, present 3438
  • Driver.WorkerWait (queue worker 0x46) 143.5 ms at 2449 ms, present 3437
  • Driver.WorkerWait (queue worker 0x46) 136.2 ms at 432 ms, present 3420
  • Driver.WorkerWait (queue worker 0x46) 130.2 ms at 3157 ms, present 3442

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

  • batch 5096: 22.7 ms at 3987 ms, present 3449: GPU no ranges; recorded by Graphics.Draw (draw committer) 0.1, Graphics.Draw.draw_and_resource_release (draw committer) 0.1, Recorder.Submit (draw committer) 0.0
  • batch 3332: 22.7 ms at 2592 ms, present 3438: GPU no ranges; recorded by Graphics.Draw (draw committer) 0.1, Graphics.Draw.draw_and_resource_release (draw committer) 0.1, Recorder.Submit (draw committer) 0.0
  • batch 4620: 22.5 ms at 3621 ms, present 3446: GPU no ranges; recorded by Graphics.Draw (draw committer) 0.1, Graphics.Draw.draw_and_resource_release (draw committer) 0.1, Recorder.Submit (draw committer) 0.0
  • batch 2413: 22.5 ms at 1864 ms, present 3432: GPU no ranges; recorded by Graphics.Draw (draw committer) 0.1, Graphics.Draw.draw_and_resource_release (draw committer) 0.1, Recorder.Submit (draw committer) 0.0
  • batch 679: 22.4 ms at 503 ms, present 3421: GPU no ranges; recorded by Recorder.Sync (draw committer) 22.5, Graphics.Draw (draw committer) 0.2, Graphics.Draw.draw_and_resource_release (draw committer) 0.2, Recorder.Submit (draw committer) 0.0
trace_digest.py, APS5_NO_LABEL_READBACK_STORE=1, main 5bc8403

seconds 230:4 from present 5033: 41 presents, frame p50 96.8 / p90 104.3 / p99 118.7 / max 118.7 ms, GPU busy 62.5 ms per present
NVIDIA GeForce RTX 5070 Ti, NVIDIA 621.01, Windows 10.0.26300, 3840x2160, commit 5bc8403, dropped: no

{"commit":"5bc84038c490","dirty":false,"env":{"APS5_HOST_IMPORT_MIB":"20480","APS5_NO_LABEL_READBACK_STORE":"1","APS5_NO_SNAPSHOT_CHECK":"1","APS5_TRACE_EVENTS":"1048576","APS5_TRACE_SECONDS":"230:4"},"gpu":"NVIDIA GeForce RTX 5070 Ti","driver":"NVIDIA 621.01","os":"Windows 10.0.26300","cpu":"AMD Ryzen 7 7800X3D 8-Core Processor","cpu_threads":16,"memory_mib":31801,"title_id":"PPSA21567","title":"ASTRO BOT","content_version":"01.018.000","resolution":"3840x2160","window":{"spec":"seconds 230:4","first_present":5033,"ms":4014.018},"presents":41,"frame_ms":{"p50":96.841,"p90":104.346,"p99":118.709,"max":118.709},"gpu_busy_ms_per_present":62.486,"worker_busy_pct":{"queue worker 0x0":98.358,"queue worker 0x40":97.722,"queue worker 0x48":93.317,"queue worker 0x46":4.138},"top_phases_ms_per_frame":{"Driver.Packet":286.937,"Driver.Packet.memory_wait":169.64,"Driver.Packet.draw":61.36,"Driver.Draw":60.87,"Graphics.Draw":60.716,"Graphics.Draw.draw_and_resource_release":47.395,"Driver.Draw.shader_compile_and_link":37.02,"Shader.DrawStage":31.123},"trace_dropped":false,"trace":"aps5-trace-5bc84038c490-23824.json.gz"}

Slowest frames (largest slices inside each, inclusive)

  • present 5033: 118.7 ms at 0 ms: Driver.WorkerWait (queue worker 0x46) 117.0, Driver.WorkerWait.dequeue_order (queue worker 0x46) 114.3, Driver.Packet (queue worker 0x0) 99.5, Driver.Packet.draw (queue worker 0x0) 77.6
  • present 5040: 110.4 ms at 721 ms: Driver.Packet (queue worker 0x40) 109.8, Driver.Packet (queue worker 0x48) 107.6, Driver.Packet.memory_wait (queue worker 0x48) 107.1, Driver.WorkerWait (queue worker 0x46) 104.0
  • present 5044: 106.0 ms at 1115 ms: Driver.Packet (queue worker 0x40) 105.4, Driver.Packet (queue worker 0x48) 103.1, Driver.Packet.memory_wait (queue worker 0x48) 102.7, Driver.WorkerWait (queue worker 0x46) 100.1
  • present 5039: 105.8 ms at 615 ms: Driver.Packet (queue worker 0x40) 105.0, Driver.Packet (queue worker 0x48) 103.3, Driver.Packet.memory_wait (queue worker 0x48) 102.7, Driver.WorkerWait (queue worker 0x46) 99.4
  • present 5063: 104.3 ms at 2954 ms: Driver.Packet (queue worker 0x40) 103.6, Driver.Packet (queue worker 0x48) 101.8, Driver.Packet.memory_wait (queue worker 0x48) 101.5, Driver.WorkerWait (queue worker 0x46) 98.1

Threads (ms per frame)

thread busy wait untraced in slices < 20 us largest
queue worker 0x0 75.6 (77 %) 3.4 (3 %) 18.9 103.4 Driver.Packet 78.9, Driver.EndSubmission 0.1
title 0.1 (0 %) 0.0 (0 %) 97.9 0.1 Shader.ResolveGraphicsStagesAbi 0.0, Shader.ResolveGraphicsAbi 0.0
title 0.1 (0 %) 0.0 (0 %) 97.8 0.7 Shader.ResolveGraphicsStagesAbi 0.1, Shader.ResolveAbi 0.0
title 0.1 (0 %) 0.0 (0 %) 97.8 0.3 Shader.ResolveGraphicsStagesAbi 0.1, Shader.ResolveGraphicsAbi 0.0
title 0.1 (0 %) 0.0 (0 %) 97.8 0.6 Shader.ResolveGraphicsStagesAbi 0.1, Shader.ResolveGraphicsAbi 0.0
queue worker 0x40 9.4 (10 %) 85.8 (88 %) 2.7 2.8 Driver.Packet 95.0, Driver.EndSubmission 0.1
draw committer 49.0 (50 %) 3.9 (4 %) 44.9 36.0 Graphics.Draw 46.3, Recorder.Submit 2.4
queue worker 0x48 0.4 (0 %) 95.3 (97 %) 2.3 0.2 Driver.Packet 91.2, Driver.EndSubmission 0.1
presenter 1.5 (1 %) 0.0 (0 %) 96.4 0.1 VideoOut.Flip 0.8, Driver.Present 0.7
queue worker 0x46 0.7 (1 %) 96.3 (98 %) 0.9 0.7 Driver.Packet 3.8, Driver.EndSubmission 0.1
title 0.1 (0 %) 0.0 (0 %) 97.8 0.3 Shader.ResolveGraphicsStagesAbi 0.1
gpu 62.6 (64 %) 0.0 (0 %) 35.4 0.0 batch 62.6

Largest slices (ms per frame, inclusive, all threads): Driver.Packet 269.0, Driver.Packet.memory_wait 169.6, Driver.WorkerWait 97.4, Driver.WorkerWait.dequeue_order 90.0, batch 62.6, Driver.Packet.draw 50.3, Driver.Draw 50.0, Graphics.Draw 46.9

Longest waits

  • Driver.WorkerWait (queue worker 0x46) 135.8 ms at 1786 ms, present 5050
  • Driver.WorkerWait (queue worker 0x46) 130.6 ms at 2051 ms, present 5053
  • Driver.WorkerWait (queue worker 0x46) 130.1 ms at 3211 ms, present 5065
  • Driver.WorkerWait (queue worker 0x46) 121.8 ms at 1928 ms, present 5052
  • Driver.WorkerWait (queue worker 0x46) 121.2 ms at 269 ms, present 5035
  • Driver.WorkerWait (queue worker 0x46) 117.4 ms at 2 ms, present 5033
  • Driver.WorkerWait (queue worker 0x46) 112.2 ms at 122 ms, present 5034
  • Driver.Packet.memory_wait (queue worker 0x48) 107.2 ms at 726 ms, present 5040

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

  • batch 313: 22.5 ms at 234 ms, present 5035: GPU no ranges; recorded by Graphics.Draw (draw committer) 0.1, Graphics.Draw.draw_and_resource_release (draw committer) 0.1, Recorder.Submit (draw committer) 0.0
  • batch 1067: 22.4 ms at 748 ms, present 5040: GPU no ranges; recorded by Graphics.Draw (draw committer) 0.1, Graphics.Draw.draw_and_resource_release (draw committer) 0.1, Recorder.Submit (draw committer) 0.0
  • batch 1817: 22.4 ms at 1239 ms, present 5045: GPU no ranges; recorded by Graphics.Draw (draw committer) 0.1, Graphics.Draw.draw_and_resource_release (draw committer) 0.1, Recorder.Submit (draw committer) 0.0
  • batch 2571: 22.2 ms at 1738 ms, present 5050: GPU no ranges; recorded by Graphics.Draw (draw committer) 0.1, Graphics.Draw.draw_and_resource_release (draw committer) 0.1, Recorder.Submit (draw committer) 0.0
  • batch 4991: 22.2 ms at 3365 ms, present 5067: GPU no ranges; recorded by Graphics.Draw (draw committer) 0.1, Graphics.Draw.draw_and_resource_release (draw committer) 0.1, Recorder.Submit (draw committer) 0.0
trace_digest.py, APS5_NO_LABEL_READBACK_STORE=1, this PR

seconds 230:4 from present 6452: 43 presents, frame p50 92.5 / p90 97.2 / p99 139.6 / max 139.6 ms, GPU busy 63.2 ms per present
NVIDIA GeForce RTX 5070 Ti, NVIDIA 621.01, Windows 10.0.26300, 3840x2160, commit c6cd870, dropped: no

{"commit":"c6cd87042e9c","dirty":false,"env":{"APS5_HOST_IMPORT_MIB":"20480","APS5_NO_LABEL_READBACK_STORE":"1","APS5_NO_SNAPSHOT_CHECK":"1","APS5_TRACE_EVENTS":"1048576","APS5_TRACE_SECONDS":"230:4"},"gpu":"NVIDIA GeForce RTX 5070 Ti","driver":"NVIDIA 621.01","os":"Windows 10.0.26300","cpu":"AMD Ryzen 7 7800X3D 8-Core Processor","cpu_threads":16,"memory_mib":31801,"title_id":"PPSA21567","title":"ASTRO BOT","content_version":"01.018.000","resolution":"3840x2160","window":{"spec":"seconds 230:4","first_present":6452,"ms":4015.058},"presents":43,"frame_ms":{"p50":92.467,"p90":97.209,"p99":139.608,"max":139.608},"gpu_busy_ms_per_present":63.197,"worker_busy_pct":{"queue worker 0x0":98.42,"queue worker 0x40":98.342,"queue worker 0x48":95.149,"queue worker 0x46":2.224},"top_phases_ms_per_frame":{"Driver.Packet":274.268,"Driver.Packet.memory_wait":160.576,"Graphics.Draw":62.152,"Driver.Packet.draw":61.001,"Driver.Draw":60.518,"Graphics.Draw.draw_and_resource_release":48.616,"Driver.Draw.shader_compile_and_link":38.351,"Shader.DrawStage":32.076},"trace_dropped":false,"trace":"aps5-trace-c6cd87042e9c-11716.json.gz"}

Slowest frames (largest slices inside each, inclusive)

  • present 6490: 139.6 ms at 3508 ms: Driver.Packet (queue worker 0x40) 139.0, Driver.Packet (queue worker 0x48) 137.3, Driver.WorkerWait (queue worker 0x46) 137.3, Driver.Packet.memory_wait (queue worker 0x48) 136.7
  • present 6463: 105.7 ms at 1018 ms: Driver.Packet (queue worker 0x40) 105.1, Driver.Packet (queue worker 0x48) 103.0, Driver.Packet.memory_wait (queue worker 0x48) 102.7, Driver.WorkerWait (queue worker 0x46) 101.8
  • present 6482: 98.3 ms at 2777 ms: Driver.Packet (queue worker 0x40) 97.7, Driver.WorkerWait (queue worker 0x46) 96.8, Driver.Packet (queue worker 0x48) 95.6, Driver.Packet.memory_wait (queue worker 0x48) 94.9
  • present 6467: 97.4 ms at 1401 ms: Driver.Packet (queue worker 0x40) 96.8, Driver.WorkerWait (queue worker 0x46) 94.2, Driver.Packet (queue worker 0x48) 87.5, Driver.Packet.memory_wait (queue worker 0x48) 87.2
  • present 6491: 97.2 ms at 3648 ms: Driver.Packet (queue worker 0x40) 96.7, Driver.Packet (queue worker 0x48) 94.4, Driver.WorkerWait (queue worker 0x46) 94.2, Driver.Packet.memory_wait (queue worker 0x48) 94.0

Threads (ms per frame)

thread busy wait untraced in slices < 20 us largest
queue worker 0x0 69.4 (74 %) 5.2 (6 %) 18.7 104.6 Driver.Packet 74.5, Driver.EndSubmission 0.1
shader prepare 0.0 (0 %) 0.0 (0 %) 93.4 0.0 Vulkan.GraphicsPipelinePrebuild 0.0
shader prepare 0.0 (0 %) 0.0 (0 %) 93.3 0.0 Vulkan.GraphicsPipelinePrebuild 0.0
shader prepare 0.0 (0 %) 0.0 (0 %) 93.4 0.0 Vulkan.GraphicsPipelinePrebuild 0.0
title 0.1 (0 %) 0.0 (0 %) 93.2 0.1 Shader.ResolveGraphicsAbi 0.1, Shader.ResolveGraphicsStagesAbi 0.0
title 0.2 (0 %) 0.0 (0 %) 93.2 0.7 Shader.ResolveGraphicsStagesAbi 0.2, Shader.ResolveGraphicsAbi 0.0
title 0.2 (0 %) 0.0 (0 %) 93.1 0.3 Shader.ResolveGraphicsStagesAbi 0.1, Shader.ResolveGraphicsAbi 0.1
title 0.3 (0 %) 0.0 (0 %) 93.1 0.6 Shader.ResolveGraphicsStagesAbi 0.3, Shader.ResolveAbi 0.0
queue worker 0x40 7.7 (8 %) 83.6 (90 %) 2.0 2.6 Driver.Packet 91.2, Driver.EndSubmission 0.1
queue worker 0x48 0.4 (0 %) 90.8 (97 %) 2.2 0.2 Driver.Packet 88.7, Driver.EndSubmission 0.1
draw committer 50.1 (54 %) 1.5 (2 %) 41.8 36.7 Graphics.Draw 47.4, Recorder.Submit 2.3
presenter 0.8 (1 %) 0.0 (0 %) 92.5 0.1 VideoOut.Flip 0.8, Driver.Present 0.0
queue worker 0x46 0.8 (1 %) 91.8 (98 %) 0.8 0.8 Driver.Packet 1.9, Driver.EndSubmission 0.0
title 0.3 (0 %) 0.0 (0 %) 93.1 0.3 Shader.ResolveGraphicsStagesAbi 0.3
gpu 63.6 (68 %) 0.0 (0 %) 29.8 0.0 batch 63.6

Largest slices (ms per frame, inclusive, all threads): Driver.Packet 256.3, Driver.Packet.memory_wait 160.6, Driver.WorkerWait 93.1, Driver.WorkerWait.dequeue_order 82.5, batch 63.6, Driver.Packet.draw 49.9, Driver.Draw 49.6, Graphics.Draw 48.1

Longest waits

  • Driver.WorkerWait (queue worker 0x46) 184.4 ms at 623 ms, present 6458
  • Driver.WorkerWait (queue worker 0x46) 177.4 ms at 3216 ms, present 6486
  • Driver.WorkerWait (queue worker 0x46) 176.2 ms at 348 ms, present 6455
  • Driver.WorkerWait (queue worker 0x46) 174.9 ms at 3719 ms, present 6491
  • Driver.WorkerWait (queue worker 0x46) 145.0 ms at 1951 ms, present 6473
  • Driver.Packet.memory_wait (queue worker 0x48) 136.8 ms at 3513 ms, present 6490
  • Driver.WorkerWait (queue worker 0x46) 128.1 ms at 3485 ms, present 6489
  • Driver.WorkerWait (queue worker 0x46) 120.2 ms at 1281 ms, present 6465

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

  • batch 1106: 22.8 ms at 766 ms, present 6460: GPU no ranges; recorded by Graphics.Draw (draw committer) 0.1, Graphics.Draw.draw_and_resource_release (draw committer) 0.1, Recorder.Submit (draw committer) 0.0
  • batch 3485: 22.7 ms at 2332 ms, present 6477: GPU no ranges; recorded by Graphics.Draw (draw committer) 0.1, Graphics.Draw.draw_and_resource_release (draw committer) 0.1, Recorder.Submit (draw committer) 0.0
  • batch 1520: 22.6 ms at 1039 ms, present 6463: GPU no ranges; recorded by Graphics.Draw (draw committer) 0.1, Graphics.Draw.draw_and_resource_release (draw committer) 0.1, Recorder.Submit (draw committer) 0.0
  • batch 5887: 22.6 ms at 3940 ms, present 6494: GPU no ranges; recorded by Graphics.Draw (draw committer) 0.1, Graphics.Draw.draw_and_resource_release (draw committer) 0.1, Recorder.Submit (draw committer) 0.0
  • batch 2083: 22.6 ms at 1427 ms, present 6467: GPU no ranges; recorded by Graphics.Draw (draw committer) 0.1, Graphics.Draw.draw_and_resource_release (draw committer) 0.1, Recorder.Submit (draw committer) 0.0
ctest -V -R agc_recorder_completion_labels, main (fails at the new check)
UpdateCTestConfiguration  from :<src>/build/DartConfiguration.tcl
Test project <src>/build
Constructing a list of tests
Done constructing a list of tests
Updating test list for fixtures
Added 0 tests to meet fixture requirements
Checking test dependency graph...
Checking test dependency graph end
test 732
    Start 732: agc_recorder_completion_labels

732: Test command: <src>\build\tests\agc_driver_recorder_tests.exe "--completion-labels-only"
732: Working Directory: <src>/build/core/libs/prx/libSceAgcDriver
732: Environment variables: 
732:  APS5_NO_PIPELINE_JOURNAL=1
732: Environment variable modifications: 
732:  PATH=path_list_prepend:<src>/build/core/libs/libs/unpatched
732: Test timeout computed to be: 30
732: [time] scheduler tick raised to 0.5 ms (was 0.50 ms, now 0.50 ms, timed waits fine)
732: [src/HostCpu.cpp:193 operator()] host CPU AMD Ryzen 7 7800X3D 8-Core Processor: has SSE, SSE2, SSE3, SSSE3, SSE4.1, SSE4.2, POPCNT, LZCNT, BMI1, BMI2, MOVBE, CMPXCHG16B, LAHF/SAHF, AVX, AVX2, FMA, F16C, AES, PCLMULQDQ, RDRAND, RDSEED, ADX, SHA, CLFLUSHOPT, CLWB, RDPID, XSAVEOPT, XSAVEC, SSE4A, PREFETCHW, CLZERO, OS AVX state (XCR0); lacks none
732: [write-watch] host imports of write-watched memory keep the write watch: yes (4096 of 4096 scratch pages reported written at the import, 0 by its 4-byte settle read, 0 after it, 0 after a full GPU read, 0 after a second, 0 after a GPU write, 1 after a CPU store); direct host imports of private memory are settled and stay watched, separate shared aliases retain guest write tracking
732: [libc] unhandled exception 'St13runtime_error' thrown from 00007ff689aaf099
732: Vulkan device: NVIDIA GeForce RTX 5070 Ti
732: Vulkan device: NVIDIA GeForce RTX 5070 Ti
732: host imports are compared
732: AGC graphics: a label the GPU stores in the stream made a bound range wait
1/1 Test #732: agc_recorder_completion_labels ...***Failed    0.42 sec

0% tests passed, 1 tests failed out of 1

Total Test time (real) =   1.42 sec

The following tests FAILED:
	732 - agc_recorder_completion_labels (Failed)
Errors while running CTest
Output from these tests are in: <src>/build/Testing/Temporary/LastTest.log
Use "--rerun-failed --output-on-failure" to re-run the failed cases verbosely.
ctest -V -R agc_recorder_completion_labels, this PR
UpdateCTestConfiguration  from :<src>/build/DartConfiguration.tcl
Test project <src>/build
Constructing a list of tests
Done constructing a list of tests
Updating test list for fixtures
Added 0 tests to meet fixture requirements
Checking test dependency graph...
Checking test dependency graph end
test 732
    Start 732: agc_recorder_completion_labels

732: Test command: <src>\build\tests\agc_driver_recorder_tests.exe "--completion-labels-only"
732: Working Directory: <src>/build/core/libs/prx/libSceAgcDriver
732: Environment variables: 
732:  APS5_NO_PIPELINE_JOURNAL=1
732: Environment variable modifications: 
732:  PATH=path_list_prepend:<src>/build/core/libs/libs/unpatched
732: Test timeout computed to be: 30
732: [time] scheduler tick raised to 0.5 ms (was 0.50 ms, now 0.50 ms, timed waits fine)
732: [src/HostCpu.cpp:193 operator()] host CPU AMD Ryzen 7 7800X3D 8-Core Processor: has SSE, SSE2, SSE3, SSSE3, SSE4.1, SSE4.2, POPCNT, LZCNT, BMI1, BMI2, MOVBE, CMPXCHG16B, LAHF/SAHF, AVX, AVX2, FMA, F16C, AES, PCLMULQDQ, RDRAND, RDSEED, ADX, SHA, CLFLUSHOPT, CLWB, RDPID, XSAVEOPT, XSAVEC, SSE4A, PREFETCHW, CLZERO, OS AVX state (XCR0); lacks none
732: [write-watch] host imports of write-watched memory keep the write watch: yes (4096 of 4096 scratch pages reported written at the import, 0 by its 4-byte settle read, 0 after it, 0 after a full GPU read, 0 after a second, 0 after a GPU write, 1 after a CPU store); direct host imports of private memory are settled and stay watched, separate shared aliases retain guest write tracking
732: Vulkan device: NVIDIA GeForce RTX 5070 Ti
732: Vulkan device: NVIDIA GeForce RTX 5070 Ti
732: host imports are compared
732: late label tests ran with APS5_LABEL_TRUST_LATE=0
732: Completion label storage and ordering tests passed
1/1 Test #732: agc_recorder_completion_labels ...   Passed    0.26 sec

The following tests passed:
	agc_recorder_completion_labels

100% tests passed, 0 tests failed out of 1

Total Test time (real) =   0.33 sec

The traces are 4 files of a few MB each; I can attach them if the digests are not enough.

@Gonic0

Gonic0 commented Oct 30, 2026

Copy link
Copy Markdown
Contributor

A data point from MoltenVK (Apple M5 Pro, macOS 27.2, PPSA21564 01.007.000, the logos and intro from boot, warm shader cache, 60 s per run). The tree is current main plus the open macOS port PRs (including #13442 and #13499), with and without this change, alternated:

round main this change
1 44.5 FPS 46.9 FPS
2 44.6 FPS 48.2 FPS
3 43.6 FPS 49.1 FPS

I counted the syncs in CompletePendingCpuWrites on the main side: all of them came from PendingLabelIn, 4,000 to 4,300 per run, with 13 to 24 s spent waiting in SyncThrough. With this change there were none. The dumped frames I compared match at the same present counts.

AI-assisted: yes (Claude Code)

@TechLevelZero

TechLevelZero commented Nov 1, 2026 •

Copy link
Copy Markdown
Contributor

✅ NVIDIA GPU test: passed

PR head c6cd870 merged onto main f6232fc · tested 2026-11-03 07:05 UTC · 18 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 ✅ 1,157 passed · 2 failed (0 new, 1 also fail on main, 1 unstable on main) · 4 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 1,163 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 (517 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 (1, 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
Failing on main too (1, not counted against this PR)
agc_driver_image_table
Validation IDs already present on main (4 IDs in 441 tests)
VUID-VkDeviceCreateInfo-pNext-pNext (441 tests): 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, agc_driver_bindless_images, and 433 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 (4)
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
Reproduce
git fetch origin c6cd87042e9cd83c237fc5ae58992f569c3048a9 f6232fcfda70644495273f6b8dd88cf0603463d6
git checkout f6232fcfda70644495273f6b8dd88cf0603463d6 && git merge --no-ff c6cd87042e9cd83c237fc5ae58992f569c3048a9
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.

@oneandonlydean

Copy link
Copy Markdown
Collaborator

Thanks for the default-setting summary lines and the four trace digests. They address that part of my earlier request, and the default pair is correctly described as not showing a measurable speedup. Please also attach the paired raw Vulkan validation logs requested in my earlier comment, naming the settings used for both arms. The pasted completion-label test output does not show validation enabled or establish the no-new-validation-errors comparison. The newer NVIDIA report is useful separate evidence, but it does not supply those paired logs.

@BunnyFl

BunnyFl commented Nov 3, 2026

Copy link
Copy Markdown
Contributor

The production half of this PR is already on main. Zenodeon's 7ac63cb ("fix(agc): avoid CPU waits for GPU-ordered resource labels", 2026-10-22) made the same one-line change in CompletePendingCpuWrites: PendingLabelIn to CompletionLabelIn, now at core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp:3621 on main f6232fcfda. This branch's base predates it. Merged with current main, the PR adds only the 26-line completionLabelWaitTests in core/libs/prx/libSceAgcDriver/tests/Recorder.cpp.

Windows 11, AMD RX 9070 XT, WinLibs GCC 15.2.0, ANYPS5_REQUIRE_VULKAN=1 ANYPS5_NO_SHADER_CACHE=1, merged onto current main f6232fcfda (clean merge): agc_recorder_completion_labels passes. It also passes with main's ShaderResources.cpp restored, as expected now that main has the fix.

Could you rescope this as a test PR? It would need a title and description without the production change and the ASTRO BOT timing, which now describe 7ac63cb. Please also check whether completionLabelWaitTests adds coverage beyond the test 7ac63cb added to the same file.

@SP4C3B4R-8

Copy link
Copy Markdown
Contributor Author

Thanks for checking this and for the reviews. 7ac63cb already landed the same CompletionLabelIn change on main, so the production half of this PR is redundant and the remaining test adds little on top of the one 7ac63cb added. Closing.

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

Labels

agc libSceAgc* perf Performance change

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants