Skip to content

perf(agc): run the dispatches a compute ring leaves unordered side by side - #9176

Merged
1 commit merged into
boykopovar:mainfrom
Celegans12:perf/agc-dispatch-overlap
Nov 2, 2026
Merged

1 commit merged into
boykopovar:mainfrom
Celegans12:perf/agc-dispatch-overlap

Conversation

@Celegans12

@Celegans12 Celegans12 commented Oct 21, 2026 •

Copy link
Copy Markdown
Contributor

What

Compute-ring dispatches separated only by SET_SH_REG/NOP share a run when their buffer/image accesses are disjoint. Queue 0 and unsupported dispatch kinds stay ordered; unknown/BDA accesses conflict with everything and a resource owner cannot join twice. APS5_NO_DISPATCH_OVERLAP=1 restores separate dispatches.

#7449 mirror clears must remain outside runs; #9508 heap buffers must remain visible to the access checks.

Tested

Windows 11, MinGW-w64 GCC 15.2.0, Release, -DBUILD_TESTING=ON, SPIR-V Tools off; based on main a043b04. 80ff4017eedd: agc_driver_dispatch_overlap / agc_driver_dispatch_overlap_off, 2/2 NVIDIA and 2/2 Windows lavapipe, once each. Build/registration pass; Vulkan required, cache off, Khronos 1.4.363 loaded, no skips/VUIDs/sync diagnostics; 30 s local limit.

Historical Yōtei 1.008 title-menu counters (2026-10-24) omit CPU and other worker/phase fields: full baseline, full change. They do not establish an FPS gain.

Not tested in this carry: Linux, macOS, titles/FPS or console behavior. Earlier negative controls are historical.

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 RTX 3080 Laptop, 610.62, Windows 11; Mesa lavapipe, LLVM 22.1.8, Windows 11
  • AI-assisted: yes
Historical summary excerpts; all retained values unchanged
{"commit":"a5a2c946a3a9","dirty":false,"env":{"APS5_NO_CLEAR_HAND_OVER":"1","APS5_NO_DEFERRED_SETTLES":"1","APS5_NO_PAD_INPUT":"1","APS5_NO_PIPELINE_JOURNAL":"1","APS5_NO_RESIDENT_LINEAR":"1","APS5_PAD_INPUT_FILE":"<path>","APS5_RESOURCE_CACHE_ENTRIES":"1024","APS5_TRACE_FRAMES":"150:60"},"gpu":"NVIDIA GeForce RTX 3080 Laptop GPU","driver":"NVIDIA 610.62","os":"Windows 10.0.26200","resolution":"3840x2160","window":{"spec":"frames 150:60","first_present":150,"ms":11388.409},"presents":60,"frame_ms":{"p50":132.237,"p90":378.788,"p99":2488.458,"max":2488.458},"gpu_busy_ms_per_present":76.739,"trace_dropped":false,"trace":"aps5-trace-a5a2c946a3a9-16452.json.gz","worker_busy_pct":{"queue worker 0x0":61.336},"top_phases_ms_per_frame":{"Driver.Packet":363.867}}
{"commit":"a147cc357739","dirty":false,"env":{"APS5_NO_CLEAR_HAND_OVER":"1","APS5_NO_DEFERRED_SETTLES":"1","APS5_NO_PAD_INPUT":"1","APS5_NO_PIPELINE_JOURNAL":"1","APS5_NO_RESIDENT_LINEAR":"1","APS5_PAD_INPUT_FILE":"<path>","APS5_RESOURCE_CACHE_ENTRIES":"1024","APS5_TRACE_FRAMES":"150:60"},"gpu":"NVIDIA GeForce RTX 3080 Laptop GPU","driver":"NVIDIA 610.62","os":"Windows 10.0.26200","resolution":"3840x2160","window":{"spec":"frames 150:60","first_present":150,"ms":12217.213},"presents":60,"frame_ms":{"p50":132.067,"p90":416.048,"p99":2879.104,"max":2879.104},"gpu_busy_ms_per_present":81.511,"trace_dropped":false,"trace":"aps5-trace-a147cc357739-23988.json.gz","worker_busy_pct":{"queue worker 0x0":57.048},"top_phases_ms_per_frame":{"Driver.Packet":360.996}}

@github-actions github-actions Bot added perf Performance change perf numbers missing perf pull request without a before and after summary line labels Oct 21, 2026
@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.

@github-actions

github-actions Bot commented Oct 21, 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 9508 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp L5338
PR 12764 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp L5264
PR 13021 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp L5264
PR 13023 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp L5264
PR 14344 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp L5333, L5338, L5406-5411
PR 14943 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp L5405-5411

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 1395 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
PR 1896 docs/dev/ENVIRONMENT.md
PR 4040 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
PR 4472 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
docs/dev/ENVIRONMENT.md
PR 5021 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
PR 5609 core/libs/prx/libSceAgcDriver/Graphics/include/Recorder.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/Recorder.cpp
PR 5925 core/libs/prx/libSceAgcDriver/Execution/src/Driver/Packets/PacketExecution.cpp
core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
PR 6186 core/libs/prx/libSceAgcDriver/Graphics/include/GuestBufferMemory.hpp
core/libs/prx/libSceAgcDriver/Graphics/include/Recorder.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
core/libs/prx/libSceAgcDriver/Graphics/src/Recorder.cpp
docs/dev/ENVIRONMENT.md
PR 6188 core/libs/prx/libSceAgcDriver/Execution/src/Driver/Packets/PacketExecution.cpp
core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
PR 6192 core/libs/prx/libSceAgcDriver/Graphics/include/ShaderResources.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp
PR 6194 core/libs/prx/libSceAgcDriver/Graphics/include/ShaderResources.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp
PR 6197 core/libs/prx/libSceAgcDriver/Graphics/include/GuestBufferMemory.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
PR 6223 core/libs/prx/libSceAgcDriver/Graphics/include/ShaderResources.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp
PR 6412 core/libs/prx/libSceAgcDriver/Graphics/include/ShaderResources.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp
PR 6481 core/libs/prx/libSceAgcDriver/Graphics/include/GuestBufferMemory.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp
PR 6501 core/libs/prx/libSceAgcDriver/Execution/src/Driver/Packets/PacketExecution.cpp
docs/dev/ENVIRONMENT.md
PR 6548 core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
PR 6918 core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
PR 6924 docs/dev/ENVIRONMENT.md
PR 6970 core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp
PR 6977 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
PR 7275 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
PR 7369 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
PR 7449 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
docs/dev/ENVIRONMENT.md
PR 7457 core/libs/prx/libSceAgcDriver/Graphics/include/GuestBufferMemory.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
docs/dev/ENVIRONMENT.md
PR 7464 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
core/libs/prx/libSceAgcDriver/Graphics/include/Recorder.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/Recorder.cpp
PR 7514 core/libs/prx/libSceAgcDriver/Graphics/include/GuestBufferMemory.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
docs/dev/ENVIRONMENT.md
PR 7604 docs/dev/ENVIRONMENT.md
PR 7642 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
core/libs/prx/libSceAgcDriver/Graphics/include/GuestBufferMemory.hpp
core/libs/prx/libSceAgcDriver/Graphics/include/Recorder.hpp
core/libs/prx/libSceAgcDriver/Graphics/include/ShaderResources.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
core/libs/prx/libSceAgcDriver/Graphics/src/Recorder.cpp
core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp
docs/dev/ENVIRONMENT.md
PR 7689 core/libs/prx/libSceAgcDriver/Graphics/include/ShaderResources.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp
PR 7963 core/libs/prx/libSceAgcDriver/Execution/src/Driver/Packets/PacketExecution.cpp
PR 7978 core/libs/prx/libSceAgcDriver/Execution/src/Driver/Packets/PacketExecution.cpp
PR 8004 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
docs/dev/ENVIRONMENT.md
PR 8484 docs/dev/ENVIRONMENT.md
PR 9012 core/libs/prx/libSceAgcDriver/Graphics/include/GuestBufferMemory.hpp
core/libs/prx/libSceAgcDriver/Graphics/include/ShaderResources.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp
docs/dev/ENVIRONMENT.md
PR 9248 docs/dev/ENVIRONMENT.md
PR 9335 core/libs/prx/libSceAgcDriver/Execution/src/Driver/Packets/PacketExecution.cpp
PR 9345 docs/dev/ENVIRONMENT.md
PR 9356 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
core/libs/prx/libSceAgcDriver/Graphics/src/Recorder.cpp
docs/dev/ENVIRONMENT.md
PR 9387 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
core/libs/prx/libSceAgcDriver/Graphics/src/Recorder.cpp
docs/dev/ENVIRONMENT.md
PR 9432 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
PR 9489 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
PR 9592 core/libs/prx/libSceAgcDriver/Graphics/include/ShaderResources.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp
PR 9712 core/libs/prx/libSceAgcDriver/Graphics/src/Recorder.cpp
core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp
docs/dev/ENVIRONMENT.md
PR 9852 core/libs/prx/libSceAgcDriver/Graphics/include/GuestBufferMemory.hpp
core/libs/prx/libSceAgcDriver/Graphics/include/ShaderResources.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp
docs/dev/ENVIRONMENT.md
PR 9884 core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp
PR 10025 core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
PR 10069 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
docs/dev/ENVIRONMENT.md
PR 10249 core/libs/prx/libSceAgcDriver/Graphics/src/Recorder.cpp
PR 10256 core/libs/prx/libSceAgcDriver/Graphics/include/ShaderResources.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp
PR 10442 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
core/libs/prx/libSceAgcDriver/Graphics/include/Recorder.hpp
core/libs/prx/libSceAgcDriver/Graphics/include/ShaderResources.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
core/libs/prx/libSceAgcDriver/Graphics/src/Recorder.cpp
core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp
docs/dev/ENVIRONMENT.md
PR 10547 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
docs/dev/ENVIRONMENT.md
PR 10757 docs/dev/ENVIRONMENT.md
PR 10894 core/libs/prx/libSceAgcDriver/Graphics/include/ShaderResources.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp
docs/dev/ENVIRONMENT.md
PR 11351 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
docs/dev/ENVIRONMENT.md
PR 11483 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
PR 11551 core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp
PR 11901 core/libs/prx/libSceAgcDriver/Graphics/include/ShaderResources.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp
PR 12120 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
docs/dev/ENVIRONMENT.md
PR 12157 core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
PR 12323 docs/dev/ENVIRONMENT.md
PR 12324 docs/dev/ENVIRONMENT.md
PR 12544 docs/dev/ENVIRONMENT.md
PR 12575 core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp
PR 12746 docs/dev/ENVIRONMENT.md
PR 12828 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
PR 12863 docs/dev/ENVIRONMENT.md
PR 13148 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
PR 14299 docs/dev/ENVIRONMENT.md

@janzezno

Copy link
Copy Markdown
Contributor

Run on AMD hardware.

Host: Arch Linux, kernel 7.2.11, AMD Radeon RX 7900 GRE (RADV NAVI31), Mesa 26.2.5, GCC 16.2.1, Release, BUILD_TESTING=ON.
main cecb540a6; PR head 0c930692a merged on top (clean merge).

ANYPS5_REQUIRE_VULKAN=1 ANYPS5_NO_SHADER_CACHE=1 VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation ctest --test-dir build -j6 -V -R 'dispatch|recorder|compute|idle_store|pipelined'
  • main: 38 of 38 pass. PR: 40 of 40 pass, including the new agc_driver_dispatch_overlap and agc_driver_dispatch_overlap_off.
  • No VUID- messages in either run, so the deferred and skipped barriers draw no synchronization errors from the validation layer on RADV. The layer loaded in both runs.
  • This was one pass of each test with six running at a time, not a repeated stress run.

