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

Merged
Celegans12 merged 1 commit from upstream-pr/9176 into main 2026-11-02 07:57:27 +00:00
Celegans12 commented 2026-10-21 14:20:49 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by Celegans12 on 2026-10-21T14:20:49Z.


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 a043b048db. 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}}
<!-- greyfinch-sync:boykopovar/AnyPS5:issue:4953141073 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/9176). Originally posted by [Celegans12](https://github.com/Celegans12) on 2026-10-21T14:20:49Z. --- ### 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` a043b048db8b. `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](https://raw.githubusercontent.com/Celegans12/AnyPS5/bringup-media/traces/title-2026-10-24/pl-main-3/aps5-summary.jsonl), [full change](https://raw.githubusercontent.com/Celegans12/AnyPS5/bringup-media/traces/title-2026-10-24/pl-9176-1/aps5-summary.jsonl). 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 <!-- Rules behind each item: https://github.com/boykopovar/AnyPS5/blob/main/CONTRIBUTING.md --> - [x] Based on current `main`; no other open PR implements the same functions - [x] One topic per PR; follow-ups go in a new PR - [x] No comments in code except [technical debt](https://github.com/boykopovar/AnyPS5/blob/main/docs/dev/CONVENTIONS.md) - [x] Unimplemented paths throw (`NotImplemented_nid_no_patch`); silent stubs are listed under Silent stubs in their library's [technical debt](https://github.com/boykopovar/AnyPS5/tree/main/docs/dev/debt) file - [x] No notes, investigation `.md` files or images added to the repository (attach them to this PR) - [x] New third-party code is a submodule built from source - [x] Generic behaviour, not specific to one title - [x] Depends on: none - [x] Fixes: none - [x] Unblocks: none - [x] GPUs tested: NVIDIA RTX 3080 Laptop, 610.62, Windows 11; Mesa lavapipe, LLVM 22.1.8, Windows 11 - [x] AI-assisted: yes <details><summary>Historical summary excerpts; all retained values unchanged</summary> ```json {"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}} ``` </details>
github-actions[bot] commented 2026-10-21 14:21:04 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by github-actions[bot] on 2026-10-21T14:21:04Z.


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.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6318408862 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/9176#issuecomment-6318408862). Originally posted by [github-actions[bot]](https://github.com/apps/github-actions) on 2026-10-21T14:21:04Z. --- <!-- pr-labels-perf --> 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`.
janzezno commented 2026-10-21 14:56:07 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by janzezno on 2026-10-21T14:56:07Z.


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.
<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6319088902 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/9176#issuecomment-6319088902). Originally posted by [janzezno](https://github.com/janzezno) on 2026-10-21T14:56:07Z. --- 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 commented 2026-10-21 17:29:36 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by CnRJay on 2026-10-21T17:29:36Z.

Review: COMMENTED


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.
<!-- greyfinch-sync:boykopovar/AnyPS5:review:5603651159 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/9176#pullrequestreview-5603651159). Originally posted by [CnRJay](https://github.com/CnRJay) on 2026-10-21T17:29:36Z. **Review:** COMMENTED --- 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 commented 2026-10-21 18:05:57 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by CnRJay on 2026-10-21T18:05:57Z.

Review: COMMENTED


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.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5604098096 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/9176#pullrequestreview-5604098096). Originally posted by [CnRJay](https://github.com/CnRJay) on 2026-10-21T18:05:57Z. **Review:** COMMENTED --- 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 commented 2026-10-22 00:14:33 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by Celegans12 on 2026-10-22T00:14:33Z.


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?

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6329478727 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/9176#issuecomment-6329478727). Originally posted by [Celegans12](https://github.com/Celegans12) on 2026-10-22T00:14:33Z. --- 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 commented 2026-10-22 08:24:08 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-22T08:24:08Z.

Review: CHANGES_REQUESTED


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.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5611271624 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/9176#pullrequestreview-5611271624). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-10-22T08:24:08Z. **Review:** CHANGES_REQUESTED --- ## 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 commented 2026-10-22 13:30:10 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by Celegans12 on 2026-10-22T13:30:10Z.


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 (cc0078595d, 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:

  • #7449: a mirror-cleared dispatch becomes a transfer clear, so it shouldn't join a run (!mirrorCleared in overlapCapable). The leading-barrier lines conflict textually.
  • #7920: a dispatch that writes buffer markers should stay out of runs, like the NV checkpoint marker.
  • #6946 / #9508: they now merge cleanly with this. The one thing to keep is that #9508's heap-bound dispatches still expose their buffer ranges to ShaderResources::RunAccesses, or else count as unknown so they never join.

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

Details
  • Microbenchmark: queue 0x20, 64 lanes, one group per dispatch, x = x*x + 1 in floats 32,767 times, then a store; median of 40 rounds, 3 runs per arm, RTX 3080 Laptop, driver 610.62.
  • Rebased heads: #9176 baae58f9dd, #9287 9edc41b72c, #9289 2f412bb25f.
<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6341988214 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/9176#issuecomment-6341988214). Originally posted by [Celegans12](https://github.com/Celegans12) on 2026-10-22T13:30:10Z. --- 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` (cc0078595d, 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: - #7449: a mirror-cleared dispatch becomes a transfer clear, so it shouldn't join a run (`!mirrorCleared` in `overlapCapable`). The leading-barrier lines conflict textually. - #7920: a dispatch that writes buffer markers should stay out of runs, like the NV checkpoint marker. - #6946 / #9508: they now merge cleanly with this. The one thing to keep is that #9508's heap-bound dispatches still expose their buffer ranges to `ShaderResources::RunAccesses`, or else count as unknown so they never join. If any of you would rather this one went first or last, tell me and I'll rebase to match. <details><summary>Details</summary> - Microbenchmark: queue 0x20, 64 lanes, one group per dispatch, `x = x*x + 1` in floats 32,767 times, then a store; median of 40 rounds, 3 runs per arm, RTX 3080 Laptop, driver 610.62. - Rebased heads: #9176 baae58f9dd, #9287 9edc41b72c, #9289 2f412bb25f. </details>
adriadam10 commented 2026-10-23 20:19:56 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by adriadam10 on 2026-10-23T20:19:56Z.

Review: CHANGES_REQUESTED


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 49625ed7d, 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.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5633974280 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/9176#pullrequestreview-5633974280). Originally posted by [adriadam10](https://github.com/adriadam10) on 2026-10-23T20:19:56Z. **Review:** CHANGES_REQUESTED --- 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 49625ed7d, 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.
Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
boykopovar/AnyPS5!9176
No description provided.