D3D12.X: use whole form once ready for split ExecuteIndirect #3528

Merged
Kalmarv merged 1 commit from upstream-pr/3528 into main 2026-12-02 17:40:02 +00:00
Kalmarv commented 2026-11-30 14:36:55 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by Kalmarv on 2026-11-30T14:36:55Z.


What is in it

Fixes the 2–3× world frame-rate regression introduced by #3499 (c9aa9f8a2), bisected and diagnosed by @throny, @tiagonleal, @CharlyRien, and @bmjask.

  • Root cause: dispatch_chain::execute_indirect always routed Dispatch-only ExecuteIndirect calls of split compute PSOs through the split chain — claiming the split scratch budget (256 MiB), running the slicer dispatch, and recording XCL_SPLIT_INDIRECT_ROUNDS (default 16) rounds of every piece plus UAV barriers — even after the background whole form (chain.whole) had finished building.
  • Fix:
    • In dispatch_chain::execute_indirect, return Ok(Indirect::Whole) once chain.whole.ready() is Some(Ok(_)) so bind.rs issues a single whole-form ExecuteIndirect without claiming split scratch or recording multi-round piece chains.
    • Re-check chain.whole.ready() immediately before recording the split chain so a background build that completes during setup hands off cleanly instead of recording a redundant split chain.
    • Keep the split chain path while chain.whole is still pending (None) or refused by the driver (Some(Err(_))), preserving #3499's cold-build and zero-indirect-variant behavior, and update queue_whole's refusal warning to match.
    • Remove the now-unused pso::dispatch_command_signature helper and tail-signature recording path.
  • Measured performance:
    • 60 s title smoke (RTX 5070 Ti, 8b9d8dfe4 vs main 1c8b55147): 1699 frames shown vs 1387 (+22.5%), 60 60 60 presents per 2 s, 0 device removals, 0 crashes, 18164 MB vs 17480 MB peak commit (+3.9%).
    • In-world merge-checks on the same handoff (49eb78ef): @throny measured 2.49–2.73 presents/s vs 0.77 presents/s on main (3.2–3.5× recovery, restoring pre-#3499 2.15–2.30 presents/s) on RTX 4080 16 GB (600–900 s runs).
  • Rebased onto main (1c8b55147) and updated per @Foniass's review:
    • Dropped creation-time prefetch_whole in dispatch_chain::build so this PR stays focused on the execute_indirect handoff and cannot starve split-chain compilation with eager whole-form builds.
    • Removed the dead pso::dispatch_command_signature helper (0 new compiler warnings).
    • Narrowed the ready() race window before chain recording (if the whole form completes after the re-check, that single dispatch still runs the chain as on main) and updated the queue_whole refusal log message.

Tested

  • Hardware & toolchain: NVIDIA GeForce RTX 5070 Ti (driver 610.74), AMD Ryzen 9 9950X, Windows 11 Pro 26200, rustc 1.99.0 (b940084d7 2026-09-28), DXC 1.9.2609.5 (debug + release).
  • scripts/test.ps1 (cargo build --workspace, cargo bench -p xcl --bench '*' -- --test, cargo test --workspace -- --test-threads=4): 2910 passed, 0 failed, 51 ignored across all 43 test targets (24 SKIPPED GPU tests on this adapter: 22 no wave64, 2 no heap windows).
  • dispatch_chain::tests (17/17 passed), including indirect_prefers_whole_only_once_built_ok (pending / OOM retry / built Ok / driver-refused Err) and an_indirect_dispatch_runs_its_chain_without_any_whole_form (transition from Indirect::Ran while building to Indirect::Whole without binding the split chain or running the slicer once chain.whole is Ok).
  • cargo build --release -p xcl: clean (0 new warnings vs main).

Regression run

Baseline (main):

xcl-smoke v1
commit: 1c8b551475e1e7bfe48f94448492a4c3544a2e0f
gpu: NVIDIA GeForce RTX 5070 Ti
title: ea3b5e4d
seconds: 60
exit: 0x0
frames shown: 1387 (PresentX 1387)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 17480 MB

PR head:

xcl-smoke v1
commit: 8b9d8dfe4c7a0a6d56ff94d7f2d9b25988f8dff3
gpu: NVIDIA GeForce RTX 5070 Ti
title: ea3b5e4d
seconds: 60
exit: 0x0
frames shown: 1699 (PresentX 1699)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 18164 MB

Not tested

  • Non-NVIDIA (AMD / Intel) GPUs and native wave64 hardware paths (22 wave64 GPU tests skipped on RTX 5070 Ti).
  • Opt-in XCL_HEAP_WINDOWS=1 GPU tests (2 skipped under default scripts/test.ps1).
  • Re-running the multi-minute in-world frame-rate checks after removing prefetch_whole (prior merge-checks verified the execute_indirect handoff itself; only the 60 s title smoke was re-run on 8b9d8dfe4).

AI use

  • Antigravity (Gemini 4 Neon) assisted with rebasing onto main, addressing the review items, running the workspace tests and smoke pair, and updating this description; initial PR draft was assisted by Antigravity (Claude Opus 5.5). Note: the commit trailer on 8b9d8dfe4 carried Gemini 3.1 Pro from an earlier template, while the actual rebase/verification was done with Gemini 4 Neon (leaving the commit SHA untouched to preserve the three merge-checks).
<!-- greyfinch-sync:ivall/xcl:issue:5567379510 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/3528). Originally posted by [Kalmarv](https://github.com/Kalmarv) on 2026-11-30T14:36:55Z. --- **What is in it** Fixes the 2–3× world frame-rate regression introduced by #3499 (`c9aa9f8a2`), bisected and diagnosed by @throny, @tiagonleal, @CharlyRien, and @bmjask. - **Root cause:** `dispatch_chain::execute_indirect` always routed Dispatch-only `ExecuteIndirect` calls of split compute PSOs through the split chain — claiming the split scratch budget (`256 MiB`), running the slicer dispatch, and recording `XCL_SPLIT_INDIRECT_ROUNDS` (default 16) rounds of every piece plus UAV barriers — even after the background whole form (`chain.whole`) had finished building. - **Fix:** - In `dispatch_chain::execute_indirect`, return `Ok(Indirect::Whole)` once `chain.whole.ready()` is `Some(Ok(_))` so `bind.rs` issues a single whole-form `ExecuteIndirect` without claiming split scratch or recording multi-round piece chains. - Re-check `chain.whole.ready()` immediately before recording the split chain so a background build that completes during setup hands off cleanly instead of recording a redundant split chain. - Keep the split chain path while `chain.whole` is still pending (`None`) or refused by the driver (`Some(Err(_))`), preserving #3499's cold-build and zero-indirect-variant behavior, and update `queue_whole`'s refusal warning to match. - Remove the now-unused `pso::dispatch_command_signature` helper and tail-signature recording path. - **Measured performance:** - **60 s title smoke (RTX 5070 Ti, `8b9d8dfe4` vs `main 1c8b55147`):** `1699` frames shown vs `1387` (`+22.5%`), `60 60 60` presents per 2 s, `0` device removals, `0` crashes, `18164 MB` vs `17480 MB` peak commit (`+3.9%`). - **In-world merge-checks on the same handoff (`49eb78ef`):** @throny measured **2.49–2.73 presents/s vs 0.77 presents/s on `main`** (3.2–3.5× recovery, restoring pre-#3499 2.15–2.30 presents/s) on RTX 4080 16 GB (600–900 s runs). - **Rebased onto `main` (`1c8b55147`) and updated per @Foniass's review:** - Dropped creation-time `prefetch_whole` in `dispatch_chain::build` so this PR stays focused on the `execute_indirect` handoff and cannot starve split-chain compilation with eager whole-form builds. - Removed the dead `pso::dispatch_command_signature` helper (0 new compiler warnings). - Narrowed the `ready()` race window before chain recording (if the whole form completes after the re-check, that single dispatch still runs the chain as on `main`) and updated the `queue_whole` refusal log message. **Tested** - Hardware & toolchain: NVIDIA GeForce RTX 5070 Ti (driver 610.74), AMD Ryzen 9 9950X, Windows 11 Pro 26200, `rustc 1.99.0 (b940084d7 2026-09-28)`, DXC `1.9.2609.5` (debug + release). - `scripts/test.ps1` (`cargo build --workspace`, `cargo bench -p xcl --bench '*' -- --test`, `cargo test --workspace -- --test-threads=4`): **2910 passed, 0 failed, 51 ignored** across all 43 test targets (24 SKIPPED GPU tests on this adapter: 22 `no wave64`, 2 `no heap windows`). - `dispatch_chain::tests` (17/17 passed), including `indirect_prefers_whole_only_once_built_ok` (pending / OOM retry / built `Ok` / driver-refused `Err`) and `an_indirect_dispatch_runs_its_chain_without_any_whole_form` (transition from `Indirect::Ran` while building to `Indirect::Whole` without binding the split chain or running the slicer once `chain.whole` is `Ok`). - `cargo build --release -p xcl`: clean (0 new warnings vs `main`). **Regression run** Baseline (`main`): ``` xcl-smoke v1 commit: 1c8b551475e1e7bfe48f94448492a4c3544a2e0f gpu: NVIDIA GeForce RTX 5070 Ti title: ea3b5e4d seconds: 60 exit: 0x0 frames shown: 1387 (PresentX 1387) presents per 2 s (last 3): 60 60 60 device removals: 0 crashes: 0 peak commit: 17480 MB ``` PR head: ``` xcl-smoke v1 commit: 8b9d8dfe4c7a0a6d56ff94d7f2d9b25988f8dff3 gpu: NVIDIA GeForce RTX 5070 Ti title: ea3b5e4d seconds: 60 exit: 0x0 frames shown: 1699 (PresentX 1699) presents per 2 s (last 3): 60 60 60 device removals: 0 crashes: 0 peak commit: 18164 MB ``` **Not tested** - Non-NVIDIA (AMD / Intel) GPUs and native wave64 hardware paths (22 wave64 GPU tests skipped on RTX 5070 Ti). - Opt-in `XCL_HEAP_WINDOWS=1` GPU tests (2 skipped under default `scripts/test.ps1`). - Re-running the multi-minute in-world frame-rate checks after removing `prefetch_whole` (prior merge-checks verified the `execute_indirect` handoff itself; only the 60 s title smoke was re-run on `8b9d8dfe4`). **AI use** - Antigravity (`Gemini 4 Neon`) assisted with rebasing onto `main`, addressing the review items, running the workspace tests and smoke pair, and updating this description; initial PR draft was assisted by Antigravity (`Claude Opus 5.5`). Note: the commit trailer on `8b9d8dfe4` carried `Gemini 3.1 Pro` from an earlier template, while the actual rebase/verification was done with `Gemini 4 Neon` (leaving the commit SHA untouched to preserve the three merge-checks).
tiagonleal commented 2026-11-30 14:39:50 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by tiagonleal on 2026-11-30T14:39:50Z.


merge-check
base: 9dfbe3ea66
head: 49eb78efbd
merge: clean (the head is on the current main, so the merge is the head itself)
build: cargo build --workspace -> ok (also cargo build --release -p xcl)
tests: cargo test --workspace --no-fail-fast -j 8 -- --test-threads=4 -> 2886 passed, 1 failed, 51 ignored; SKIPPED: 24 lines, the same as on the base; failing: gpu::dxil::msaa_tests::gpu_direct_image_get_resinfo_d16, which fails the same way on this base alone (2885 passed, 1 failed, 51 ignored; #3513 fixes it). Both changed tests pass and the GPU one ran on this card. With only the early return in execute_indirect turned off (if false && indirect_prefers_whole(...)), an_indirect_dispatch_runs_its_chain_without_any_whole_form fails ("whole-ready indirect dispatch must not bind the split chain"), so it tests the change. indirect_prefers_whole_only_once_built_ok tests the helper only and passes either way.
review: whole diff read (+46/-24, real/dispatch_chain.rs). Once chain.whole.ready() is Some(Ok(_)), execute_indirect returns Indirect::Whole before claiming scratch or building commands. bind.rs then takes the same whole_ready -> Whole::Ready path as before #3499, binds the whole form and issues one ExecuteIndirect. WholeBuild keeps an Ok result for good, so the second check in whole_ready cannot see anything else (no race between the two reads). While the whole form is building (None) or the driver refused it (Some(Err)), the chain runs as in #3499 and the build is queued. The tail ExecuteIndirect that #3499 recorded for groups past the slicer's rounds is gone. It only ran when the whole form was ready, and that case now leaves at the first check. Edit after the review by Zippp69: there is one window left. If the build finishes between the first ready() (line 602) and the recording, the chain is still recorded, now without the tail, so a dispatch with more groups than the rounds cover is left out for that one call. That is what already happens to such a dispatch while the whole form is building or refused, before and after this PR, so I do not see it as a blocker; returning Indirect::Whole at the second check (line 614) when it sees Some(Ok(_)) would close it. The "whose whole form is still being built skipped" warning is not brought back for Dispatch-only commands: it stays only on the Whole paths it had before (multi-command or count-buffer signatures, no chain scratch). The early queue_whole in build goes through whole_sent, so the whole form is queued once per chain. It runs on the single xcl-pso-whole worker, holds no lock past the CHAINS insert, and adds whole-form compiles at load time for programs listed in used-indirect-split.txt (the journal note_indirect_use fills; read once at start from the DXIL cache directory). World entry did not move in our runs (below). Two notes, neither a blocker. (1) The refused-build warning in queue_whole still says "its indirect dispatches stay left out", but they now run the chain. (2) The log does not count how many indirect dispatches took the whole form or the chain. A counter in the compute split: line would make this checkable in the field.
performance: scripts/smoke.ps1, 60 s of a retail title, release, after one warm-up run of the base: 1671 frames, 18966 MB peak commit against 1652 frames, 18909 MB on the base (warm-up: 1665, 18646 MB). No device removal, no crash. World runs, release, warm caches, 16 UMA windows, the same 330 s plan with scripted presses and the RAM guard, interleaved base, PR, base, PR. Presents per second are measured from 30 s after world entry to the end. Base: 0.61 and 0.63 (214-215 s windows, world entry 86-88 s; compute split: 89-95k chained dispatches in 221-260k slabs, scratch 561-613 MiB). PR: 1.37 and 1.41 (214-217 s windows, world entry 84-88 s; 224-229k chained dispatches in 281-284k slabs, scratch 334-348 MiB). That is 2.2x the base. It matches #3499 reverted on the same base earlier today (1.43, 1.33), and the two pairs agree within 0.04. No "skipped" lines, no device removal. Min free RAM 1.22-2.25 GB, peak commit 39.7-39.9 GB against 41.2-41.7 GB on the base. One PR run was cut at 132 s (48 s of world) by a driver timeout (nvlddmkm 153 at 15:12:10; the log ends with no removal line); its retry ran the full 330 s. Plain main had 2 such timeouts in 9 runs of this recipe on this PC today, so one timeout says nothing about this PR. The world frames show the same lit interior, and nothing looks missing or broken. The late frames of the PR runs are darker (7-10 % lit pixels against 38-100 % on the base), but two runs of the revert already differ (20 % and 42 %), and the frames come from different moments of the scene, so I cannot read a rendering change into it.
verdict: safe to merge
hardware / tool and model: RTX 5070 Ti 16 GB (617.42, wave32), Ryzen 7 9800X3D, 32 GB, Windows 11 26300, rustc 1.100.0 / Claude Code (Claude Opus 5.5 ran the build, suite, tests, smoke and world runs, reviewed the diff against the merged source and wrote this)

  • Tiago
<!-- greyfinch-sync:ivall/xcl:comment:7281731479 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/3528#issuecomment-7281731479). Originally posted by [tiagonleal](https://github.com/tiagonleal) on 2026-11-30T14:39:50Z. --- merge-check base: 9dfbe3ea6653a9c76ef3ea0d66187a4b5407483b head: 49eb78efbd8e4aaac3ce2d750ecc5b026b6ce337 merge: clean (the head is on the current main, so the merge is the head itself) build: cargo build --workspace -> ok (also `cargo build --release -p xcl`) tests: cargo test --workspace --no-fail-fast -j 8 -- --test-threads=4 -> 2886 passed, 1 failed, 51 ignored; SKIPPED: 24 lines, the same as on the base; failing: `gpu::dxil::msaa_tests::gpu_direct_image_get_resinfo_d16`, which fails the same way on this base alone (2885 passed, 1 failed, 51 ignored; #3513 fixes it). Both changed tests pass and the GPU one ran on this card. With only the early return in `execute_indirect` turned off (`if false && indirect_prefers_whole(...)`), `an_indirect_dispatch_runs_its_chain_without_any_whole_form` fails ("whole-ready indirect dispatch must not bind the split chain"), so it tests the change. `indirect_prefers_whole_only_once_built_ok` tests the helper only and passes either way. review: whole diff read (+46/-24, `real/dispatch_chain.rs`). Once `chain.whole.ready()` is `Some(Ok(_))`, `execute_indirect` returns `Indirect::Whole` before claiming scratch or building commands. `bind.rs` then takes the same `whole_ready` -> `Whole::Ready` path as before #3499, binds the whole form and issues one `ExecuteIndirect`. `WholeBuild` keeps an Ok result for good, so the second check in `whole_ready` cannot see anything else (no race between the two reads). While the whole form is building (`None`) or the driver refused it (`Some(Err)`), the chain runs as in #3499 and the build is queued. The tail `ExecuteIndirect` that #3499 recorded for groups past the slicer's rounds is gone. It only ran when the whole form was ready, and that case now leaves at the first check. Edit after the review by Zippp69: there is one window left. If the build finishes between the first `ready()` (line 602) and the recording, the chain is still recorded, now without the tail, so a dispatch with more groups than the rounds cover is left out for that one call. That is what already happens to such a dispatch while the whole form is building or refused, before and after this PR, so I do not see it as a blocker; returning `Indirect::Whole` at the second check (line 614) when it sees `Some(Ok(_))` would close it. The "whose whole form is still being built skipped" warning is not brought back for Dispatch-only commands: it stays only on the `Whole` paths it had before (multi-command or count-buffer signatures, no chain scratch). The early `queue_whole` in `build` goes through `whole_sent`, so the whole form is queued once per chain. It runs on the single `xcl-pso-whole` worker, holds no lock past the `CHAINS` insert, and adds whole-form compiles at load time for programs listed in `used-indirect-split.txt` (the journal `note_indirect_use` fills; read once at start from the DXIL cache directory). World entry did not move in our runs (below). Two notes, neither a blocker. (1) The refused-build warning in `queue_whole` still says "its indirect dispatches stay left out", but they now run the chain. (2) The log does not count how many indirect dispatches took the whole form or the chain. A counter in the `compute split:` line would make this checkable in the field. performance: `scripts/smoke.ps1`, 60 s of a retail title, release, after one warm-up run of the base: 1671 frames, 18966 MB peak commit against 1652 frames, 18909 MB on the base (warm-up: 1665, 18646 MB). No device removal, no crash. World runs, release, warm caches, 16 UMA windows, the same 330 s plan with scripted presses and the RAM guard, interleaved base, PR, base, PR. Presents per second are measured from 30 s after world entry to the end. Base: 0.61 and 0.63 (214-215 s windows, world entry 86-88 s; `compute split:` 89-95k chained dispatches in 221-260k slabs, scratch 561-613 MiB). PR: 1.37 and 1.41 (214-217 s windows, world entry 84-88 s; 224-229k chained dispatches in 281-284k slabs, scratch 334-348 MiB). That is 2.2x the base. It matches #3499 reverted on the same base earlier today (1.43, 1.33), and the two pairs agree within 0.04. No "skipped" lines, no device removal. Min free RAM 1.22-2.25 GB, peak commit 39.7-39.9 GB against 41.2-41.7 GB on the base. One PR run was cut at 132 s (48 s of world) by a driver timeout (nvlddmkm 153 at 15:12:10; the log ends with no removal line); its retry ran the full 330 s. Plain main had 2 such timeouts in 9 runs of this recipe on this PC today, so one timeout says nothing about this PR. The world frames show the same lit interior, and nothing looks missing or broken. The late frames of the PR runs are darker (7-10 % lit pixels against 38-100 % on the base), but two runs of the revert already differ (20 % and 42 %), and the frames come from different moments of the scene, so I cannot read a rendering change into it. verdict: safe to merge hardware / tool and model: RTX 5070 Ti 16 GB (617.42, wave32), Ryzen 7 9800X3D, 32 GB, Windows 11 26300, rustc 1.100.0 / Claude Code (Claude Opus 5.5 ran the build, suite, tests, smoke and world runs, reviewed the diff against the merged source and wrote this) - Tiago
CharlyRien commented 2026-11-30 15:19:53 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by CharlyRien on 2026-11-30T15:19:53Z.


merge-check
base: 9dfbe3ea66
head: 49eb78efbd
merge: clean (the head's parent is main 9dfbe3ea, so git merge --no-edit is a fast-forward and the merged tree is the head itself; git diff --check 9dfbe3ea..HEAD clean)
build: cargo build --workspace -> ok
tests: cargo test --workspace --no-fail-fast -- --test-threads=4 (debug, on the merged tree) -> 2883 passed, 4 failed, 51 ignored; SKIPPED: 25 (22 "no wave64" (this card has no wave64), 2 "no heap windows" (opt-in), 1 "no GPU_UPLOAD heaps"); failing: gpu_direct_image_get_resinfo_d16, test_title_draws_with_a_root_signature_under_the_debug_layer and test_title_runs_under_the_debug_layer_with_dred fail on base 9dfbe3ea alone too (the same suite run there: 2883 passed, 3 failed). test_title_runs_and_game_folder_is_untouched failed once in the merged debug suite only ([FAIL] ... a texture in title memory (XG layout, #44) follows CPU writes: subresource 2 row 0 differs); rerun alone in release 3 times on each side after cargo build --workspace --release, it passed 3 of 3 on the merged tree and 3 of 3 on base, so I read it as flaky and unrelated to dispatch_chain.rs. The PR's module tests in release on the GPU (dispatch_chain::tests + bind.rs's ExecuteIndirect test, GPU skips not allowed): 17 passed, 0 failed, including indirect_prefers_whole_only_once_built_ok.
review: no blocking finding after reading the whole diff (1 commit, dispatch_chain.rs +46/-24). What I checked:

  • Once chain.whole.ready() is Some(Ok), execute_indirect now returns Indirect::Whole before claiming any split scratch, so bind.rs falls through to whole_ready, which hands back the cached whole form without waiting. This is what ran for these dispatches before #3499.
  • The removed tail path (the whole form running the slicer's whole-form command) ran only in that Some(Ok) case, so nothing is lost. While the whole form is still building (None) or was refused (Some(Err)), the behaviour is unchanged: same chain, same queue_whole when None, and a dispatch too large for the rounds is still left out.
  • note_indirect_use still runs before the early return, so the journal stays complete.
  • The new queue_whole in build (records already in used-indirect-split.txt) moves the whole-form compile from the first indirect dispatch to pipeline creation, on the same single xcl-pso-whole worker, guarded by whole_sent. Unlike whole_ready, it does not check pso_async::cs_goes_on(). If that is off, a later synchronous whole(true) only waits on the same WholeBuild lock, so I do not count it as a bug. A record that is journaled but never dispatched in a run now pays one whole-form compile.
  • The updated GPU test now covers the change of path, from Ran while building to Whole with no split bind once the whole form is built. The new pure test covers pending, OOM retry, built and refused.
    Not covered here: AMD / Intel, the Series X profile, and the PR alone on plain main in the world (see performance).
    performance: by default it should give back the frame time #3499 took once each whole form is built, plus an earlier whole-form compile on warm runs.
    Measured, 60 s scripts/smoke.ps1, one run per side, the retail title, XCL_PREPARE=0, cold shader cache on both sides (no used-indirect-split.txt, so only the cold path runs): base 9dfbe3ea 561 frames, peak commit 15813 MB; merged 559 frames, peak commit 15702 MB (-111 MB). 0 device removals and 0 crashes on both sides. These 60 s do not reach the world on this machine.
    World frame rate, one run with the PR's commit, on a local tree: main d52ff48c (already contains #3499) + 42 local commits of ours (none in dispatch_chain.rs or bind.rs; same translator id with and without the PR), the same warm shader cache with the journal, the same switches (XCL_PREPARE=0 XCL_HEAP_WINDOWS=1 XCL_UMA_WINDOWS=16 XCL_HUGE_PSO_CONCURRENCY=8 XCL_HUGE_PSO_WANTED_CONCURRENCY=8 XCL_PSO_WAIT_MS=5000 XCL_ALIAS_COPY=1 XCL_PLACE_RETIRE=0 XCL_VIEW_REACH_MB=36 XCL_TWO_PASS_MB=2048 XCL_DEPTH_UAV_TWIN=1 XCL_OUTSIDE_ONLY_BYTES=0x3200000,0x1900000 XCL_OUTSIDE_VIEW_USE=1 XCL_PAIR_PAGES=1 XCL_DRED=1 XCL_GPU_WAIT_TIMEOUT_MS=45000). Presents/s over world + 20..180 s:
  • that tree without the PR: 0.18;
  • with XCL_SPLIT_INDIRECT_ROUNDS=1: 0.26;
  • with this PR: 0.19;
  • the same stack on main 53e85fb1, before #3499: 0.51.
    0 removals, 0 TDR. So no world gain measured on this tree: the log does not say whether the whole forms were built during the window, so this may only mean the new path was not taken here; the other reports on #3499 / here measured a gain on plain main. One run per setting, so treat differences under ~10 % as noise.
    verdict: safe to merge
    hardware / tool and model: NVIDIA GeForce RTX 3090 (driver 616.56), AMD Ryzen 9 5950X, Windows 11 build 22631 / AI use: Claude Code (Claude Opus 5.5) ran the merge, the builds, the suite, both smoke runs and the world run on this machine, read the diff and wrote this report; checked and posted by me.
<!-- greyfinch-sync:ivall/xcl:comment:7282818451 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/3528#issuecomment-7282818451). Originally posted by [CharlyRien](https://github.com/CharlyRien) on 2026-11-30T15:19:53Z. --- merge-check base: 9dfbe3ea6653a9c76ef3ea0d66187a4b5407483b head: 49eb78efbd8e4aaac3ce2d750ecc5b026b6ce337 merge: clean (the head's parent is main 9dfbe3ea, so `git merge --no-edit` is a fast-forward and the merged tree is the head itself; `git diff --check 9dfbe3ea..HEAD` clean) build: cargo build --workspace -> ok tests: cargo test --workspace --no-fail-fast -- --test-threads=4 (debug, on the merged tree) -> 2883 passed, 4 failed, 51 ignored; SKIPPED: 25 (22 "no wave64" (this card has no wave64), 2 "no heap windows" (opt-in), 1 "no GPU_UPLOAD heaps"); failing: `gpu_direct_image_get_resinfo_d16`, `test_title_draws_with_a_root_signature_under_the_debug_layer` and `test_title_runs_under_the_debug_layer_with_dred` fail on base 9dfbe3ea alone too (the same suite run there: 2883 passed, 3 failed). `test_title_runs_and_game_folder_is_untouched` failed once in the merged debug suite only (`[FAIL] ... a texture in title memory (XG layout, #44) follows CPU writes: subresource 2 row 0 differs`); rerun alone in release 3 times on each side after `cargo build --workspace --release`, it passed 3 of 3 on the merged tree and 3 of 3 on base, so I read it as flaky and unrelated to dispatch_chain.rs. The PR's module tests in release on the GPU (`dispatch_chain::tests` + bind.rs's ExecuteIndirect test, GPU skips not allowed): 17 passed, 0 failed, including `indirect_prefers_whole_only_once_built_ok`. review: no blocking finding after reading the whole diff (1 commit, dispatch_chain.rs +46/-24). What I checked: - Once `chain.whole.ready()` is `Some(Ok)`, `execute_indirect` now returns `Indirect::Whole` before claiming any split scratch, so bind.rs falls through to `whole_ready`, which hands back the cached whole form without waiting. This is what ran for these dispatches before #3499. - The removed tail path (the whole form running the slicer's whole-form command) ran only in that `Some(Ok)` case, so nothing is lost. While the whole form is still building (`None`) or was refused (`Some(Err)`), the behaviour is unchanged: same chain, same `queue_whole` when `None`, and a dispatch too large for the rounds is still left out. - `note_indirect_use` still runs before the early return, so the journal stays complete. - The new `queue_whole` in `build` (records already in `used-indirect-split.txt`) moves the whole-form compile from the first indirect dispatch to pipeline creation, on the same single `xcl-pso-whole` worker, guarded by `whole_sent`. Unlike `whole_ready`, it does not check `pso_async::cs_goes_on()`. If that is off, a later synchronous `whole(true)` only waits on the same `WholeBuild` lock, so I do not count it as a bug. A record that is journaled but never dispatched in a run now pays one whole-form compile. - The updated GPU test now covers the change of path, from `Ran` while building to `Whole` with no split bind once the whole form is built. The new pure test covers pending, OOM retry, built and refused. Not covered here: AMD / Intel, the Series X profile, and the PR alone on plain main in the world (see performance). performance: by default it should give back the frame time #3499 took once each whole form is built, plus an earlier whole-form compile on warm runs. Measured, 60 s `scripts/smoke.ps1`, one run per side, the retail title, `XCL_PREPARE=0`, cold shader cache on both sides (no `used-indirect-split.txt`, so only the cold path runs): base 9dfbe3ea 561 frames, peak commit 15813 MB; merged 559 frames, peak commit 15702 MB (-111 MB). 0 device removals and 0 crashes on both sides. These 60 s do not reach the world on this machine. World frame rate, one run with the PR's commit, on a local tree: main d52ff48c (already contains #3499) + 42 local commits of ours (none in dispatch_chain.rs or bind.rs; same translator id with and without the PR), the same warm shader cache with the journal, the same switches (`XCL_PREPARE=0 XCL_HEAP_WINDOWS=1 XCL_UMA_WINDOWS=16 XCL_HUGE_PSO_CONCURRENCY=8 XCL_HUGE_PSO_WANTED_CONCURRENCY=8 XCL_PSO_WAIT_MS=5000 XCL_ALIAS_COPY=1 XCL_PLACE_RETIRE=0 XCL_VIEW_REACH_MB=36 XCL_TWO_PASS_MB=2048 XCL_DEPTH_UAV_TWIN=1 XCL_OUTSIDE_ONLY_BYTES=0x3200000,0x1900000 XCL_OUTSIDE_VIEW_USE=1 XCL_PAIR_PAGES=1 XCL_DRED=1 XCL_GPU_WAIT_TIMEOUT_MS=45000`). Presents/s over world + 20..180 s: - that tree without the PR: 0.18; - with `XCL_SPLIT_INDIRECT_ROUNDS=1`: 0.26; - with this PR: **0.19**; - the same stack on main 53e85fb1, before #3499: 0.51. 0 removals, 0 TDR. So no world gain measured on this tree: the log does not say whether the whole forms were built during the window, so this may only mean the new path was not taken here; the other reports on #3499 / here measured a gain on plain main. One run per setting, so treat differences under ~10 % as noise. verdict: safe to merge hardware / tool and model: NVIDIA GeForce RTX 3090 (driver 616.56), AMD Ryzen 9 5950X, Windows 11 build 22631 / AI use: Claude Code (Claude Opus 5.5) ran the merge, the builds, the suite, both smoke runs and the world run on this machine, read the diff and wrote this report; checked and posted by me.
minimalhipster990 commented 2026-11-30 15:46:38 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by minimalhipster990 on 2026-11-30T15:46:38Z.


Correction, December 1. On this RTX 4090, 49eb78e reduced the split work from #3499 and the world remained near 0.2 frames/s. I previously attributed that remaining cost to #2571 alone. Our fast-to-slow comparison spans four changes, and the exact pre-#2571 control hung before world entry. Corrected bisection and measurements.

Setup: RTX 4090 24 GB, NVIDIA 621.40, 32 GB RAM, Windows 11 build 26300, NVIDIA shader heap 2048 MB (#2590). d52ff48c + #3318 f5496479 (without it this card does not reach the world), with and without 49eb78e cherry-picked (clean), release. Retail title, the same save and inputs, 600 s, warm XCL cache, the switches listed on #2571.

tree frames/s, 300–540 s split slabs per present
3a8745dc (before #3499) 2.13 · 3.08 · 3.08 · 3.22 · 3.17 ~985
c9aa9f8a (#3499) 0.73 · 0.75 · 0.75 · 0.72 · 0.63 ~2,900
d52ff48c 0.17–0.22 (2 runs) ~1,900
d52ff48c + 49eb78e 0.18 · 0.20 · 0.22 · 0.22 · 0.23 ~1,170
  • My bisection of main's merges agrees with throny's: 3a8745dc good, c9aa9f8a bad.
  • No device removal or crash in either run.

Not tested: this commit on c9aa9f8a (before #2571), which would show whether it recovers the full ~3.1 frames/s here, and the PR head on top of 9dfbe3ea.

AI use: Claude Code (Claude Opus 5.5) built the trees, ran the replays and wrote this. The person running these tests checked it and asked for it to be posted.

December 1 correction drafted with Codex (GPT-6) after checking the Git ancestry and replay logs.

<!-- greyfinch-sync:ivall/xcl:comment:7283567019 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/3528#issuecomment-7283567019). Originally posted by [minimalhipster990](https://github.com/minimalhipster990) on 2026-11-30T15:46:38Z. --- **Correction, December 1.** On this RTX 4090, `49eb78e` reduced the split work from #3499 and the world remained near 0.2 frames/s. I previously attributed that remaining cost to #2571 alone. Our fast-to-slow comparison spans four changes, and the exact pre-#2571 control hung before world entry. [Corrected bisection and measurements](https://github.com/xcl-dev/xcl/pull/2571#issuecomment-7283564613). **Setup:** RTX 4090 24 GB, NVIDIA 621.40, 32 GB RAM, Windows 11 build 26300, NVIDIA shader heap 2048 MB (#2590). `d52ff48c` + #3318 `f5496479` (without it this card does not reach the world), with and without `49eb78e` cherry-picked (clean), release. Retail title, the same save and inputs, 600 s, warm XCL cache, the switches listed on #2571. | tree | frames/s, 300–540 s | split slabs per present | |---|---|---| | `3a8745dc` (before #3499) | 2.13 · 3.08 · 3.08 · 3.22 · 3.17 | ~985 | | `c9aa9f8a` (#3499) | 0.73 · 0.75 · 0.75 · 0.72 · 0.63 | ~2,900 | | `d52ff48c` | 0.17–0.22 (2 runs) | ~1,900 | | `d52ff48c` + `49eb78e` | 0.18 · 0.20 · 0.22 · 0.22 · 0.23 | ~1,170 | - My bisection of `main`'s merges agrees with throny's: `3a8745dc` good, `c9aa9f8a` bad. - No device removal or crash in either run. **Not tested:** this commit on `c9aa9f8a` (before #2571), which would show whether it recovers the full ~3.1 frames/s here, and the PR head on top of `9dfbe3ea`. AI use: Claude Code (Claude Opus 5.5) built the trees, ran the replays and wrote this. The person running these tests checked it and asked for it to be posted. December 1 correction drafted with Codex (GPT-6) after checking the Git ancestry and replay logs.
Zippp69 commented 2026-11-30 15:57:00 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by Zippp69 on 2026-11-30T15:57:00Z.

Review: COMMENTED


[P2] Recheck whole-form readiness before recording the split chain

If the background build completes between the two chain.whole.ready() calls in execute_indirect, the second check sees Some(Ok(_)) but still records the split chain. For a dispatch that exceeds the slicer’s round budget, the split commands do no work. Before this PR, a successful build observed at this point let the tail command execute that dispatch.

Keep the fast path and replace the second check with:

match chain.whole.ready() {
    Some(Ok(_)) => return Ok(Indirect::Whole),
    None => { queue_whole(&chain); }
    Some(Err(_)) => {}
}

I checked that the patch applies to 49eb78e. In an isolated Rust harness, the completed-build case failed before the change. All three cases (completed, pending, and refused) passed afterward. The XCL suite and GPU tests were not run.

Codex assisted with the review, patch, and isolated tests.

<!-- greyfinch-sync:ivall/xcl:review:6115596759 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/3528#pullrequestreview-6115596759). Originally posted by [Zippp69](https://github.com/Zippp69) on 2026-11-30T15:57:00Z. **Review:** COMMENTED --- **[P2] Recheck whole-form readiness before recording the split chain** If the background build completes between the two `chain.whole.ready()` calls in `execute_indirect`, the [second check](https://github.com/xcl-dev/xcl/pull/3528/files#diff-2a996d23e40ddd3bc1df89728ad443b1a5d6be79800cbab351333c3314b94197R614) sees `Some(Ok(_))` but still records the split chain. For a dispatch that exceeds the slicer’s round budget, the split commands do no work. Before this PR, a successful build observed at this point let the tail command execute that dispatch. Keep the fast path and replace the second check with: ```rust match chain.whole.ready() { Some(Ok(_)) => return Ok(Indirect::Whole), None => { queue_whole(&chain); } Some(Err(_)) => {} } ``` I checked that the patch applies to `49eb78e`. In an isolated Rust harness, the completed-build case failed before the change. All three cases (completed, pending, and refused) passed afterward. The XCL suite and GPU tests were not run. Codex assisted with the review, patch, and isolated tests.
throny commented 2026-11-30 17:24:13 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by throny on 2026-11-30T17:24:13Z.


@Kalmarv a run of this PR on the RTX 4080 16 GB (621.40), i9-12900K, release, main 9dfbe3ea + 49eb78ef + a local input-timing patch for the run script, the switches of my #3499 comment, 600 to 900 s per run:

build runs presents/s from 240 s device removal
main 9dfbe3ea 2 0.77; 0.00 (no present after 240 s) none
+ this PR 4 2.73, 2.49; two runs ended early 2 of 4: 0x887a0006 (hung) at 141 s and 151 s, DRED page fault at VA 0, no breadcrumbs
+ this PR + XCL_PER_LANE=1 1 ended early an access violation at 168 s

So it does bring the frame rate back (2.5 to 2.7 against 0.77, close to the 2.15 to 2.30 before #3499), but half of the runs with it lost the device about 140 to 150 s after the first frame, which none of my runs of 3a8745dc (before #3499) or of main did. Caveats: the first pair ran while other GPU work ran on the same card (I discarded that as evidence, but the hang repeated in the clean pair); a TDR at about that time also took this PC down a few minutes later, so I stopped the series there.

My reading, not verified: the switch from the chain to the whole form happens mid-frame once the whole form becomes ready, and the first indirect dispatch on the whole form is where it hangs. If you have a switch to force the chain or the whole form from the start, I can run both.

AI use: Claude Code (Claude Opus 5.5) made the runs and wrote this.

<!-- greyfinch-sync:ivall/xcl:comment:7286220803 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/3528#issuecomment-7286220803). Originally posted by [throny](https://github.com/throny) on 2026-11-30T17:24:13Z. --- @Kalmarv a run of this PR on the RTX 4080 16 GB (621.40), i9-12900K, release, `main` `9dfbe3ea` + `49eb78ef` + a local input-timing patch for the run script, the switches of my #3499 comment, 600 to 900 s per run: | build | runs | presents/s from 240 s | device removal | |---|---|---|---| | `main` `9dfbe3ea` | 2 | 0.77; 0.00 (no present after 240 s) | none | | + this PR | 4 | **2.73, 2.49**; two runs ended early | **2 of 4**: `0x887a0006` (hung) at 141 s and 151 s, DRED page fault at VA 0, no breadcrumbs | | + this PR + `XCL_PER_LANE=1` | 1 | ended early | an access violation at 168 s | So it does bring the frame rate back (2.5 to 2.7 against 0.77, close to the 2.15 to 2.30 before #3499), but half of the runs with it lost the device about 140 to 150 s after the first frame, which none of my runs of `3a8745dc` (before #3499) or of `main` did. Caveats: the first pair ran while other GPU work ran on the same card (I discarded that as evidence, but the hang repeated in the clean pair); a TDR at about that time also took this PC down a few minutes later, so I stopped the series there. My reading, not verified: the switch from the chain to the whole form happens mid-frame once the whole form becomes ready, and the first indirect dispatch on the whole form is where it hangs. If you have a switch to force the chain or the whole form from the start, I can run both. AI use: Claude Code (Claude Opus 5.5) made the runs and wrote this.
cj-tomlin commented 2026-11-30 19:23:47 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by cj-tomlin on 2026-11-30T19:23:47Z.


Correction (edit of the report below): the device removals are not specific to this PR. main removes the device at the same point once its pipelines are warm. The two main runs in the report ran on without a removal only because they froze before the GPU work that fails.

Five more main runs after the report, same machine and setup (abec7ce9, runtime the same as 9dfbe3ea, the same uncommitted memory counters). One used the shader cache the report's runs used, three a fresh copy of my main shader cache, one after a reboot:

main in the report (2 runs) this PR (4 runs) main later (5 runs)
first cutscene its audio only, no image drawn its audio only, no image
title threads waiting 1 s for a pipeline still being built 87, 100 54, 0, 0, 14 0, 7, 0, 0, 0
after the cutscene opening's burst (~8,000 dispatches in 2 s) 0 submits: the title stands still keeps submitting keeps submitting
last present 87, 105 s 104, 104, 109, 126 s 90, 95, 104, 108, 124 s
end ran the 300 s, no removal removed at 106, 121, 128, 155 s removed at 91, 97, 105, 107, 127 s
  • Removals on main: four 0x887A0005 and one 0x887A0006, all with DRED no breadcrumbs, system commit 47–54 of 81 GB. The same signature as with this PR.
  • The pipeline waits fall run by run as the shader and driver caches warm. The two main runs in the report were early in that: they stalled on pipelines at the cutscene opening, so they never submitted the work after it.
  • So the report's "main 0 of 2 removals, this PR 4 of 4" compares a cold stall with a warm run, and does not show that this PR causes the removals. What still holds: with this PR the first cutscene is drawn; on main it is not, warm or cold (audio only, in all seven main runs). The removal that follows happens on main as well, and I don't know its cause.
  • Not tested: a raised NVIDIA shader heap; other GPUs.

AI use: Claude Code (Claude Opus 5.5) ran the runs, read the logs and drafted this correction; I checked it.


Test report, RTX 3080 10 GB: with this PR a retail title draws its first in-engine cutscene, which main never shows; then the device is removed, in 4 of 4 runs.

Setup

  • RTX 3080 10 GB (NVIDIA 621.40, no driver profile for xcl.exe, so the default 512 MB shader heap), Ryzen 7 7800X3D, 32 GB RAM, Windows 11 build 26300, Rust 1.100.0, release build.
  • PR: main abec7ce9 + this PR's head 49eb78ef (clean merge). main: 9dfbe3ea (its runtime is the same as abec7ce9; the commit between them only changes a test file). Both with uncommitted logging of memory counters that I use for #3211; no other change.
  • A retail title, Series X profile, same save, warm shader and driver caches, XCL_PREPARE=0 XCL_ACTIVITY=1 XCL_NETWORK=0 XCL_PRESS_AT=25:A, 300 s limit. 4 runs with the PR, 2 with main, back to back.
  • cargo test --release -p xcl --lib dispatch_chain -- --test-threads=4 on the merged tree: 27 passed, 0 failed, 0 ignored; SKIPPED dispatch_chain_native_wave64_builds_whole (no wave64). I did not run the whole suite.

Results

main (2 runs) this PR (4 runs)
first cutscene its audio only, no image drawn: backdrop (1 run), title card with audio (3 runs), some stutter
last present 87, 105 s 104, 104, 109, 126 s
DirectStorage read by then 5,259, 5,303 MB 5,575, 5,733, 5,767, 5,824 MB
end ran the 300 s, no removal device removed at 106, 121, 128, 155 s
peak local video memory (DXGI budget 8.7–9.0 GB) 15,319, 15,685 MB 16,236, 16,343, 16,492, 16,502 MB
split scratch, peak (compute split log line) 386, 574 MiB 392, 394, 531, 539 MiB
  • On main the title stops presenting when the first cutscene starts, with draws waiting over 1 s on pipelines still being built. With this PR it keeps presenting into the cutscene.
  • Every removal: 0x887A0005, DRED no breadcrumbs, system commit 54 of 81 GB at the removal. In one run the title's own crash handler ran after the removal (exit 0x80000003).
  • At the same amount of DirectStorage read (4,500 and 5,000 MB), local video memory and the D3D12 heaps commit part match main within ~0.4 GB. The PR runs use more because they get further. I have not shown that the removals come from video memory; main never gets far enough to compare.
  • Split scratch while the cutscene loads is as high as on main, as expected: the whole forms are still building then, so indirect dispatches still take the 256 MiB claim. In one run it fell to 23 MiB once they were ready.

Against the other reports here: these runs end at the opening of the first in-engine cutscene. That is where the cold-cache stall on #505 happens too (118–126 s, with a title thread waiting in whole_ready → Chain::whole), and earlier than the interior scene of @throny's RTX 4080 runs. So the removals here are at a different point of the game from that hang, and of another kind: that was 0x887a0006 with a DRED page fault at VA 0. These are silent 0x887a0005 with no breadcrumbs, the signature of the NVIDIA shader-code heap filling (#2403, 512 MB by default). This PR's early queue_whole adds whole-form compiles at load for every journaled program, so more machine code may be in use than on main when the cutscene starts. This machine has no NVIDIA profile for xcl.exe, so the shader heap was at the default 512 MB in all six runs. That fits, but I have not tested a raised heap. The RTX 4090 runs of this PR above, with the shader heap at 2048 MB (#2590), had no removal; I don't know how far into the game they ran.

Not tested: a raised NVIDIA shader heap (#2590), which would tell whether the removals are #2403; the whole test suite, scripts/smoke.ps1, a GPU with more video memory (to tell whether the removals are a 10 GB limit), AMD, other titles. Commit other was 0.7–2 GB higher with the PR at the same DirectStorage read, and I have not found why.

AI use: Claude Code (Claude Opus 5.5) built the trees, ran the tests and the runs, read the logs and drafted this; I watched the runs and checked it.

<!-- greyfinch-sync:ivall/xcl:comment:7289322187 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/3528#issuecomment-7289322187). Originally posted by [cj-tomlin](https://github.com/cj-tomlin) on 2026-11-30T19:23:47Z. --- **Correction (edit of the report below):** the device removals are not specific to this PR. `main` removes the device at the same point once its pipelines are warm. The two `main` runs in the report ran on without a removal only because they froze before the GPU work that fails. Five more `main` runs after the report, same machine and setup (`abec7ce9`, runtime the same as `9dfbe3ea`, the same uncommitted memory counters). One used the shader cache the report's runs used, three a fresh copy of my main shader cache, one after a reboot: | | `main` in the report (2 runs) | this PR (4 runs) | `main` later (5 runs) | |---|---|---|---| | first cutscene | its audio only, no image | drawn | its audio only, no image | | title threads waiting 1 s for a pipeline still being built | 87, 100 | 54, 0, 0, 14 | 0, 7, 0, 0, 0 | | after the cutscene opening's burst (~8,000 dispatches in 2 s) | 0 submits: the title stands still | keeps submitting | keeps submitting | | last present | 87, 105 s | 104, 104, 109, 126 s | 90, 95, 104, 108, 124 s | | end | ran the 300 s, no removal | removed at 106, 121, 128, 155 s | removed at 91, 97, 105, 107, 127 s | - Removals on `main`: four `0x887A0005` and one `0x887A0006`, all with DRED `no breadcrumbs`, system commit 47–54 of 81 GB. The same signature as with this PR. - The pipeline waits fall run by run as the shader and driver caches warm. The two `main` runs in the report were early in that: they stalled on pipelines at the cutscene opening, so they never submitted the work after it. - So the report's "`main` 0 of 2 removals, this PR 4 of 4" compares a cold stall with a warm run, and does not show that this PR causes the removals. What still holds: with this PR the first cutscene is drawn; on `main` it is not, warm or cold (audio only, in all seven `main` runs). The removal that follows happens on `main` as well, and I don't know its cause. - Not tested: a raised NVIDIA shader heap; other GPUs. AI use: Claude Code (Claude Opus 5.5) ran the runs, read the logs and drafted this correction; I checked it. --- **Test report, RTX 3080 10 GB: with this PR a retail title draws its first in-engine cutscene, which `main` never shows; then the device is removed, in 4 of 4 runs.** **Setup** - RTX 3080 10 GB (NVIDIA 621.40, no driver profile for `xcl.exe`, so the default 512 MB shader heap), Ryzen 7 7800X3D, 32 GB RAM, Windows 11 build 26300, Rust 1.100.0, release build. - PR: `main` `abec7ce9` + this PR's head `49eb78ef` (clean merge). `main`: `9dfbe3ea` (its runtime is the same as `abec7ce9`; the commit between them only changes a test file). Both with uncommitted logging of memory counters that I use for #3211; no other change. - A retail title, Series X profile, same save, warm shader and driver caches, `XCL_PREPARE=0 XCL_ACTIVITY=1 XCL_NETWORK=0 XCL_PRESS_AT=25:A`, 300 s limit. 4 runs with the PR, 2 with `main`, back to back. - `cargo test --release -p xcl --lib dispatch_chain -- --test-threads=4` on the merged tree: 27 passed, 0 failed, 0 ignored; SKIPPED `dispatch_chain_native_wave64_builds_whole` (no wave64). I did not run the whole suite. **Results** | | `main` (2 runs) | this PR (4 runs) | |---|---|---| | first cutscene | its audio only, no image | drawn: backdrop (1 run), title card with audio (3 runs), some stutter | | last present | 87, 105 s | 104, 104, 109, 126 s | | DirectStorage read by then | 5,259, 5,303 MB | 5,575, 5,733, 5,767, 5,824 MB | | end | ran the 300 s, no removal | device removed at 106, 121, 128, 155 s | | peak local video memory (DXGI budget 8.7–9.0 GB) | 15,319, 15,685 MB | 16,236, 16,343, 16,492, 16,502 MB | | split scratch, peak (`compute split` log line) | 386, 574 MiB | 392, 394, 531, 539 MiB | - On `main` the title stops presenting when the first cutscene starts, with draws waiting over 1 s on pipelines still being built. With this PR it keeps presenting into the cutscene. - Every removal: `0x887A0005`, DRED `no breadcrumbs`, system commit 54 of 81 GB at the removal. In one run the title's own crash handler ran after the removal (exit `0x80000003`). - At the same amount of DirectStorage read (4,500 and 5,000 MB), local video memory and the `D3D12 heaps` commit part match `main` within ~0.4 GB. The PR runs use more because they get further. I have not shown that the removals come from video memory; `main` never gets far enough to compare. - Split scratch while the cutscene loads is as high as on `main`, as expected: the whole forms are still building then, so indirect dispatches still take the 256 MiB claim. In one run it fell to 23 MiB once they were ready. **Against the other reports here:** these runs end at the opening of the first in-engine cutscene. That is where the cold-cache stall on #505 happens too (118–126 s, with a title thread waiting in `whole_ready` → `Chain::whole`), and earlier than the interior scene of @throny's RTX 4080 runs. So the removals here are at a different point of the game from that hang, and of another kind: that was `0x887a0006` with a DRED page fault at VA 0. These are silent `0x887a0005` with no breadcrumbs, the signature of the NVIDIA shader-code heap filling (#2403, 512 MB by default). This PR's early `queue_whole` adds whole-form compiles at load for every journaled program, so more machine code may be in use than on `main` when the cutscene starts. This machine has no NVIDIA profile for `xcl.exe`, so the shader heap was at the default 512 MB in all six runs. That fits, but I have not tested a raised heap. The RTX 4090 runs of this PR above, with the shader heap at 2048 MB (#2590), had no removal; I don't know how far into the game they ran. **Not tested:** a raised NVIDIA shader heap (#2590), which would tell whether the removals are #2403; the whole test suite, `scripts/smoke.ps1`, a GPU with more video memory (to tell whether the removals are a 10 GB limit), AMD, other titles. Commit `other` was 0.7–2 GB higher with the PR at the same DirectStorage read, and I have not found why. AI use: Claude Code (Claude Opus 5.5) built the trees, ran the tests and the runs, read the logs and drafted this; I watched the runs and checked it.
minimalhipster990 commented 2026-11-30 19:51:36 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by minimalhipster990 on 2026-11-30T19:51:36Z.


How far the RTX 4090 runs with this PR got, to answer cj-tomlin's question above: past the load into the 3D scene, and on in it until the 600 s limit. With the NVIDIA shader heap at 2048 MB (#2590), none of them ended with the silent 0x887a0005 of #2403.

  • 6 runs with this PR's commit 49eb78e, always the same save and the same scripted presses, 600 s each: 2 on d52ff48c + #3318, 2 on ff0c364b + #3318, and 2 on ff0c364b + #3318 + #3535.
  • In all six the title reaches the 3D scene at 110–143 s. That is the first 2 s interval with ≥ 3,000 draws; after it there are 4,500–5,500 draws per present. It keeps presenting there, at ~0.2 frames/s on this card. December 1 correction: the cause of that frame rate remains open. Corrected bisection.
  • 5 of 6 ran the full 600 s with no removal. The sixth, one of the two with #3535, was removed at 356.6 s with 0x887a0006, DRED state 3, no breadcrumbs and no page fault, about 3 s after one of this PR's whole forms finished building. That is the kind of removal throny saw here, not #2403's. Details are in my #3535 report.
  • I can't say which scene this is against the first in-engine cutscene cj-tomlin's runs stop at. At ~0.2 frames/s these runs also see far fewer frames than a card at normal speed would.

AI use: Claude Code (Claude Opus 5.5) ran the replays, read the logs and wrote this. The person running these tests checked it and asked for it to be posted.

December 1 correction drafted with Codex (GPT-6).

<!-- greyfinch-sync:ivall/xcl:comment:7290043589 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/3528#issuecomment-7290043589). Originally posted by [minimalhipster990](https://github.com/minimalhipster990) on 2026-11-30T19:51:36Z. --- **How far the RTX 4090 runs with this PR got, to answer cj-tomlin's question above:** past the load into the 3D scene, and on in it until the 600 s limit. With the NVIDIA shader heap at 2048 MB (#2590), none of them ended with the silent `0x887a0005` of #2403. - 6 runs with this PR's commit `49eb78e`, always the same save and the same scripted presses, 600 s each: 2 on `d52ff48c` + #3318, 2 on `ff0c364b` + #3318, and 2 on `ff0c364b` + #3318 + #3535. - In all six the title reaches the 3D scene at 110–143 s. That is the first 2 s interval with ≥ 3,000 draws; after it there are 4,500–5,500 draws per present. It keeps presenting there, at ~0.2 frames/s on this card. **December 1 correction:** the cause of that frame rate remains open. [Corrected bisection](https://github.com/xcl-dev/xcl/pull/2571#issuecomment-7283564613). - 5 of 6 ran the full 600 s with no removal. The sixth, one of the two with #3535, was removed at 356.6 s with `0x887a0006`, DRED state 3, no breadcrumbs and no page fault, about 3 s after one of this PR's whole forms finished building. That is the kind of removal throny saw here, not #2403's. Details are in [my #3535 report](https://github.com/xcl-dev/xcl/pull/3535#issuecomment-7290041297). - I can't say which scene this is against the first in-engine cutscene cj-tomlin's runs stop at. At ~0.2 frames/s these runs also see far fewer frames than a card at normal speed would. AI use: Claude Code (Claude Opus 5.5) ran the replays, read the logs and wrote this. The person running these tests checked it and asked for it to be posted. December 1 correction drafted with Codex (GPT-6).
Gevroska commented 2026-11-30 20:23:54 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by Gevroska on 2026-11-30T20:23:54Z.


@Kalmarv I checked the first ExecuteIndirect call after the whole pipeline becomes ready, using the same fixture on parent 9dfbe3ea and PR head 49eb78ef. The argument buffer held a 1×1×1 decoy at offset zero and the intended 2×3×4 dispatch at byte offset 16. I read back the group counts after each WARP queue fence.

Pipeline state Parent PR head
Whole pipeline pending 24 groups in each split piece 24 groups in each split piece
First call with whole pipeline ready 24 groups in each split piece 24 groups in the whole shader, zero in either split piece

On the head, forcing the refusal case sent all 24 groups through each split piece again. Every completed readback preserved both guard words and returned the expected group-ID sums (12, 24, 36). That checks both the switch on the first ready call and the argument offset across it.

The fixture controls readiness directly. I didn’t test asynchronous readiness timing or reproduce the reported physical-GPU device removals.

I used Codex GPT-6.2 Sol to write the fixture and run both revisions. A separate GPT-6.2 Sol agent verified the source and raw WARP logs. Codex GPT-6.2 Astra drafted this comment.

I reviewed and approved this comment before posting.

<!-- greyfinch-sync:ivall/xcl:comment:7290850313 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/3528#issuecomment-7290850313). Originally posted by [Gevroska](https://github.com/Gevroska) on 2026-11-30T20:23:54Z. --- @Kalmarv I checked the first `ExecuteIndirect` call after the whole pipeline becomes ready, using the same fixture on parent `9dfbe3ea` and PR head `49eb78ef`. The argument buffer held a `1×1×1` decoy at offset zero and the intended `2×3×4` dispatch at byte offset 16. I read back the group counts after each WARP queue fence. | Pipeline state | Parent | PR head | |---|---|---| | Whole pipeline pending | 24 groups in each split piece | 24 groups in each split piece | | First call with whole pipeline ready | 24 groups in each split piece | 24 groups in the whole shader, zero in either split piece | On the head, forcing the refusal case sent all 24 groups through each split piece again. Every completed readback preserved both guard words and returned the expected group-ID sums `(12, 24, 36)`. That checks both the switch on the first ready call and the argument offset across it. The fixture controls readiness directly. I didn’t test asynchronous readiness timing or reproduce the reported physical-GPU device removals. I used Codex GPT-6.2 Sol to write the fixture and run both revisions. A separate GPT-6.2 Sol agent verified the source and raw WARP logs. Codex GPT-6.2 Astra drafted this comment. I reviewed and approved this comment before posting.
treybertram06 commented 2026-11-30 21:03:35 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by treybertram06 on 2026-11-30T21:03:35Z.


Test report: in-world frame rate on NVIDIA, 49eb78ef against its base 9dfbe3ea.

Tested

  • RTX 3080 10 GB (driver 621.40, ReBAR on), Ryzen 9 5900X, 64 GB RAM, Windows 11 26300. Release builds of both commits, no local changes.
  • Retail title, 300 s per run with scripted presses, alternating main, PR, main, PR. Env: XCL_PREPARE=0 XCL_HEAP_WINDOWS=1 XCL_GFX_PSO_WAIT_MS=100 XCL_GPU_TIMES=8,150 XCL_LOOK_STATS=2, otherwise main's defaults (edited: an earlier version of this comment also listed XCL_SPARSE_LAZY, XCL_TEXTURE_LEVEL_PAGES and XCL_TEXTURE_SYSMEM, which these runs did not set). Counted over 150–300 s, in the world:
run presents GPU ms per frame
main 1 96 1143
PR 1 262 611
main 2 97 1321
PR 2 275 496
  • About 2.8× the presents and about half the GPU time per frame. No device removal or crash in any of the four runs.

  • Before this PR, on d52ff48c with #2987 and #3039 on top, an Nsight Graphics 2026.4 GPU Trace of one world frame (1454 ms) showed where the time goes:

    • 42,907 dispatch ExecuteIndirects took 1045 ms of it, about 24 µs each, over 1248 pipelines.
    • Each pipeline was called a multiple of 16 times, matching XCL_SPLIT_INDIRECT_ROUNDS × pieces with a UAV barrier before each, whether the round has groups or not.
  • Rounds alone on that build, one run each, same window:

rounds presents GPU ms per frame
16 (default) 85 1445
1 193 938
4 206 670

Not tested

  • The test suite on this head.
  • Other GPUs, and AMD.
  • Runs longer than 300 s.
  • Whether the frames are drawn correctly; only rates and GPU times were compared.
  • The review point about rechecking chain.whole.ready() between the two calls in execute_indirect.

AI use

  • Claude Code, Claude Opus 5.5. It built both commits, ran and analysed the runs and the GPU trace, and wrote this report.
<!-- greyfinch-sync:ivall/xcl:comment:7291857306 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/3528#issuecomment-7291857306). Originally posted by [treybertram06](https://github.com/treybertram06) on 2026-11-30T21:03:35Z. --- Test report: in-world frame rate on NVIDIA, `49eb78ef` against its base `9dfbe3ea`. **Tested** - RTX 3080 10 GB (driver 621.40, ReBAR on), Ryzen 9 5900X, 64 GB RAM, Windows 11 26300. Release builds of both commits, no local changes. - Retail title, 300 s per run with scripted presses, alternating main, PR, main, PR. Env: `XCL_PREPARE=0 XCL_HEAP_WINDOWS=1 XCL_GFX_PSO_WAIT_MS=100 XCL_GPU_TIMES=8,150 XCL_LOOK_STATS=2`, otherwise main's defaults (edited: an earlier version of this comment also listed `XCL_SPARSE_LAZY`, `XCL_TEXTURE_LEVEL_PAGES` and `XCL_TEXTURE_SYSMEM`, which these runs did not set). Counted over 150–300 s, in the world: | run | presents | GPU ms per frame | |---|---|---| | main 1 | 96 | 1143 | | PR 1 | 262 | 611 | | main 2 | 97 | 1321 | | PR 2 | 275 | 496 | - About 2.8× the presents and about half the GPU time per frame. No device removal or crash in any of the four runs. - Before this PR, on `d52ff48c` with #2987 and #3039 on top, an Nsight Graphics 2026.4 GPU Trace of one world frame (1454 ms) showed where the time goes: - 42,907 dispatch `ExecuteIndirect`s took 1045 ms of it, about 24 µs each, over 1248 pipelines. - Each pipeline was called a multiple of 16 times, matching `XCL_SPLIT_INDIRECT_ROUNDS` × pieces with a UAV barrier before each, whether the round has groups or not. - Rounds alone on that build, one run each, same window: | rounds | presents | GPU ms per frame | |---|---|---| | 16 (default) | 85 | 1445 | | 1 | 193 | 938 | | 4 | 206 | 670 | **Not tested** - The test suite on this head. - Other GPUs, and AMD. - Runs longer than 300 s. - Whether the frames are drawn correctly; only rates and GPU times were compared. - The review point about rechecking `chain.whole.ready()` between the two calls in `execute_indirect`. **AI use** - Claude Code, Claude Opus 5.5. It built both commits, ran and analysed the runs and the GPU trace, and wrote this report.
andresd-cerebras commented 2026-11-30 21:49:27 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by andresd-cerebras on 2026-11-30T21:49:27Z.

Code review location: crates/xcl/src/hle/d3d12x/real/dispatch_chain.rs; line 307

@@ -304,6 +304,9 @@ pub(super) unsafe fn build(this: *mut c_void, create: PsoFn, desc: &D3D12_COMPUT
         indirect_noted: AtomicBool::new(false), whole_sent: AtomicBool::new(false) });
     // Initialize the journal on this preparation worker, never on the first recording call.
     let _ = indirect_used();
+    if EARLIER_INDIRECT_USED.contains(&record) {

This drops the indirect_blobs_present(&chain, &plan) condition the pre-#3499 prefetch had (git show e8a36664^:crates/xcl/src/hle/d3d12x/real/dispatch_chain.rs, L440). Without it, every journalled program compiles its whole form at creation even when no driver blob is on disk, and even if this run never dispatches it indirectly. Suggest restoring the gate, or queueing this as an ahead-of-use build so it doesn't take a slot ahead of the title's pieces.

<!-- greyfinch-sync:ivall/xcl:review-comment:4745982441 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/3528#discussion_r4745982441). Originally posted by [andresd-cerebras](https://github.com/andresd-cerebras) on 2026-11-30T21:49:27Z. **Code review location:** `crates/xcl/src/hle/d3d12x/real/dispatch_chain.rs`; line 307 ~~~~diff @@ -304,6 +304,9 @@ pub(super) unsafe fn build(this: *mut c_void, create: PsoFn, desc: &D3D12_COMPUT indirect_noted: AtomicBool::new(false), whole_sent: AtomicBool::new(false) }); // Initialize the journal on this preparation worker, never on the first recording call. let _ = indirect_used(); + if EARLIER_INDIRECT_USED.contains(&record) { ~~~~ --- This drops the `indirect_blobs_present(&chain, &plan)` condition the pre-#3499 prefetch had (`git show e8a36664^:crates/xcl/src/hle/d3d12x/real/dispatch_chain.rs`, L440). Without it, every journalled program compiles its whole form at creation even when no driver blob is on disk, and even if this run never dispatches it indirectly. Suggest restoring the gate, or queueing this as an ahead-of-use build so it doesn't take a slot ahead of the title's pieces.
andresd-cerebras commented 2026-11-30 21:49:27 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by andresd-cerebras on 2026-11-30T21:49:27Z.

Code review location: crates/xcl/src/hle/d3d12x/real/dispatch_chain.rs; line 614

@@ -602,15 +611,9 @@ pub(in crate::hle::d3d12x) unsafe fn execute_indirect(
         return Ok(Indirect::Whole);
     };
     let signature = pso::chain_command_signature(&chain.builder.device, &chain.builder.signature)?;
-    let tail_signature = pso::dispatch_command_signature(&chain.builder.device)?;
-    // for a dispatch whose groups do not fit the slicer's rounds
-    let whole = match chain.whole.ready() {
-        Some(result) => result.ok(),
-        None => {
-            queue_whole(&chain);
-            None
-        }
-    };
+    if chain.whole.ready().is_none() {

If the whole form finished building since the check at L602, this sees Some(Ok) and falls through to record the split chain, which no longer has a tail for groups past the slicer's rounds, so that dispatch is silently dropped. Suggest match chain.whole.ready() { None => queue_whole(&chain), Some(Ok(_)) => return Ok(Indirect::Whole), Some(Err(_)) => {} }.

<!-- greyfinch-sync:ivall/xcl:review-comment:4745982457 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/3528#discussion_r4745982457). Originally posted by [andresd-cerebras](https://github.com/andresd-cerebras) on 2026-11-30T21:49:27Z. **Code review location:** `crates/xcl/src/hle/d3d12x/real/dispatch_chain.rs`; line 614 ~~~~diff @@ -602,15 +611,9 @@ pub(in crate::hle::d3d12x) unsafe fn execute_indirect( return Ok(Indirect::Whole); }; let signature = pso::chain_command_signature(&chain.builder.device, &chain.builder.signature)?; - let tail_signature = pso::dispatch_command_signature(&chain.builder.device)?; - // for a dispatch whose groups do not fit the slicer's rounds - let whole = match chain.whole.ready() { - Some(result) => result.ok(), - None => { - queue_whole(&chain); - None - } - }; + if chain.whole.ready().is_none() { ~~~~ --- If the whole form finished building since the check at L602, this sees `Some(Ok)` and falls through to record the split chain, which no longer has a tail for groups past the slicer's rounds, so that dispatch is silently dropped. Suggest `match chain.whole.ready() { None => queue_whole(&chain), Some(Ok(_)) => return Ok(Indirect::Whole), Some(Err(_)) => {} }`.
andresd-cerebras commented 2026-11-30 21:49:27 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by andresd-cerebras on 2026-11-30T21:49:27Z.

Review: COMMENTED


Withdrawn.

<!-- greyfinch-sync:ivall/xcl:review:6121173575 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/3528#pullrequestreview-6121173575). Originally posted by [andresd-cerebras](https://github.com/andresd-cerebras) on 2026-11-30T21:49:27Z. **Review:** COMMENTED --- Withdrawn.
AAsobu commented 2026-11-30 23:49:43 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by AAsobu on 2026-11-30T23:49:43Z.


Test report for #3528 at head 49eb78efbd8e4aaac3ce2d750ecc5b026b6ce337: the in-world run on an RTX 3090 that Not tested asks for.

  • Merged into main 86e86fcb33f94fa5d0c809d9b50af7b84bf49cce: clean. cargo build --workspace: ok.
  • cargo test --workspace --no-fail-fast -- --test-threads=4: 2890 passed, 0 failed, 51 ignored; SKIPPED: 28 (22 no wave64, 2 no heap windows, 3 no D3D12 debug layer / d3d12SDKLayers.dll, 1 no GPU_UPLOAD heaps), the same as main plus the new test. indirect_prefers_whole_only_once_built_ok and an_indirect_dispatch_runs_its_chain_without_any_whole_form pass.
  • Diff read in full: no findings.

Retail title, in the world. Release builds of main (ff0c364b, which differs from this base only in scripts/ and .github/) as A and this merge as B, runs A, B, A, B of 420 s each, warm XCL and driver caches, xcl.exe with the #2590 profile (1024 MB shader heap; without it this card loses the device ~5-50 s after world entry, #2403). Env: XCL_PREPARE=0 XCL_DIRECT_DXIL=1 XCL_DXC_THREADS=4 XCL_NETWORK=0 XCL_DRED=1 XCL_ACTIVITY=1 XCL_PSO_WAIT_MS=1000 XCL_TEXTURE_LEVEL_PAGES=1 XCL_HUGE_PSO_CONCURRENCY=4 XCL_HUGE_PSO_WANTED_CONCURRENCY=4, start prompt by XCL_PRESS_A_AT, no input. Numbers from world entry + 30 s to the end of the run (~220 s each):

A1 B1 A2 B2
world entry (first two-pass mesh dispatch) 142 s 162 s 151 s 165 s
presents per 2 s 0.72 0.94 1.04 1.12
draws per 2 s 2395 4066 4645 4596
process CPU (cores busy) 10.6 10.3 9.3 9.9
peak private / working set, MB 40989 / 18900 40481 / 20646 40685 / 20589 40155 / 20162
chained dispatches at the end 53,453 76,475 99,154 93,384
device removals 0 0 0 0
  • No regression: no removal or crash, memory and CPU the same within noise.
  • Frame rate: B averaged 1.03 presents per 2 s against 0.88 for A (+17 %), but the two A runs differ by 44 % between themselves, so with two runs a side this is not a measured gain. The 2-3x of the #3499 regression is not visible here: this title on this card is GPU-bound at about one present per 2 s on both builds.
  • I could not tell from the log how many indirect dispatches took the whole form: used-indirect-split.txt lists 296 programs, but no whole-form build on xcl-pso-whole took over 1 s in any run (no slow-compile line), so they were either loaded from driver blobs or not built in these runs.
  • What the screen shows in the world on both builds: frames keep being presented, but no frame is drawn correctly (a flat black, white or blurred single-colour image). Audio plays without glitches.

Hardware: NVIDIA GeForce RTX 3090 24 GB (driver 621.24, wave32 only), Intel Core i5-10600K, 32 GB, Windows 11 Home build 26300, rustc 1.100.0. Tool and model: Claude Code (Claude Opus 5.5), results checked by me.

<!-- greyfinch-sync:ivall/xcl:comment:7295571931 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/3528#issuecomment-7295571931). Originally posted by [AAsobu](https://github.com/AAsobu) on 2026-11-30T23:49:43Z. --- Test report for #3528 at head `49eb78efbd8e4aaac3ce2d750ecc5b026b6ce337`: the in-world run on an RTX 3090 that **Not tested** asks for. - Merged into `main` `86e86fcb33f94fa5d0c809d9b50af7b84bf49cce`: clean. `cargo build --workspace`: ok. - `cargo test --workspace --no-fail-fast -- --test-threads=4`: 2890 passed, 0 failed, 51 ignored; SKIPPED: 28 (22 no wave64, 2 no heap windows, 3 no D3D12 debug layer / d3d12SDKLayers.dll, 1 no GPU_UPLOAD heaps), the same as `main` plus the new test. `indirect_prefers_whole_only_once_built_ok` and `an_indirect_dispatch_runs_its_chain_without_any_whole_form` pass. - Diff read in full: no findings. **Retail title, in the world.** Release builds of `main` (`ff0c364b`, which differs from this base only in scripts/ and .github/) as A and this merge as B, runs A, B, A, B of 420 s each, warm XCL and driver caches, `xcl.exe` with the #2590 profile (1024 MB shader heap; without it this card loses the device ~5-50 s after world entry, #2403). Env: `XCL_PREPARE=0 XCL_DIRECT_DXIL=1 XCL_DXC_THREADS=4 XCL_NETWORK=0 XCL_DRED=1 XCL_ACTIVITY=1 XCL_PSO_WAIT_MS=1000 XCL_TEXTURE_LEVEL_PAGES=1 XCL_HUGE_PSO_CONCURRENCY=4 XCL_HUGE_PSO_WANTED_CONCURRENCY=4`, start prompt by `XCL_PRESS_A_AT`, no input. Numbers from world entry + 30 s to the end of the run (~220 s each): | | A1 | B1 | A2 | B2 | |---|---|---|---|---| | world entry (first two-pass mesh dispatch) | 142 s | 162 s | 151 s | 165 s | | presents per 2 s | 0.72 | 0.94 | 1.04 | 1.12 | | draws per 2 s | 2395 | 4066 | 4645 | 4596 | | process CPU (cores busy) | 10.6 | 10.3 | 9.3 | 9.9 | | peak private / working set, MB | 40989 / 18900 | 40481 / 20646 | 40685 / 20589 | 40155 / 20162 | | chained dispatches at the end | 53,453 | 76,475 | 99,154 | 93,384 | | device removals | 0 | 0 | 0 | 0 | - No regression: no removal or crash, memory and CPU the same within noise. - Frame rate: B averaged 1.03 presents per 2 s against 0.88 for A (+17 %), but the two A runs differ by 44 % between themselves, so with two runs a side this is not a measured gain. The 2-3x of the #3499 regression is not visible here: this title on this card is GPU-bound at about one present per 2 s on both builds. - I could not tell from the log how many indirect dispatches took the whole form: `used-indirect-split.txt` lists 296 programs, but no whole-form build on `xcl-pso-whole` took over 1 s in any run (no slow-compile line), so they were either loaded from driver blobs or not built in these runs. - What the screen shows in the world on both builds: frames keep being presented, but no frame is drawn correctly (a flat black, white or blurred single-colour image). Audio plays without glitches. Hardware: NVIDIA GeForce RTX 3090 24 GB (driver 621.24, wave32 only), Intel Core i5-10600K, 32 GB, Windows 11 Home build 26300, rustc 1.100.0. Tool and model: Claude Code (Claude Opus 5.5), results checked by me.
Foniass commented 2026-12-01 00:19:51 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by Foniass on 2026-12-01T00:19:51Z.


merge-check
base: d0832e614f
head: ba8592a435
merge: clean
build: cargo build --workspace -> ok
tests: cargo test --workspace --no-fail-fast -- --test-threads=4 -> 2892 passed, 0 failed, 51 ignored; SKIPPED: 28 (22 no wave64, 2 no heap windows, 2 no d3d12SDKLayers.dll, 1 no D3D12 debug layer, 1 cannot disable the driver cache); failing: none. The PR's tests ran and passed: an_indirect_dispatch_runs_its_chain_without_any_whole_form (GPU, not skipped), indirect_prefers_whole_only_once_built_ok, whole_form_is_prefetched_only_when_used_indirectly_and_its_blob_is_on_disk.
review: whole diff read (1 commit, dispatch_chain.rs +79/-22) together with bind.rs's ExecuteIndirect path and compute_container. All three earlier review points are fixed at this head: the second readiness check returns Indirect::Whole (dispatch_chain.rs:630-636), the load-time whole-form queue is gated on the journal and on the whole form's DirectConstants driver blob being on disk (309, 358-367; the path matches the one compute_container loads), and the refusal warning is corrected (382). Indirect::Whole goes to whole_ready -> Whole::Ready; an Ok result stays in a OnceLock, so the two reads cannot disagree. Remaining: (1) blocking: the PR description check fails: both xcl-smoke blocks are from the old head 49eb78ef, not ba8592a4; the description still describes the ungated prefetch, omits the second-check fix, lists 16 module tests from the old head and no full-suite counts, has no "What is in it" section, and AI use names "Antigravity" with no model (the commit says Claude Opus 5.5). (2) minor: with only the first early return (616) disabled, the GPU test still passes, because the second check now covers it; the scratch-avoiding fast path has no test that fails without it (both checks disabled -> fails at 883). (3) minor: a blob kept by an older driver passes the prefetch gate, is refused and then compiled in full at creation, despite the comment at 307-308 (same as before #3499). (4) Device removals reported on this PR (RTX 4080 2/4; RTX 4090 1/6 about 3 s after a whole form finished building) are not attributed, since main removes the device at the same point on an RTX 3080; not checked here. No retail title on this machine: no smoke or world run, no Tier 2/3 runtime evidence of my own.
performance: reasoned: by default it brings back the single whole-form ExecuteIndirect from before #3499 once whole forms are built (other testers measured 2.2-2.8x on RTX 5070 Ti / 3080 / 4080 at 49eb78ef). The new code is a load at pipeline creation for journalled programs with a blob on disk, plus a stat call per split program. Not measured here (no retail title); the description's smoke blocks are for 49eb78ef, not this head.
verdict: not yet: the required PR description check fails (no xcl-smoke block on head ba8592a4), and the description is stale (old prefetch behaviour, no full-suite counts, no model named in AI use); the code itself has no blocking finding
hardware / tool and model: NVIDIA GeForce RTX 5070 Ti (driver 32.0.16.2114 / 621.14), AMD Ryzen 7 7800X3D, Windows 11 Pro 10.0.26300, rustc 1.100.0 MSVC / Claude Code, Claude Opus 5.5

<!-- greyfinch-sync:ivall/xcl:comment:7296208434 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/3528#issuecomment-7296208434). Originally posted by [Foniass](https://github.com/Foniass) on 2026-12-01T00:19:51Z. --- merge-check base: d0832e614fa7d6ae027bb4feb27ccb9121f54a8f head: ba8592a435ede5fa9ab952bbe30a9d1a114d28bf merge: clean build: cargo build --workspace -> ok tests: cargo test --workspace --no-fail-fast -- --test-threads=4 -> 2892 passed, 0 failed, 51 ignored; SKIPPED: 28 (22 no wave64, 2 no heap windows, 2 no d3d12SDKLayers.dll, 1 no D3D12 debug layer, 1 cannot disable the driver cache); failing: none. The PR's tests ran and passed: an_indirect_dispatch_runs_its_chain_without_any_whole_form (GPU, not skipped), indirect_prefers_whole_only_once_built_ok, whole_form_is_prefetched_only_when_used_indirectly_and_its_blob_is_on_disk. review: whole diff read (1 commit, dispatch_chain.rs +79/-22) together with bind.rs's ExecuteIndirect path and compute_container. All three earlier review points are fixed at this head: the second readiness check returns Indirect::Whole (dispatch_chain.rs:630-636), the load-time whole-form queue is gated on the journal and on the whole form's DirectConstants driver blob being on disk (309, 358-367; the path matches the one compute_container loads), and the refusal warning is corrected (382). Indirect::Whole goes to whole_ready -> Whole::Ready; an Ok result stays in a OnceLock, so the two reads cannot disagree. Remaining: (1) blocking: the PR description check fails: both xcl-smoke blocks are from the old head 49eb78ef, not ba8592a4; the description still describes the ungated prefetch, omits the second-check fix, lists 16 module tests from the old head and no full-suite counts, has no "What is in it" section, and AI use names "Antigravity" with no model (the commit says Claude Opus 5.5). (2) minor: with only the first early return (616) disabled, the GPU test still passes, because the second check now covers it; the scratch-avoiding fast path has no test that fails without it (both checks disabled -> fails at 883). (3) minor: a blob kept by an older driver passes the prefetch gate, is refused and then compiled in full at creation, despite the comment at 307-308 (same as before #3499). (4) Device removals reported on this PR (RTX 4080 2/4; RTX 4090 1/6 about 3 s after a whole form finished building) are not attributed, since main removes the device at the same point on an RTX 3080; not checked here. No retail title on this machine: no smoke or world run, no Tier 2/3 runtime evidence of my own. performance: reasoned: by default it brings back the single whole-form ExecuteIndirect from before #3499 once whole forms are built (other testers measured 2.2-2.8x on RTX 5070 Ti / 3080 / 4080 at 49eb78ef). The new code is a load at pipeline creation for journalled programs with a blob on disk, plus a stat call per split program. Not measured here (no retail title); the description's smoke blocks are for 49eb78ef, not this head. verdict: not yet: the required PR description check fails (no xcl-smoke block on head ba8592a4), and the description is stale (old prefetch behaviour, no full-suite counts, no model named in AI use); the code itself has no blocking finding hardware / tool and model: NVIDIA GeForce RTX 5070 Ti (driver 32.0.16.2114 / 621.14), AMD Ryzen 7 7800X3D, Windows 11 Pro 10.0.26300, rustc 1.100.0 MSVC / Claude Code, Claude Opus 5.5
AAsobu commented 2026-12-01 02:22:38 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by AAsobu on 2026-12-01T02:22:38Z.


merge-check
base: d0832e614f
head: ba8592a435
merge: clean
build: cargo build --workspace -> ok
tests: cargo test --workspace --no-fail-fast -- --test-threads=4 -> 2892 passed, 0 failed, 51 ignored; SKIPPED: 28 (22 no wave64, 2 no heap windows, 3 no D3D12 debug layer / d3d12SDKLayers.dll, 1 no GPU_UPLOAD heaps); failing: none. In the full run the lib binary aborted early (0xc0000005, last line gpu::dxil::compact_tests::a_mask_read_whole_after_one_copy_only_splits_the_class ... ok, nothing this PR touches); the other binaries gave 148 passed, 0 failed, 20 ignored. Lib alone (cargo test -p xcl --lib -- --test-threads=4) 3 times in a row: 2744 passed, 0 failed, 31 ignored each time; the counts above add those. The same early lib abort happened on my run of #3514 on ff0c364b. The 3 tests of this PR pass, an_indirect_dispatch_runs_its_chain_without_any_whole_form on the GPU (not skipped).
review: none. Read the whole diff (dispatch_chain.rs +79/-22). The prefetch at creation is gated on the journal and on a non-empty whole-form blob file at driver_cache::path_for_chain_root_node(.., DirectConstants, ..), so a cold driver cache adds no compiles; execute_indirect hands back Indirect::Whole before and after building the slicer commands once the whole form is Ok, so a dispatch whose groups pass the slicer's rounds is no longer left out. The file writes are in the test only, in a temp dir it removes.
performance: retail title, in the world. Release builds of main d0832e61 (A) and this merge (B), runs A, B, A, B of 420 s each, warm XCL and driver caches, xcl.exe with the #2590 profile at 2048 MB. Env: XCL_PREPARE=0 XCL_DIRECT_DXIL=1 XCL_DXC_THREADS=4 XCL_NETWORK=0 XCL_DRED=1 XCL_ACTIVITY=1 XCL_PSO_WAIT_MS=1000 XCL_TEXTURE_LEVEL_PAGES=1 XCL_HUGE_PSO_CONCURRENCY=4 XCL_HUGE_PSO_WANTED_CONCURRENCY=4, start prompt by XCL_PRESS_A_AT, no input. From world entry + 30 s to the end (~240 s each):

A1 B1 A2 B2
world entry (first two-pass mesh dispatch) 143 s 144 s 136 s 142 s
presents per 2 s 1.79 3.52 1.06 2.98
draws per 2 s 3588 8405 4358 14290
process CPU (cores busy) 9.4 9.6 9.2 9.7
peak private / working set, MB 42846 / 20169 40763 / 20510 43258 / 20263 41466 / 20677
chained dispatches at the end 73,976 169,274 99,066 300,805
device removals 0 0 0 0
  • Both B runs beat both A runs: 3.25 against 1.43 presents per 2 s on average (2.3x) and 2.8x the draws, at the same CPU and ~2 GB less private memory. That is the size of the #3499 regression this fixes.
  • My runs of the first head 49eb78ef (on main 86e86fcb, profile at 1024 MB) showed no clear gain (0.94 / 1.12 against 0.72 / 1.04). I cannot tell from the logs how much of the change comes from this head's prefetch of the cached whole forms and how much from the caches being warmer now, but A and B had the same caches here, alternated.
  • On screen, both builds play the intro with the UI and subtitles drawn; the user saw parts of the scene (a lit horizon, haze) more often with B, but the scene is still mostly a flat colour on both.
    verdict: not yet: the required PR description check fails, its xcl-smoke blocks are from the old head 49eb78ef (as Foniass noted); the code and the in-world numbers above have no blocking finding
    hardware / tool and model: NVIDIA GeForce RTX 3090 24 GB (driver 621.24, wave32 only), Intel Core i5-10600K, 32 GB, Windows 11 Home build 26300, rustc 1.100.0 / Claude Code (Claude Opus 5.5), results checked by me
<!-- greyfinch-sync:ivall/xcl:comment:7298547269 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/3528#issuecomment-7298547269). Originally posted by [AAsobu](https://github.com/AAsobu) on 2026-12-01T02:22:38Z. --- merge-check base: d0832e614fa7d6ae027bb4feb27ccb9121f54a8f head: ba8592a435ede5fa9ab952bbe30a9d1a114d28bf merge: clean build: cargo build --workspace -> ok tests: cargo test --workspace --no-fail-fast -- --test-threads=4 -> 2892 passed, 0 failed, 51 ignored; SKIPPED: 28 (22 no wave64, 2 no heap windows, 3 no D3D12 debug layer / d3d12SDKLayers.dll, 1 no GPU_UPLOAD heaps); failing: none. In the full run the lib binary aborted early (0xc0000005, last line `gpu::dxil::compact_tests::a_mask_read_whole_after_one_copy_only_splits_the_class ... ok`, nothing this PR touches); the other binaries gave 148 passed, 0 failed, 20 ignored. Lib alone (`cargo test -p xcl --lib -- --test-threads=4`) 3 times in a row: 2744 passed, 0 failed, 31 ignored each time; the counts above add those. The same early lib abort happened on my run of #3514 on `ff0c364b`. The 3 tests of this PR pass, `an_indirect_dispatch_runs_its_chain_without_any_whole_form` on the GPU (not skipped). review: none. Read the whole diff (`dispatch_chain.rs` +79/-22). The prefetch at creation is gated on the journal and on a non-empty whole-form blob file at `driver_cache::path_for_chain_root_node(.., DirectConstants, ..)`, so a cold driver cache adds no compiles; `execute_indirect` hands back `Indirect::Whole` before and after building the slicer commands once the whole form is `Ok`, so a dispatch whose groups pass the slicer's rounds is no longer left out. The file writes are in the test only, in a temp dir it removes. performance: retail title, in the world. Release builds of `main` `d0832e61` (A) and this merge (B), runs A, B, A, B of 420 s each, warm XCL and driver caches, `xcl.exe` with the #2590 profile at 2048 MB. Env: `XCL_PREPARE=0 XCL_DIRECT_DXIL=1 XCL_DXC_THREADS=4 XCL_NETWORK=0 XCL_DRED=1 XCL_ACTIVITY=1 XCL_PSO_WAIT_MS=1000 XCL_TEXTURE_LEVEL_PAGES=1 XCL_HUGE_PSO_CONCURRENCY=4 XCL_HUGE_PSO_WANTED_CONCURRENCY=4`, start prompt by `XCL_PRESS_A_AT`, no input. From world entry + 30 s to the end (~240 s each): | | A1 | B1 | A2 | B2 | |---|---|---|---|---| | world entry (first two-pass mesh dispatch) | 143 s | 144 s | 136 s | 142 s | | presents per 2 s | 1.79 | 3.52 | 1.06 | 2.98 | | draws per 2 s | 3588 | 8405 | 4358 | 14290 | | process CPU (cores busy) | 9.4 | 9.6 | 9.2 | 9.7 | | peak private / working set, MB | 42846 / 20169 | 40763 / 20510 | 43258 / 20263 | 41466 / 20677 | | chained dispatches at the end | 73,976 | 169,274 | 99,066 | 300,805 | | device removals | 0 | 0 | 0 | 0 | - Both B runs beat both A runs: 3.25 against 1.43 presents per 2 s on average (2.3x) and 2.8x the draws, at the same CPU and ~2 GB less private memory. That is the size of the #3499 regression this fixes. - My runs of the first head `49eb78ef` (on `main` `86e86fcb`, profile at 1024 MB) showed no clear gain (0.94 / 1.12 against 0.72 / 1.04). I cannot tell from the logs how much of the change comes from this head's prefetch of the cached whole forms and how much from the caches being warmer now, but A and B had the same caches here, alternated. - On screen, both builds play the intro with the UI and subtitles drawn; the user saw parts of the scene (a lit horizon, haze) more often with B, but the scene is still mostly a flat colour on both. verdict: not yet: the required PR description check fails, its xcl-smoke blocks are from the old head `49eb78ef` (as Foniass noted); the code and the in-world numbers above have no blocking finding hardware / tool and model: NVIDIA GeForce RTX 3090 24 GB (driver 621.24, wave32 only), Intel Core i5-10600K, 32 GB, Windows 11 Home build 26300, rustc 1.100.0 / Claude Code (Claude Opus 5.5), results checked by me
Foniass commented 2026-12-01 03:21:45 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by Foniass on 2026-12-01T03:21:45Z.


merge-check
base: d0832e614f
head: ba8592a435
merge: clean
build: cargo build --workspace -> ok (new warning: dispatch_command_signature is never used)
tests: cargo test --workspace --no-fail-fast -- --test-threads=4 -> 2892 passed, 0 failed, 51 ignored; SKIPPED: 28 (20 no wave64, 2 no d3d12SDKLayers.dll, 1 no D3D12 debug layer, 1 no heap windows, 1 cannot disable the driver cache, 3 others; the same set as on main); failing: none
review: read the whole diff (dispatch_chain.rs, +79/-22). It changes the default path: once a split program's whole form is built, its Dispatch-only indirect dispatches go through the whole-form bind instead of the slicer, and programs an earlier run dispatched indirectly queue their whole form at creation. Findings: (1) the "only a load" guard of the creation-time prefetch (prefetch_whole) only checks that a blob file exists. Compute chain blob names (path_for_chain_root_node) carry no adapter/driver identity, unlike graphics files (graphics_file_hash), so after a driver update or GPU swap the file exists, the driver rejects it, and compute_container compiles every journalled whole form during loading on the one worker, the case the comment says it avoids. Fold the driver identity into the chain name or treat a rejected blob as "no prefetch". (2) The regression evidence is not for this head: the smoke block names 49eb78ef (before the blob check), and the main run 91244db9 predates #3499. Peak commit +1.6 GB is unexplained. (3) Rules: AI use names the tool but not the model; the full suite was not run; the creation-time prefetch is a second change that could be its own PR; the description still says every journalled program is queued. (4) pso::dispatch_command_signature (pso.rs ~1835) is now unused, and the doc of an_indirect_dispatch_runs_its_chain_without_any_whole_form still mentions the removed overflow tail. Fine: a built whole form stays built, the re-check after scratch allocation covers the race, refused / pending / OOM states are unchanged, the journal is still noted before the early return, and the new GPU-test assertion fails on main.
performance: 60 s smoke of a retail title, main d0832e61 vs this merge (a4f0b7db): 1516 -> 1662 frames shown (110 %; 60 presents per 2 s in both), peak commit 18133 -> 17634 MB, no device removal, no crash. Same driver as the main run, so it does not exercise finding (1).
verdict: not yet: the creation-time prefetch can compile every journalled whole form during loading after a driver update (finding 1), and the PR's own regression run is from an earlier head
hardware / tool and model: RTX 5070 Ti (driver 621.14), Ryzen 7 7800X3D, Windows 11 26300 / Claude Code with Claude Opus 5.5

AI-written and posted by Foniass without a human check of each point.

<!-- greyfinch-sync:ivall/xcl:comment:7299626326 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/3528#issuecomment-7299626326). Originally posted by [Foniass](https://github.com/Foniass) on 2026-12-01T03:21:45Z. --- merge-check base: d0832e614fa7d6ae027bb4feb27ccb9121f54a8f head: ba8592a435ede5fa9ab952bbe30a9d1a114d28bf merge: clean build: cargo build --workspace -> ok (new warning: `dispatch_command_signature` is never used) tests: cargo test --workspace --no-fail-fast -- --test-threads=4 -> 2892 passed, 0 failed, 51 ignored; SKIPPED: 28 (20 no wave64, 2 no d3d12SDKLayers.dll, 1 no D3D12 debug layer, 1 no heap windows, 1 cannot disable the driver cache, 3 others; the same set as on main); failing: none review: read the whole diff (dispatch_chain.rs, +79/-22). It changes the default path: once a split program's whole form is built, its Dispatch-only indirect dispatches go through the whole-form bind instead of the slicer, and programs an earlier run dispatched indirectly queue their whole form at creation. Findings: (1) the "only a load" guard of the creation-time prefetch (`prefetch_whole`) only checks that a blob file exists. Compute chain blob names (`path_for_chain_root_node`) carry no adapter/driver identity, unlike graphics files (`graphics_file_hash`), so after a driver update or GPU swap the file exists, the driver rejects it, and `compute_container` compiles every journalled whole form during loading on the one worker, the case the comment says it avoids. Fold the driver identity into the chain name or treat a rejected blob as "no prefetch". (2) The regression evidence is not for this head: the smoke block names 49eb78ef (before the blob check), and the main run 91244db9 predates #3499. Peak commit +1.6 GB is unexplained. (3) Rules: AI use names the tool but not the model; the full suite was not run; the creation-time prefetch is a second change that could be its own PR; the description still says every journalled program is queued. (4) `pso::dispatch_command_signature` (pso.rs ~1835) is now unused, and the doc of `an_indirect_dispatch_runs_its_chain_without_any_whole_form` still mentions the removed overflow tail. Fine: a built whole form stays built, the re-check after scratch allocation covers the race, refused / pending / OOM states are unchanged, the journal is still noted before the early return, and the new GPU-test assertion fails on main. performance: 60 s smoke of a retail title, main d0832e61 vs this merge (a4f0b7db): 1516 -> 1662 frames shown (110 %; 60 presents per 2 s in both), peak commit 18133 -> 17634 MB, no device removal, no crash. Same driver as the main run, so it does not exercise finding (1). verdict: not yet: the creation-time prefetch can compile every journalled whole form during loading after a driver update (finding 1), and the PR's own regression run is from an earlier head hardware / tool and model: RTX 5070 Ti (driver 621.14), Ryzen 7 7800X3D, Windows 11 26300 / Claude Code with Claude Opus 5.5 AI-written and posted by Foniass without a human check of each point.
brainhay5 commented 2026-12-01 04:22:12 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by brainhay5 on 2026-12-01T04:22:12Z.


A third card, and one number I have not seen in the reports above: the peak video-memory overshoot falls as well.

Setup

  • RTX 5070 Ti 16 GB, driver 610.88 (32.0.16.1088), Ryzen 7 5800X3D, 64 GB, Windows 11 22631.
  • This head merged into main d0832e61 (merge 8934162b, parents verified), cargo build --release -p xcl ok. Diff read in full: one file, no unrelated edits.
  • Title, 300 s per run, scripted presses. Env: XCL_PREPARE=0 XCL_NETWORK=0 XCL_DEVICE_TYPE=lockhart XCL_ACTIVITY=1.
  • One prerequisite worth knowing: on this card every run was removed (0x887a0005) at ~80 s until xcl.exe was given a 2048 MB driver shader heap (the default 512 MB; #2590). Without that profile there is no in-world measurement to make here, so all runs below have it.
  • Same worktree, same binary flags, same warm shader and driver caches for every run; three control runs of plain main interleaved with three of this PR.
control 1 control 2 control 3 PR 1 PR 2 PR 3
1500 frames reached at 236.0 s 237.4 s 238.5 s 174.8 s 164.6 s 126.8 s
worst video memory over Windows' budget 1,945 MB 1,913 MB 2,085 MB 1,752 MB 1,573 MB 1,179 MB
median dispatches per 2 s 4,663 4,683 4,471 5,943 9,679 9,535
device removals 0 0 0 0 0 0

So the control is stable to within 2.5 s across three runs, and the PR is 1.4-1.9× faster to the same 1500-frame mark with a consistently lower peak overshoot. The dispatch count per 2 s goes up, which I read as the intended effect rather than a regression: a whole-form ExecuteIndirect replaces several rounds of piece dispatches, so more of the frame's work completes in the same wall time.

What it does not fix here: the frame rate after the world loads stays around 1-2 fps either way. On this card the title's texture pages alone come to 19,393 MB against the 15,152 MB budget Windows gives the process, so the driver pages continuously; that is a 16 GB limit, not something this PR can move. The gain is in how much of the load completes before that plays out.

This is consistent with the reports above in one respect and not another: a clear win on a 10 GB card, a small one on a 24 GB one, and a clear one here — plausibly the cards where memory pressure is highest benefit most.

AI use: an agent ran the builds and the runs and wrote this comment.

<!-- greyfinch-sync:ivall/xcl:comment:7300664457 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/3528#issuecomment-7300664457). Originally posted by [brainhay5](https://github.com/brainhay5) on 2026-12-01T04:22:12Z. --- A third card, and one number I have not seen in the reports above: the peak video-memory overshoot falls as well. **Setup** - RTX 5070 Ti 16 GB, driver 610.88 (32.0.16.1088), Ryzen 7 5800X3D, 64 GB, Windows 11 22631. - This head merged into `main` `d0832e61` (merge `8934162b`, parents verified), `cargo build --release -p xcl` ok. Diff read in full: one file, no unrelated edits. - Title, 300 s per run, scripted presses. Env: `XCL_PREPARE=0 XCL_NETWORK=0 XCL_DEVICE_TYPE=lockhart XCL_ACTIVITY=1`. - **One prerequisite worth knowing:** on this card every run was removed (`0x887a0005`) at ~80 s until `xcl.exe` was given a 2048 MB driver shader heap (the default 512 MB; #2590). Without that profile there is no in-world measurement to make here, so all runs below have it. - Same worktree, same binary flags, same warm shader and driver caches for every run; three control runs of plain `main` interleaved with three of this PR. | | control 1 | control 2 | control 3 | PR 1 | PR 2 | PR 3 | |---|---|---|---|---|---|---| | 1500 frames reached at | 236.0 s | 237.4 s | 238.5 s | 174.8 s | 164.6 s | 126.8 s | | worst video memory over Windows' budget | 1,945 MB | 1,913 MB | 2,085 MB | 1,752 MB | 1,573 MB | 1,179 MB | | median dispatches per 2 s | 4,663 | 4,683 | 4,471 | 5,943 | 9,679 | 9,535 | | device removals | 0 | 0 | 0 | 0 | 0 | 0 | So the control is stable to within 2.5 s across three runs, and the PR is 1.4-1.9× faster to the same 1500-frame mark with a consistently lower peak overshoot. The dispatch count per 2 s goes *up*, which I read as the intended effect rather than a regression: a whole-form `ExecuteIndirect` replaces several rounds of piece dispatches, so more of the frame's work completes in the same wall time. **What it does not fix here:** the frame rate after the world loads stays around 1-2 fps either way. On this card the title's texture pages alone come to 19,393 MB against the 15,152 MB budget Windows gives the process, so the driver pages continuously; that is a 16 GB limit, not something this PR can move. The gain is in how much of the load completes before that plays out. This is consistent with the reports above in one respect and not another: a clear win on a 10 GB card, a small one on a 24 GB one, and a clear one here — plausibly the cards where memory pressure is highest benefit most. *AI use: an agent ran the builds and the runs and wrote this comment.*
thehollowedone commented 2026-12-01 04:50:00 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by thehollowedone on 2026-12-01T04:50:00Z.


One implementation detail for Foniass's cache review at head ba8592a4: Microsoft documents cached PSOs as specific to the hardware and driver; another adapter or driver version may reject them. XCL's prefetch check, runtime DirectChain load/save, and offline pipeline preparation all use the same driver-agnostic chain filename.

If the disk key is made driver-specific, carry one key/path helper through all three call sites. Changing prefetch alone would miss stale blobs in runtime; changing runtime alone would stop it finding offline-prepared blobs. XCL already computes an adapter/driver identity and exposes it to preparation. A focused regression can assert that preparation and runtime derive the same path for one identity, different identities derive different paths, and a legacy unkeyed file alone cannot trigger prefetch. If identity is unavailable, the disk path can be absent and the ordinary build path still works.

This is a source-level implementation suggestion; I did not run a build or test. AI use: OpenAI Codex (GPT-6.2 Sol) traced the cache call sites and checked Microsoft's D3D12 contract.

<!-- greyfinch-sync:ivall/xcl:comment:7301147385 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/3528#issuecomment-7301147385). Originally posted by [thehollowedone](https://github.com/thehollowedone) on 2026-12-01T04:50:00Z. --- One implementation detail for [Foniass's cache review](https://github.com/xcl-dev/xcl/pull/3528#issuecomment-7299626326) at head [`ba8592a4`](https://github.com/xcl-dev/xcl/commit/ba8592a435ede5fa9ab952bbe30a9d1a114d28bf): [Microsoft documents](https://learn.microsoft.com/en-us/windows/win32/api/d3d12/ns-d3d12-d3d12_cached_pipeline_state) cached PSOs as specific to the hardware and driver; another adapter or driver version may reject them. XCL's [prefetch check](https://github.com/xcl-dev/xcl/blob/ba8592a435ede5fa9ab952bbe30a9d1a114d28bf/crates/xcl/src/hle/d3d12x/real/dispatch_chain.rs#L354-L367), [runtime `DirectChain` load/save](https://github.com/xcl-dev/xcl/blob/ba8592a435ede5fa9ab952bbe30a9d1a114d28bf/crates/xcl/src/hle/d3d12x/real.rs#L6338-L6363), and [offline pipeline preparation](https://github.com/xcl-dev/xcl/blob/ba8592a435ede5fa9ab952bbe30a9d1a114d28bf/crates/xcl/src/shaders.rs#L2701-L2732) all use the same driver-agnostic chain filename. If the disk key is made driver-specific, carry one key/path helper through all three call sites. Changing prefetch alone would miss stale blobs in runtime; changing runtime alone would stop it finding offline-prepared blobs. XCL already computes an [adapter/driver identity](https://github.com/xcl-dev/xcl/blob/ba8592a435ede5fa9ab952bbe30a9d1a114d28bf/crates/xcl/src/hle/d3d12x/real.rs#L9329-L9359) and exposes it to preparation. A focused regression can assert that preparation and runtime derive the same path for one identity, different identities derive different paths, and a legacy unkeyed file alone cannot trigger prefetch. If identity is unavailable, the disk path can be absent and the ordinary build path still works. This is a source-level implementation suggestion; I did not run a build or test. AI use: OpenAI Codex (GPT-6.2 Sol) traced the cache call sites and checked Microsoft's D3D12 contract.
Kalmarv commented 2026-12-02 02:59:58 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by Kalmarv on 2026-12-02T02:59:58Z.


Rebased onto main (1c8b55147) at 8b9d8dfe4 and addressed all four review points from @Foniass:

  1. Dropped creation-time prefetch_whole in dispatch_chain::build so this PR stays focused on the execute_indirect handoff.
  2. Removed the unused pso::dispatch_command_signature helper (0 new warnings).
  3. Re-checked chain.whole.ready() immediately before recording the split chain to close the race window.
  4. Updated queue_whole's driver-refusal warning to reflect that Dispatch-only indirect dispatches continue on the split chain.

Re-verified with full scripts/test.ps1 (2910 passed, 0 failed, 51 ignored on RTX 5070 Ti + DXC 1.9.2609.5) and a fresh 60 s scripts/smoke.ps1 pair (1699 frames vs 1387 on main, 0 removals/crashes).

<!-- greyfinch-sync:ivall/xcl:comment:7333417878 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/3528#issuecomment-7333417878). Originally posted by [Kalmarv](https://github.com/Kalmarv) on 2026-12-02T02:59:58Z. --- Rebased onto `main` (`1c8b55147`) at `8b9d8dfe4` and addressed all four review points from @Foniass: 1. Dropped creation-time `prefetch_whole` in `dispatch_chain::build` so this PR stays focused on the `execute_indirect` handoff. 2. Removed the unused `pso::dispatch_command_signature` helper (`0` new warnings). 3. Re-checked `chain.whole.ready()` immediately before recording the split chain to close the race window. 4. Updated `queue_whole`'s driver-refusal warning to reflect that Dispatch-only indirect dispatches continue on the split chain. Re-verified with full `scripts/test.ps1` (`2910 passed, 0 failed, 51 ignored` on RTX 5070 Ti + DXC 1.9.2609.5) and a fresh 60 s `scripts/smoke.ps1` pair (`1699` frames vs `1387` on `main`, `0` removals/crashes).
vasanex commented 2026-12-02 05:44:06 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by vasanex on 2026-12-02T05:44:06Z.


merge-check
base: 1c8b551475
head: 8b9d8dfe4c
merge: clean
build: cargo build --workspace -> ok
tests: cargo test --workspace --no-fail-fast -- --test-threads=4 -> 2910 passed, 0 failed, 51 ignored; SKIPPED: 25 (22 no wave64, 2 no heap windows, 1 cannot disable the driver cache), the same tests as on the base (2909 passed there); failing: none. indirect_prefers_whole_only_once_built_ok and an_indirect_dispatch_runs_its_chain_without_any_whole_form ran and passed.
review: whole diff read, nothing that blocks. Once the whole form is built, a Dispatch-only indirect call returns Indirect::Whole before any scratch is claimed, so the caller issues the one whole-form ExecuteIndirect it issued before #3499. While the whole form is pending or refused the chain runs as on main; the removed tail call only ran when the whole form was there, which now returns earlier, so a dispatch whose groups do not fit the slicer's rounds is left out in the same cases as before (the slicer still writes the tail command, which nothing reads now). The device removals reported for an earlier head on an RTX 4080 were corrected in this thread as not specific to the PR; I saw none (below). Not tested here: AMD, and a driver that refuses the whole form.
performance: better in the world, neutral in the 60 s smoke. Smoke, release, same title and settings: base 1608 frames, peak commit 19911 MB; merged tree 1696 frames, 18650 MB (94 %), presents 60 60 61, 0 device removals, 0 crashes. In the world (a private test line on this base with non-default memory switches, so not the merged tree itself; same shader cache, one run each): 0.51 presents/s without this PR, 1.46 presents/s with it between 300 and 380 s, and 1.5 to 1.67 presents/s over a 1500 s run with no device removal and no crash. Per-program GPU times without the PR showed two split compute programs at 384 ms and 205 ms a frame (one of them the ExecuteIndirect one); with it neither is among the 60 most expensive.
verdict: safe to merge
hardware / tool and model: NVIDIA GeForce RTX 3080 10 GB (driver 621.40), AMD Ryzen 9 7950X, Windows 11 Pro 26200, rustc 1.100.0 / Claude Code with Claude Fable 5.2. Run and posted without a human check of each point.

<!-- greyfinch-sync:ivall/xcl:comment:7336238606 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/3528#issuecomment-7336238606). Originally posted by [vasanex](https://github.com/vasanex) on 2026-12-02T05:44:06Z. --- merge-check base: 1c8b551475e1e7bfe48f94448492a4c3544a2e0f head: 8b9d8dfe4c7a0a6d56ff94d7f2d9b25988f8dff3 merge: clean build: cargo build --workspace -> ok tests: cargo test --workspace --no-fail-fast -- --test-threads=4 -> 2910 passed, 0 failed, 51 ignored; SKIPPED: 25 (22 no wave64, 2 no heap windows, 1 cannot disable the driver cache), the same tests as on the base (2909 passed there); failing: none. `indirect_prefers_whole_only_once_built_ok` and `an_indirect_dispatch_runs_its_chain_without_any_whole_form` ran and passed. review: whole diff read, nothing that blocks. Once the whole form is built, a Dispatch-only indirect call returns `Indirect::Whole` before any scratch is claimed, so the caller issues the one whole-form `ExecuteIndirect` it issued before #3499. While the whole form is pending or refused the chain runs as on `main`; the removed tail call only ran when the whole form was there, which now returns earlier, so a dispatch whose groups do not fit the slicer's rounds is left out in the same cases as before (the slicer still writes the tail command, which nothing reads now). The device removals reported for an earlier head on an RTX 4080 were corrected in this thread as not specific to the PR; I saw none (below). Not tested here: AMD, and a driver that refuses the whole form. performance: better in the world, neutral in the 60 s smoke. Smoke, release, same title and settings: base 1608 frames, peak commit 19911 MB; merged tree 1696 frames, 18650 MB (94 %), presents 60 60 61, 0 device removals, 0 crashes. In the world (a private test line on this base with non-default memory switches, so not the merged tree itself; same shader cache, one run each): 0.51 presents/s without this PR, 1.46 presents/s with it between 300 and 380 s, and 1.5 to 1.67 presents/s over a 1500 s run with no device removal and no crash. Per-program GPU times without the PR showed two split compute programs at 384 ms and 205 ms a frame (one of them the `ExecuteIndirect` one); with it neither is among the 60 most expensive. verdict: safe to merge hardware / tool and model: NVIDIA GeForce RTX 3080 10 GB (driver 621.40), AMD Ryzen 9 7950X, Windows 11 Pro 26200, rustc 1.100.0 / Claude Code with Claude Fable 5.2. Run and posted without a human check of each point.
Foniass commented 2026-12-02 08:35:40 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by Foniass on 2026-12-02T08:35:40Z.


Follow-up review (head 8b9d8dfe, since ba8592a4, diff read, not a merge-check):

  • Creation-time prefetch and the driver/GPU identity of whole-form blobs: no longer applies. prefetch_whole and whole_blob_path are gone from crates/xcl/src/hle/d3d12x/real/dispatch_chain.rs, and build (~280-311) only creates the chain again. The whole form is queued only from execute_indirect / whole_ready, as on main, so a cold driver cache no longer makes compute_container compile each journalled whole form at load time.
  • Regression evidence: fixed. Both xcl-smoke blocks are now for head 8b9d8dfe and main 1c8b5514, which contains #3499. Frames 1699 vs 1387, peak commit 18164 MB vs 17480 MB (+684 MB, 3.9 %), no device removal or crash. The 2-3x world frame-rate recovery in the description still comes from the runs on 49eb78ef; the 60 s smoke does not show it for this head, and Not tested says so.
  • Description: mostly fixed, one point open. The full suite is reported (2910 passed, 0 failed, 51 ignored, 24 SKIPPED), and the prefetch (the second change) and the claim that every journalled program is queued are gone. Still open: AI use names "Antigravity (Gemini 4 Neon)", the commit trailer says "Antigravity (Gemini 3.1 Pro)", and the initial draft is credited to "Antigravity / Claude" with no model. Name each tool and model the same way in both places. Also, "Closed the ready() race" overstates it: the second check at dispatch_chain.rs ~620 narrows the window but does not close it. If the whole form finishes after that check, this dispatch still records the chain with no tail, as main does while the whole form is pending, so it is not a regression; the wording should say "narrowed".
  • Unused pso::dispatch_command_signature and the stale test doc: fixed. The helper is removed from crates/xcl/src/gpu/recomp/pso.rs ~1835 with no references left, and the doc of an_indirect_dispatch_runs_its_chain_without_any_whole_form (dispatch_chain.rs ~826) no longer mentions the overflow tail.
  • Test for the fast path that avoids split scratch: fixed (GPU only). The same test now builds the whole form, calls execute_indirect again and expects Indirect::Whole, with bind and around_slicer set to panic (~876-886); on main that call binds the chain and runs the slicer, so it fails without the fix. It skips with "no GPU" on the CI runner.
  • No new problems found. By reading: on Indirect::Whole, bind.rs ~3857 whole_ready sees ready().is_some() and returns the built form without compiling, so the dispatch goes through the guard/clamp path from before #3499. While the whole form is pending or refused, behaviour is unchanged from main.

Fine: the diff is down to a small change in two files (+55/-38): an early hand-off once the whole form is Ok, the re-check after scratch is set up, and the dead helper and tail recording removed. #3648 touches dispatch_chain::build, not execute_indirect, and merges with this PR without conflicts.

AI review: Claude Code (Claude Opus 5.5), posted by Foniass without a human check of each point.

<!-- greyfinch-sync:ivall/xcl:comment:7339661967 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/3528#issuecomment-7339661967). Originally posted by [Foniass](https://github.com/Foniass) on 2026-12-02T08:35:40Z. --- Follow-up review (head 8b9d8dfe, since ba8592a4, diff read, not a merge-check): - **Creation-time prefetch and the driver/GPU identity of whole-form blobs: no longer applies.** `prefetch_whole` and `whole_blob_path` are gone from `crates/xcl/src/hle/d3d12x/real/dispatch_chain.rs`, and `build` (~280-311) only creates the chain again. The whole form is queued only from `execute_indirect` / `whole_ready`, as on main, so a cold driver cache no longer makes `compute_container` compile each journalled whole form at load time. - **Regression evidence: fixed.** Both `xcl-smoke` blocks are now for head 8b9d8dfe and main 1c8b5514, which contains #3499. Frames 1699 vs 1387, peak commit 18164 MB vs 17480 MB (+684 MB, 3.9 %), no device removal or crash. The 2-3x world frame-rate recovery in the description still comes from the runs on 49eb78ef; the 60 s smoke does not show it for this head, and **Not tested** says so. - **Description: mostly fixed, one point open.** The full suite is reported (2910 passed, 0 failed, 51 ignored, 24 SKIPPED), and the prefetch (the second change) and the claim that every journalled program is queued are gone. Still open: **AI use** names "Antigravity (Gemini 4 Neon)", the commit trailer says "Antigravity (Gemini 3.1 Pro)", and the initial draft is credited to "Antigravity / Claude" with no model. Name each tool and model the same way in both places. Also, "Closed the `ready()` race" overstates it: the second check at `dispatch_chain.rs` ~620 narrows the window but does not close it. If the whole form finishes after that check, this dispatch still records the chain with no tail, as main does while the whole form is pending, so it is not a regression; the wording should say "narrowed". - **Unused `pso::dispatch_command_signature` and the stale test doc: fixed.** The helper is removed from `crates/xcl/src/gpu/recomp/pso.rs` ~1835 with no references left, and the doc of `an_indirect_dispatch_runs_its_chain_without_any_whole_form` (`dispatch_chain.rs` ~826) no longer mentions the overflow tail. - **Test for the fast path that avoids split scratch: fixed (GPU only).** The same test now builds the whole form, calls `execute_indirect` again and expects `Indirect::Whole`, with `bind` and `around_slicer` set to panic (~876-886); on main that call binds the chain and runs the slicer, so it fails without the fix. It skips with "no GPU" on the CI runner. - No new problems found. By reading: on `Indirect::Whole`, `bind.rs` ~3857 `whole_ready` sees `ready().is_some()` and returns the built form without compiling, so the dispatch goes through the guard/clamp path from before #3499. While the whole form is pending or refused, behaviour is unchanged from main. Fine: the diff is down to a small change in two files (+55/-38): an early hand-off once the whole form is `Ok`, the re-check after scratch is set up, and the dead helper and tail recording removed. #3648 touches `dispatch_chain::build`, not `execute_indirect`, and merges with this PR without conflicts. AI review: Claude Code (Claude Opus 5.5), posted by Foniass without a human check of each point.
Decodere commented 2026-12-02 08:56:53 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by Decodere on 2026-12-02T08:56:53Z.


merge-check
base: 1c8b551475
head: 8b9d8dfe4c
merge: clean fast-forward onto 1c8b551475e1e7bfe48f94448492a4c3544a2e0f (8b9d8dfe4c7a0a6d56ff94d7f2d9b25988f8dff3; git diff --check clean).
build: cargo build --workspace -> ok; cargo build --release -p xcl -> ok.
tests: cargo test --workspace --no-fail-fast -- --test-threads=4 --nocapture (43 targets) -> 2909 passed, 1 failed, 51 ignored (+1 passed vs main 1c8b5514's 2908 passed, 1 failed, 51 ignored). All 17 hle::d3d12x::real::dispatch_chain::tests passed with 0 skips, including new indirect_prefers_whole_only_once_built_ok and updated an_indirect_dispatch_runs_its_chain_without_any_whole_form and a_split_indirect_dispatch_slices_the_counts_the_guard_let_through. 28 SKIPPED lines — all hardware/environment-expected on RTX 4060 (22 no wave64, 2 no d3d12SDKLayers.dll, 1 no D3D12 debug layer, 2 no heap windows, 1 cannot disable the driver cache (Windows Developer Mode required)). Sole failure is pre-existing Issue #3441 (tests/gpu_two_pass_cache_e2e.rs :: two_pass_driver_cache_reuses_both_passes_and_recovers_corrupt_blobs at line 584, releasing the title PSOs releases their two-pass state, left: 1, right: 0), which also fails on clean base 1c8b5514 (2/2 on this machine) and is unrelated to dispatch_chain.
review: read the full diff (2 files: crates/xcl/src/gpu/recomp/pso.rs -15, crates/xcl/src/hle/d3d12x/real/dispatch_chain.rs +55/-23, total +55/-38). Clean and tightly scoped: execute_indirect checks indirect_prefers_whole(chain.whole.ready()) before claiming split scratch or command storage and re-checks after preparing scratch/command signature so indirect dispatches hand back to Indirect::Whole as soon as the background whole-form build finishes (Some(Ok(_))) while staying on the split chain during None (building) or Some(Err(_)) (driver refusal). No cold-cache prefetch_whole in dispatch_chain::build, and pso::dispatch_command_signature has no remaining callers. No UB, synchronization, or correctness issues found.
performance: Tier 3 60 s retail smoke (title: 29640639) shows no regression vs main 1c8b5514 baseline (1462 frames, presents per 2 s (last 3): 48 53 59, peak commit: 16043 MB): 1618 frames (+10.7%), presents per 2 s (last 3): 60 60 60, peak commit: 15250 MB (-4.9%), 0 device removals, 0 crashes.

xcl-smoke v1
commit: 8b9d8dfe4c7a0a6d56ff94d7f2d9b25988f8dff3
gpu: NVIDIA GeForce RTX 4060
title: 29640639
seconds: 60
exit: 0x0
frames shown: 1618 (PresentX 1618)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 15250 MB

verdict: safe to merge
hardware / tool and model: NVIDIA GeForce RTX 4060 8 GB (driver 621.40), Intel Core i5-11400F, 32 GB RAM, Windows 11 Build 26200, Rust 1.100.1 MSVC, DXC 1.9.2602.17 / Antigravity (Gemini 4 Neon)

<!-- greyfinch-sync:ivall/xcl:comment:7340148314 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/3528#issuecomment-7340148314). Originally posted by [Decodere](https://github.com/Decodere) on 2026-12-02T08:56:53Z. --- merge-check base: 1c8b551475e1e7bfe48f94448492a4c3544a2e0f head: 8b9d8dfe4c7a0a6d56ff94d7f2d9b25988f8dff3 merge: clean fast-forward onto `1c8b551475e1e7bfe48f94448492a4c3544a2e0f` (`8b9d8dfe4c7a0a6d56ff94d7f2d9b25988f8dff3`; `git diff --check` clean). build: `cargo build --workspace` -> ok; `cargo build --release -p xcl` -> ok. tests: `cargo test --workspace --no-fail-fast -- --test-threads=4 --nocapture` (43 targets) -> 2909 passed, 1 failed, 51 ignored (+1 passed vs `main` `1c8b5514`'s 2908 passed, 1 failed, 51 ignored). All 17 `hle::d3d12x::real::dispatch_chain::tests` passed with 0 skips, including new `indirect_prefers_whole_only_once_built_ok` and updated `an_indirect_dispatch_runs_its_chain_without_any_whole_form` and `a_split_indirect_dispatch_slices_the_counts_the_guard_let_through`. 28 `SKIPPED` lines — all hardware/environment-expected on RTX 4060 (22 `no wave64`, 2 `no d3d12SDKLayers.dll`, 1 `no D3D12 debug layer`, 2 `no heap windows`, 1 `cannot disable the driver cache (Windows Developer Mode required)`). Sole failure is pre-existing Issue `#3441` (`tests/gpu_two_pass_cache_e2e.rs :: two_pass_driver_cache_reuses_both_passes_and_recovers_corrupt_blobs` at line 584, `releasing the title PSOs releases their two-pass state`, `left: 1, right: 0`), which also fails on clean base `1c8b5514` (2/2 on this machine) and is unrelated to `dispatch_chain`. review: read the full diff (2 files: `crates/xcl/src/gpu/recomp/pso.rs` -15, `crates/xcl/src/hle/d3d12x/real/dispatch_chain.rs` +55/-23, total +55/-38). Clean and tightly scoped: `execute_indirect` checks `indirect_prefers_whole(chain.whole.ready())` before claiming split scratch or command storage and re-checks after preparing scratch/command signature so indirect dispatches hand back to `Indirect::Whole` as soon as the background whole-form build finishes (`Some(Ok(_))`) while staying on the split chain during `None` (building) or `Some(Err(_))` (driver refusal). No cold-cache `prefetch_whole` in `dispatch_chain::build`, and `pso::dispatch_command_signature` has no remaining callers. No UB, synchronization, or correctness issues found. performance: Tier 3 60 s retail smoke (`title: 29640639`) shows no regression vs `main` `1c8b5514` baseline (`1462` frames, `presents per 2 s (last 3): 48 53 59`, `peak commit: 16043 MB`): `1618` frames (+10.7%), `presents per 2 s (last 3): 60 60 60`, `peak commit: 15250 MB` (-4.9%), 0 device removals, 0 crashes. ``` xcl-smoke v1 commit: 8b9d8dfe4c7a0a6d56ff94d7f2d9b25988f8dff3 gpu: NVIDIA GeForce RTX 4060 title: 29640639 seconds: 60 exit: 0x0 frames shown: 1618 (PresentX 1618) presents per 2 s (last 3): 60 60 60 device removals: 0 crashes: 0 peak commit: 15250 MB ``` verdict: safe to merge hardware / tool and model: NVIDIA GeForce RTX 4060 8 GB (driver 621.40), Intel Core i5-11400F, 32 GB RAM, Windows 11 Build 26200, Rust 1.100.1 MSVC, DXC 1.9.2602.17 / Antigravity (Gemini 4 Neon)
Foniass commented 2026-12-02 09:35:43 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by Foniass on 2026-12-02T09:35:43Z.


merge-check
base: 1c8b551475
head: 8b9d8dfe4c
merge: clean
build: cargo build --workspace -> ok
tests: cargo test --workspace --no-fail-fast -- --test-threads=4 -> 2910 passed, 0 failed, 51 ignored; SKIPPED: 28 (20 no wave64, 2 no d3d12SDKLayers.dll, 1 no D3D12 debug layer, 1 no heap windows, 1 cannot disable the driver cache, 3 others; the same set as on main); failing: none
review: read by one reviewer at this same head; the review is at https://github.com/xcl-dev/xcl/pull/3528#issuecomment-7339661967 and its findings stand. Most serious: all earlier points are fixed; the AI use section and the commit trailer name different models, and "closed the race" should say "narrowed".
performance: 60 s smoke of a retail title, main 1c8b5514 vs this merge (8b9d8dfe): 1652 -> 1688 frames shown (102 %; last presents per 2 s: 60 61 60), peak commit 18228 -> 17150 MB, 0 device removals, 0 crashes.
verdict: safe to merge: no blocking finding in the review (the points there are minor), the suite passes and the smoke run is clean
hardware / tool and model: RTX 5070 Ti (driver 621.14), Ryzen 7 7800X3D, Windows 11 26300 / Claude Code with Claude Opus 5.5

AI-written and posted by Foniass without a human check of each point.

<!-- greyfinch-sync:ivall/xcl:comment:7341171162 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/3528#issuecomment-7341171162). Originally posted by [Foniass](https://github.com/Foniass) on 2026-12-02T09:35:43Z. --- merge-check base: 1c8b551475e1e7bfe48f94448492a4c3544a2e0f head: 8b9d8dfe4c7a0a6d56ff94d7f2d9b25988f8dff3 merge: clean build: cargo build --workspace -> ok tests: cargo test --workspace --no-fail-fast -- --test-threads=4 -> 2910 passed, 0 failed, 51 ignored; SKIPPED: 28 (20 no wave64, 2 no d3d12SDKLayers.dll, 1 no D3D12 debug layer, 1 no heap windows, 1 cannot disable the driver cache, 3 others; the same set as on main); failing: none review: read by one reviewer at this same head; the review is at https://github.com/xcl-dev/xcl/pull/3528#issuecomment-7339661967 and its findings stand. Most serious: all earlier points are fixed; the AI use section and the commit trailer name different models, and "closed the race" should say "narrowed". performance: 60 s smoke of a retail title, main 1c8b5514 vs this merge (8b9d8dfe): 1652 -> 1688 frames shown (102 %; last presents per 2 s: 60 61 60), peak commit 18228 -> 17150 MB, 0 device removals, 0 crashes. verdict: safe to merge: no blocking finding in the review (the points there are minor), the suite passes and the smoke run is clean hardware / tool and model: RTX 5070 Ti (driver 621.14), Ryzen 7 7800X3D, Windows 11 26300 / Claude Code with Claude Opus 5.5 AI-written and posted by Foniass without a human check of each point.
bmjask commented 2026-12-02 11:42:15 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by bmjask on 2026-12-02T11:42:15Z.

Review: COMMENTED


Review of 8b9d8dfe: 1 finding(s). These are on lines outside the diff:

crates/xcl/src/hle/d3d12x/real/dispatch_chain.rs:652: Oversized ("partial") Dispatch-only indirect dispatches are now dropped but reported as Indirect::Ran. The slicer zeroes every piece round and puts the groups only in the whole-form tail command, and with the tail ExecuteIndirect removed nothing reads that tail. If the whole form is pending (None) or refused by the driver (Err) and the GPU args need more than XCL_SPLIT_INDIRECT_ROUNDS x most slabs (e.g. 16 rounds with large groups), the slicer sets partial=true, writes 0 groups to every round and puts g at chain_tail_offset(rounds). No groups run, execute_indirect returns Ok(Indirect::Ran), and bind.rs counts it as RAN/DISPATCHES instead of SKIPPED. With a permanent Err the dispatch is lost for the whole session with no warning, while the new refusal warning (~365) says these dispatches run their chain. Returning Indirect::Whole or Err for partial splits would make it counted and logged as a skip.


These findings come from an AI-assisted review (Claude Code) and focus on correctness. Each is a candidate; please check it before acting on it.

<!-- greyfinch-sync:ivall/xcl:review:6150044761 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/3528#pullrequestreview-6150044761). Originally posted by [bmjask](https://github.com/bmjask) on 2026-12-02T11:42:15Z. **Review:** COMMENTED --- Review of `8b9d8dfe`: 1 finding(s). These are on lines outside the diff: **`crates/xcl/src/hle/d3d12x/real/dispatch_chain.rs:652`**: Oversized ("partial") Dispatch-only indirect dispatches are now dropped but reported as Indirect::Ran. The slicer zeroes every piece round and puts the groups only in the whole-form tail command, and with the tail ExecuteIndirect removed nothing reads that tail. If the whole form is pending (None) or refused by the driver (Err) and the GPU args need more than XCL_SPLIT_INDIRECT_ROUNDS x most slabs (e.g. 16 rounds with large groups), the slicer sets partial=true, writes 0 groups to every round and puts g at `chain_tail_offset(rounds)`. No groups run, `execute_indirect` returns Ok(Indirect::Ran), and bind.rs counts it as RAN/DISPATCHES instead of SKIPPED. With a permanent Err the dispatch is lost for the whole session with no warning, while the new refusal warning (~365) says these dispatches run their chain. Returning Indirect::Whole or Err for partial splits would make it counted and logged as a skip. --- _These findings come from an AI-assisted review (Claude Code) and focus on correctness. Each is a candidate; please check it before acting on it._
Kalmarv commented 2026-12-02 13:52:23 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by Kalmarv on 2026-12-02T13:52:23Z.


Thanks @vasanex, @Decodere, @Foniass, and @bmjask for the reviews and merge-checks!

  • Updated the description wording for @Foniass ("narrowed" the ready() window and clarified the commit trailer vs Gemini 4 Neon model naming without touching HEAD 8b9d8dfe4).
  • Re @bmjask on dispatch_chain.rs:652 (oversized partial splits when chain.whole is pending or refused): as @vasanex noted, on main the tail ExecuteIndirect also only ran when chain.whole was already built, so oversized dispatches while chain.whole is pending/refused are unchanged from main (not a regression of this PR). Happy to track returning Err/skip accounting for permanently refused oversized splits in a small follow-up so we do not invalidate the three merge-checks here.
<!-- greyfinch-sync:ivall/xcl:comment:7347598322 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/3528#issuecomment-7347598322). Originally posted by [Kalmarv](https://github.com/Kalmarv) on 2026-12-02T13:52:23Z. --- Thanks @vasanex, @Decodere, @Foniass, and @bmjask for the reviews and merge-checks! - Updated the description wording for @Foniass ("narrowed" the `ready()` window and clarified the commit trailer vs `Gemini 4 Neon` model naming without touching HEAD `8b9d8dfe4`). - Re @bmjask on `dispatch_chain.rs:652` (oversized partial splits when `chain.whole` is pending or refused): as @vasanex noted, on `main` the tail `ExecuteIndirect` also only ran when `chain.whole` was already built, so oversized dispatches while `chain.whole` is pending/refused are unchanged from `main` (not a regression of this PR). Happy to track returning `Err`/skip accounting for permanently refused oversized splits in a small follow-up so we do not invalidate the three merge-checks here.
bmjask commented 2026-12-02 14:11:53 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by bmjask on 2026-12-02T14:11:53Z.


@Prime1997 could you take a look at this one for review and merge? My automated review notes are above, if any.

<!-- greyfinch-sync:ivall/xcl:comment:7348147338 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/3528#issuecomment-7348147338). Originally posted by [bmjask](https://github.com/bmjask) on 2026-12-02T14:11:53Z. --- @Prime1997 could you take a look at this one for review and merge? My automated review notes are above, if any.
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
xcl-dev/xcl!3528
No description provided.