@CnRJay CnRJay 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 microbenchmark is a real signal (8 independent dispatches 0.80 ms against 6.3 ms with a barrier between each pair on an RTX 3080 Laptop). The design decides overlap from the absence of packets the game wrote, and that is the wrong evidence.

  • "Unordered" here means no packet between the two dispatches other than SET_SH_REG and NOP. That says the game didn't ask for ordering; it does not say the dispatches are independent. Titles that skip a CS_PARTIAL_FLUSH/ACQUIRE_MEM between two dispatches may still depend on the second starting after the first has launched, and nothing in the PR shows that none does. Before this PR the emulator imposed full ordering and hid that; now a dispatch that reads what the previous one wrote through the same memory (not the same resources object) runs concurrently with it. The PR's own tests only check that dispatches over separate resources keep their results.
  • The emulator already has the evidence the PR needs: the read and write ranges of each dispatch (PassHazards does it for draws in one render pass, and the staged-element code knows each element's extent). Overlap a dispatch only when its ranges are disjoint from the run's, and treat unknown accesses (BDA, indirect) as conflicting, the way PassHazards does. That makes overlap a proven-independent case and costs one range check; the packet-pattern rule makes it a guess. Please add that check, and a test where dispatch B reads what A writes, with only SET_SH_REG between them, and requires B to see A's result.
  • The only measured effect on a game is in "our own tree (not main)": overlap off added about 146 ms of summed GPU time per frame (+19%) on PPSA26344, with presents unchanged because the scene is CPU-bound. That is a GPU-time number on a scene where the frame rate doesn't move. Post the summary lines of main and this PR from the same scene, and one GPU-bound scene where the benefit would show in frame time.
  • NVIDIA only. AMD and Intel hardware run unordered dispatches differently; an AMD run of agc_driver_dispatch_overlap and a game scene would show it's not specific to the NVIDIA barrier cost.

@CnRJay CnRJay 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.

A data point for the hazard question in my earlier review: #9287, stacked on this PR, says "PPSA26344 v1.008: renders correctly in our tree with this change (geometry broke before the guards)" and adds a rule that "a dispatch does not join when one of its ranges overlaps a range of the run" when one side is a staged copy. So overlapping dispatches already produced wrong geometry on this title once the copies were allowed inside a run.

That shows the dispatch overlap in this PR needs the same guard in the base case: a dispatch must not join an open run when its read or write ranges overlap the ranges of the run (reads against writes, writes against writes), and unknown accesses (BDA, indirect) must conflict, not only the staged-copy case #9287 covers. Please add that check here, with a test where dispatch B reads what A wrote with only SET_SH_REG between them, rather than leaving it to a follow-up that depends on this one landing first.

@Celegans12
Celegans12 force-pushed the perf/agc-dispatch-overlap branch from 0c93069 to 49625ed Compare October 21, 2026 21:45
@Celegans12

Copy link
Copy Markdown
Contributor Author

Thanks, you're right that the packet pattern was the wrong evidence. No CS_PARTIAL_FLUSH between two dispatches only says the game didn't ask for ordering, not that the dispatches are independent, and #9287's geometry history shows what happens when that gap is left open. I've amended the commit so a dispatch joins an open run only when its accesses are disjoint from the run's: every bound buffer range counts as a read, every written range as a write, and storage images (including sampled views of them) are compared by image. Reads against writes and writes against writes conflict. An address-based or BDA build counts as writing all memory, and indirect, LDS, thread-dimension and staged dispatches never join.

agc_driver_dispatch_overlap now has the case you asked for: B reads the buffer A just wrote with only SET_SH_REG between them, and it must not join and must see A's values. There are also write-after-read and write-after-write versions, and the same pair over disjoint buffers still joins. With the range check taken out, the read case fails with "1 joined a run, expected 0" in 3 of 3 runs. To be honest, its data check still passed in those runs, probably because a single 64-lane group finishes before the next one starts, so the join count is what actually guards it. #9287 now relies on this base check instead of its own rule for staged copies.

You're also right that the main-vs-PR summary lines from one scene and a GPU-bound scene are still owed. In the part of Yotei's world we can reach we're CPU-bound in the committer, so frame time won't move there; I'll post both summary lines and look for a GPU-bound spot. We don't have AMD hardware either. Could someone with an AMD card run agc_driver_dispatch_overlap and agc_driver_dispatch_overlap_off?

@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.

Review

I reviewed the dispatch eligibility, access-range conflict checks, deferred barrier lifecycle, and the added ordering/hazard cases. I did not confirm a behavioral defect in the read/write conflict predicate from static inspection. I’m requesting changes because the branch is far behind current main, the performance report does not yet meet the repository’s evidence rule, and some active overlaps need to be recorded and coordinated.

Bring the branch and validation current

This head is 721 commits behind current main (merge base de4ef842b5). The tests in the description were run against that old base. Please rebase on current main, resolve any conflicts, and rerun the focused dispatch tests on both main and this head.

This changes the AGC driver, so the PR checklist also requires the focused tests on both revisions with VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation, ANYPS5_NO_SHADER_CACHE=1, and ANYPS5_REQUIRE_VULKAN=1 under ctest -V, including a comparison of new VUID- messages and confirmation the requested validation layer loaded. The reported Windows/WSL test counts and dispatch cases are useful, but the description does not report this comparison.

Performance report

The repo requires a perf PR to provide valid summary lines for main and the change from the same machine and scene, with traces. The current perf numbers missing label reflects the gap: the PPSA26344 result compares the feature enabled/disabled in “our own tree (not main),” and the 8-dispatch microbenchmark is not a main-versus-change scene report.

Please add same-scene, same-machine main and rebased-head summary lines and traces as described by the performance issue form. Keep the enabled/disabled run as a useful feature-isolation result, but label it separately from the required main comparison.

Open overlaps

The generated overlap report lists currently open #6946, #9508, and #7449 in code changed here; the PR body currently records #7920 and mentions #8278/#8992. In particular, #6946 changes packet execution ordering in the same function, #9508 is stacked on #6946, and #7449 touches the dispatch recording/barrier path. Please update the overlap notes, agree on integration order with the affected authors, and add a Depends on entry if this branch actually depends on another PR. The #7920 barrier interaction is already called out; please preserve that coordination as well.

Checks

  • git diff --check: passed.
  • tools/check_conventions.py against current main: passed.
  • Current CI: eligibility, conventions, labels, and report passed; Linux, Windows, register-context, relinker, ASan relinker, and write-watch jobs were skipped.
  • I did not produce a local build/runtime result for this head in this session. The runtime results in the PR description are author-reported and are from the older base above.

The test matrix and explicit APS5_NO_DISPATCH_OVERLAP control are useful. I’ll revisit after the current-base validation, performance comparison, and overlap notes are updated.

Celegans12 added a commit to Celegans12/AnyPS5-Ghost-of-Yotei that referenced this pull request Oct 22, 2026
…_NO_OVERLAP_RANGE_CHECK=1 off; an APS5_AB switch)

Port of boykopovar#9176's range check: a dispatch joins an open run only when its
buffer ranges and storage images are disjoint from the run's (reads
against writes, writes against writes); address-based/BDA builds and
bindless image dispatches count as accessing everything. [overlap-range]
counts refusals, and conflicts that joined while the switch was set.

AI-assisted: yes
@Celegans12
Celegans12 force-pushed the perf/agc-dispatch-overlap branch from 49625ed to baae58f Compare October 22, 2026 12:03
@Celegans12

Copy link
Copy Markdown
Contributor Author

Thanks for the careful pass, especially the reminder that the validation-layer comparison is part of the checklist. I hadn't run it. I've rebased onto current main (cc00785, with #8992 in) and restacked #9287 and #9289. The rebase changed no lines of the PR's diff. I moved the ring-order hook two lines down so it no longer touches the lines #6946 edits.

Validation: I ran VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation ANYPS5_NO_SHADER_CACHE=1 ANYPS5_REQUIRE_VULKAN=1 ctest -V -R dispatch on main and on the head. With VK_LOADER_DEBUG=layer the loader shows the layer being added from the SDK 1.4.363 registry entry, and there's no "was not found" message. main passes 12/12 and the head 14/14 (the same 12 plus the two overlap tests), with no VUID- message on either. That's in the body now, together with fresh Windows and Linux runs on the new base.

On performance, I've split the two results. The game number stays as a feature on/off result from our own tree, and it's labelled that way. A main-vs-change game scene isn't possible yet: plain main doesn't reach Yōtei's world. It stops on the loading screen at about 160 s and later aborts on a 10_11_11 blend; a follow-up to #9020 is in progress. What I can give for main against this head is a driver-level microbenchmark: 8 unordered single-group dispatches of a loop, timed until the results are visible on the CPU. That's 12.5 ms on main and 1.79 ms here, and 12.3 ms vs 12.8 ms when a CS partial flush separates them. The harness is on our fork (bench/dispatch-overlap, not for merge) if you want to rerun it. I'll post game summary lines once main gets into the world.

On overlaps, @AlxcBTW @hugodearaujo @Raghav314, I don't think there's an ordering dependency in either direction. Whoever lands second adds one condition:

If any of you would rather this one went first or last, tell me and I'll rebase to match.

Details

@hugodearaujo

Copy link
Copy Markdown
Contributor

@Celegans12 no preference on order from #7920's side, and your condition is the right one. With APS5_GPU_CHECKPOINTS on a device without the NV extension, #7920 writes a top-of-pipe marker before each dispatch and a bottom-of-pipe marker after it. On a lost device it lists the dispatches between the last finished marker and the last reached one. Today the trailing barrier keeps that to the one dispatch in flight. In a run, all of the run's dispatches can be in flight together, so the report would list them all without saying which one faulted.

So a dispatch that writes markers should stay out of runs, as the NV checkpoint does: state->bufferMarker == nullptr next to state->checkpointMarker == nullptr in overlapCapable. If #9176 lands first, I'll add it to #7920 when I rebase. If #7920 lands first, it's yours to add.

@Celegans12

Copy link
Copy Markdown
Contributor Author

@hugodearaujo thanks, that works for me. If #7920 lands first, I'll add the state->bufferMarker == nullptr check to overlapCapable next to the checkpoint one when I rebase.

@github-actions github-actions Bot added the needs rebase Conflicts with main, rebase needed label Oct 23, 2026
@Celegans12
Celegans12 force-pushed the perf/agc-dispatch-overlap branch from baae58f to 45c6265 Compare October 23, 2026 15:28
@Celegans12

Copy link
Copy Markdown
Contributor Author

#7920 landed, so I've added the agreed condition while rebasing onto current main (45c6265). overlapCapable now also needs state->bufferMarker == nullptr, so a dispatch that writes buffer markers stays out of runs, like one with an NV checkpoint. @hugodearaujo, that should keep your lost-device report to the one dispatch in flight. #9287 and #9289 are restacked on it. The validation-layer run is redone on the new base: main 13/13 and this head 15/15 with -R dispatch, no VUID- on either. The dispatch/overlap/staging tests pass on Windows and in CI's Linux job on the merge.

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

@adriadam10 adriadam10 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Thanks for the access-range check and the rebase; I read the full diff and found no logic defect in the conflict predicate, the deferred-barrier flushes or the exclusions. What is left is the evidence rule for perf PRs (also asked by the labels bot on 2026-10-21):

  • Paste the aps5-summary.jsonl line of a capture with the change and one with APS5_NO_DISPATCH_OVERLAP=1 (that switch records every dispatch as before, so it is a valid baseline on the same tree, title, scene and machine), and add the tools/trace_digest.py output of both. The "+146 ms GPU per frame" figure in Tested should come from those two captures, attached to the PR.
  • Once that is in, please ask @MarcZX10 to re-review: their CHANGES_REQUESTED is on the old head 49625ed, and the merge queue does not merge over it.

Overlap notes for #7449 (!mirrorCleared) and #9508 (heap-bound ranges visible to RunAccesses) are fine as written; whichever lands second adds its condition.

Celegans12 added a commit to Celegans12/AnyPS5-Ghost-of-Yotei that referenced this pull request Oct 23, 2026
…PPSA26344 world, two pairs)

Same tree (085bd8f), title, scene and machine; B runs add APS5_NO_DISPATCH_OVERLAP=1.

AI-assisted: yes
@Celegans12

Copy link
Copy Markdown
Contributor Author

I made the two captures you asked for, and then a second pair to show the spread. All four are warm runs of PPSA26344 v1.008 on our own tree (yotei/best, 085bd8f, which carries this change; not main). They ran back to back on the same laptop (RTX 3080 Laptop, driver 610.62) from the same open-world save with the same pad script, in the order on, off, on, off. The off runs only add APS5_NO_DISPATCH_OVERLAP=1. Each capture is the trace window APS5_TRACE_FRAMES=880:16, about 30 s in the world after the scene settles.

With overlap off, GPU time per present went from 845 to 952 ms in the first pair and from 856 to 1,059 ms in the second. That's +106 and +203 ms, so the mean is +155 ms (+18 %). The PR said +146 ms, which is inside that spread, so I've updated Tested with these numbers. What's new is the frame time. The old body said presents didn't change, but on this build frames are about 12 % longer with overlap off: median 1,932/1,938 ms on against 2,177/2,158 ms off, or 5.1 against 4.6 presents per 10 s in the window. The other phases (Driver.Packet.memory_wait, DrawPipeline.commit) go up by about the same share, so I read this as the queue workers waiting longer on the GPU. Frames looked the same in all four runs, and the pipeline cache was warm each time.

I've kept the window aps5-summary.jsonl lines and the tools/trace_digest.py output of all four below; each digest starts with its summary line. Files are on our media branch (the comment box can't take 9 MB traces):

@MarcZX10, could you take another look when you have a moment? Your review was on the old head 49625ed. Since then I've rebased onto current main (45c6265), redone the validation-layer comparison, added the overlap notes and now these captures.

Details

The window summary lines in short (the full lines are in the digests below):

run switch window presents frame p50 / p90 ms GPU busy ms per present dropped
A1 on 31,078 ms 16 1,931.8 / 2,174.0 845.3 no
B1 APS5_NO_DISPATCH_OVERLAP=1 35,189 ms 16 2,177.1 / 2,314.3 951.7 no
A2 on 31,385 ms 16 1,937.6 / 2,060.0 856.3 no
B2 APS5_NO_DISPATCH_OVERLAP=1 35,180 ms 16 2,158.3 / 2,471.0 1,059.1 no

The runs also wrote APS5_TRACE_SUMMARY_EVERY=10 interval lines. Over the whole world phase in those lines (from the third world interval to the stop, about 170-190 s per run), the gap is smaller than in the window: GPU busy 897/928 ms per present on against 945/992 off (about +56 ms, +6 %), and 5.04/5.08 against 4.50/4.46 presents per 10 s.

Setup: README env of yotei/best (APS5_SPANNED_WAVE=1 APS5_BINDLESS_IMAGES=1 APS5_BINDLESS_LAZY=1 APS5_NO_RESULT_MEMO=1 APS5_STAGING_DIFF=1 APS5_PIPELINE_INDIRECT=1 APS5_NO_ADDRESS_DRAW_REUSE=1 APS5_NO_PIPELINE_JOURNAL=1 APS5_RESOURCE_CACHE_ENTRIES=1024 APS5_ASYNC_LANE=51 APS5_NO_DRAW_AHEAD=1 APS5_DEFER_REFRESH_FLUSH=1), APS5_PROFILE_GPU=0, APS5_TRACE_FRAMES=880:16 APS5_TRACE_SUMMARY_EVERY=10 APS5_TRACE_EVENTS=1048576, no pad input besides the script, 3840x2160. Windows 11 Pro, i9-11900H, 32 GB. Every env variable is in the summary lines. Each run stopped about 10 s after present 900. All four were warm: shader cache 32,544 entries, 1 miss, NVIDIA pipeline cache readable with the game's dictionary.

A1, overlap on: trace_digest.py

frames 880:16 from present 880: 16 presents, frame p50 1931.8 / p90 2174.0 / p99 2187.7 / max 2187.7 ms, GPU busy 845.3 ms per present
NVIDIA GeForce RTX 3080 Laptop GPU, NVIDIA 610.62, Windows 10.0.26200, 3840x2160, commit 085bd8f, dropped: no

{"commit":"085bd8f20325","dirty":false,"env":{"APS5_ASYNC_LANE":"51","APS5_BINDLESS_IMAGES":"1","APS5_BINDLESS_LAZY":"1","APS5_CACHE_SPIRV_BACKING":"1","APS5_COLD_SPIRV":"1","APS5_COLD_SPIRV_FILE":"1","APS5_DEFER_REFRESH_FLUSH":"1","APS5_DUMP_FRAMES":"300","APS5_DUMP_FRAMES_EVERY":"10","APS5_INLINE_SHADER_PREPARE":"1","APS5_MEM_STATS":"10","APS5_NO_ADDRESS_DRAW_REUSE":"1","APS5_NO_DRAW_AHEAD":"1","APS5_NO_PAD_INPUT":"1","APS5_NO_PIPELINE_JOURNAL":"1","APS5_NO_RESULT_MEMO":"1","APS5_PAD_SCRIPT":"100:cross,106:cross,112:cross,118:cross,124:cross,130:cross,136:cross,142:cross,148:cross,154:cross,160:cross,166:cross,172:cross,178:cross,184:cross,190:cross,196:cross,202:cross,208:cross,214:cross,220:cross,226:cross,232:cross,238:cross,244:cross,250:cross,256:cross,262:cross,268:cross,274:cross,280:cross,286:cross,292:cross,298:cross,304:cross,310:cross,316:cross,322:cross,328:cross,334:cross,340:cross,346:cross,352:cross,358:cross,364:cross,370:cross,376:cross,382:cross,388:cross,394:cross,400:cross,406:cross,412:cross,418:cross,424:cross,430:cross,436:cross,442:cross,448:cross,454:cross,460:cross,466:cross,472:cross,478:cross,484:cross,490:cross,496:cross,502:cross,508:cross,514:cross,520:cross,526:cross,532:cross,538:cross,544:cross,550:cross,556:cross,562:cross,568:cross,574:cross,580:cross","APS5_PAD_SCRIPT_REPEAT":"","APS5_PIPELINE_INDIRECT":"1","APS5_PROFILE_DRAW":"1","APS5_PROFILE_GPU":"0","APS5_RESOURCE_CACHE_ENTRIES":"1024","APS5_SPANNED_WAVE":"1","APS5_STAGING_DIFF":"1","APS5_TEXTURE_OVERFLOW_MIB":"1024","APS5_TRACE_DIR":"<path>","APS5_TRACE_EVENTS":"1048576","APS5_TRACE_FRAMES":"880:16","APS5_TRACE_SUMMARY_EVERY":"10","APS5_UNNORM_WRAP_GUARD":"1"},"gpu":"NVIDIA GeForce RTX 3080 Laptop GPU","driver":"NVIDIA 610.62","os":"Windows 10.0.26200","cpu":"11th Gen Intel(R) Core(TM) i9-11900H @ 2.50GHz","cpu_threads":16,"memory_mib":32469,"title_id":"PPSA26344","title":"Ghost of Y\u00c5\u008dtei","content_version":"01.008.000","resolution":"3840x2160","window":{"spec":"frames 880:16","first_present":880,"ms":31077.601},"presents":16,"frame_ms":{"p50":1931.814,"p90":2173.967,"p99":2187.742,"max":2187.742},"gpu_busy_ms_per_present":845.322,"worker_busy_pct":{"queue worker 0x0":91.11,"queue worker 0x52":60.58,"queue worker 0x53":60.163,"queue worker 0x20":73.777,"queue worker 0x30":83.971,"queue worker 0x48":3.984,"queue worker 0x38":85.615,"queue worker 0x51":6.237,"queue worker 0x50":34.757},"top_phases_ms_per_frame":{"Driver.Packet":9712.659,"Driver.Packet.memory_wait":6865.413,"Driver.Packet.dispatch":1237.273,"DrawPipeline.commit":1193.178,"Graphics.Draw":1087.744,"Driver.Packet.draw":1043.43,"Driver.Draw":1038.498,"Driver.Dispatch":987.341},"trace_dropped":false,"trace":"aps5-trace-085bd8f20325-22740.json.gz"}

Slowest frames (largest slices inside each, inclusive)

  • present 893: 2187.7 ms at 25014 ms: Driver.WorkerWait (queue worker 0x48) 2068.6, Driver.WorkerWait.idle_and_completion_poll (queue worker 0x48) 2068.6, Driver.WorkerWait (queue worker 0x51) 2067.8, Driver.WorkerWait.idle_and_completion_poll (queue worker 0x51) 2067.8
  • present 889: 2174.0 ms at 16888 ms: Driver.WorkerWait (queue worker 0x48) 2101.2, Driver.WorkerWait.idle_and_completion_poll (queue worker 0x48) 2101.2, Driver.WorkerWait (queue worker 0x51) 2038.6, Driver.WorkerWait.idle_and_completion_poll (queue worker 0x51) 2038.6
  • present 891: 2130.7 ms at 20896 ms: Driver.WorkerWait (queue worker 0x48) 2044.5, Driver.WorkerWait.idle_and_completion_poll (queue worker 0x48) 2044.5, Driver.WorkerWait (queue worker 0x51) 2040.1, Driver.WorkerWait.idle_and_completion_poll (queue worker 0x51) 2040.1
  • present 883: 2104.9 ms at 5648 ms: Driver.WorkerWait (queue worker 0x48) 2027.3, Driver.WorkerWait.idle_and_completion_poll (queue worker 0x48) 2027.3, Driver.WorkerWait (queue worker 0x51) 1971.9, Driver.WorkerWait.idle_and_completion_poll (queue worker 0x51) 1971.9
  • present 880: 2068.8 ms at 0 ms: Driver.WorkerWait (queue worker 0x48) 1993.1, Driver.WorkerWait.idle_and_completion_poll (queue worker 0x48) 1993.1, Driver.WorkerWait (queue worker 0x51) 1953.4, Driver.WorkerWait.idle_and_completion_poll (queue worker 0x51) 1953.4

Threads (ms per frame)

thread busy wait untraced in slices < 20 us largest
title 85.6 (4 %) 6.7 (0 %) 1850.1 3.9 Shader.ResolveGraphicsStagesAbi 44.7, Shader.ResolveAbi 39.8
shader prepare 0.3 (0 %) 0.0 (0 %) 1942.1 0.0 Vulkan.GraphicsPipelinePrebuild 0.3
queue worker 0x0 1047.5 (54 %) 852.1 (44 %) 42.8 336.1 Driver.Packet 1737.3, Driver.Completion 0.0
queue worker 0x52 9.7 (0 %) 1901.1 (98 %) 31.6 1.3 Driver.Packet 1175.8, Driver.EndSubmission 0.7
queue worker 0x53 1.2 (0 %) 1909.2 (98 %) 31.9 0.2 Driver.Packet 1168.2, Driver.EndSubmission 0.3
queue worker 0x20 152.3 (8 %) 1777.5 (92 %) 12.5 18.2 Driver.Packet 1430.1, Driver.EndSubmission 0.8
title 83.4 (4 %) 0.0 (0 %) 1858.9 2.7 Shader.ResolveGraphicsStagesAbi 43.9, Shader.ResolveAbi 38.4
title 84.3 (4 %) 0.0 (0 %) 1858.1 2.7 Shader.ResolveGraphicsStagesAbi 44.8, Shader.ResolveAbi 38.6
title 84.4 (4 %) 0.0 (0 %) 1858.0 2.9 Shader.ResolveGraphicsStagesAbi 44.8, Shader.ResolveAbi 38.6
queue worker 0x30 84.6 (4 %) 1847.2 (95 %) 10.5 4.3 Driver.Packet 1630.4, Driver.EndSubmission 0.1
queue worker 0x48 63.4 (3 %) 1772.9 (91 %) 106.1 2.1 Driver.Packet 76.9, Driver.EndSubmission 0.1
draw committer 1120.9 (58 %) 70.1 (4 %) 751.4 34.2 DrawPipeline.commit 1191.0
queue worker 0x38 145.3 (7 %) 1788.3 (92 %) 8.7 6.3 Driver.Packet 1661.7, Driver.EndSubmission 0.3
draw preparer 113.0 (6 %) 30.4 (2 %) 1798.9 12.6 Resources.Prepare 113.0
presenter 0.7 (0 %) 82.9 (4 %) 1858.8 0.1 VideoOut.Flip 83.6
title 84.9 (4 %) 0.0 (0 %) 1857.4 2.9 Shader.ResolveGraphicsStagesAbi 45.0, Shader.ResolveAbi 38.9
title 86.2 (4 %) 0.0 (0 %) 1856.2 2.8 Shader.ResolveGraphicsStagesAbi 45.7, Shader.ResolveAbi 39.5
title 85.5 (4 %) 0.0 (0 %) 1856.8 2.9 Shader.ResolveGraphicsStagesAbi 44.7, Shader.ResolveAbi 39.9
title 83.0 (4 %) 0.0 (0 %) 1859.3 2.7 Shader.ResolveGraphicsStagesAbi 43.5, Shader.ResolveAbi 38.5
title 86.4 (4 %) 0.0 (0 %) 1855.9 2.8 Shader.ResolveGraphicsStagesAbi 44.6, Shader.ResolveAbi 40.9
title 83.9 (4 %) 0.0 (0 %) 1858.4 3.0 Shader.ResolveGraphicsStagesAbi 43.6, Shader.ResolveAbi 39.4
title 85.1 (4 %) 0.0 (0 %) 1857.2 3.0 Shader.ResolveGraphicsStagesAbi 45.3, Shader.ResolveAbi 38.8
queue worker 0x51 67.7 (3 %) 1849.0 (95 %) 25.6 6.4 Driver.Packet 119.7, Driver.EndSubmission 0.2
queue worker 0x50 49.1 (3 %) 1892.3 (97 %) 1.0 1.4 Driver.Packet 674.1, Driver.EndSubmission 0.1
gpu 615.5 (32 %) 0.0 (0 %) 1326.8 0.0 batch 615.5

Largest slices (ms per frame, inclusive, all threads): Driver.Packet 9674.3, Driver.WorkerWait 7533.4, Driver.WorkerWait.idle_and_completion_poll 7101.0, Driver.Packet.memory_wait 6865.3, Driver.Packet.dispatch 1236.4, DrawPipeline.commit 1191.0, Graphics.Draw 1087.0, Driver.Packet.draw 1042.8, Driver.Draw 1037.7, Driver.Dispatch 983.5

Longest waits

  • Driver.WorkerWait (queue worker 0x51) 2080.7 ms at 24589 ms, present 892
  • Driver.WorkerWait (queue worker 0x48) 2024.3 ms at 25322 ms, present 893
  • Driver.WorkerWait (queue worker 0x48) 2017.8 ms at 17185 ms, present 889
  • Driver.WorkerWait (queue worker 0x48) 2001.3 ms at 21156 ms, present 891
  • Driver.WorkerWait (queue worker 0x51) 1999.0 ms at 16439 ms, present 888
  • Driver.WorkerWait (queue worker 0x48) 1977.1 ms at 5903 ms, present 883
  • Driver.WorkerWait (queue worker 0x48) 1973.4 ms at 23229 ms, present 892
  • Driver.WorkerWait (queue worker 0x48) 1963.4 ms at 252 ms, present 880
  • Driver.WorkerWait (queue worker 0x51) 1960.3 ms at 20487 ms, present 890
  • Driver.WorkerWait (queue worker 0x51) 1913.5 ms at 5208 ms, present 882

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

  • batch 45255: 191.2 ms at 7175 ms, present 883: GPU no ranges; recorded by Driver.Packet (queue worker 0x51) 52.3, Driver.Packet.dispatch (queue worker 0x51) 52.1, Driver.Dispatch (queue worker 0x51) 38.6, Vulkan.Dispatch (queue worker 0x51) 25.9
  • batch 46753: 137.8 ms at 18512 ms, present 889: GPU no ranges; recorded by Driver.Packet (queue worker 0x51) 73.6, Driver.Packet.dispatch (queue worker 0x51) 73.1, Driver.Dispatch (queue worker 0x51) 61.2, GpuMutex.wait.dispatch (queue worker 0x51) 31.9
  • batch 45005: 126.7 ms at 5151 ms, present 882: GPU no ranges; recorded by Driver.Packet (queue worker 0x51) 31.9, Driver.Packet.dispatch (queue worker 0x51) 31.6, Driver.Dispatch (queue worker 0x51) 31.5, Vulkan.Dispatch (queue worker 0x51) 21.3
  • batch 47258: 107.7 ms at 22511 ms, present 891: GPU no ranges; recorded by Driver.Packet (queue worker 0x51) 41.9, Driver.Packet.dispatch (queue worker 0x51) 41.7, Driver.Dispatch (queue worker 0x51) 41.5, Vulkan.Dispatch (queue worker 0x51) 25.0
  • batch 47016: 105.9 ms at 20438 ms, present 890: GPU no ranges; recorded by Driver.Packet (queue worker 0x51) 31.4, Driver.Packet.dispatch (queue worker 0x51) 31.1, Driver.Dispatch (queue worker 0x51) 31.0, Vulkan.Dispatch (queue worker 0x51) 19.5
B1, `APS5_NO_DISPATCH_OVERLAP=1`: trace_digest.py

frames 880:16 from present 880: 16 presents, frame p50 2177.1 / p90 2314.3 / p99 2782.2 / max 2782.2 ms, GPU busy 951.7 ms per present
NVIDIA GeForce RTX 3080 Laptop GPU, NVIDIA 610.62, Windows 10.0.26200, 3840x2160, commit 085bd8f, dropped: no

{"commit":"085bd8f20325","dirty":false,"env":{"APS5_ASYNC_LANE":"51","APS5_BINDLESS_IMAGES":"1","APS5_BINDLESS_LAZY":"1","APS5_CACHE_SPIRV_BACKING":"1","APS5_COLD_SPIRV":"1","APS5_COLD_SPIRV_FILE":"1","APS5_DEFER_REFRESH_FLUSH":"1","APS5_DUMP_FRAMES":"300","APS5_DUMP_FRAMES_EVERY":"10","APS5_INLINE_SHADER_PREPARE":"1","APS5_MEM_STATS":"10","APS5_NO_ADDRESS_DRAW_REUSE":"1","APS5_NO_DISPATCH_OVERLAP":"1","APS5_NO_DRAW_AHEAD":"1","APS5_NO_PAD_INPUT":"1","APS5_NO_PIPELINE_JOURNAL":"1","APS5_NO_RESULT_MEMO":"1","APS5_PAD_SCRIPT":"100:cross,106:cross,112:cross,118:cross,124:cross,130:cross,136:cross,142:cross,148:cross,154:cross,160:cross,166:cross,172:cross,178:cross,184:cross,190:cross,196:cross,202:cross,208:cross,214:cross,220:cross,226:cross,232:cross,238:cross,244:cross,250:cross,256:cross,262:cross,268:cross,274:cross,280:cross,286:cross,292:cross,298:cross,304:cross,310:cross,316:cross,322:cross,328:cross,334:cross,340:cross,346:cross,352:cross,358:cross,364:cross,370:cross,376:cross,382:cross,388:cross,394:cross,400:cross,406:cross,412:cross,418:cross,424:cross,430:cross,436:cross,442:cross,448:cross,454:cross,460:cross,466:cross,472:cross,478:cross,484:cross,490:cross,496:cross,502:cross,508:cross,514:cross,520:cross,526:cross,532:cross,538:cross,544:cross,550:cross,556:cross,562:cross,568:cross,574:cross,580:cross","APS5_PAD_SCRIPT_REPEAT":"","APS5_PIPELINE_INDIRECT":"1","APS5_PROFILE_DRAW":"1","APS5_PROFILE_GPU":"0","APS5_RESOURCE_CACHE_ENTRIES":"1024","APS5_SPANNED_WAVE":"1","APS5_STAGING_DIFF":"1","APS5_TEXTURE_OVERFLOW_MIB":"1024","APS5_TRACE_DIR":"<path>","APS5_TRACE_EVENTS":"1048576","APS5_TRACE_FRAMES":"880:16","APS5_TRACE_SUMMARY_EVERY":"10","APS5_UNNORM_WRAP_GUARD":"1"},"gpu":"NVIDIA GeForce RTX 3080 Laptop GPU","driver":"NVIDIA 610.62","os":"Windows 10.0.26200","cpu":"11th Gen Intel(R) Core(TM) i9-11900H @ 2.50GHz","cpu_threads":16,"memory_mib":32469,"title_id":"PPSA26344","title":"Ghost of Y\u00c5\u008dtei","content_version":"01.008.000","resolution":"3840x2160","window":{"spec":"frames 880:16","first_present":880,"ms":35189.383},"presents":16,"frame_ms":{"p50":2177.066,"p90":2314.313,"p99":2782.24,"max":2782.24},"gpu_busy_ms_per_present":951.726,"worker_busy_pct":{"queue worker 0x0":92.277,"queue worker 0x52":62.153,"queue worker 0x53":61.687,"queue worker 0x20":73.514,"queue worker 0x30":84.621,"queue worker 0x38":86.052,"queue worker 0x48":3.417,"queue worker 0x51":5.821,"queue worker 0x50":34.244},"top_phases_ms_per_frame":{"Driver.Packet":11075.374,"Driver.Packet.memory_wait":7858.848,"DrawPipeline.commit":1396.893,"Driver.Packet.dispatch":1350.259,"Graphics.Draw":1267.176,"Driver.Packet.draw":1249.199,"Driver.Draw":1243.574,"Graphics.Draw.draw_and_resource_release":1090.075},"trace_dropped":false,"trace":"aps5-trace-085bd8f20325-21492.json.gz"}

Slowest frames (largest slices inside each, inclusive)

  • present 894: 2782.2 ms at 30210 ms: Driver.WorkerWait (queue worker 0x48) 2705.1, Driver.WorkerWait.idle_and_completion_poll (queue worker 0x48) 2705.1, Driver.WorkerWait (queue worker 0x51) 2657.0, Driver.WorkerWait.idle_and_completion_poll (queue worker 0x51) 2657.0
  • present 892: 2314.3 ms at 25750 ms: Driver.WorkerWait (queue worker 0x48) 2236.2, Driver.WorkerWait.idle_and_completion_poll (queue worker 0x48) 2236.2, Driver.WorkerWait (queue worker 0x51) 2159.4, Driver.WorkerWait.idle_and_completion_poll (queue worker 0x51) 2159.4
  • present 882: 2296.5 ms at 4273 ms: Driver.WorkerWait (queue worker 0x48) 2224.5, Driver.WorkerWait.idle_and_completion_poll (queue worker 0x48) 2224.5, Driver.WorkerWait (queue worker 0x51) 2174.2, Driver.WorkerWait.idle_and_completion_poll (queue worker 0x51) 2174.2
  • present 891: 2263.6 ms at 23486 ms: Driver.WorkerWait (queue worker 0x48) 2190.2, Driver.WorkerWait.idle_and_completion_poll (queue worker 0x48) 2190.2, Driver.WorkerWait (queue worker 0x51) 2140.0, Driver.WorkerWait.idle_and_completion_poll (queue worker 0x51) 2140.0
  • present 887: 2262.4 ms at 14855 ms: Driver.WorkerWait (queue worker 0x48) 2172.4, Driver.WorkerWait.idle_and_completion_poll (queue worker 0x48) 2172.4, Driver.WorkerWait (queue worker 0x51) 2128.2, Driver.WorkerWait.idle_and_completion_poll (queue worker 0x51) 2128.1

Threads (ms per frame)

thread busy wait untraced in slices < 20 us largest
title 91.7 (4 %) 1.4 (0 %) 2106.2 4.2 Shader.ResolveGraphicsStagesAbi 47.6, Shader.ResolveAbi 42.8
queue worker 0x0 1192.5 (54 %) 959.9 (44 %) 47.0 342.7 Driver.Packet 1993.9, Driver.Suspend 0.0
queue worker 0x52 13.2 (1 %) 2144.8 (98 %) 41.3 1.3 Driver.Packet 1364.6, Driver.EndSubmission 2.2
queue worker 0x53 3.1 (0 %) 2153.8 (98 %) 42.5 0.2 Driver.Packet 1356.0, Driver.EndSubmission 0.6
queue worker 0x20 142.4 (6 %) 2042.8 (93 %) 14.1 17.3 Driver.Packet 1614.2, Driver.EndSubmission 0.7
title 90.3 (4 %) 0.0 (0 %) 2109.0 3.1 Shader.ResolveGraphicsStagesAbi 47.6, Shader.ResolveAbi 41.5
title 89.0 (4 %) 0.0 (0 %) 2110.3 3.0 Shader.ResolveGraphicsStagesAbi 46.8, Shader.ResolveAbi 41.1
title 89.5 (4 %) 0.0 (0 %) 2109.8 3.1 Shader.ResolveGraphicsStagesAbi 47.6, Shader.ResolveAbi 40.8
queue worker 0x30 120.3 (5 %) 2066.4 (94 %) 12.7 4.7 Driver.Packet 1860.4, Driver.EndSubmission 0.1
queue worker 0x38 173.6 (8 %) 2015.4 (92 %) 10.3 6.2 Driver.Packet 1891.3, Driver.EndSubmission 0.3
queue worker 0x48 61.4 (3 %) 2013.8 (92 %) 124.2 2.2 Driver.Packet 74.6, Driver.EndSubmission 0.2
draw committer 1310.8 (60 %) 84.0 (4 %) 804.5 30.9 DrawPipeline.commit 1394.8
draw preparer 129.4 (6 %) 32.6 (1 %) 2037.3 12.4 Resources.Prepare 129.4
presenter 0.8 (0 %) 88.2 (4 %) 2110.3 0.1 VideoOut.Flip 89.1
title 90.1 (4 %) 0.0 (0 %) 2109.2 2.8 Shader.ResolveGraphicsStagesAbi 47.8, Shader.ResolveAbi 41.2
title 88.3 (4 %) 0.0 (0 %) 2111.0 2.8 Shader.ResolveGraphicsStagesAbi 45.4, Shader.ResolveAbi 41.7
title 90.5 (4 %) 0.0 (0 %) 2108.9 3.2 Shader.ResolveGraphicsStagesAbi 47.8, Shader.ResolveAbi 41.6
title 89.8 (4 %) 0.0 (0 %) 2109.5 2.8 Shader.ResolveGraphicsStagesAbi 46.6, Shader.ResolveAbi 42.0
title 89.6 (4 %) 0.0 (0 %) 2109.7 3.0 Shader.ResolveGraphicsStagesAbi 46.7, Shader.ResolveAbi 41.7
title 90.0 (4 %) 0.0 (0 %) 2109.4 3.4 Shader.ResolveGraphicsStagesAbi 47.5, Shader.ResolveAbi 41.3
title 90.4 (4 %) 0.0 (0 %) 2108.9 3.1 Shader.ResolveGraphicsStagesAbi 48.3, Shader.ResolveAbi 41.0
queue worker 0x51 71.6 (3 %) 2091.4 (95 %) 36.3 7.0 Driver.Packet 126.4, Driver.EndSubmission 0.3
queue worker 0x50 54.0 (2 %) 2144.2 (97 %) 1.1 1.6 Driver.Packet 751.9, Driver.EndSubmission 0.1
gpu 667.6 (30 %) 0.0 (0 %) 1531.7 0.0 batch 667.6

Largest slices (ms per frame, inclusive, all threads): Driver.Packet 11033.3, Driver.WorkerWait 8426.8, Driver.WorkerWait.idle_and_completion_poll 7924.8, Driver.Packet.memory_wait 7858.7, DrawPipeline.commit 1394.8, Driver.Packet.dispatch 1349.9, Graphics.Draw 1266.7, Driver.Packet.draw 1248.7, Driver.Draw 1242.9, Graphics.Draw.draw_and_resource_release 1084.2

Longest waits

  • Driver.WorkerWait (queue worker 0x48) 2709.7 ms at 30428 ms, present 894
  • Driver.WorkerWait (queue worker 0x51) 2603.7 ms at 29690 ms, present 893
  • Driver.WorkerWait (queue worker 0x48) 2231.8 ms at 23679 ms, present 891
  • Driver.WorkerWait (queue worker 0x48) 2224.0 ms at 4496 ms, present 882
  • Driver.WorkerWait (queue worker 0x48) 2197.8 ms at 25989 ms, present 892
  • Driver.WorkerWait (queue worker 0x51) 2180.7 ms at 22991 ms, present 890
  • Driver.WorkerWait (queue worker 0x48) 2170.0 ms at 8803 ms, present 884
  • Driver.WorkerWait (queue worker 0x51) 2168.6 ms at 3761 ms, present 881
  • Driver.WorkerWait (queue worker 0x48) 2167.5 ms at 15109 ms, present 887
  • Driver.WorkerWait (queue worker 0x51) 2097.3 ms at 32419 ms, present 894

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

  • batch 42831: 161.0 ms at 16519 ms, present 887: GPU no ranges; recorded by Driver.Packet (queue worker 0x51) 43.5, Driver.Packet.dispatch (queue worker 0x51) 43.4, Driver.Dispatch (queue worker 0x51) 28.3, Vulkan.Dispatch (queue worker 0x51) 20.4
  • batch 41596: 147.1 ms at 5998 ms, present 882: GPU no ranges; recorded by Driver.Packet (queue worker 0x51) 67.1, Driver.Packet.dispatch (queue worker 0x51) 67.0, Driver.Dispatch (queue worker 0x51) 52.1, GpuMutex.wait.dispatch (queue worker 0x51) 28.6
  • batch 44107: 147.1 ms at 27479 ms, present 892: GPU no ranges; recorded by Driver.Packet (queue worker 0x51) 90.3, Driver.Packet.dispatch (queue worker 0x51) 89.0, Driver.Dispatch (queue worker 0x51) 70.5, GpuMutex.wait.dispatch (queue worker 0x51) 43.1
  • batch 44858: 140.9 ms at 34573 ms, present 895: GPU no ranges; recorded by Driver.Packet (queue worker 0x51) 56.0, Driver.Packet.dispatch (queue worker 0x51) 55.9, Driver.Dispatch (queue worker 0x51) 41.0, GpuMutex.wait.dispatch (queue worker 0x51) 21.9
  • batch 43314: 129.9 ms at 20773 ms, present 889: GPU no ranges; recorded by Driver.Packet (queue worker 0x51) 49.2, Driver.Packet.dispatch (queue worker 0x51) 49.0, Driver.Dispatch (queue worker 0x51) 48.9, GpuMutex.wait.dispatch (queue worker 0x51) 30.0
A2, overlap on: trace_digest.py

frames 880:16 from present 880: 16 presents, frame p50 1937.6 / p90 2060.0 / p99 2211.2 / max 2211.2 ms, GPU busy 856.3 ms per present
NVIDIA GeForce RTX 3080 Laptop GPU, NVIDIA 610.62, Windows 10.0.26200, 3840x2160, commit 085bd8f, dropped: no

{"commit":"085bd8f20325","dirty":false,"env":{"APS5_ASYNC_LANE":"51","APS5_BINDLESS_IMAGES":"1","APS5_BINDLESS_LAZY":"1","APS5_CACHE_SPIRV_BACKING":"1","APS5_COLD_SPIRV":"1","APS5_COLD_SPIRV_FILE":"1","APS5_DEFER_REFRESH_FLUSH":"1","APS5_DUMP_FRAMES":"300","APS5_DUMP_FRAMES_EVERY":"10","APS5_INLINE_SHADER_PREPARE":"1","APS5_MEM_STATS":"10","APS5_NO_ADDRESS_DRAW_REUSE":"1","APS5_NO_DRAW_AHEAD":"1","APS5_NO_PAD_INPUT":"1","APS5_NO_PIPELINE_JOURNAL":"1","APS5_NO_RESULT_MEMO":"1","APS5_PAD_SCRIPT":"100:cross,106:cross,112:cross,118:cross,124:cross,130:cross,136:cross,142:cross,148:cross,154:cross,160:cross,166:cross,172:cross,178:cross,184:cross,190:cross,196:cross,202:cross,208:cross,214:cross,220:cross,226:cross,232:cross,238:cross,244:cross,250:cross,256:cross,262:cross,268:cross,274:cross,280:cross,286:cross,292:cross,298:cross,304:cross,310:cross,316:cross,322:cross,328:cross,334:cross,340:cross,346:cross,352:cross,358:cross,364:cross,370:cross,376:cross,382:cross,388:cross,394:cross,400:cross,406:cross,412:cross,418:cross,424:cross,430:cross,436:cross,442:cross,448:cross,454:cross,460:cross,466:cross,472:cross,478:cross,484:cross,490:cross,496:cross,502:cross,508:cross,514:cross,520:cross,526:cross,532:cross,538:cross,544:cross,550:cross,556:cross,562:cross,568:cross,574:cross,580:cross","APS5_PAD_SCRIPT_REPEAT":"","APS5_PIPELINE_INDIRECT":"1","APS5_PROFILE_DRAW":"1","APS5_PROFILE_GPU":"0","APS5_RESOURCE_CACHE_ENTRIES":"1024","APS5_SPANNED_WAVE":"1","APS5_STAGING_DIFF":"1","APS5_TEXTURE_OVERFLOW_MIB":"1024","APS5_TRACE_DIR":"<path>","APS5_TRACE_EVENTS":"1048576","APS5_TRACE_FRAMES":"880:16","APS5_TRACE_SUMMARY_EVERY":"10","APS5_UNNORM_WRAP_GUARD":"1"},"gpu":"NVIDIA GeForce RTX 3080 Laptop GPU","driver":"NVIDIA 610.62","os":"Windows 10.0.26200","cpu":"11th Gen Intel(R) Core(TM) i9-11900H @ 2.50GHz","cpu_threads":16,"memory_mib":32469,"title_id":"PPSA26344","title":"Ghost of Y\u00c5\u008dtei","content_version":"01.008.000","resolution":"3840x2160","window":{"spec":"frames 880:16","first_present":880,"ms":31385.074},"presents":16,"frame_ms":{"p50":1937.559,"p90":2060.037,"p99":2211.216,"max":2211.216},"gpu_busy_ms_per_present":856.278,"worker_busy_pct":{"queue worker 0x0":91.266,"queue worker 0x52":61.732,"queue worker 0x20":74.975,"queue worker 0x53":61.337,"queue worker 0x30":84.428,"queue worker 0x38":86.006,"queue worker 0x48":3.921,"queue worker 0x51":6.531,"queue worker 0x50":33.876},"top_phases_ms_per_frame":{"Driver.Packet":9884.848,"Driver.Packet.memory_wait":6963.016,"Driver.Packet.dispatch":1271.66,"DrawPipeline.commit":1242.586,"Graphics.Draw":1125.27,"Driver.Packet.draw":1084.085,"Driver.Draw":1079.26,"Driver.Dispatch":982.31},"trace_dropped":false,"trace":"aps5-trace-085bd8f20325-14880.json.gz"}

Slowest frames (largest slices inside each, inclusive)

  • present 883: 2211.2 ms at 5650 ms: Driver.WorkerWait (queue worker 0x48) 2096.1, Driver.WorkerWait.idle_and_completion_poll (queue worker 0x48) 2096.1, Driver.WorkerWait (queue worker 0x51) 2019.7, Driver.WorkerWait.idle_and_completion_poll (queue worker 0x51) 2019.7
  • present 893: 2060.0 ms at 25358 ms: Driver.WorkerWait (queue worker 0x48) 1989.3, Driver.WorkerWait.idle_and_completion_poll (queue worker 0x48) 1989.3, Driver.WorkerWait (queue worker 0x51) 1936.1, Driver.WorkerWait.idle_and_completion_poll (queue worker 0x51) 1936.1
  • present 894: 2029.8 ms at 27418 ms: Driver.WorkerWait (queue worker 0x48) 1942.9, Driver.WorkerWait.idle_and_completion_poll (queue worker 0x48) 1942.9, Driver.WorkerWait (queue worker 0x51) 1914.1, Driver.WorkerWait.idle_and_completion_poll (queue worker 0x51) 1914.1
  • present 885: 2025.7 ms at 9728 ms: Driver.WorkerWait (queue worker 0x48) 1954.1, Driver.WorkerWait.idle_and_completion_poll (queue worker 0x48) 1954.1, Driver.WorkerWait (queue worker 0x51) 1898.2, Driver.WorkerWait.idle_and_completion_poll (queue worker 0x51) 1898.2
  • present 886: 2012.4 ms at 11754 ms: Driver.WorkerWait (queue worker 0x48) 1938.1, Driver.WorkerWait.idle_and_completion_poll (queue worker 0x48) 1938.1, Driver.WorkerWait (queue worker 0x51) 1886.5, Driver.WorkerWait.idle_and_completion_poll (queue worker 0x51) 1886.5

Threads (ms per frame)

thread busy wait untraced in slices < 20 us largest
title 81.8 (4 %) 3.8 (0 %) 1876.0 3.9 Shader.ResolveGraphicsStagesAbi 42.7, Shader.ResolveAbi 38.1
shader prepare 0.1 (0 %) 0.0 (0 %) 1961.5 0.0 Vulkan.GraphicsPipelinePrebuild 0.1
queue worker 0x0 1047.3 (53 %) 872.9 (44 %) 41.4 336.9 Driver.Packet 1758.9, Driver.Completion 0.0
queue worker 0x52 10.7 (1 %) 1916.9 (98 %) 33.9 1.3 Driver.Packet 1209.6, Driver.EndSubmission 1.2
queue worker 0x20 151.3 (8 %) 1779.4 (91 %) 30.9 18.2 Driver.Packet 1468.1, Driver.EndSubmission 0.6
queue worker 0x53 1.5 (0 %) 1925.8 (98 %) 34.3 0.2 Driver.Packet 1202.8, Driver.EndSubmission 0.3
title 83.2 (4 %) 0.0 (0 %) 1878.4 2.9 Shader.ResolveGraphicsStagesAbi 43.3, Shader.ResolveAbi 38.9
title 82.8 (4 %) 0.0 (0 %) 1878.8 2.9 Shader.ResolveGraphicsStagesAbi 44.1, Shader.ResolveAbi 37.7
title 82.5 (4 %) 0.0 (0 %) 1879.1 2.9 Shader.ResolveGraphicsStagesAbi 43.4, Shader.ResolveAbi 38.2
queue worker 0x30 95.4 (5 %) 1856.3 (95 %) 9.9 4.3 Driver.Packet 1655.5, Driver.EndSubmission 0.1
queue worker 0x38 164.3 (8 %) 1788.1 (91 %) 9.1 6.4 Driver.Packet 1686.0, Driver.EndSubmission 0.2
draw committer 1160.3 (59 %) 80.3 (4 %) 720.9 33.8 DrawPipeline.commit 1240.6
queue worker 0x48 63.0 (3 %) 1791.9 (91 %) 106.6 2.0 Driver.Packet 76.4, Driver.EndSubmission 0.2
draw preparer 111.4 (6 %) 38.6 (2 %) 1811.6 13.0 Resources.Prepare 111.4
presenter 0.7 (0 %) 82.0 (4 %) 1878.9 0.1 VideoOut.Flip 82.7
title 78.8 (4 %) 0.0 (0 %) 1882.8 2.6 Shader.ResolveGraphicsStagesAbi 40.6, Shader.ResolveAbi 37.3
title 81.6 (4 %) 0.0 (0 %) 1879.9 3.0 Shader.ResolveGraphicsStagesAbi 43.0, Shader.ResolveAbi 37.6
title 82.9 (4 %) 0.0 (0 %) 1878.7 3.0 Shader.ResolveGraphicsStagesAbi 43.4, Shader.ResolveAbi 38.5
title 80.1 (4 %) 0.0 (0 %) 1881.5 2.5 Shader.ResolveGraphicsStagesAbi 41.1, Shader.ResolveAbi 38.1
title 82.7 (4 %) 0.0 (0 %) 1878.9 3.1 Shader.ResolveGraphicsStagesAbi 43.3, Shader.ResolveAbi 38.4
title 81.5 (4 %) 0.0 (0 %) 1880.1 2.9 Shader.ResolveGraphicsStagesAbi 42.8, Shader.ResolveAbi 37.7
title 82.2 (4 %) 0.0 (0 %) 1879.4 3.0 Shader.ResolveGraphicsStagesAbi 43.1, Shader.ResolveAbi 38.2
queue worker 0x51 70.1 (4 %) 1863.6 (95 %) 27.9 6.5 Driver.Packet 126.8, Driver.EndSubmission 0.1
queue worker 0x50 51.7 (3 %) 1908.9 (97 %) 1.0 1.4 Driver.Packet 663.5, Driver.EndSubmission 0.0
gpu 627.3 (32 %) 0.0 (0 %) 1334.2 0.0 batch 627.3

Largest slices (ms per frame, inclusive, all threads): Driver.Packet 9847.5, Driver.WorkerWait 7508.8, Driver.WorkerWait.idle_and_completion_poll 7114.3, Driver.Packet.memory_wait 6962.9, Driver.Packet.dispatch 1270.9, DrawPipeline.commit 1240.6, Graphics.Draw 1124.8, Driver.Packet.draw 1083.5, Driver.Draw 1078.5, Driver.Dispatch 978.5

Longest waits

  • Driver.WorkerWait (queue worker 0x48) 2109.3 ms at 5924 ms, present 883
  • Driver.WorkerWait (queue worker 0x51) 2091.0 ms at 5272 ms, present 882
  • Driver.WorkerWait (queue worker 0x48) 1965.3 ms at 25599 ms, present 893
  • Driver.WorkerWait (queue worker 0x48) 1961.4 ms at 27651 ms, present 894
  • Driver.WorkerWait (queue worker 0x48) 1951.5 ms at 17884 ms, present 889
  • Driver.WorkerWait (queue worker 0x48) 1939.2 ms at 11962 ms, present 886
  • Driver.WorkerWait (queue worker 0x48) 1931.9 ms at 9955 ms, present 885
  • Driver.WorkerWait (queue worker 0x51) 1928.0 ms at 11268 ms, present 885
  • Driver.WorkerWait (queue worker 0x51) 1925.7 ms at 15223 ms, present 887
  • Driver.WorkerWait (queue worker 0x51) 1905.4 ms at 24970 ms, present 892

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

  • batch 46957: 133.6 ms at 19187 ms, present 889: GPU no ranges; recorded by Driver.Packet (queue worker 0x51) 66.8, Driver.Packet.dispatch (queue worker 0x51) 64.4, Driver.Dispatch (queue worker 0x51) 53.9, Vulkan.Dispatch (queue worker 0x51) 31.7
  • batch 45942: 125.0 ms at 11219 ms, present 885: GPU no ranges; recorded by Driver.Packet (queue worker 0x51) 45.4, Driver.Packet.dispatch (queue worker 0x51) 45.0, Driver.Dispatch (queue worker 0x51) 44.9, GpuMutex.wait.dispatch (queue worker 0x51) 26.4
  • batch 46446: 123.1 ms at 15152 ms, present 887: GPU no ranges; recorded by Driver.Packet (queue worker 0x51) 52.2, Driver.Packet.dispatch (queue worker 0x51) 52.0, Driver.Dispatch (queue worker 0x51) 40.3, GpuMutex.wait.dispatch (queue worker 0x51) 22.3
  • batch 46195: 123.1 ms at 13226 ms, present 886: GPU no ranges; recorded by Driver.Packet (queue worker 0x51) 29.7, Driver.Packet.dispatch (queue worker 0x51) 29.4, Driver.Dispatch (queue worker 0x51) 17.8, Vulkan.Dispatch (queue worker 0x51) 12.6
  • batch 45672: 95.9 ms at 9274 ms, present 884: GPU no ranges; recorded by Driver.Packet (queue worker 0x51) 57.7, Driver.Packet.dispatch (queue worker 0x51) 57.6, Driver.Dispatch (queue worker 0x51) 57.5, GpuMutex.wait.dispatch (queue worker 0x51) 38.0
B2, `APS5_NO_DISPATCH_OVERLAP=1`: trace_digest.py

frames 880:16 from present 880: 16 presents, frame p50 2158.3 / p90 2471.0 / p99 2544.9 / max 2544.9 ms, GPU busy 1059.1 ms per present
NVIDIA GeForce RTX 3080 Laptop GPU, NVIDIA 610.62, Windows 10.0.26200, 3840x2160, commit 085bd8f, dropped: no

{"commit":"085bd8f20325","dirty":false,"env":{"APS5_ASYNC_LANE":"51","APS5_BINDLESS_IMAGES":"1","APS5_BINDLESS_LAZY":"1","APS5_CACHE_SPIRV_BACKING":"1","APS5_COLD_SPIRV":"1","APS5_COLD_SPIRV_FILE":"1","APS5_DEFER_REFRESH_FLUSH":"1","APS5_DUMP_FRAMES":"300","APS5_DUMP_FRAMES_EVERY":"10","APS5_INLINE_SHADER_PREPARE":"1","APS5_MEM_STATS":"10","APS5_NO_ADDRESS_DRAW_REUSE":"1","APS5_NO_DISPATCH_OVERLAP":"1","APS5_NO_DRAW_AHEAD":"1","APS5_NO_PAD_INPUT":"1","APS5_NO_PIPELINE_JOURNAL":"1","APS5_NO_RESULT_MEMO":"1","APS5_PAD_SCRIPT":"100:cross,106:cross,112:cross,118:cross,124:cross,130:cross,136:cross,142:cross,148:cross,154:cross,160:cross,166:cross,172:cross,178:cross,184:cross,190:cross,196:cross,202:cross,208:cross,214:cross,220:cross,226:cross,232:cross,238:cross,244:cross,250:cross,256:cross,262:cross,268:cross,274:cross,280:cross,286:cross,292:cross,298:cross,304:cross,310:cross,316:cross,322:cross,328:cross,334:cross,340:cross,346:cross,352:cross,358:cross,364:cross,370:cross,376:cross,382:cross,388:cross,394:cross,400:cross,406:cross,412:cross,418:cross,424:cross,430:cross,436:cross,442:cross,448:cross,454:cross,460:cross,466:cross,472:cross,478:cross,484:cross,490:cross,496:cross,502:cross,508:cross,514:cross,520:cross,526:cross,532:cross,538:cross,544:cross,550:cross,556:cross,562:cross,568:cross,574:cross,580:cross","APS5_PAD_SCRIPT_REPEAT":"","APS5_PIPELINE_INDIRECT":"1","APS5_PROFILE_DRAW":"1","APS5_PROFILE_GPU":"0","APS5_RESOURCE_CACHE_ENTRIES":"1024","APS5_SPANNED_WAVE":"1","APS5_STAGING_DIFF":"1","APS5_TEXTURE_OVERFLOW_MIB":"1024","APS5_TRACE_DIR":"<path>","APS5_TRACE_EVENTS":"1048576","APS5_TRACE_FRAMES":"880:16","APS5_TRACE_SUMMARY_EVERY":"10","APS5_UNNORM_WRAP_GUARD":"1"},"gpu":"NVIDIA GeForce RTX 3080 Laptop GPU","driver":"NVIDIA 610.62","os":"Windows 10.0.26200","cpu":"11th Gen Intel(R) Core(TM) i9-11900H @ 2.50GHz","cpu_threads":16,"memory_mib":32469,"title_id":"PPSA26344","title":"Ghost of Y\u00c5\u008dtei","content_version":"01.008.000","resolution":"3840x2160","window":{"spec":"frames 880:16","first_present":880,"ms":35180.498},"presents":16,"frame_ms":{"p50":2158.311,"p90":2470.962,"p99":2544.854,"max":2544.854},"gpu_busy_ms_per_present":1059.102,"worker_busy_pct":{"queue worker 0x0":92.738,"queue worker 0x52":61.141,"queue worker 0x53":60.719,"queue worker 0x20":73.194,"queue worker 0x30":85.392,"queue worker 0x38":87.458,"queue worker 0x48":3.821,"queue worker 0x51":6.21,"queue worker 0x50":35.085},"top_phases_ms_per_frame":{"Driver.Packet":11117.026,"Driver.Packet.memory_wait":7757.51,"Driver.Packet.dispatch":1456.715,"DrawPipeline.commit":1395.699,"Graphics.Draw":1246.875,"Driver.Packet.draw":1235.832,"Driver.Draw":1230.033,"Driver.Dispatch":1155.94},"trace_dropped":false,"trace":"aps5-trace-085bd8f20325-13716.json.gz"}

Slowest frames (largest slices inside each, inclusive)

  • present 889: 2544.9 ms at 19680 ms: Driver.WorkerWait (queue worker 0x48) 2395.3, Driver.WorkerWait.idle_and_completion_poll (queue worker 0x48) 2395.3, Driver.WorkerWait (queue worker 0x51) 2392.8, Driver.WorkerWait.idle_and_completion_poll (queue worker 0x51) 2392.7
  • present 883: 2471.0 ms at 6422 ms: Driver.WorkerWait (queue worker 0x48) 2397.6, Driver.WorkerWait.idle_and_completion_poll (queue worker 0x48) 2397.6, Driver.WorkerWait (queue worker 0x51) 2319.9, Driver.WorkerWait.idle_and_completion_poll (queue worker 0x51) 2319.9
  • present 895: 2275.7 ms at 32905 ms: Driver.Packet (queue worker 0x0) 2063.8, Driver.Packet (queue worker 0x38) 1984.0, Driver.Packet (queue worker 0x30) 1936.0, Driver.Packet (queue worker 0x20) 1655.2
  • present 887: 2227.5 ms at 15260 ms: Driver.WorkerWait (queue worker 0x48) 2148.6, Driver.WorkerWait.idle_and_completion_poll (queue worker 0x48) 2148.6, Driver.WorkerWait (queue worker 0x51) 2098.8, Driver.WorkerWait.idle_and_completion_poll (queue worker 0x51) 2098.8
  • present 892: 2213.1 ms at 26481 ms: Driver.WorkerWait (queue worker 0x48) 2137.1, Driver.WorkerWait.idle_and_completion_poll (queue worker 0x48) 2137.1, Driver.WorkerWait (queue worker 0x51) 2063.1, Driver.WorkerWait.idle_and_completion_poll (queue worker 0x51) 2063.1

Threads (ms per frame)

thread busy wait untraced in slices < 20 us largest
title 101.2 (5 %) 5.1 (0 %) 2092.5 4.3 Shader.ResolveGraphicsStagesAbi 52.3, Shader.ResolveAbi 47.5
queue worker 0x0 1175.8 (53 %) 974.7 (44 %) 48.3 353.1 Driver.Packet 2002.7, Driver.Completion 0.0
queue worker 0x52 14.7 (1 %) 2141.7 (97 %) 42.4 1.3 Driver.Packet 1342.8, Driver.EndSubmission 1.3
queue worker 0x53 1.6 (0 %) 2154.5 (98 %) 42.7 0.2 Driver.Packet 1334.7, Driver.EndSubmission 0.3
queue worker 0x20 145.3 (7 %) 2038.9 (93 %) 14.5 19.8 Driver.Packet 1606.6, Driver.EndSubmission 0.6
title 100.8 (5 %) 0.0 (0 %) 2097.9 3.2 Shader.ResolveGraphicsStagesAbi 53.3, Shader.ResolveAbi 46.1
title 101.7 (5 %) 0.0 (0 %) 2097.1 3.0 Shader.ResolveGraphicsStagesAbi 53.1, Shader.ResolveAbi 47.1
title 100.5 (5 %) 0.0 (0 %) 2098.2 2.9 Shader.ResolveGraphicsStagesAbi 51.5, Shader.ResolveAbi 47.6
queue worker 0x30 162.0 (7 %) 2024.3 (92 %) 12.5 4.7 Driver.Packet 1876.9, Driver.EndSubmission 0.2
draw committer 1293.6 (59 %) 100.1 (5 %) 805.1 32.2 DrawPipeline.commit 1393.7
queue worker 0x38 191.7 (9 %) 1997.0 (91 %) 10.0 6.3 Driver.Packet 1921.7, Driver.EndSubmission 0.3
queue worker 0x48 66.1 (3 %) 2005.0 (91 %) 127.7 2.2 Driver.Packet 83.5, Driver.EndSubmission 0.1
draw preparer 130.5 (6 %) 39.6 (2 %) 2028.7 12.4 Resources.Prepare 130.5
presenter 0.8 (0 %) 84.5 (4 %) 2113.4 0.1 VideoOut.Flip 85.3
title 99.7 (5 %) 0.0 (0 %) 2099.1 3.0 Shader.ResolveGraphicsStagesAbi 51.4, Shader.ResolveAbi 46.9
title 102.0 (5 %) 0.0 (0 %) 2096.8 3.2 Shader.ResolveGraphicsStagesAbi 53.5, Shader.ResolveAbi 47.0
title 100.2 (5 %) 0.0 (0 %) 2098.6 3.2 Shader.ResolveGraphicsStagesAbi 52.4, Shader.ResolveAbi 46.4
title 101.1 (5 %) 0.0 (0 %) 2097.7 3.1 Shader.ResolveGraphicsStagesAbi 52.3, Shader.ResolveAbi 47.3
title 101.6 (5 %) 0.0 (0 %) 2097.2 3.3 Shader.ResolveGraphicsStagesAbi 52.0, Shader.ResolveAbi 48.2
title 100.3 (5 %) 0.0 (0 %) 2098.4 3.1 Shader.ResolveGraphicsStagesAbi 52.4, Shader.ResolveAbi 46.5
title 99.7 (5 %) 0.0 (0 %) 2099.1 3.0 Shader.ResolveGraphicsStagesAbi 52.2, Shader.ResolveAbi 46.2
queue worker 0x51 81.0 (4 %) 2083.1 (95 %) 34.8 7.8 Driver.Packet 134.7, Driver.EndSubmission 0.4
queue worker 0x50 42.4 (2 %) 2155.2 (98 %) 1.2 1.6 Driver.Packet 770.1, Driver.EndSubmission 0.1
gpu 750.6 (34 %) 0.0 (0 %) 1448.2 0.0 batch 750.6

Largest slices (ms per frame, inclusive, all threads): Driver.Packet 11073.7, Driver.WorkerWait 8377.8, Driver.WorkerWait.idle_and_completion_poll 7872.7, Driver.Packet.memory_wait 7757.4, Driver.Packet.dispatch 1456.3, DrawPipeline.commit 1393.7, Graphics.Draw 1246.4, Driver.Packet.draw 1235.4, Driver.Draw 1229.4, Driver.Dispatch 1152.7

Longest waits

  • Driver.WorkerWait (queue worker 0x48) 2405.4 ms at 6620 ms, present 883
  • Driver.WorkerWait (queue worker 0x48) 2379.1 ms at 19981 ms, present 889
  • Driver.WorkerWait (queue worker 0x51) 2304.7 ms at 19198 ms, present 888
  • Driver.WorkerWait (queue worker 0x51) 2265.6 ms at 5886 ms, present 882
  • Driver.WorkerWait (queue worker 0x48) 2156.3 ms at 15466 ms, present 887
  • Driver.WorkerWait (queue worker 0x51) 2134.9 ms at 14718 ms, present 886
  • Driver.WorkerWait (queue worker 0x48) 2123.4 ms at 11210 ms, present 885
  • Driver.WorkerWait (queue worker 0x48) 2117.6 ms at 17714 ms, present 888
  • Driver.WorkerWait (queue worker 0x51) 2113.1 ms at 32390 ms, present 894
  • Driver.WorkerWait (queue worker 0x48) 2112.7 ms at 26725 ms, present 892

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

  • batch 45948: 208.1 ms at 21575 ms, present 889: GPU no ranges; recorded by Driver.Packet (queue worker 0x51) 71.4, Driver.Packet.dispatch (queue worker 0x51) 71.3, Driver.Dispatch (queue worker 0x51) 53.0, GpuMutex.wait.dispatch (queue worker 0x51) 32.5
  • batch 46713: 156.5 ms at 28088 ms, present 892: GPU no ranges; recorded by Driver.Packet (queue worker 0x51) 74.1, Driver.Packet.dispatch (queue worker 0x51) 73.9, Driver.Dispatch (queue worker 0x51) 58.2, GpuMutex.wait.dispatch (queue worker 0x51) 37.4
  • batch 43659: 146.8 ms at 1530 ms, present 880: GPU no ranges; recorded by Driver.Packet (queue worker 0x51) 67.8, Driver.Packet.dispatch (queue worker 0x51) 67.7, Driver.Dispatch (queue worker 0x51) 52.6, GpuMutex.wait.dispatch (queue worker 0x51) 34.7
  • batch 45408: 143.0 ms at 16916 ms, present 887: GPU no ranges; recorded by Driver.Packet (queue worker 0x51) 62.2, Driver.Packet.dispatch (queue worker 0x51) 62.0, Driver.Dispatch (queue worker 0x51) 48.6, GpuMutex.wait.dispatch (queue worker 0x51) 26.9
  • batch 44393: 141.7 ms at 8231 ms, present 883: GPU no ranges; recorded by Driver.Packet (queue worker 0x51) 78.8, Driver.Packet.dispatch (queue worker 0x51) 78.6, Driver.Dispatch (queue worker 0x51) 50.9, GpuMutex.wait.dispatch (queue worker 0x51) 34.2

@oneandonlydean oneandonlydean self-assigned this Oct 24, 2026
@oneandonlydean

oneandonlydean commented Oct 24, 2026 •

Copy link
Copy Markdown
Collaborator

@adriadam10 I've added myself as a co-assignee here (you stay on it). #9287 and #9289 build on this PR and have already passed review on our side, so I'd like to get this one reviewed too and keep both moving. If you'd rather keep it to yourself, just say so and I'll step back.

@Celegans12

Copy link
Copy Markdown
Contributor Author

@adriadam10 I've added main-against-change summary lines to Tested as well, alongside the overlap on/off captures from our tree. Yōtei's world doesn't run on plain main, so these are from the title menu: main a5a2c94 (3 runs) against main plus this PR (2 runs), interleaved in one session, only APS5_TRACE_FRAMES=150:60. Frame p50 is 131.9 against 132.2 ms, inside main's own spread, so the title menu doesn't show the overlap effect; the GPU-time difference in the world captures above is where it shows. @MarcZX10, whenever you have time for a re-review: your CHANGES_REQUESTED is still on the old head.

@github-actions github-actions Bot added needs rebase Conflicts with main, rebase needed and removed perf numbers missing perf pull request without a before and after summary line labels Oct 24, 2026
@oneandonlydean

Copy link
Copy Markdown
Collaborator

@adriadam10 could you take another look at your performance-evidence request? @Celegans12 posted the captures with the same tree and overlap off as the baseline, as you suggested (#9176 (comment)), plus the menu main/change summaries (#9176 (comment)), on 45c6265440.

@Celegans12
Celegans12 force-pushed the perf/agc-dispatch-overlap branch from 45c6265 to ed7f07c Compare October 27, 2026 02:08
@github-actions github-actions Bot removed the needs rebase Conflicts with main, rebase needed label Oct 27, 2026
@janzezno

janzezno commented Oct 27, 2026 •

Copy link
Copy Markdown
Contributor

RADV rerun on the current head ed7f07cf26 (my earlier run was on 0c930692a), merged without a commit onto main a40ad89e2c (clean merge), compared with that main.

Setup: Arch Linux, kernel 7.2.11, AMD Radeon RX 7900 GRE (RADV NAVI31, Mesa 26.2.5), Release, BUILD_TESTING=ON, with ANYPS5_REQUIRE_VULKAN=1, ANYPS5_NO_SHADER_CACHE=1 and VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation.

main a40ad89e2c main + this PR
ctest -R "dispatch|overlap|staging|compute|async_compute" -V, 3 runs 46/46 each 48/48 each (adds agc_driver_dispatch_overlap, _off)
ctest -R "agc|shader|recompiler" -j6 -V 1074/1077 1076/1079
Failures agc_idle_publish_wait, agc_performance_overlay, agc_driver_tessellation the same three
VUID- lines VkPipelineColorBlendStateCreateInfo-pAttachments-00605 ×26 the same, ×26

@edubox

edubox commented Oct 27, 2026

Copy link
Copy Markdown
Contributor

Independent Linux/NVIDIA check.

  • Host: CachyOS, kernel 7.3.0-3-cachyos, NVIDIA GeForce RTX 4080 SUPER (615.78.08), GCC 16.2.1, Release, BUILD_TESTING=ON.
  • Exact head ed7f07cf26bddc0d4cc85b1e8672d8b4716e7b24, fetched from the PR ref: agc_driver_dispatch_overlap and agc_driver_dispatch_overlap_off pass (2/2).
  • The same single commit cherry-picked onto 0e2d4d15b8 (to reuse a warm shader cache for a scene run): agc_driver_graphics, agc_driver_dispatch_overlap and agc_driver_dispatch_overlap_off pass.

Scene check, not a counterexample: Demon's Souls (tutorial), 1920x1080, warm shader cache, same pad script, 180 s runs, with overlap on versus APS5_NO_DISPATCH_OVERLAP=1. Last-window FPS was 0.74 versus 0.76. That scene spends its time waiting on the CPU-side GpuMutex (compute stage-B image builds), so it does not exercise this GPU-barrier path; the result says nothing about the Yōtei captures.

@bunbeans2-arch

Copy link
Copy Markdown
Contributor

An AMD RDNA 4 run on Windows of ed7f07cf26, since the GPUs tested are NVIDIA and lavapipe.

Windows 11 Pro 10.0.22631, AMD Radeon RX 9070 XT (1002:7550, driver 32.0.32015.7029, amdvlk64), MSYS2 UCRT64 g++ 16.1.0, Release. ANYPS5_REQUIRE_VULKAN=1, ANYPS5_NO_SHADER_CACHE=1, VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation; with VK_LOADER_DEBUG=layer the loader logs Insert instance layer "VK_LAYER_KHRONOS_validation" in every run of every test below that creates a Vulkan instance. This head merged onto main f7f03daf52, 3 runs:

  • agc_driver_dispatch_overlap and agc_driver_dispatch_overlap_off, which this PR adds, pass 3 of 3, each with dispatch overlap tests passed.
  • No VUID- line.

AI-assisted: yes (Claude Code)

@Celegans12
Celegans12 force-pushed the perf/agc-dispatch-overlap branch from ed7f07c to 0bf3f6f Compare October 31, 2026 04:13
@Celegans12

Copy link
Copy Markdown
Contributor Author

I rebased the dispatch-overlap stack onto main e2df06e so #9289 can follow the now-merged #9565. This PR is now 0bf3f6f46c; its own patch is unchanged.

The focused Windows/NVIDIA pass is 7/7, including overlap on/off; the five shared controls also pass on main. VVL was inserted, shader caches were disabled, and neither side emitted a VUID. I also added the contributor AMD/NVIDIA reports to the body, explicitly tied to the previous head. The earlier Linux and title measurements remain historical evidence; I did not rerun the game.

The shared baseline used main's exact runtime sources with only an unrelated test fixture added. The dependency order remains #9176 → #9287 → #9289.

@TechLevelZero

Copy link
Copy Markdown
Contributor

✅ NVIDIA GPU test: passed

PR head 0bf3f6f merged onto main 828ac0b · tested 2026-10-31 09:09 UTC · 27 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,418 passed · 3 failed (0 new, 2 also fail on main, 1 unstable on main) · 42 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,463 of 3,048 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 (913 tests run on the GPU)
Slow tests (>30 s, GPU tests timed with validation layers) ⚠️ agc_driver_graphics_maps_fallback 35.3 s
Unstable on main (1, these also failed in recent main runs on this machine; not counted against this PR)
agc_submit_progress_no_timeline: failed in 8 of the last 10 main runs
Failing on main too (2, not counted against this PR)
guest_mmap_executable
guest_socket_options_multicast
Validated but not compared (2, not in the main baseline's validation pass)
agc_driver_dispatch_overlap
agc_driver_dispatch_overlap_off
Validation IDs already present on main (4 IDs in 424 tests)
VUID-VkDeviceCreateInfo-pNext-pNext (424 tests): agc_compute_pipeline_replay, agc_driver, agc_driver_address_passes, agc_driver_address_passes_draw_transitions, agc_driver_address_passes_targets_split, agc_driver_alias_copy_label, agc_driver_alpha_to_coverage, agc_driver_array_layer_target, and 416 more
VUID-vkCmdCopyImage-srcImage-01548 (13 tests): agc_driver_depth_clear_hle, agc_driver_depth_plane_buffer_memory, agc_driver_depth_plane_cpu_write_after_memo, agc_driver_depth_plane_cpu_write_after_page_unwatch, agc_driver_depth_plane_cpu_write_after_partial_unwatch, agc_driver_depth_plane_partial_store, agc_driver_depth_plane_partial_store_unimported, agc_driver_depth_plane_sampling, and 5 more
VUID-vkCmdCopyImage-srcImage-01551 (13 tests): agc_driver_depth_clear_hle, agc_driver_depth_plane_buffer_memory, agc_driver_depth_plane_cpu_write_after_memo, agc_driver_depth_plane_cpu_write_after_page_unwatch, agc_driver_depth_plane_cpu_write_after_partial_unwatch, agc_driver_depth_plane_partial_store, agc_driver_depth_plane_partial_store_unimported, agc_driver_depth_plane_sampling, and 5 more
VUID-VkPipelineColorBlendStateCreateInfo-pAttachments-00605 (1 test): agc_driver_srgb8_color_target
Skipped (42)
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_msaa_dcc_compared_import_2: skipped, the device reports host imports that keep write protection, so the write-watch probe compares none of them
agc_driver_msaa_dcc_compared_import_4: skipped, the device reports host imports that keep write protection, so the write-watch probe compares none of them
agc_driver_msaa_dcc_compared_import_8: skipped, the device reports host imports that keep write protection, so the write-watch probe compares none of them
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_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_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_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 (offscreen) or platform
video_out_flip_eop_main: 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_fresh: 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 plat
Reproduce
git fetch origin 0bf3f6f46c66b42063abf4bd7b91c87b37befadf 828ac0b2ae74aac181ba128fb59b08a1534f2041
git checkout 828ac0b2ae74aac181ba128fb59b08a1534f2041 && git merge --no-ff 0bf3f6f46c66b42063abf4bd7b91c87b37befadf
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.

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

Every dispatch records a barrier before and after itself, and on NVIDIA
any barrier between two dispatches drains the GPU.

A dispatch of a compute ring (queue != 0) with only SET_SH_REG and plain
NOPs between it and the ring's previous dispatch in the same submission
may join that dispatch's run: it records no leading barrier, and the
run's trailing barrier is deferred until any other command records it.
It joins only when its buffer ranges and storage images are disjoint
from the run's (reads against writes, writes against writes); an
address-based or BDA build counts as accessing everything, and a run
never takes the same resources object twice. A dispatch that records
GPU checkpoints (NV checkpoints or AMD buffer markers) never joins.
APS5_NO_DISPATCH_OVERLAP=1 turns it off.

AI-assisted: yes
@Celegans12
Celegans12 force-pushed the perf/agc-dispatch-overlap branch from 0bf3f6f to 80ff401 Compare November 1, 2026 09:40
@github-actions github-actions Bot removed the needs rebase Conflicts with main, rebase needed label Nov 1, 2026
@TechLevelZero

Copy link
Copy Markdown
Contributor

✅ NVIDIA GPU test: passed

PR head 80ff401 merged onto main e6f5730 · tested 2026-11-01 13:27 UTC · 28 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,484 passed · 5 failed (0 new, 3 also fail on main, 2 unstable on main) · 45 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,534 of 3,148 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 (933 tests run on the GPU)
Slow tests (>30 s, GPU tests timed with validation layers) ⚠️ agc_driver_pipeline_journal 120.1 s, ⚠️ agc_driver_lookup_log_fits_build 95.0 s
Unstable on main (2, these also failed in recent main runs on this machine; not counted against this PR)
agc_driver_pipeline_journal: failed in 1 of the last 10 main runs
agc_submit_progress: failed in 6 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
Validated but not compared (1, not in the main baseline's validation pass)
agc_driver_dispatch_overlap
Validation IDs already present on main (5 IDs in 481 tests)
VUID-VkDeviceCreateInfo-pNext-pNext (481 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 473 more
VUID-vkCmdCopyImage-srcImage-01548 (7 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
VUID-vkCmdCopyImage-srcImage-01551 (7 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
VUID-VkPipelineColorBlendStateCreateInfo-pAttachments-00605 (1 test): agc_driver_prepared_exports
VUID-VkShaderModuleCreateInfo-pCode-08737 (1 test): agc_driver_image_sample_derivatives
Skipped (45)
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_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 (offscreen) or platform
video_out_flip_eop_main: 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_fps_limit: 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_o
Reproduce
git fetch origin 80ff4017eedd8af5797a72f537c1377dec3a5a25 e6f57307fa7f47165d7fc1bee945abdb2f6816e7
git checkout e6f57307fa7f47165d7fc1bee945abdb2f6816e7 && git merge --no-ff 80ff4017eedd8af5797a72f537c1377dec3a5a25
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

@adriadam10 @MarcZX10 could you each take another look? Both CHANGES_REQUESTED reviews are on old heads (49625ed7d and 45c6265440); the head is now 80ff4017ee, with its own patch unchanged.

What was asked and where it is now:

  1. Perf evidence: aps5-summary.jsonl lines and tools/trace_digest.py output for a capture with the change and one with APS5_NO_DISPATCH_OVERLAP=1, same tree, title, scene and machine, are in perf(agc): run the dispatches a compute ring leaves unordered side by side #9176 (comment). The main-against-change menu summaries are in perf(agc): run the dispatches a compute ring leaves unordered side by side #9176 (comment).
  2. Rebase and validation-layer comparison: the branch is current with main. Paired runs against main with VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation, ANYPS5_NO_SHADER_CACHE=1 and ANYPS5_REQUIRE_VULKAN=1 show the layer loaded and no new VUID- lines: RADV in perf(agc): run the dispatches a compute ring leaves unordered side by side #9176 (comment) and AMD RDNA 4 on Windows in perf(agc): run the dispatches a compute ring leaves unordered side by side #9176 (comment). The NVIDIA GPU run passed on the current head.
  3. The overlap notes for perf(agc): clear the mirror of a depth plane instead of dispatching the UAV clear over it #7449 and feat(agc): GPU descriptor heap on VK_EXT_descriptor_heap (APS5_GPU_HEAP) #9508 are as you accepted them.

If anything is still missing, please say what, and we'll get it done.

@oneandonlydean oneandonlydean closed this pull request by merging all changes into boykopovar:main in bfd8b8c Nov 2, 2026
Pipodi pushed a commit to Pipodi/AnyPS5 that referenced this pull request Nov 14, 2026
…_NO_OVERLAP_RANGE_CHECK=1 off; an APS5_AB switch)

Port of boykopovar#9176's range check: a dispatch joins an open run only when its
buffer ranges and storage images are disjoint from the run's (reads
against writes, writes against writes); address-based/BDA builds and
bindless image dispatches count as accessing everything. [overlap-range]
counts refusals, and conflicts that joined while the switch was set.

AI-assisted: yes
Pipodi added a commit to Pipodi/AnyPS5 that referenced this pull request Nov 14, 2026
…step 1)

Step 1 of plan-1111c-converge (D:\PS5\status\plan-1111c-converge.md): main
1c8c0ef merged into slice 1 (cc72bbc) under the decided dispositions
(D:\PS5\status\rebase\conv-dispositions.md): R2a keeps the fork's path and
adds main's missing lines, R2b keeps both behind their own switches with no
default change, R2c takes main only for the marked rows (compute scratch pool
a46f050/boykopovar#12764, boykopovar#10228, boykopovar#10382 read-only expression, boykopovar#6867 where present).

Resolver logs, one per group, with every hunk, rule and drop:
- conv1-log-A.md: Texture.*, DepthSurface.* (HTILE GPU expansion R2a with
  main's recorder/device keys, Texture ctor order depthCompare, hostMemory,
  layerRows, clear)
- conv1-log-B.md: ShaderResources, GuestBufferMemory, Recorder (fork overlap
  and lane signatures, STAGING_DIFF beside main's changed copy-back, fork
  host import budget kept, main's default 4 GiB reserve dropped)
- conv1-log-C.md: Graphics Draw, Execution/** (scratch pool R2c, shape memo
  on the fork's committer pipeline, DrawTail sites on the fork's locals)
- conv1-log-D1.md: core/shader (request wire version and FormatVersion 153,
  spec id 57728 for the unnormalized wrap guard, main's masked result memo
  not ported: E1 accepted drop)
- conv1-log-D2.md: tests, CMake fragments, docs, libc, other libs, and the
  four escalations: mesh window descriptor set moved to 4 (fork's bindless
  heap keeps 3), BDA fault buffer = main's shared slot arena carrying the
  fork's counters, profiling and range index, BufferPool tests ported onto
  the fork's MockDevice, fork HostImportBudget expectations.
All logs are under D:\PS5\status\rebase\.

First-build fixes folded in (the merge did not compile without them):
duplicate declarations or definitions left by the auto-merge (main's dispatch
overlap block and PendingLeaseSerial in Recorder.cpp, main's overlap locals in
VulkanDevice.cpp, RunAccesses, HasGpuCopies/MemoryOwner, ZeroFetchSlack,
supplied, main38, main's MatchHtileBufferMaskClear twin and its test,
CheckRepeatedNeighbourStores), braces and a split string literal (Texture.cpp,
GuestBufferMemory.cpp, Dispatch.cpp), the fork's run copy-back path kept over
main's afterRunSelf (R2a, boykopovar#9176 row), main's formatTable restored for
genericFormattedStore, DeviceProcLookups restored, SharedCode API in fork
callers, fork names in main tests (StorageImageTable, Enqueue prepare slot),
test stubs and GpuWindowSampler sources for main's new test targets.
The blend-path exclusivity (D1 E2) follows as its own commit.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agc libSceAgc* build docs perf Performance change

Projects

None yet

Development

Successfully merging this pull request may close these issues.

10 participants