D3D12.X: a DispatchX with thread dimensions launches whole groups #2600

Closed
KDenKC wants to merge 1 commit from upstream-pr/2610 into main
KDenKC commented 2026-11-26 01:52:06 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by KDenKC on 2026-11-26T01:52:06Z.


Part of a stack: EXEC masking of the last group follows in a second PR.

Related: #1751. The BVH rehydration passes it discusses (RehydrateRaytracingAccelerationStructureBatched2X) are among the DispatchX calls this fixes. A step on the #1833 roadmap.

DispatchX(x, y, z, flags) dropped its flags (list_x::dispatch_x). With USE_THREAD_DIMENSIONS (0x20; 0x8020 with the wave32 bit), x, y, z are thread counts: the console launches ceil(count / numthreads) groups and leaves the lanes past the count out of EXEC. XCL launched the counts as groups. That's 32–64× the groups, and past D3D12's 65,535 groups for a large enough count. On the retail title, the BVH builder's rehydration passes have no bounds check of their own, so every extra thread wrote outside the node array.

The retail title calls it at world start. This PR's run logged it (127.7 s): DispatchX with flags 0x20: 45x1x1 and flags 0x8020: 1x1x1. Before this change the first launched 45 groups of 64 threads for 45 items.

What PR 1 fixes on its own: the 32–64× group overrun and the 65,535-group overflow. Shaders that check their own bounds (the BVH builder's DecompressHeader and ReloadTriangles) now run correctly.

What it doesn't fix yet: the unguarded Box32 / Box16 rehydration still runs the last group whole, so it overruns by up to 63 lanes until the second PR masks them out of EXEC.

What is in it

  • crates/xcl/src/hle/d3d12x/list_x.rs: dispatch_x forwards its flags; a dispatch put off to the submit (Deferred::Dispatch) keeps them.

  • crates/xcl/src/hle/d3d12x/bind.rs:

    • dispatch_flags + dispatch_groups: with 0x20 the counts become whole groups of the pipeline's console numthreads.

    • A pipeline whose group shape isn't known is skipped and counted (launching the counts as groups was the bug).

    • Each flags value is logged once.

    • The thread count of an axis that doesn't end on a whole group goes into io.

  • crates/xcl/src/gpu/recomp/mod.rs: IO_THREAD_LIMIT = io slots 114–116, written now, read by the compute prologue in the second PR. Slot 113 is left for #1428.

  • crates/xcl/src/gpu/recomp/pso.rs, hle/d3d12x/real.rs: compute_interface gives the console's numthreads with the user SGPRs; it's kept per pipeline (pso_threads).

  • Test dispatch_x_with_thread_dimensions_launches_whole_groups.

Tested

  • RTX 5090 32 GB (driver 621.24), Ryzen 7 9800X3D, Windows 11 Pro 26200, Rust 1.99.1; debug tests, release smoke builds. Base main 08db802.

  • The new test fails with main's behaviour (the counts launched as groups: left: Some(([640, 1, 1], …)), right: Some(([10, 1, 1], …))) and passes with the change.

  • cargo test -p xcl --lib hle::d3d12x -- --test-threads=4: 254 passed, 0 failed, 2 ignored.

  • cargo build --workspace, then cargo test --workspace --no-fail-fast -- --test-threads=4 on a3e820d

    (XCL_NETWORK=0): 1426 passed, 4 failed, 47 ignored over 37 test binaries. The 4 failures are

    gpu::dxil::fuzz_tests::fuzz_validate_and_gpu_0..3 (CreateComputePipelineState 0x8007000E, seeds

    70 / 545 / 1019 / 1507). They fail the same way on main 08db802 (pre-existing, #1905).

    --no-fail-fast because otherwise those 4 stop cargo before the integration tests.

  • SKIPPED (26 lines): GPU tests or forms that need wave64 (no wave64 on this card); 3 f16/f32 forms the

    per-lane lowering refuses (#1426); heap_window_out_of_memory_falls_back_to_the_switch_form (no heap

    windows); pso_measurement_compiles_an_exact_synthetic_record (needs Developer Mode).

Tested by others (thank you):

  • RTX 3090, CharlyRien, this change's host part ported into their lab tree behind a switch (not this head): 39,474 thread-dimension DispatchX calls in a world run; the largest, x = 82,606, is launched by the unpatched tree as 82,606 groups (above D3D12's 65,535), and as 1,291 with the conversion. The character was whole in 3 of 3 runs with it, 1 of 3 without, with 0 removals. https://github.com/xcl-dev/xcl/pull/2610#issuecomment-7228347319
  • RTX 5070 Ti, jessenic, in their own tree: scene geometry whole in 3 of 3 runs with this change, 0 of 3 without (#505).
  • RTX 4090, minimalhipster990, a capture on main (the failure this fixes): two rehydration DispatchX calls asking for 2,841 and 927 threads ran groups up to 206 and 161 (45 and 15 needed), and both wrote the same DWORD of a live skinning input page (ffffffff over 1, then 0). The group-count conversion here excludes both writers. https://github.com/xcl-dev/xcl/pull/2610#issuecomment-7227160276
    • Replayed with this change (RTX 4090): the two calls launched 45 and 15 groups, and the overwritten skinning data stayed intact through skinning (byte-for-byte at the checked dispatch). The eight deformed face triangles went from a median edge-length ratio of 86.84 to 1.04-1.15 across 71 draws, and the head silhouette in the presented image is continuous again. A separate protrusion below the ear remains open. https://github.com/xcl-dev/xcl/pull/2610#issuecomment-7227614961
  • RTX 3090 Ti, GodlyBDS, traced on nvidia-dev af2cecc4: by 72.4 s the title made at least 2,048 DispatchX calls with the 0x20 bit, e.g. 4, 29 and 65 threads on a 64-thread program (partial groups and the boundary above one group). https://github.com/xcl-dev/xcl/pull/2610#issuecomment-7197232084
  • RTX 3060 12 GB, jennydeth, retail title, 600 s: 2,017 frames vs main's 2,047, no removal; the title sends the 45-thread DispatchX (45x1x1 launched as 1x1x1 groups); suite 1,430 passed. https://github.com/xcl-dev/xcl/pull/2610#issuecomment-7196241140
  • AMD RX 7800 XT (RDNA3), oni-swr, exact head a3e820d against its parent: whole suite 1429 passed / 1 failed (the same fuzz test on both); plus a GPU check that the groups run every wanted thread exactly once (e.g. 45 threads: 64 lanes, against 2,880 on main). https://github.com/xcl-dev/xcl/pull/2610#issuecomment-7181389865
  • RTX 3060 Ti, DavidM1911: cargo test -p xcl --lib all passed with the branch merged on current main.
  • AMD RX 7900 XT (RDNA3), SlopTart, Linux + Wine/vkd3d-proton (RADV), head merged on current main: the new test passes; gpu_ suite 165 passed / 3 failed (the lane's known baseline, not this PR). https://github.com/xcl-dev/xcl/pull/2610#issuecomment-7183538427
  • RTX 4060 Laptop, pickles976, under Wine: the new test passes (CPU-side group arithmetic only, no GPU dispatch). https://github.com/xcl-dev/xcl/pull/2610#issuecomment-7183101541

Regression run

main:


xcl-smoke v1

commit: 08db8020d323bf478964fcc586152cce54959cfc

gpu: NVIDIA GeForce RTX 5090

title: 9cc6a39e

seconds: 200

exit: 0x0

frames shown: 2034 (PresentX 2034)

presents per 2 s (last 3): 0 0 0

device removals: 0

crashes: 0

peak commit: 31275 MB

This PR (a3e820d):


xcl-smoke v1

commit: a3e820d8e86fcbd8322fee8e519f4b6593b076ce

gpu: NVIDIA GeForce RTX 5090

title: 9cc6a39e

seconds: 200

exit: 0x0

frames shown: 2079 (PresentX 2079)

presents per 2 s (last 3): 0 0 0

device removals: 0

crashes: 0

peak commit: 31141 MB

Both: the retail title, -Seconds 200, XCL_DIRECT_DXIL=1 XCL_HEAP_WINDOWS=1, the same scripted input to the world load, each on a copy of the same cache under a never-used exe name. Both stop presenting at the world load (cold whole forms of split compute programs, #2088), shortly after the DispatchX calls above.

Not tested

  • The masking of the last group's lanes (second PR); until then the unguarded rehydration passes still overrun by up to 63 lanes.

  • Whether rendering with ray tracing improves: the title stops at world start for other reasons (#2088, #2403) before anything is drawn with these acceleration structures.

  • Indirect DispatchX (XBOX_ARG_DISPATCH_X, GPU-written counts): still group counts; it needs a GPU pre-pass.

  • The inline console-list record 0x4003_CC00 (only with XCL_CONSOLE_LISTS=1): a separate PR.

  • AMD and Intel GPUs, other NVIDIA cards.

AMD test wanted: this has not run on AMD. A run on RDNA2/3/4 would help: cargo test -p xcl --lib dispatch_x -- --test-threads=4 (the new test is dispatch_x_with_thread_dimensions_launches_whole_groups), and if you can, scripts/smoke.ps1 on this head against main, plus the DispatchX with flags log lines from a run that reaches the world.

AI use

  • Claude Code (Claude Opus 5.5) wrote the change, the test and this description, and ran the tests and runs above. The design follows a review by Antigravity (Gemini 4 Neon) of the console contract.

🤖 Generated with Claude Code

<!-- greyfinch-sync:ivall/xcl:issue:5502510925 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2610). Originally posted by [KDenKC](https://github.com/KDenKC) on 2026-11-26T01:52:06Z. --- Part of a stack: EXEC masking of the last group follows in a second PR. Related: #1751. The BVH rehydration passes it discusses (`RehydrateRaytracingAccelerationStructureBatched2X`) are among the DispatchX calls this fixes. A step on the #1833 roadmap. `DispatchX(x, y, z, flags)` dropped its flags (`list_x::dispatch_x`). With `USE_THREAD_DIMENSIONS` (0x20; 0x8020 with the wave32 bit), x, y, z are **thread counts**: the console launches `ceil(count / numthreads)` groups and leaves the lanes past the count out of EXEC. XCL launched the counts as groups. That's 32–64× the groups, and past D3D12's 65,535 groups for a large enough count. On the retail title, the BVH builder's rehydration passes have no bounds check of their own, so every extra thread wrote outside the node array. The retail title calls it at world start. This PR's run logged it (127.7 s): `DispatchX with flags 0x20: 45x1x1` and `flags 0x8020: 1x1x1`. Before this change the first launched 45 groups of 64 threads for 45 items. **What PR 1 fixes on its own:** the 32–64× group overrun and the 65,535-group overflow. Shaders that check their own bounds (the BVH builder's `DecompressHeader` and `ReloadTriangles`) now run correctly. **What it doesn't fix yet:** the unguarded Box32 / Box16 rehydration still runs the last group whole, so it overruns by up to 63 lanes until the second PR masks them out of EXEC. **What is in it** - `crates/xcl/src/hle/d3d12x/list_x.rs`: `dispatch_x` forwards its flags; a dispatch put off to the submit (`Deferred::Dispatch`) keeps them. - `crates/xcl/src/hle/d3d12x/bind.rs`: - `dispatch_flags` + `dispatch_groups`: with 0x20 the counts become whole groups of the pipeline's console `numthreads`. - A pipeline whose group shape isn't known is skipped and counted (launching the counts as groups was the bug). - Each flags value is logged once. - The thread count of an axis that doesn't end on a whole group goes into `io`. - `crates/xcl/src/gpu/recomp/mod.rs`: `IO_THREAD_LIMIT` = io slots 114–116, **written now, read by the compute prologue in the second PR**. Slot 113 is left for #1428. - `crates/xcl/src/gpu/recomp/pso.rs`, `hle/d3d12x/real.rs`: `compute_interface` gives the console's `numthreads` with the user SGPRs; it's kept per pipeline (`pso_threads`). - Test `dispatch_x_with_thread_dimensions_launches_whole_groups`. **Tested** - RTX 5090 32 GB (driver 621.24), Ryzen 7 9800X3D, Windows 11 Pro 26200, Rust 1.99.1; debug tests, release smoke builds. Base `main` `08db802`. - The new test fails with `main`'s behaviour (the counts launched as groups: `left: Some(([640, 1, 1], …))`, `right: Some(([10, 1, 1], …))`) and passes with the change. - `cargo test -p xcl --lib hle::d3d12x -- --test-threads=4`: 254 passed, 0 failed, 2 ignored. - `cargo build --workspace`, then `cargo test --workspace --no-fail-fast -- --test-threads=4` on `a3e820d` (`XCL_NETWORK=0`): **1426 passed, 4 failed, 47 ignored** over 37 test binaries. The 4 failures are `gpu::dxil::fuzz_tests::fuzz_validate_and_gpu_0..3` (`CreateComputePipelineState` `0x8007000E`, seeds 70 / 545 / 1019 / 1507). They fail the same way on `main` `08db802` (pre-existing, #1905). `--no-fail-fast` because otherwise those 4 stop cargo before the integration tests. - SKIPPED (26 lines): GPU tests or forms that need wave64 (no wave64 on this card); 3 f16/f32 forms the per-lane lowering refuses (#1426); `heap_window_out_of_memory_falls_back_to_the_switch_form` (no heap windows); `pso_measurement_compiles_an_exact_synthetic_record` (needs Developer Mode). **Tested by others** (thank you): - RTX 3090, CharlyRien, this change's host part ported into their lab tree behind a switch (not this head): 39,474 thread-dimension `DispatchX` calls in a world run; the largest, x = 82,606, is launched by the unpatched tree as 82,606 groups (above D3D12's 65,535), and as 1,291 with the conversion. The character was whole in 3 of 3 runs with it, 1 of 3 without, with 0 removals. https://github.com/xcl-dev/xcl/pull/2610#issuecomment-7228347319 - RTX 5070 Ti, jessenic, in their own tree: scene geometry whole in 3 of 3 runs with this change, 0 of 3 without (#505). - RTX 4090, minimalhipster990, a capture on `main` (the failure this fixes): two rehydration `DispatchX` calls asking for 2,841 and 927 threads ran groups up to 206 and 161 (45 and 15 needed), and both wrote the same DWORD of a live skinning input page (`ffffffff` over `1`, then `0`). The group-count conversion here excludes both writers. https://github.com/xcl-dev/xcl/pull/2610#issuecomment-7227160276 - Replayed with this change (RTX 4090): the two calls launched 45 and 15 groups, and the overwritten skinning data stayed intact through skinning (byte-for-byte at the checked dispatch). The eight deformed face triangles went from a median edge-length ratio of 86.84 to 1.04-1.15 across 71 draws, and the head silhouette in the presented image is continuous again. A separate protrusion below the ear remains open. https://github.com/xcl-dev/xcl/pull/2610#issuecomment-7227614961 - RTX 3090 Ti, GodlyBDS, traced on `nvidia-dev` `af2cecc4`: by 72.4 s the title made at least 2,048 `DispatchX` calls with the `0x20` bit, e.g. 4, 29 and 65 threads on a 64-thread program (partial groups and the boundary above one group). https://github.com/xcl-dev/xcl/pull/2610#issuecomment-7197232084 - RTX 3060 12 GB, jennydeth, retail title, 600 s: 2,017 frames vs `main`'s 2,047, no removal; the title sends the 45-thread `DispatchX` (`45x1x1 launched as 1x1x1 groups`); suite 1,430 passed. https://github.com/xcl-dev/xcl/pull/2610#issuecomment-7196241140 - AMD RX 7800 XT (RDNA3), oni-swr, exact head `a3e820d` against its parent: whole suite 1429 passed / 1 failed (the same fuzz test on both); plus a GPU check that the groups run every wanted thread exactly once (e.g. 45 threads: 64 lanes, against 2,880 on `main`). https://github.com/xcl-dev/xcl/pull/2610#issuecomment-7181389865 - RTX 3060 Ti, DavidM1911: `cargo test -p xcl --lib` all passed with the branch merged on current `main`. - AMD RX 7900 XT (RDNA3), SlopTart, Linux + Wine/vkd3d-proton (RADV), head merged on current `main`: the new test passes; `gpu_` suite 165 passed / 3 failed (the lane's known baseline, not this PR). https://github.com/xcl-dev/xcl/pull/2610#issuecomment-7183538427 - RTX 4060 Laptop, pickles976, under Wine: the new test passes (CPU-side group arithmetic only, no GPU dispatch). https://github.com/xcl-dev/xcl/pull/2610#issuecomment-7183101541 **Regression run** `main`: ``` xcl-smoke v1 commit: 08db8020d323bf478964fcc586152cce54959cfc gpu: NVIDIA GeForce RTX 5090 title: 9cc6a39e seconds: 200 exit: 0x0 frames shown: 2034 (PresentX 2034) presents per 2 s (last 3): 0 0 0 device removals: 0 crashes: 0 peak commit: 31275 MB ``` This PR (`a3e820d`): ``` xcl-smoke v1 commit: a3e820d8e86fcbd8322fee8e519f4b6593b076ce gpu: NVIDIA GeForce RTX 5090 title: 9cc6a39e seconds: 200 exit: 0x0 frames shown: 2079 (PresentX 2079) presents per 2 s (last 3): 0 0 0 device removals: 0 crashes: 0 peak commit: 31141 MB ``` Both: the retail title, `-Seconds 200`, `XCL_DIRECT_DXIL=1 XCL_HEAP_WINDOWS=1`, the same scripted input to the world load, each on a copy of the same cache under a never-used exe name. Both stop presenting at the world load (cold whole forms of split compute programs, #2088), shortly after the DispatchX calls above. **Not tested** - The masking of the last group's lanes (second PR); until then the unguarded rehydration passes still overrun by up to 63 lanes. - Whether rendering with ray tracing improves: the title stops at world start for other reasons (#2088, #2403) before anything is drawn with these acceleration structures. - Indirect `DispatchX` (`XBOX_ARG_DISPATCH_X`, GPU-written counts): still group counts; it needs a GPU pre-pass. - The inline console-list record `0x4003_CC00` (only with `XCL_CONSOLE_LISTS=1`): a separate PR. - AMD and Intel GPUs, other NVIDIA cards. **AMD test wanted:** this has not run on AMD. A run on RDNA2/3/4 would help: `cargo test -p xcl --lib dispatch_x -- --test-threads=4` (the new test is `dispatch_x_with_thread_dimensions_launches_whole_groups`), and if you can, `scripts/smoke.ps1` on this head against `main`, plus the `DispatchX with flags` log lines from a run that reaches the world. **AI use** - Claude Code (Claude Opus 5.5) wrote the change, the test and this description, and ran the tests and runs above. The design follows a review by Antigravity (Gemini 4 Neon) of the console contract. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
DavidM1911 commented 2026-11-26 03:06:33 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by DavidM1911 on 2026-11-26T02:31:55Z.


Verification on RTX 3060 Ti (Windows 11), branch merged with current main:

  • cargo test -p xcl --lib: all passed, 0 failed, 26 ignored.

Thanks!

— Devin

<!-- greyfinch-sync:ivall/xcl:comment:7180889607 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2610#issuecomment-7180889607). Originally posted by [DavidM1911](https://github.com/DavidM1911) on 2026-11-26T02:31:55Z. --- Verification on RTX 3060 Ti (Windows 11), branch merged with current `main`: - `cargo test -p xcl --lib`: all passed, 0 failed, 26 ignored. Thanks! — Devin
oni-swr commented 2026-11-26 03:06:39 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by oni-swr on 2026-11-26T03:05:42Z.


Test report: AMD RX 7800 XT, exact head a3e820d8e86fcbd8322fee8e519f4b6593b076ce, with exact parent 08db8020d323bf478964fcc586152cce54959cfc as control. Both were clean detached checkouts (no uncommitted changes), not merged with current main.

Hardware / setup

  • AMD Radeon RX 7800 XT (RDNA3), driver 32.0.31035.1003. Windows 11 Pro 10.0.26200, Rust 1.100.0, debug builds, XCL_NETWORK=0, cargo -j 4.

Tested

  • cargo build --workspace, then cargo test --workspace --no-fail-fast -- --test-threads=4 (37 test binaries):
    • head a3e820d: 1429 passed, 1 failed, 47 ignored
    • parent 08db802: 1428 passed, 1 failed, 47 ignored
    • On both, the only failure is gpu::dxil::fuzz_tests::fuzz_validate_and_gpu_1 (seed 722: res[30] = 0x1, CPU 0x7fffffff). It reproduces on its own with cargo test -p xcl --lib gpu::dxil::fuzz_tests on both commits, so it is not from this PR.
    • SKIPPED (7, the same on both): the 6 f16/f32 per-lane forms of f16_programs_on_the_gpu / f32_programs_on_the_gpu (refused, #1426), and heap_window_out_of_memory_falls_back_to_the_switch_form (no heap windows).
  • cargo test -p xcl --lib dispatch_x -- --test-threads=4: head 1 passed (dispatch_x_with_thread_dimensions_launches_whole_groups); the parent has no such test (0 run).
  • cargo test -p xcl --lib hle::d3d12x -- --test-threads=4: head 254 passed, 0 failed, 2 ignored; parent 253 passed, 0 failed, 2 ignored.

Extra synthetic checks (local only, not proposed for the PR)
Three temporary tests were added to bind.rs's test module on the head checkout (patch below). They were run with cargo test -p xcl --lib verify2610 -- --test-threads=1 --nocapture and XCL_VERIFY_ADAPTER="AMD Radeon RX 7800 XT", which makes the GPU test fail on any other adapter. Result: 3 passed, 0 failed.

  • verify2610_group_counts_sweep_and_bounds (dispatch_groups):
    • Checked for 7 group shapes ([64,1,1], [32,1,1], [256,1,1], [1024,1,1], [8,8,1], [4,4,4], [16,16,4]), flags 0x20 / 0x8020 / 0x21, counts 0..=3000 plus 65,535·numthreads−1 and 65,535·numthreads:
      • the groups cover the count, and one group fewer would not;
      • the thread limit is set only on an axis that does not end on a whole group;
      • every axis stays ≤ 65,535 groups.
    • Without 0x20 (0, 0x8000, 0x1, 0x10, 0x40), the counts pass through as groups.
    • 65,535·64 threads give 65,535 groups. One thread more gives 65,536 groups, which is past D3D12's limit: the count is not clamped, so the D3D12 limit still applies to the count the title passes.
    • u32::MAX threads give 67,108,864 groups without overflow, and a zero in the group shape is taken as 1.
  • verify2610_dispatch_x_forwards_flags: list_x::dispatch_x(…, 100, 1, 1, 0x20 / 0x8020) on a translated pipeline whose group shape is not known reaches dispatch_flags with the flags and is skipped. DISPATCHES_SKIPPED goes up, and no Dispatch, root signature, UAV or PSO call reaches the fake list. The deferred path (Deferred::Dispatch(.., flags) → record_deferred) was not driven at runtime.
  • verify2610_gpu_whole_groups_cover_threads: an HLSL cs_6_6 shader with the same numthreads is launched through runner::dispatch with the groups that dispatch_groups gives. It counts the lanes it runs, and each thread inside the count marks its own slot. The buffer is sized for the counted threads only, and only in-range threads write to it. Adapter printed: AMD Radeon RX 7800 XT.
numthreads threads (flags) groups (PR) lanes run in-range threads run once main's launch (counts as groups): lanes
64,1,1 640,1,1 (0x20) 10,1,1 640 640/640 40960
64,1,1 100,1,1 (0x20) 2,1,1 128 100/100 6400
64,1,1 45,1,1 (0x20) 1,1,1 64 45/45 2880
64,1,1 1,1,1 (0x8020) 1,1,1 64 1/1 64
8,8,1 20,16,3 (0x20) 3,2,3 1152 960/960 61440
4,4,4 9,5,7 (0x8020) 3,2,2 768 315/315 20160
64,1,1 4194240,1,1 (0x20) 65535,1,1 4194240 4194240/4194240 not launched (4194240 groups > 65,535)

The last column is main's behaviour (the counts launched as groups), run on the same build for comparison, and only where that is a valid dispatch.

Not tested

  • scripts/smoke.ps1 / any retail title (out of scope for this report), and the DispatchX with flags log lines from a title.
  • The IO_THREAD_LIMIT io slots reaching the GPU through bind_abi (not driven here; it is read only in the second PR), and the deferred DispatchX path at runtime.
  • Indirect DispatchX, and other AMD generations (RDNA2/4).
Local test patch (applied on top of a3e820d only for this run)
diff --git a/crates/xcl/src/hle/d3d12x/bind.rs b/crates/xcl/src/hle/d3d12x/bind.rs
index 9bb3e030..425cdb1e 100644
--- a/crates/xcl/src/hle/d3d12x/bind.rs
+++ b/crates/xcl/src/hle/d3d12x/bind.rs
@@ -1480,6 +1480,146 @@ void main(uint t : SV_GroupIndex) {
         assert_eq!(dispatch_groups(0x7300_00FF, [100, 1, 1], 0), Some(([100, 1, 1], [0, 0, 0])));
     }
 
+    // ---- local verification of PR #2610 (not part of the PR) ----
+
+    /// Sweep: whole groups cover the count, one group fewer would not, limits only on partial axes;
+    /// bounded dimensions: up to 65,535 * numthreads threads stay within D3D12's 65,535 groups.
+    #[test]
+    fn verify2610_group_counts_sweep_and_bounds() {
+        let shapes: [[u32; 3]; 7] = [[64, 1, 1], [32, 1, 1], [256, 1, 1], [1024, 1, 1], [8, 8, 1], [4, 4, 4], [16, 16, 4]];
+        for (i, sh) in shapes.iter().enumerate() {
+            let pso = 0x7310_0000usize + i;
+            real::register_threads_for_test(pso, *sh);
+            for flags in [0x20u32, 0x8020, 0x20 | 0x1] {
+                for n in (0u32..=3000).chain([65_535 * sh[0] - 1, 65_535 * sh[0]]) {
+                    let dims = [n, (n % 7) + 1, (n % 3) + 1];
+                    let (g, l) = dispatch_groups(pso, dims, flags).unwrap();
+                    for k in 0..3 {
+                        assert!(g[k] as u64 * sh[k] as u64 >= dims[k] as u64, "{sh:?} {dims:?} {k}");
+                        assert!(dims[k] == 0 || ((g[k] - 1) as u64) * (sh[k] as u64) < dims[k] as u64, "{sh:?} {dims:?} {k}");
+                        assert_eq!(l[k], if dims[k] % sh[k] != 0 { dims[k] } else { 0 });
+                        assert!(g[k] <= 65_535, "{sh:?} {dims:?}: {g:?}");
+                    }
+                }
+            }
+            // without 0x20 the counts are groups, whatever the other bits
+            for flags in [0u32, 0x8000, 0x1, 0x10, 0x40] {
+                assert_eq!(dispatch_groups(pso, [70_000, 3, 2], flags), Some(([70_000, 3, 2], [0; 3])));
+            }
+        }
+        // the retail log case: 45 threads of 64 -> one group (main launched 45)
+        assert_eq!(dispatch_groups(0x7310_0000, [45, 1, 1], 0x20), Some(([1, 1, 1], [45, 0, 0])));
+        assert_eq!(dispatch_groups(0x7310_0000, [1, 1, 1], 0x8020), Some(([1, 1, 1], [1, 0, 0])));
+        // the largest count that fits: 65,535 groups; one thread more needs 65,536 (reported, not clamped)
+        assert_eq!(dispatch_groups(0x7310_0000, [65_535 * 64, 1, 1], 0x20), Some(([65_535, 1, 1], [0, 0, 0])));
+        assert_eq!(dispatch_groups(0x7310_0000, [65_535 * 64 + 1, 1, 1], 0x20).unwrap().0, [65_536, 1, 1]);
+        // u32::MAX threads: no overflow in the division
+        assert_eq!(dispatch_groups(0x7310_0000, [u32::MAX, 1, 1], 0x20).unwrap().0, [67_108_864, 1, 1]);
+        // a zero in the console group shape is taken as 1 (no division by zero)
+        real::register_threads_for_test(0x7310_00F0, [0, 1, 1]);
+        assert_eq!(dispatch_groups(0x7310_00F0, [100, 1, 1], 0x20), Some(([100, 1, 1], [0, 0, 0])));
+    }
+
+    /// `DispatchX` (#78) hands its flags to the dispatch: with 0x20 on a translated pipeline whose
+    /// group shape is not known it is skipped before any binding (on main the flags were dropped).
+    #[test]
+    fn verify2610_dispatch_x_forwards_flags() {
+        let mut orig_vt = [0usize; 64];
+        orig_vt[1] = fake_add_ref as usize;
+        orig_vt[2] = fake_release as usize;
+        orig_vt[14] = fake_dispatch as usize;
+        orig_vt[25] = fake_set_pso as usize;
+        orig_vt[29] = fake_set_compute_rs as usize;
+        orig_vt[41] = fake_set_compute_uav as usize;
+        orig_vt[59] = fake_execute_indirect as usize;
+        let mut ext_vt = vec![0usize; 65];
+        ext_vt[0] = orig_vt.as_ptr() as usize;
+        ext_vt[1..].copy_from_slice(&orig_vt);
+        let fake = Box::new(FakeAdoptedList {
+            vt: unsafe { ext_vt.as_ptr().add(1) },
+            refs: AtomicUsize::new(1),
+            dispatch_calls: AtomicUsize::new(0),
+            set_compute_rs_calls: AtomicUsize::new(0),
+            set_compute_uav_calls: AtomicUsize::new(0),
+            set_pso_calls: AtomicUsize::new(0),
+            execute_indirect_calls: AtomicUsize::new(0),
+        });
+        let list_ptr = &*fake as *const FakeAdoptedList as *mut c_void;
+        let pso = 0x7320_0001usize;
+        real::register_translated_compute_for_test(pso);
+        assert_eq!(real::pso_threads(pso), None);
+        reset(list_ptr, 0x7320_0100, pso);
+        for flags in [0x20u32, 0x8020] {
+            let before = counts_snapshot();
+            unsafe { list_x::dispatch_x(list_ptr, 100, 1, 1, flags) };
+            let after = counts_snapshot();
+            assert_eq!(after[DISPATCHES], before[DISPATCHES]);
+            assert!(after[DISPATCHES_SKIPPED] > before[DISPATCHES_SKIPPED]);
+        }
+        assert_eq!(fake.dispatch_calls.load(Ordering::Relaxed), 0);
+        assert_eq!(fake.set_compute_rs_calls.load(Ordering::Relaxed), 0);
+        assert_eq!(fake.set_compute_uav_calls.load(Ordering::Relaxed), 0);
+        assert_eq!(fake.set_pso_calls.load(Ordering::Relaxed), 0);
+        forget(list_ptr);
+    }
+
+    /// On the GPU: the groups `dispatch_groups` gives, launched with a synthetic HLSL shader of
+    /// the same numthreads, run every wanted thread exactly once and launch no more lanes than
+    /// whole groups; the buffer holds a counter and one slot per wanted thread (in-range writes only).
+    #[test]
+    fn verify2610_gpu_whole_groups_cover_threads() {
+        use crate::gpu::recomp::{dxc, runner};
+        let adapter = match runner::adapter() {
+            Ok(a) => a,
+            Err(_) => return runner::skip_test("no GPU"),
+        };
+        if dxc::location().is_err() {
+            return runner::skip_test("no DXC");
+        }
+        eprintln!("verify2610 adapter: {adapter}");
+        if let Ok(want) = std::env::var("XCL_VERIFY_ADAPTER") {
+            assert!(adapter.contains(&want), "adapter {adapter} is not {want}");
+        }
+        let cases: [([u32; 3], [u32; 3], u32); 7] = [
+            ([64, 1, 1], [640, 1, 1], 0x20),
+            ([64, 1, 1], [100, 1, 1], 0x20),
+            ([64, 1, 1], [45, 1, 1], 0x20),
+            ([64, 1, 1], [1, 1, 1], 0x8020),
+            ([8, 8, 1], [20, 16, 3], 0x20),
+            ([4, 4, 4], [9, 5, 7], 0x8020),
+            ([64, 1, 1], [65_535 * 64, 1, 1], 0x20),
+        ];
+        for (i, (sh, dims, flags)) in cases.into_iter().enumerate() {
+            let pso = 0x7330_0000usize + i;
+            real::register_threads_for_test(pso, sh);
+            let (groups, _) = dispatch_groups(pso, dims, flags).unwrap();
+            let src = format!(
+                "RWByteAddressBuffer io : register(u0);\nRWByteAddressBuffer mem : register(u2);\n\
+                 [numthreads({}, {}, {})]\nvoid main(uint3 t : SV_DispatchThreadID) {{\n\
+                 uint3 lim = uint3(io.Load(0), io.Load(4), io.Load(8));\n\
+                 uint o; mem.InterlockedAdd(0, 1, o);\n\
+                 if (all(t < lim)) {{ uint idx = (t.z * lim.y + t.y) * lim.x + t.x; mem.InterlockedAdd(16 + idx * 4, 1, o); }}\n}}\n",
+                sh[0], sh[1], sh[2]
+            );
+            let dxil = dxc::compile(&src, "main", "cs_6_6", &[]).unwrap_or_else(|e| panic!("{e}"));
+            let wanted = (dims[0] * dims[1] * dims[2]) as usize;
+            let mem = vec![0u32; 4 + wanted];
+            let out = runner::dispatch(&dxil, groups, &dims, &mem).unwrap_or_else(|e| panic!("{sh:?} {dims:?}: {e}"));
+            let lanes = groups.iter().map(|&g| g as u64).product::<u64>() * sh.iter().map(|&t| t as u64).product::<u64>();
+            let once = out[4..4 + wanted].iter().filter(|&&v| v == 1).count();
+            eprintln!("verify2610 {sh:?} {dims:?} flags {flags:#x}: groups {groups:?}, lanes run {} (expected {lanes}), wanted threads run once {once}/{wanted}", out[0]);
+            assert_eq!(out[0] as u64, lanes);
+            assert_eq!(once, wanted);
+            // main's launch (the counts as groups) for comparison, where it is a valid dispatch
+            if dims.iter().all(|&d| d <= 65_535) && i < 6 {
+                let out = runner::dispatch(&dxil, dims, &dims, &mem).unwrap();
+                let lanes_main = dims.iter().map(|&g| g as u64).product::<u64>() * sh.iter().map(|&t| t as u64).product::<u64>();
+                eprintln!("verify2610   counts as groups (main): groups {dims:?}, lanes run {} (expected {lanes_main})", out[0]);
+                assert_eq!(out[0] as u64, lanes_main);
+            }
+        }
+    }
+
     #[test]
     fn async_compute_pso_success_and_failure_in_dispatch_and_execute_indirect() {
         let mut orig_vt = [0usize; 64];

AI use: Claude Code (Claude Opus 5.5), coordinated by Codex (gpt-6.2-sol), ran these tests, wrote the temporary checks and wrote this report. The results come from the runs above on this machine.

<!-- greyfinch-sync:ivall/xcl:comment:7181389865 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2610#issuecomment-7181389865). Originally posted by [oni-swr](https://github.com/oni-swr) on 2026-11-26T03:05:42Z. --- **Test report: AMD RX 7800 XT, exact head `a3e820d8e86fcbd8322fee8e519f4b6593b076ce`**, with exact parent `08db8020d323bf478964fcc586152cce54959cfc` as control. Both were clean detached checkouts (no uncommitted changes), not merged with current `main`. **Hardware / setup** - AMD Radeon RX 7800 XT (RDNA3), driver 32.0.31035.1003. Windows 11 Pro 10.0.26200, Rust 1.100.0, debug builds, `XCL_NETWORK=0`, `cargo -j 4`. **Tested** - `cargo build --workspace`, then `cargo test --workspace --no-fail-fast -- --test-threads=4` (37 test binaries): - head `a3e820d`: **1429 passed, 1 failed, 47 ignored** - parent `08db802`: **1428 passed, 1 failed, 47 ignored** - On both, the only failure is `gpu::dxil::fuzz_tests::fuzz_validate_and_gpu_1` (`seed 722: res[30] = 0x1, CPU 0x7fffffff`). It reproduces on its own with `cargo test -p xcl --lib gpu::dxil::fuzz_tests` on both commits, so it is not from this PR. - SKIPPED (7, the same on both): the 6 f16/f32 per-lane forms of `f16_programs_on_the_gpu` / `f32_programs_on_the_gpu` (refused, #1426), and `heap_window_out_of_memory_falls_back_to_the_switch_form` (no heap windows). - `cargo test -p xcl --lib dispatch_x -- --test-threads=4`: head 1 passed (`dispatch_x_with_thread_dimensions_launches_whole_groups`); the parent has no such test (0 run). - `cargo test -p xcl --lib hle::d3d12x -- --test-threads=4`: head 254 passed, 0 failed, 2 ignored; parent 253 passed, 0 failed, 2 ignored. **Extra synthetic checks (local only, not proposed for the PR)** Three temporary tests were added to `bind.rs`'s test module on the head checkout (patch below). They were run with `cargo test -p xcl --lib verify2610 -- --test-threads=1 --nocapture` and `XCL_VERIFY_ADAPTER="AMD Radeon RX 7800 XT"`, which makes the GPU test fail on any other adapter. Result: **3 passed, 0 failed**. - `verify2610_group_counts_sweep_and_bounds` (`dispatch_groups`): - Checked for 7 group shapes (`[64,1,1]`, `[32,1,1]`, `[256,1,1]`, `[1024,1,1]`, `[8,8,1]`, `[4,4,4]`, `[16,16,4]`), flags `0x20` / `0x8020` / `0x21`, counts 0..=3000 plus 65,535·numthreads−1 and 65,535·numthreads: - the groups cover the count, and one group fewer would not; - the thread limit is set only on an axis that does not end on a whole group; - every axis stays ≤ 65,535 groups. - Without `0x20` (`0`, `0x8000`, `0x1`, `0x10`, `0x40`), the counts pass through as groups. - 65,535·64 threads give 65,535 groups. One thread more gives 65,536 groups, which is past D3D12's limit: the count is not clamped, so the D3D12 limit still applies to the count the title passes. - `u32::MAX` threads give 67,108,864 groups without overflow, and a zero in the group shape is taken as 1. - `verify2610_dispatch_x_forwards_flags`: `list_x::dispatch_x(…, 100, 1, 1, 0x20 / 0x8020)` on a translated pipeline whose group shape is not known reaches `dispatch_flags` with the flags and is skipped. `DISPATCHES_SKIPPED` goes up, and no Dispatch, root signature, UAV or PSO call reaches the fake list. The deferred path (`Deferred::Dispatch(.., flags)` → `record_deferred`) was not driven at runtime. - `verify2610_gpu_whole_groups_cover_threads`: an HLSL `cs_6_6` shader with the same `numthreads` is launched through `runner::dispatch` with the groups that `dispatch_groups` gives. It counts the lanes it runs, and each thread inside the count marks its own slot. The buffer is sized for the counted threads only, and only in-range threads write to it. Adapter printed: `AMD Radeon RX 7800 XT`. | numthreads | threads (flags) | groups (PR) | lanes run | in-range threads run once | `main`'s launch (counts as groups): lanes | |---|---|---|---|---|---| | 64,1,1 | 640,1,1 (0x20) | 10,1,1 | 640 | 640/640 | 40960 | | 64,1,1 | 100,1,1 (0x20) | 2,1,1 | 128 | 100/100 | 6400 | | 64,1,1 | 45,1,1 (0x20) | 1,1,1 | 64 | 45/45 | 2880 | | 64,1,1 | 1,1,1 (0x8020) | 1,1,1 | 64 | 1/1 | 64 | | 8,8,1 | 20,16,3 (0x20) | 3,2,3 | 1152 | 960/960 | 61440 | | 4,4,4 | 9,5,7 (0x8020) | 3,2,2 | 768 | 315/315 | 20160 | | 64,1,1 | 4194240,1,1 (0x20) | 65535,1,1 | 4194240 | 4194240/4194240 | not launched (4194240 groups > 65,535) | The last column is `main`'s behaviour (the counts launched as groups), run on the same build for comparison, and only where that is a valid dispatch. **Not tested** - `scripts/smoke.ps1` / any retail title (out of scope for this report), and the `DispatchX with flags` log lines from a title. - The `IO_THREAD_LIMIT` io slots reaching the GPU through `bind_abi` (not driven here; it is read only in the second PR), and the deferred `DispatchX` path at runtime. - Indirect `DispatchX`, and other AMD generations (RDNA2/4). <details><summary>Local test patch (applied on top of a3e820d only for this run)</summary> ```diff diff --git a/crates/xcl/src/hle/d3d12x/bind.rs b/crates/xcl/src/hle/d3d12x/bind.rs index 9bb3e030..425cdb1e 100644 --- a/crates/xcl/src/hle/d3d12x/bind.rs +++ b/crates/xcl/src/hle/d3d12x/bind.rs @@ -1480,6 +1480,146 @@ void main(uint t : SV_GroupIndex) { assert_eq!(dispatch_groups(0x7300_00FF, [100, 1, 1], 0), Some(([100, 1, 1], [0, 0, 0]))); } + // ---- local verification of PR #2610 (not part of the PR) ---- + + /// Sweep: whole groups cover the count, one group fewer would not, limits only on partial axes; + /// bounded dimensions: up to 65,535 * numthreads threads stay within D3D12's 65,535 groups. + #[test] + fn verify2610_group_counts_sweep_and_bounds() { + let shapes: [[u32; 3]; 7] = [[64, 1, 1], [32, 1, 1], [256, 1, 1], [1024, 1, 1], [8, 8, 1], [4, 4, 4], [16, 16, 4]]; + for (i, sh) in shapes.iter().enumerate() { + let pso = 0x7310_0000usize + i; + real::register_threads_for_test(pso, *sh); + for flags in [0x20u32, 0x8020, 0x20 | 0x1] { + for n in (0u32..=3000).chain([65_535 * sh[0] - 1, 65_535 * sh[0]]) { + let dims = [n, (n % 7) + 1, (n % 3) + 1]; + let (g, l) = dispatch_groups(pso, dims, flags).unwrap(); + for k in 0..3 { + assert!(g[k] as u64 * sh[k] as u64 >= dims[k] as u64, "{sh:?} {dims:?} {k}"); + assert!(dims[k] == 0 || ((g[k] - 1) as u64) * (sh[k] as u64) < dims[k] as u64, "{sh:?} {dims:?} {k}"); + assert_eq!(l[k], if dims[k] % sh[k] != 0 { dims[k] } else { 0 }); + assert!(g[k] <= 65_535, "{sh:?} {dims:?}: {g:?}"); + } + } + } + // without 0x20 the counts are groups, whatever the other bits + for flags in [0u32, 0x8000, 0x1, 0x10, 0x40] { + assert_eq!(dispatch_groups(pso, [70_000, 3, 2], flags), Some(([70_000, 3, 2], [0; 3]))); + } + } + // the retail log case: 45 threads of 64 -> one group (main launched 45) + assert_eq!(dispatch_groups(0x7310_0000, [45, 1, 1], 0x20), Some(([1, 1, 1], [45, 0, 0]))); + assert_eq!(dispatch_groups(0x7310_0000, [1, 1, 1], 0x8020), Some(([1, 1, 1], [1, 0, 0]))); + // the largest count that fits: 65,535 groups; one thread more needs 65,536 (reported, not clamped) + assert_eq!(dispatch_groups(0x7310_0000, [65_535 * 64, 1, 1], 0x20), Some(([65_535, 1, 1], [0, 0, 0]))); + assert_eq!(dispatch_groups(0x7310_0000, [65_535 * 64 + 1, 1, 1], 0x20).unwrap().0, [65_536, 1, 1]); + // u32::MAX threads: no overflow in the division + assert_eq!(dispatch_groups(0x7310_0000, [u32::MAX, 1, 1], 0x20).unwrap().0, [67_108_864, 1, 1]); + // a zero in the console group shape is taken as 1 (no division by zero) + real::register_threads_for_test(0x7310_00F0, [0, 1, 1]); + assert_eq!(dispatch_groups(0x7310_00F0, [100, 1, 1], 0x20), Some(([100, 1, 1], [0, 0, 0]))); + } + + /// `DispatchX` (#78) hands its flags to the dispatch: with 0x20 on a translated pipeline whose + /// group shape is not known it is skipped before any binding (on main the flags were dropped). + #[test] + fn verify2610_dispatch_x_forwards_flags() { + let mut orig_vt = [0usize; 64]; + orig_vt[1] = fake_add_ref as usize; + orig_vt[2] = fake_release as usize; + orig_vt[14] = fake_dispatch as usize; + orig_vt[25] = fake_set_pso as usize; + orig_vt[29] = fake_set_compute_rs as usize; + orig_vt[41] = fake_set_compute_uav as usize; + orig_vt[59] = fake_execute_indirect as usize; + let mut ext_vt = vec![0usize; 65]; + ext_vt[0] = orig_vt.as_ptr() as usize; + ext_vt[1..].copy_from_slice(&orig_vt); + let fake = Box::new(FakeAdoptedList { + vt: unsafe { ext_vt.as_ptr().add(1) }, + refs: AtomicUsize::new(1), + dispatch_calls: AtomicUsize::new(0), + set_compute_rs_calls: AtomicUsize::new(0), + set_compute_uav_calls: AtomicUsize::new(0), + set_pso_calls: AtomicUsize::new(0), + execute_indirect_calls: AtomicUsize::new(0), + }); + let list_ptr = &*fake as *const FakeAdoptedList as *mut c_void; + let pso = 0x7320_0001usize; + real::register_translated_compute_for_test(pso); + assert_eq!(real::pso_threads(pso), None); + reset(list_ptr, 0x7320_0100, pso); + for flags in [0x20u32, 0x8020] { + let before = counts_snapshot(); + unsafe { list_x::dispatch_x(list_ptr, 100, 1, 1, flags) }; + let after = counts_snapshot(); + assert_eq!(after[DISPATCHES], before[DISPATCHES]); + assert!(after[DISPATCHES_SKIPPED] > before[DISPATCHES_SKIPPED]); + } + assert_eq!(fake.dispatch_calls.load(Ordering::Relaxed), 0); + assert_eq!(fake.set_compute_rs_calls.load(Ordering::Relaxed), 0); + assert_eq!(fake.set_compute_uav_calls.load(Ordering::Relaxed), 0); + assert_eq!(fake.set_pso_calls.load(Ordering::Relaxed), 0); + forget(list_ptr); + } + + /// On the GPU: the groups `dispatch_groups` gives, launched with a synthetic HLSL shader of + /// the same numthreads, run every wanted thread exactly once and launch no more lanes than + /// whole groups; the buffer holds a counter and one slot per wanted thread (in-range writes only). + #[test] + fn verify2610_gpu_whole_groups_cover_threads() { + use crate::gpu::recomp::{dxc, runner}; + let adapter = match runner::adapter() { + Ok(a) => a, + Err(_) => return runner::skip_test("no GPU"), + }; + if dxc::location().is_err() { + return runner::skip_test("no DXC"); + } + eprintln!("verify2610 adapter: {adapter}"); + if let Ok(want) = std::env::var("XCL_VERIFY_ADAPTER") { + assert!(adapter.contains(&want), "adapter {adapter} is not {want}"); + } + let cases: [([u32; 3], [u32; 3], u32); 7] = [ + ([64, 1, 1], [640, 1, 1], 0x20), + ([64, 1, 1], [100, 1, 1], 0x20), + ([64, 1, 1], [45, 1, 1], 0x20), + ([64, 1, 1], [1, 1, 1], 0x8020), + ([8, 8, 1], [20, 16, 3], 0x20), + ([4, 4, 4], [9, 5, 7], 0x8020), + ([64, 1, 1], [65_535 * 64, 1, 1], 0x20), + ]; + for (i, (sh, dims, flags)) in cases.into_iter().enumerate() { + let pso = 0x7330_0000usize + i; + real::register_threads_for_test(pso, sh); + let (groups, _) = dispatch_groups(pso, dims, flags).unwrap(); + let src = format!( + "RWByteAddressBuffer io : register(u0);\nRWByteAddressBuffer mem : register(u2);\n\ + [numthreads({}, {}, {})]\nvoid main(uint3 t : SV_DispatchThreadID) {{\n\ + uint3 lim = uint3(io.Load(0), io.Load(4), io.Load(8));\n\ + uint o; mem.InterlockedAdd(0, 1, o);\n\ + if (all(t < lim)) {{ uint idx = (t.z * lim.y + t.y) * lim.x + t.x; mem.InterlockedAdd(16 + idx * 4, 1, o); }}\n}}\n", + sh[0], sh[1], sh[2] + ); + let dxil = dxc::compile(&src, "main", "cs_6_6", &[]).unwrap_or_else(|e| panic!("{e}")); + let wanted = (dims[0] * dims[1] * dims[2]) as usize; + let mem = vec![0u32; 4 + wanted]; + let out = runner::dispatch(&dxil, groups, &dims, &mem).unwrap_or_else(|e| panic!("{sh:?} {dims:?}: {e}")); + let lanes = groups.iter().map(|&g| g as u64).product::<u64>() * sh.iter().map(|&t| t as u64).product::<u64>(); + let once = out[4..4 + wanted].iter().filter(|&&v| v == 1).count(); + eprintln!("verify2610 {sh:?} {dims:?} flags {flags:#x}: groups {groups:?}, lanes run {} (expected {lanes}), wanted threads run once {once}/{wanted}", out[0]); + assert_eq!(out[0] as u64, lanes); + assert_eq!(once, wanted); + // main's launch (the counts as groups) for comparison, where it is a valid dispatch + if dims.iter().all(|&d| d <= 65_535) && i < 6 { + let out = runner::dispatch(&dxil, dims, &dims, &mem).unwrap(); + let lanes_main = dims.iter().map(|&g| g as u64).product::<u64>() * sh.iter().map(|&t| t as u64).product::<u64>(); + eprintln!("verify2610 counts as groups (main): groups {dims:?}, lanes run {} (expected {lanes_main})", out[0]); + assert_eq!(out[0] as u64, lanes_main); + } + } + } + #[test] fn async_compute_pso_success_and_failure_in_dispatch_and_execute_indirect() { let mut orig_vt = [0usize; 64]; ``` </details> **AI use:** Claude Code (Claude Opus 5.5), coordinated by Codex (gpt-6.2-sol), ran these tests, wrote the temporary checks and wrote this report. The results come from the runs above on this machine.
itsSio commented 2026-11-26 04:07:45 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by itsSio on 2026-11-26T03:57:46Z.


Independent dual-PC NVIDIA full-workspace test report on clean head a3e820d8e86fcbd8322fee8e519f4b6593b076ce.

Tested

  • Machine 1: NVIDIA GeForce RTX 5080 (driver 32.0.16.1088), AMD Ryzen 7 9800X3D, 32 GB RAM, Windows 11 Pro build 26200, rustc 1.97.0 (stable-x86_64-pc-windows-msvc), DXC 1.9.2609.5, debug build (XCL_ADAPTER=NVIDIA)
    • cargo build --workspace: exit 0
    • cargo test --workspace --no-fail-fast -- --test-threads=4 --nocapture: 1430 passed, 0 failed, 47 ignored (bind::tests::dispatch_x_with_thread_dimensions_launches_whole_groups passed)
    • SKIPPED: 26 (wave64-only GPU tests, #1426 wave32 f16/cvt refusals, heap_window_out_of_memory_falls_back_to_the_switch_form, pso_measurement_compiles_an_exact_synthetic_record)
  • Machine 2: NVIDIA GeForce RTX 2080 SUPER (driver 32.0.16.1088), AMD Ryzen 5 5600X, 16 GB RAM, Windows 11 Pro build 26200, rustc 1.99.1 (stable-x86_64-pc-windows-msvc), Windows SDK 10.0.26100 DXC 1.8.2502.11, debug build (XCL_ADAPTER=NVIDIA)
    • cargo build --workspace: exit 0
    • cargo test --workspace --no-fail-fast -- --test-threads=4 --nocapture: 1430 passed, 0 failed, 47 ignored (bind::tests::dispatch_x_with_thread_dimensions_launches_whole_groups passed)
    • SKIPPED: 29 (same 26 as Machine 1 plus 3 requiring d3d12SDKLayers.dll)

Not tested

  • Retail title / scripts/smoke.ps1 runs
  • Release builds (--release)
  • AMD / Intel GPUs, native wave64, Linux / Wine / vkd3d-proton

AI use
Ran via Samaritan:

  • Google Antigravity CLI (Claude Opus 5.5 (High)): built the branch and ran the workspace test suite on both NVIDIA machines.
  • Google Antigravity CLI (Gemini 4 Neon (High)): coordinated the runs and wrote this test report.
<!-- greyfinch-sync:ivall/xcl:comment:7182173407 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2610#issuecomment-7182173407). Originally posted by [itsSio](https://github.com/itsSio) on 2026-11-26T03:57:46Z. --- Independent dual-PC NVIDIA full-workspace test report on clean head `a3e820d8e86fcbd8322fee8e519f4b6593b076ce`. **Tested** - **Machine 1:** NVIDIA GeForce RTX 5080 (driver `32.0.16.1088`), AMD Ryzen 7 9800X3D, 32 GB RAM, Windows 11 Pro build 26200, `rustc 1.97.0` (`stable-x86_64-pc-windows-msvc`), DXC `1.9.2609.5`, debug build (`XCL_ADAPTER=NVIDIA`) - `cargo build --workspace`: exit 0 - `cargo test --workspace --no-fail-fast -- --test-threads=4 --nocapture`: **1430 passed, 0 failed, 47 ignored** (`bind::tests::dispatch_x_with_thread_dimensions_launches_whole_groups` passed) - `SKIPPED`: 26 (wave64-only GPU tests, `#1426` wave32 f16/cvt refusals, `heap_window_out_of_memory_falls_back_to_the_switch_form`, `pso_measurement_compiles_an_exact_synthetic_record`) - **Machine 2:** NVIDIA GeForce RTX 2080 SUPER (driver `32.0.16.1088`), AMD Ryzen 5 5600X, 16 GB RAM, Windows 11 Pro build 26200, `rustc 1.99.1` (`stable-x86_64-pc-windows-msvc`), Windows SDK 10.0.26100 DXC `1.8.2502.11`, debug build (`XCL_ADAPTER=NVIDIA`) - `cargo build --workspace`: exit 0 - `cargo test --workspace --no-fail-fast -- --test-threads=4 --nocapture`: **1430 passed, 0 failed, 47 ignored** (`bind::tests::dispatch_x_with_thread_dimensions_launches_whole_groups` passed) - `SKIPPED`: 29 (same 26 as Machine 1 plus 3 requiring `d3d12SDKLayers.dll`) **Not tested** - Retail title / `scripts/smoke.ps1` runs - Release builds (`--release`) - AMD / Intel GPUs, native wave64, Linux / Wine / vkd3d-proton **AI use** Ran via Samaritan: - Google Antigravity CLI (Claude Opus 5.5 (High)): built the branch and ran the workspace test suite on both NVIDIA machines. - Google Antigravity CLI (Gemini 4 Neon (High)): coordinated the runs and wrote this test report.
pickles976 commented 2026-11-26 05:05:43 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by pickles976 on 2026-11-26T05:00:54Z.


Wine cross-check of the new test — passes; scope is the group arithmetic, not GPU execution. Head a3e820d8e86fcbd8322fee8e519f4b6593b076ce, RTX 4060 Laptop GPU host, Wine 11.0, NVIDIA 590.48.1, --locked --target x86_64-pc-windows-msvc, one test thread, fresh Compiling xcl .../xcl-pr2610/... provenance.

dispatch_x_with_thread_dimensions_launches_whole_groups — 1/1 pass (0.00 s). The fixture is the CPU-side dispatch_groups table (bind.rs), so the pass cross-checks the math under the Windows target on this host, including the 2-D shape [8,8,1] → [20,16,3] → 3×2×3 case, the wave32 bit changing nothing, and the unknown-shape skip. No GPU dispatch was executed here — the retail-title relevance of this fix (BVH rehydration overruns at world start) remains the author's Windows observation; I have not run the title.

This PR is on the world-entry chain for this machine's goal (the #2140 failfast class: retail title, world start), so I'll watch for the stacked EXEC-masking follow-up it mentions. Log: .compat-xcl/logs/verify-pr2610-wine-dispatchx-relaxed.log (local). AI-assisted verification and report (OpenAI Codex).

<!-- greyfinch-sync:ivall/xcl:comment:7183101541 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2610#issuecomment-7183101541). Originally posted by [pickles976](https://github.com/pickles976) on 2026-11-26T05:00:54Z. --- **Wine cross-check of the new test — passes; scope is the group arithmetic, not GPU execution.** Head `a3e820d8e86fcbd8322fee8e519f4b6593b076ce`, RTX 4060 Laptop GPU host, Wine 11.0, NVIDIA 590.48.1, `--locked --target x86_64-pc-windows-msvc`, one test thread, fresh `Compiling xcl .../xcl-pr2610/...` provenance. `dispatch_x_with_thread_dimensions_launches_whole_groups` — **1/1 pass** (0.00 s). The fixture is the CPU-side `dispatch_groups` table (`bind.rs`), so the pass cross-checks the math under the Windows target on this host, including the 2-D shape `[8,8,1]` → `[20,16,3]` → 3×2×3 case, the wave32 bit changing nothing, and the unknown-shape skip. **No GPU dispatch was executed here** — the retail-title relevance of this fix (BVH rehydration overruns at world start) remains the author's Windows observation; I have not run the title. This PR is on the world-entry chain for this machine's goal (the #2140 failfast class: retail title, world start), so I'll watch for the stacked EXEC-masking follow-up it mentions. Log: `.compat-xcl/logs/verify-pr2610-wine-dispatchx-relaxed.log` (local). AI-assisted verification and report (OpenAI Codex).
SlopTart commented 2026-11-26 06:06:43 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by SlopTart on 2026-11-26T05:29:54Z.


Tested: current PR head merged onto current origin/main (clean), Linux (Arch, kernel 7.2.15), Mesa 26.2.5 RADV, Radeon RX 7900 XT (NAVI31), cargo target x86_64-pc-windows-gnu run under wine-11.0 (Proton), rustc 1.94.0, vkd3d-proton 3.1 with the XCL patch, official MS DXC (binaries 2026-09-29).

gpu_ suite (cold cache): 165 passed / 3 failed, no crashes. The three are the known baseline on this lane (seed-1003 fuzz, mad/mac contraction, promoted-UAV-clear driver gap, PR #2490); none caused by this PR. This PR does not change the mad/mac red on RADV.
Targeted run of dispatch_x_with_thread_dimensions_launches_whole_groups: passed.

Not tested: retail titles (no title data on this lane, counts only).

AI use: Hermes agent (local Qwen-class) ran both machines and drafted this; I checked it before posting.

<!-- greyfinch-sync:ivall/xcl:comment:7183538427 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2610#issuecomment-7183538427). Originally posted by [SlopTart](https://github.com/SlopTart) on 2026-11-26T05:29:54Z. --- **Tested**: current PR head merged onto current `origin/main` (clean), Linux (Arch, kernel 7.2.15), Mesa 26.2.5 RADV, Radeon RX 7900 XT (NAVI31), cargo target `x86_64-pc-windows-gnu` run under wine-11.0 (Proton), rustc 1.94.0, vkd3d-proton 3.1 with the XCL patch, official MS DXC (binaries 2026-09-29). `gpu_` suite (cold cache): 165 passed / 3 failed, no crashes. The three are the known baseline on this lane (seed-1003 fuzz, mad/mac contraction, promoted-UAV-clear driver gap, PR #2490); none caused by this PR. This PR does not change the mad/mac red on RADV. Targeted run of `dispatch_x_with_thread_dimensions_launches_whole_groups`: passed. **Not tested**: retail titles (no title data on this lane, counts only). **AI use**: Hermes agent (local Qwen-class) ran both machines and drafted this; I checked it before posting.
DavidM1911 commented 2026-11-26 09:07:41 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by DavidM1911 on 2026-11-26T08:29:12Z.


Re-verification on RTX 3060 Ti (Windows 11), new head merged with current main:

  • cargo test -p xcl --lib: all passed, 0 failed, 27 ignored. The earlier merge conflict is resolved.

Thanks!

— Devin

<!-- greyfinch-sync:ivall/xcl:comment:7186651778 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2610#issuecomment-7186651778). Originally posted by [DavidM1911](https://github.com/DavidM1911) on 2026-11-26T08:29:12Z. --- Re-verification on RTX 3060 Ti (Windows 11), new head merged with current `main`: - `cargo test -p xcl --lib`: all passed, 0 failed, 27 ignored. The earlier merge conflict is resolved. Thanks! — Devin
jennydeth commented 2026-11-26 16:06:16 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by jennydeth on 2026-11-26T15:25:14Z.


Windows / NVIDIA results for a3e820d with the retail title (1.0.2.1) on an RTX 3060 12 GB. The title reaches the new path.

Regression run (default settings, 600 s)

main b49be18:

xcl-smoke v1
commit: b49be1836844fe0b0cdb3211dce3cb7fb4e21ac7
gpu: NVIDIA GeForce RTX 3060
title: 9cc6a39e
seconds: 600
exit: 0x0
frames shown: 2047 (PresentX 2047)
presents per 2 s (last 3): 0 0 0
device removals: 0
crashes: 0
peak commit: 35859 MB

This PR, a3e820d:

xcl-smoke v1
commit: a3e820d8e86fcbd8322fee8e519f4b6593b076ce
gpu: NVIDIA GeForce RTX 3060
title: 9cc6a39e
seconds: 600
exit: 0x0
frames shown: 2017 (PresentX 2017)
presents per 2 s (last 3): 0 0 0
device removals: 0
crashes: 0
peak commit: 35304 MB
  • This PR has 2,017 frames against main's 2,047 (99 %) and peak commit of 35,304 MB against 35,859 MB (98 %), with no removal and no crash in either. Neither run reaches the world: presents stop at 100.3 s on main and at 96.1 s with this PR, while big compute programs are still compiling.

  • The new line came twice in each run of this PR, first at 95.8 s in the 600 s run and at 109.2 s in the direct DXIL run:

    • DispatchX with flags 0x8020: 1x1x1 launched as 1x1x1 groups (thread limits [1, 0, 0])
    • DispatchX with flags 0x20: 45x1x1 launched as 1x1x1 groups (thread limits [45, 0, 0])

    So this title sends a 45-thread DispatchX that main launched as 45 groups. As I read the diff, nothing reads IO_THREAD_LIMIT yet, so lanes 45 and up of that one group still run. The PR says this, and the masking is its second PR, so it is not a regression.

  • Direct DXIL (XCL_DIRECT_DXIL=1 XCL_HEAP_WINDOWS=1 XCL_DRED=1, warm caches, 900 s): the device was lost (0x887a0005, #2403) at 238.0 s, last present at 218.5 s, with the same DRED line as on main (page fault at GPU VA 0x0; allocations there: []; recently freed: []). Three b49be18 runs today with the same switches lost it at 110.6, 211.2 and 216.0 s, so one run can't tell this PR apart from main there.

Tested

  • NVIDIA GeForce RTX 3060 12 GB, driver 32.0.16.2101 (32-lane waves only); Ryzen 5 5600X; 32 GB RAM; Windows 11 Pro 10.0.26300.9974; Rust 1.100.0 (stable-x86_64-pc-windows-msvc); release; DXC 1.9.2609.5.
  • cargo test --workspace --release --no-fail-fast -- --test-threads=4 on a3e820d: 1430 passed, 0 failed, 47 ignored. SKIPPED (29): 21 × no wave64; 3 × per-lane form refused; 3 × no D3D12 debug layer / d3d12SDKLayers.dll; 1 × no heap windows; 1 × pso_measurement_compiles_an_exact_synthetic_record (cannot disable the driver cache).
  • Retail title 1.0.2.1, scripts/smoke.ps1 -Game <folder> (XCL_NETWORK=0), the same scripted pad presses into the story load in every run; XCL_FRAME_DUMP=300 in the pair, 100 in the direct DXIL runs. Every run was of a copy named xcl-noprofile.exe: this machine has #2590's 1 GiB shader-heap profile on xcl.exe, and a copy under another name does not match it.

Not tested: what the 45-thread dispatch computes, before or after (no readback); AMD / wave64.

AI use: Claude Code (Claude Opus 5.5) built the commit, ran the suite and the runs on my machine, read the logs and wrote this.

<!-- greyfinch-sync:ivall/xcl:comment:7196241140 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2610#issuecomment-7196241140). Originally posted by [jennydeth](https://github.com/jennydeth) on 2026-11-26T15:25:14Z. --- Windows / NVIDIA results for `a3e820d` with the retail title (1.0.2.1) on an RTX 3060 12 GB. The title reaches the new path. **Regression run** (default settings, 600 s) `main` `b49be18`: ``` xcl-smoke v1 commit: b49be1836844fe0b0cdb3211dce3cb7fb4e21ac7 gpu: NVIDIA GeForce RTX 3060 title: 9cc6a39e seconds: 600 exit: 0x0 frames shown: 2047 (PresentX 2047) presents per 2 s (last 3): 0 0 0 device removals: 0 crashes: 0 peak commit: 35859 MB ``` This PR, `a3e820d`: ``` xcl-smoke v1 commit: a3e820d8e86fcbd8322fee8e519f4b6593b076ce gpu: NVIDIA GeForce RTX 3060 title: 9cc6a39e seconds: 600 exit: 0x0 frames shown: 2017 (PresentX 2017) presents per 2 s (last 3): 0 0 0 device removals: 0 crashes: 0 peak commit: 35304 MB ``` - This PR has 2,017 frames against `main`'s 2,047 (99 %) and peak commit of 35,304 MB against 35,859 MB (98 %), with no removal and no crash in either. Neither run reaches the world: presents stop at 100.3 s on `main` and at 96.1 s with this PR, while big compute programs are still compiling. - **The new line** came twice in each run of this PR, first at 95.8 s in the 600 s run and at 109.2 s in the direct DXIL run: - `DispatchX with flags 0x8020: 1x1x1 launched as 1x1x1 groups (thread limits [1, 0, 0])` - `DispatchX with flags 0x20: 45x1x1 launched as 1x1x1 groups (thread limits [45, 0, 0])` So this title sends a 45-thread `DispatchX` that `main` launched as 45 groups. As I read the diff, nothing reads `IO_THREAD_LIMIT` yet, so lanes 45 and up of that one group still run. The PR says this, and the masking is its second PR, so it is not a regression. - **Direct DXIL** (`XCL_DIRECT_DXIL=1 XCL_HEAP_WINDOWS=1 XCL_DRED=1`, warm caches, 900 s): the device was lost (`0x887a0005`, #2403) at 238.0 s, last present at 218.5 s, with the same DRED line as on `main` (`page fault at GPU VA 0x0; allocations there: []; recently freed: []`). Three `b49be18` runs today with the same switches lost it at 110.6, 211.2 and 216.0 s, so one run can't tell this PR apart from `main` there. **Tested** - NVIDIA GeForce RTX 3060 12 GB, driver 32.0.16.2101 (32-lane waves only); Ryzen 5 5600X; 32 GB RAM; Windows 11 Pro 10.0.26300.9974; Rust 1.100.0 (`stable-x86_64-pc-windows-msvc`); release; DXC 1.9.2609.5. - `cargo test --workspace --release --no-fail-fast -- --test-threads=4` on `a3e820d`: **1430 passed, 0 failed, 47 ignored**. SKIPPED (29): 21 × no wave64; 3 × per-lane form refused; 3 × no D3D12 debug layer / `d3d12SDKLayers.dll`; 1 × no heap windows; 1 × `pso_measurement_compiles_an_exact_synthetic_record` (cannot disable the driver cache). - Retail title 1.0.2.1, `scripts/smoke.ps1 -Game <folder>` (`XCL_NETWORK=0`), the same scripted pad presses into the story load in every run; `XCL_FRAME_DUMP=300` in the pair, `100` in the direct DXIL runs. Every run was of a copy named `xcl-noprofile.exe`: this machine has #2590's 1 GiB shader-heap profile on `xcl.exe`, and a copy under another name does not match it. **Not tested:** what the 45-thread dispatch computes, before or after (no readback); AMD / wave64. AI use: Claude Code (Claude Opus 5.5) built the commit, ran the suite and the runs on my machine, read the logs and wrote this.
KDenKC commented 2026-11-26 16:06:19 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by KDenKC on 2026-11-26T15:43:38Z.


Thanks @jennydeth, that is the case this was written for, and your reading is right: with this PR alone the 45-thread DispatchX launches one group, and its lanes 45-63 still run. The masking is the follow-up, stacked on this PR, which we are about to open. It masks lanes outside the requested thread dimensions in a direct-DXIL entry, with GPU readback tests. In a 200 s run on our side, 2,999 of 3,009 thread-dimension DispatchX calls had a partial last group, on 4 pipelines.

AI use: Claude Code (Claude Opus 5.5) wrote this.

<!-- greyfinch-sync:ivall/xcl:comment:7196666609 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2610#issuecomment-7196666609). Originally posted by [KDenKC](https://github.com/KDenKC) on 2026-11-26T15:43:38Z. --- Thanks @jennydeth, that is the case this was written for, and your reading is right: with this PR alone the 45-thread `DispatchX` launches one group, and its lanes 45-63 still run. The masking is the follow-up, stacked on this PR, which we are about to open. It masks lanes outside the requested thread dimensions in a direct-DXIL entry, with GPU readback tests. In a 200 s run on our side, 2,999 of 3,009 thread-dimension `DispatchX` calls had a partial last group, on 4 pipelines. AI use: Claude Code (Claude Opus 5.5) wrote this.
GodlyBDS commented 2026-11-26 16:08:19 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by GodlyBDS on 2026-11-26T16:08:19Z.


Runtime path coverage on a different host and branch. I traced the current nvidia-dev base af2cecc40886a8682ecf3267f5328c6dc4b66ad7 with the local DRED/memory diagnostics and #2815. RTX 3090 Ti, NVIDIA 621.40, Windows 10 19045, Agility 620, release. The added logging records the flag and dimensions immediately before the unchanged XCL direct dispatch.

At 72.4 s the title made at least 2,048 calls with the 0x20 bit set. Samples include 0x8020 with 1×1×1 and 0x20 with 4×1×1, 29×1×1 and 65×1×1 on CS 80f65d1925a2df48. The GPU profiler identifies that program as 64×1×1 threads, split wave64. The recorded requests therefore exercise both partial groups and the boundary above one group. A second 64-thread program, be262edda389c646, received 4 and 5 in X.

Separate indirect signature logging also saw type 105 created. The compute shader associated with the older q0 hang used ordinary type 2 in the observed follow-up calls. These are independent observations. This run measures use of the existing direct flag path and carries no #2610 code or tail masking. OpenAI Codex (GPT-6 family) added and ran the trace.

<!-- greyfinch-sync:ivall/xcl:comment:7197232084 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2610#issuecomment-7197232084). Originally posted by [GodlyBDS](https://github.com/GodlyBDS) on 2026-11-26T16:08:19Z. --- Runtime path coverage on a different host and branch. I traced the current `nvidia-dev` base `af2cecc40886a8682ecf3267f5328c6dc4b66ad7` with the local DRED/memory diagnostics and #2815. RTX 3090 Ti, NVIDIA 621.40, Windows 10 19045, Agility 620, release. The added logging records the flag and dimensions immediately before the unchanged XCL direct dispatch. At 72.4 s the title made at least 2,048 calls with the `0x20` bit set. Samples include `0x8020` with 1×1×1 and `0x20` with 4×1×1, 29×1×1 and 65×1×1 on CS `80f65d1925a2df48`. The GPU profiler identifies that program as 64×1×1 threads, split wave64. The recorded requests therefore exercise both partial groups and the boundary above one group. A second 64-thread program, `be262edda389c646`, received 4 and 5 in X. Separate indirect signature logging also saw type 105 created. The compute shader associated with the older q0 hang used ordinary type 2 in the observed follow-up calls. These are independent observations. This run measures use of the existing direct flag path and carries no #2610 code or tail masking. OpenAI Codex (GPT-6 family) added and ran the trace.
Decodere commented 2026-11-27 00:18:21 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by Decodere on 2026-11-27T00:18:21Z.


Independent desktop NVIDIA verification of PR #2610 at head a3e820d8e86fcbd8322fee8e519f4b6593b076ce (1 commit; exact parent & merge-base: 08db8020d323bf478964fcc586152cce54959cfc, pre-#2555 ancestor of main).

Environment

  • GPU: NVIDIA GeForce RTX 4060 (8 GB / 7956 MiB reported by D3D12), driver 32.0.16.2114 (NVIDIA 621.14, WDDM 3.2)
  • CPU / RAM / OS: Intel Core i5-11400F (6C / 12T), 32 GB RAM (31.9 GiB usable), Windows 11 Home 26200 (Developer Mode off)
  • Toolchain: rustc 1.100.0 (0ef1bc386 2026-11-09) MSVC, DXC 1.9.2609.5, --release

Targeted release tests & build (a3e820d8)

Command Result
cargo test --release -p xcl --lib dispatch_x_with_thread_dimensions_launches_whole_groups -- --nocapture (3 consecutive runs) 1 passed; 0 failed; 0 ignored; 1331 filtered out × 3 (0.00s × 3)
cargo test --release -p xcl --lib hle::d3d12x::bind:: (3 consecutive runs) 9 passed; 0 failed; 0 ignored; 1323 filtered out × 3 (0.27s, 0.27s, 0.28s, 0 skipped)
cargo test --release -p xcl --lib hle::d3d12x::list_x:: -- --test-threads=1 (3 consecutive runs) 40 passed; 0 failed; 0 ignored; 1292 filtered out × 3 (1.17s, 1.14s, 1.15s, 0 skipped)
cargo test --release -p xcl --lib gpu::recomp::pso:: (3 consecutive runs) 24 passed; 0 failed; 1 ignored; 1307 filtered out × 3 (0.08s × 3)
cargo build --release -p xcl Clean build (1m 15s, exit 0, 0 new warnings)

Paired quiet 60 s retail smoke (title: 29640639)

Exact parent & merge-base (08db8020d323bf478964fcc586152cce54959cfc, cached baseline on the same machine):

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

PR #2610 (a3e820d8e86fcbd8322fee8e519f4b6593b076ce):

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

Runtime log observations (xcl.log)

  • 9221 log lines, 0 [ERROR] / device-removal / panic lines.
  • Final draw/memory telemetry in log: 19717 draws with translated pipelines (0 skipped, 0 with PC pipelines), 1024 dispatches (0 skipped); last memory sample 14022 MB committed by the process; video memory 6116 MB local, 4681 MB non-local.
  • 0 flagged USE_THREAD_DIMENSIONS DispatchX or skipped-unknown-shape lines logged during the 60 s retail smoke on title: 29640639.

Limits of coverage

  • Thread-dimension DispatchX whole-group ceiling (USE_THREAD_DIMENSIONS 0x20/0x8020), unknown-group-shape skip, and IO_THREAD_LIMIT propagation were verified via dispatch_x_with_thread_dimensions_launches_whole_groups (3/3), hle::d3d12x::bind:: (9/9 × 3), hle::d3d12x::list_x:: (40/40 × 3), and gpu::recomp::pso:: (24/0/1 × 3).
  • title: 29640639 did not issue flagged USE_THREAD_DIMENSIONS DispatchX calls in 60 s, so the retail smoke confirms zero regression on standard compute dispatches (1024 dispatches, 0 skipped; frame-count and commit deltas vs. cached parent reflect single-run startup variance, not this PR).

AI disclosure: test execution and report drafting assisted by Google Antigravity (Gemini 4 Neon).

<!-- greyfinch-sync:ivall/xcl:comment:7206349479 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2610#issuecomment-7206349479). Originally posted by [Decodere](https://github.com/Decodere) on 2026-11-27T00:18:21Z. --- Independent desktop NVIDIA verification of **PR #2610** at head `a3e820d8e86fcbd8322fee8e519f4b6593b076ce` (`1` commit; exact parent & merge-base: `08db8020d323bf478964fcc586152cce54959cfc`, pre-`#2555` ancestor of `main`). ### Environment - **GPU:** NVIDIA GeForce RTX 4060 (8 GB / `7956 MiB` reported by D3D12), driver `32.0.16.2114` (NVIDIA `621.14`, WDDM 3.2) - **CPU / RAM / OS:** Intel Core i5-11400F (6C / 12T), 32 GB RAM (`31.9 GiB` usable), Windows 11 Home `26200` (Developer Mode off) - **Toolchain:** `rustc 1.100.0 (0ef1bc386 2026-11-09)` MSVC, DXC `1.9.2609.5`, `--release` ### Targeted release tests & build (`a3e820d8`) | Command | Result | | --- | --- | | `cargo test --release -p xcl --lib dispatch_x_with_thread_dimensions_launches_whole_groups -- --nocapture` (3 consecutive runs) | `1 passed; 0 failed; 0 ignored; 1331 filtered out` × 3 (`0.00s` × 3) | | `cargo test --release -p xcl --lib hle::d3d12x::bind::` (3 consecutive runs) | `9 passed; 0 failed; 0 ignored; 1323 filtered out` × 3 (`0.27s`, `0.27s`, `0.28s`, `0` skipped) | | `cargo test --release -p xcl --lib hle::d3d12x::list_x:: -- --test-threads=1` (3 consecutive runs) | `40 passed; 0 failed; 0 ignored; 1292 filtered out` × 3 (`1.17s`, `1.14s`, `1.15s`, `0` skipped) | | `cargo test --release -p xcl --lib gpu::recomp::pso::` (3 consecutive runs) | `24 passed; 0 failed; 1 ignored; 1307 filtered out` × 3 (`0.08s` × 3) | | `cargo build --release -p xcl` | Clean build (`1m 15s`, exit `0`, `0` new warnings) | ### Paired quiet 60 s retail smoke (`title: 29640639`) Exact parent & merge-base (`08db8020d323bf478964fcc586152cce54959cfc`, cached baseline on the same machine): ``` xcl-smoke v1 commit: 08db8020d323bf478964fcc586152cce54959cfc gpu: NVIDIA GeForce RTX 4060 title: 29640639 seconds: 60 exit: 0x0 frames shown: 1588 (PresentX 1588) presents per 2 s (last 3): 60 60 60 device removals: 0 crashes: 0 peak commit: 14000 MB ``` PR #2610 (`a3e820d8e86fcbd8322fee8e519f4b6593b076ce`): ``` xcl-smoke v1 commit: a3e820d8e86fcbd8322fee8e519f4b6593b076ce gpu: NVIDIA GeForce RTX 4060 title: 29640639 seconds: 60 exit: 0x0 frames shown: 1617 (PresentX 1617) presents per 2 s (last 3): 60 60 60 device removals: 0 crashes: 0 peak commit: 14022 MB ``` ### Runtime log observations (`xcl.log`) - `9221` log lines, `0` `[ERROR]` / device-removal / panic lines. - Final draw/memory telemetry in log: `19717 draws with translated pipelines (0 skipped, 0 with PC pipelines), 1024 dispatches (0 skipped)`; last memory sample `14022 MB committed by the process; video memory 6116 MB local, 4681 MB non-local`. - `0` flagged `USE_THREAD_DIMENSIONS` `DispatchX` or skipped-unknown-shape lines logged during the 60 s retail smoke on `title: 29640639`. ### Limits of coverage - Thread-dimension `DispatchX` whole-group ceiling (`USE_THREAD_DIMENSIONS` `0x20`/`0x8020`), unknown-group-shape skip, and `IO_THREAD_LIMIT` propagation were verified via `dispatch_x_with_thread_dimensions_launches_whole_groups` (`3/3`), `hle::d3d12x::bind::` (`9/9` × 3), `hle::d3d12x::list_x::` (`40/40` × 3), and `gpu::recomp::pso::` (`24/0/1` × 3). - `title: 29640639` did not issue flagged `USE_THREAD_DIMENSIONS` `DispatchX` calls in 60 s, so the retail smoke confirms zero regression on standard compute dispatches (`1024` dispatches, `0` skipped; frame-count and commit deltas vs. cached parent reflect single-run startup variance, not this PR). *AI disclosure: test execution and report drafting assisted by Google Antigravity (Gemini 4 Neon).*
KDenKC commented 2026-11-27 12:22:31 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by KDenKC on 2026-11-27T12:22:31Z.


@jennydeth, the masking follow-up is up as #3015 (stacked on this PR). It adds an opt-in compute entry that ANDs EXEC with the DispatchX thread bounds, so lanes 45-63 of your 45-thread group stop executing. The ordinary entry stays byte-identical. It isn't selected at runtime yet; that's the next PR in the series. On AMD with native wave64, dispatchx_native_wave64_masks_excess_lanes is the test that covers your case (the command is in #3015).

AI use: Claude Code (Claude Opus 5.5).

<!-- greyfinch-sync:ivall/xcl:comment:7218166976 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2610#issuecomment-7218166976). Originally posted by [KDenKC](https://github.com/KDenKC) on 2026-11-27T12:22:31Z. --- @jennydeth, the masking follow-up is up as #3015 (stacked on this PR). It adds an opt-in compute entry that ANDs EXEC with the `DispatchX` thread bounds, so lanes 45-63 of your 45-thread group stop executing. The ordinary entry stays byte-identical. It isn't selected at runtime yet; that's the next PR in the series. On AMD with native wave64, `dispatchx_native_wave64_masks_excess_lanes` is the test that covers your case (the command is in #3015). AI use: Claude Code (Claude Opus 5.5).
minimalhipster990 commented 2026-11-27 20:05:11 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by minimalhipster990 on 2026-11-27T20:05:11Z.


The RTX 4090 baseline capture connects the extra groups to a specific consumer in the retail scene. Two Box32Rehydration dispatches requesting 2,841 and 927 threads wrote the same DWORD of a live skinning input page. Group 206 lane 29 wrote ffffffff over 1, then group 161 lane 34 wrote 0. The required group counts were 45 and 15. Both writers would be excluded by the group-count conversion alone.

The output VA came from root parameter 2. The first root constant, node index and store immediate reproduce the same byte offset (+0x25ff00) independently for both stores. A second replay verified the root arguments on the CPU and GPU after the BVH moved. This is baseline evidence for the failure addressed here. Testing the resulting image on the PR stack remains open. RTX 4090 report and capture details

AI assistance: OpenAI Codex instrumented the local HLSL replay and checked the readbacks.

<!-- greyfinch-sync:ivall/xcl:comment:7227160276 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2610#issuecomment-7227160276). Originally posted by [minimalhipster990](https://github.com/minimalhipster990) on 2026-11-27T20:05:11Z. --- The RTX 4090 baseline capture connects the extra groups to a specific consumer in the retail scene. Two Box32Rehydration dispatches requesting 2,841 and 927 threads wrote the same DWORD of a live skinning input page. Group 206 lane 29 wrote `ffffffff` over 1, then group 161 lane 34 wrote 0. The required group counts were 45 and 15. Both writers would be excluded by the group-count conversion alone. The output VA came from root parameter 2. The first root constant, node index and store immediate reproduce the same byte offset (`+0x25ff00`) independently for both stores. A second replay verified the root arguments on the CPU and GPU after the BVH moved. This is baseline evidence for the failure addressed here. Testing the resulting image on the PR stack remains open. [RTX 4090 report and capture details](https://github.com/xcl-dev/xcl/issues/42#issuecomment-7196227194) AI assistance: OpenAI Codex instrumented the local HLSL replay and checked the readbacks.
KDenKC commented 2026-11-27 20:08:41 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by KDenKC on 2026-11-27T20:08:41Z.


@minimalhipster990, that's the missing link: a live page the extra groups overwrite. Added to the description. The lanes past the requested extent inside the last, partial group are the follow-ups: #3015 (masked compute entry) and #3066 (selecting it for partial groups on workers). In the retail title, both DispatchX kinds we saw take that path. If your capture can be replayed on the stack (#2610 → #3015 → #3066), whether that skinning page stays intact would be the image-level check that's still open.

AI use: Claude Code (Claude Opus 5.5).

<!-- greyfinch-sync:ivall/xcl:comment:7227217378 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2610#issuecomment-7227217378). Originally posted by [KDenKC](https://github.com/KDenKC) on 2026-11-27T20:08:41Z. --- @minimalhipster990, that's the missing link: a live page the extra groups overwrite. Added to the description. The lanes past the requested extent inside the last, partial group are the follow-ups: #3015 (masked compute entry) and #3066 (selecting it for partial groups on workers). In the retail title, both `DispatchX` kinds we saw take that path. If your capture can be replayed on the stack (#2610 → #3015 → #3066), whether that skinning page stays intact would be the image-level check that's still open. AI use: Claude Code (Claude Opus 5.5).
minimalhipster990 commented 2026-11-27 20:33:11 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by minimalhipster990 on 2026-11-27T20:33:11Z.


@KDenKC I replayed the cell checkpoint on the RTX 4090 with the group-count change from a3e820d8 ported into our instrumented 782fde74 lab. View pool and page budget were both 1024 MiB.

The two Box32 sections launched 45 and 15 groups. On the exact 128 KiB of source data previously overwritten, the selector stayed 1 from upload through skinning. Of 9,470 valid command-boundary samples, the only zero preceded the upload. At dispatch 4906 the direct resource before and after, the shader heap view and the CPU source matched byte for byte. The three monitored lanes actually read 1 at guest PC 0x1df8 and stored finite positions for 1856, 1857 and 1897. Guest addresses relocated between runs.

I also matched the original eight face triangles by all 128 primitive indices and vertex attributes. Their median edge-length ratio to their neighbors was 86.84 in the deformed baseline draw, and 1.04–1.15 across 71 matching draws with #2610. A separate close-up still shows a triangular protrusion below the ear in both the base-color buffer and the presented image. Its producing draw remains open.

For the post-fade courtyard view I matched a baseline and a corrected present with one active page pair in both. Across 53 image correspondences the median registration residual was 1.49 pixels at 2560×1440. The foreground head that was mostly missing in base color has a continuous silhouette in the corrected shot.

This answers the #2610-only question on the HLSL capture. The direct-DXIL stack test you asked for remains open. It needs the same page readbacks with the #3066 worker-selected masked pipeline active, including the partial last group.

AI assistance: OpenAI Codex adapted the instrumentation, ran the replays and checked the readbacks.

<!-- greyfinch-sync:ivall/xcl:comment:7227614961 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2610#issuecomment-7227614961). Originally posted by [minimalhipster990](https://github.com/minimalhipster990) on 2026-11-27T20:33:11Z. --- @KDenKC I replayed the cell checkpoint on the RTX 4090 with the group-count change from `a3e820d8` ported into our instrumented `782fde74` lab. View pool and page budget were both 1024 MiB. The two Box32 sections launched 45 and 15 groups. On the exact 128 KiB of source data previously overwritten, the selector stayed **1** from upload through skinning. Of 9,470 valid command-boundary samples, the only zero preceded the upload. At dispatch 4906 the direct resource before and after, the shader heap view and the CPU source matched byte for byte. The three monitored lanes actually read 1 at guest PC `0x1df8` and stored finite positions for 1856, 1857 and 1897. Guest addresses relocated between runs. I also matched the original eight face triangles by all 128 primitive indices and vertex attributes. Their median edge-length ratio to their neighbors was 86.84 in the deformed baseline draw, and 1.04–1.15 across 71 matching draws with #2610. A separate close-up still shows a triangular protrusion below the ear in both the base-color buffer and the presented image. Its producing draw remains open. For the post-fade courtyard view I matched a baseline and a corrected present with one active page pair in both. Across 53 image correspondences the median registration residual was 1.49 pixels at 2560×1440. The foreground head that was mostly missing in base color has a continuous silhouette in the corrected shot. This answers the #2610-only question on the HLSL capture. The direct-DXIL stack test you asked for remains open. It needs the same page readbacks with the #3066 worker-selected masked pipeline active, including the partial last group. AI assistance: OpenAI Codex adapted the instrumentation, ran the replays and checked the readbacks.
KDenKC commented 2026-11-27 20:40:11 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by KDenKC on 2026-11-27T20:40:11Z.


@minimalhipster990, thank you. That's the image-level answer for this PR: the deformed face triangles are back to normal proportions and the silhouette is continuous. Added to the description. For the #3066 stack check, the partial last groups we saw in the title were the 0x20 calls (45 threads, 1 group, limits [45,0,0]) and 0x8020 (1×1×1, limits [1,0,0]). Those are the dispatches whose excess lanes the masked pipeline should leave unwritten, if you can read back their pages the same way.

AI use: Claude Code (Claude Opus 5.5).

<!-- greyfinch-sync:ivall/xcl:comment:7227726985 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2610#issuecomment-7227726985). Originally posted by [KDenKC](https://github.com/KDenKC) on 2026-11-27T20:40:11Z. --- @minimalhipster990, thank you. That's the image-level answer for this PR: the deformed face triangles are back to normal proportions and the silhouette is continuous. Added to the description. For the #3066 stack check, the partial last groups we saw in the title were the `0x20` calls (45 threads, 1 group, limits `[45,0,0]`) and `0x8020` (1×1×1, limits `[1,0,0]`). Those are the dispatches whose excess lanes the masked pipeline should leave unwritten, if you can read back their pages the same way. AI use: Claude Code (Claude Opus 5.5).
minimalhipster990 commented 2026-11-27 20:48:31 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by minimalhipster990 on 2026-11-27T20:48:31Z.


@KDenKC I replayed the same RTX 4090 cell checkpoint with the 1 GiB view pool and page budget. Both partial Box32Rehydration dispatches selected the same worker-built direct-DXIL PSO. The skinning input kept its selector.

Frame 1766, command Threads Groups × 64 Last group, EXEC[63:0]
2724 2,841 45 00000000_01ffffff (25 active)
2737 927 15 00000000_7fffffff (31 active)

The capture wrote the computed EXEC words to a side UAV at masked shader entry. All 64 threads in each penultimate group reported full EXEC. Both hardware halves agreed on the last-group masks. Readbacks completed on the fence for the list that issued both dispatches. A second pair at frame 1802 reproduced both masks.

The upload set the selector to 1. The GPU read 1 immediately before and after each Box32 dispatch. At skinning command 4886, frame 1767, the direct resource before and after and the shader heap view matched all 128 KiB of the original source (SHA-256 bd1d8ae80f7649662d3959d7d652e58786a43cd11917f72162b321afa593a512). Vertices 1856, 1857 and 1897 each read 1 at 0x1df8 and the corresponding packed words at 0x1e20 matched the source.

For reproducibility, this was the instrumented checkpoint host with #2610’s group conversion. For partial Box32 it called the #3066 worker, selector and #3015 compiler from d8a1f5f1; the host created the native PSO with its capture root signature. Skinning used the existing HLSL probe. The #2610-only replay already preserved this page, so the additional evidence here is the measured final-group EXEC on the live dispatches. This capture verifies the skinning reads; the final vertex-store probe did not return positions for command 4886.

AI assistance: OpenAI Codex integrated the capture probes, ran the replay and checked the fenced GPU readbacks.

<!-- greyfinch-sync:ivall/xcl:comment:7227859589 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2610#issuecomment-7227859589). Originally posted by [minimalhipster990](https://github.com/minimalhipster990) on 2026-11-27T20:48:31Z. --- @KDenKC I replayed the same RTX 4090 cell checkpoint with the 1 GiB view pool and page budget. Both partial Box32Rehydration dispatches selected the same worker-built direct-DXIL PSO. The skinning input kept its selector. | Frame 1766, command | Threads | Groups × 64 | Last group, EXEC[63:0] | | --- | ---: | ---: | --- | | 2724 | 2,841 | 45 | `00000000_01ffffff` (25 active) | | 2737 | 927 | 15 | `00000000_7fffffff` (31 active) | The capture wrote the computed EXEC words to a side UAV at masked shader entry. All 64 threads in each penultimate group reported full EXEC. Both hardware halves agreed on the last-group masks. Readbacks completed on the fence for the list that issued both dispatches. A second pair at frame 1802 reproduced both masks. The upload set the selector to 1. The GPU read 1 immediately before and after **each** Box32 dispatch. At skinning command **4886**, frame **1767**, the direct resource before and after and the shader heap view matched all 128 KiB of the original source (SHA-256 `bd1d8ae80f7649662d3959d7d652e58786a43cd11917f72162b321afa593a512`). Vertices 1856, 1857 and 1897 each read 1 at `0x1df8` and the corresponding packed words at `0x1e20` matched the source. For reproducibility, this was the instrumented checkpoint host with #2610’s group conversion. For partial Box32 it called the #3066 worker, selector and #3015 compiler from `d8a1f5f1`; the host created the native PSO with its capture root signature. Skinning used the existing HLSL probe. The #2610-only replay already preserved this page, so the additional evidence here is the measured final-group EXEC on the live dispatches. This capture verifies the skinning reads; the final vertex-store probe did not return positions for command 4886. AI assistance: OpenAI Codex integrated the capture probes, ran the replay and checked the fenced GPU readbacks.
minimalhipster990 commented 2026-11-27 21:02:59 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by minimalhipster990 on 2026-11-27T21:02:59Z.


@KDenKC I closed the missing vertex-store measurement from the RTX 4090 cell replay. On the same checkpoint and 1 GiB budgets, dispatch 4983 (frame 1720) matched dispatch 4886 from the previous capture by all 128 KiB of input and the three vertex signatures. All three read selector 1. With s48=1 the shader executed 0x8108. The nine FP32 words written and read back from their destination addresses matched bit for bit.

Source vertex X Y Z
1856 0.001231 0.326001 0.594412
1857 -0.000607 0.326216 0.590960
1897 0.001231 0.326001 0.594412

A second replay ties the remaining visual artifact to a different part of the image. In the post-fade courtyard view, frame 1786 matched the previous camera on 123 points (1.45 px median error at 2560×1440). A thin triangle extends from the neckline into the background in both base color and the final present. For that frame we traced the three vertices from producer 35206 at 0x8108 to mesh draw 434. The mesh read exactly the nine finite words the shader wrote. The eight incident triangles project to x=960–968, y=608–630. The visible spike crosses x=1600 at about y=835, well outside them. Its producing draw is still unidentified.

As in the previous capture, partial Box32 dispatches used the worker-selected masked direct-DXIL variant from d8a1f5f1, and skinning used the instrumented HLSL path. These measurements confirm that the original vertices are finite while a separate visible defect persists.

AI assistance: OpenAI Codex instrumented the stores, ran the replays and checked the fenced readbacks and camera alignment.

<!-- greyfinch-sync:ivall/xcl:comment:7228084962 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2610#issuecomment-7228084962). Originally posted by [minimalhipster990](https://github.com/minimalhipster990) on 2026-11-27T21:02:59Z. --- @KDenKC I closed the missing vertex-store measurement from the RTX 4090 cell replay. On the same checkpoint and 1 GiB budgets, dispatch 4983 (frame 1720) matched dispatch 4886 from the previous capture by all 128 KiB of input and the three vertex signatures. All three read selector 1. With `s48=1` the shader executed `0x8108`. The nine FP32 words written and read back from their destination addresses matched bit for bit. | Source vertex | X | Y | Z | | ---: | ---: | ---: | ---: | | 1856 | 0.001231 | 0.326001 | 0.594412 | | 1857 | -0.000607 | 0.326216 | 0.590960 | | 1897 | 0.001231 | 0.326001 | 0.594412 | A second replay ties the remaining visual artifact to a different part of the image. In the post-fade courtyard view, frame 1786 matched the previous camera on 123 points (1.45 px median error at 2560×1440). A thin triangle extends from the neckline into the background in both base color and the final present. For that frame we traced the three vertices from producer 35206 at `0x8108` to mesh draw 434. The mesh read exactly the nine finite words the shader wrote. The eight incident triangles project to x=960–968, y=608–630. The visible spike crosses x=1600 at about y=835, well outside them. Its producing draw is still unidentified. As in the previous capture, partial Box32 dispatches used the worker-selected masked direct-DXIL variant from `d8a1f5f1`, and skinning used the instrumented HLSL path. These measurements confirm that the original vertices are finite while a separate visible defect persists. AI assistance: OpenAI Codex instrumented the stores, ran the replays and checked the fenced readbacks and camera alignment.
CharlyRien commented 2026-11-27 21:19:54 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by CharlyRien on 2026-11-27T21:19:54Z.


@KDenKC an in-world data point for the group-count conversion, on an RTX 3090. It is not a test of a3e820d: I ported the host part of this PR onto our lab tree, behind a switch, and compared runs of that tree with and without it. No build of this head, no suite run and no smoke pair here, so this is not one of the PR's test reports.

What was ported (patch 0029, credited to you, GPL-3.0-or-later):

  • dispatch_flags / dispatch_groups, the console numthreads kept per pipeline, the flags kept by a put-off dispatch; a pipeline whose group shape is not known is not launched.
  • Differences from the PR: it runs only with XCL_DISPATCHX_FLAGS=1; numthreads sits in a map of its own instead of widening PSO_USER_SGPRS; the IO_THREAD_LIMIT slots are not written (nothing reads them in this PR). The last group still runs whole, as with this PR alone.

Measured (the retail title, one run per row):

  • In one world run with a probe, the title made 39,474 DispatchX calls, all with flag 0x20, from 4 programs. The largest x was 82,606, which the unpatched tree launches as 82,606 groups (above D3D12's 65,535).
  • With the switch, the character was whole on every look frame in 3 runs of 3. The same setup without it: 1 run of 3.
  • One of the 3 runs with the switch still had a thin stretched triangle from the neck to the edge of the view, on all its frames. It may be the same defect as the thin triangle from the neckline in 7228084962; we have not traced its draw.
  • Pace in the two runs without the probe: 2.60 and 2.78 presents/s, against 2.62 without the switch. Two runs of one setup differ by ±7 % here, so no change is measured.
  • 0 device removals in the 3 runs.

@jessenic ran this PR's change in their own tree on an RTX 5070 Ti: scene geometry whole in 3 runs of 3 with it, 0 of 3 without (#505, 7227706772).

Not tested

  • This head as built (a3e820d), the suite, a smoke pair against main.
  • The lane mask of the last group (#3015, #3066).
  • Whether the character result holds without the other switches of our setup (below).
  • AMD and Intel.
  • The verdicts come from 4–5 frames per run at fixed points of the world, not from a capture.

Setup: MacieGx's lab 59986ef + 47d0eac + #2934 + our patches 0001-0029 (lab-patches/fix-waits); the runs used the lab commits these patches were made from. Env: MacieGx's #505 env (7200417753) + XCL_PAGE_BUDGET_MB=4096 XCL_LOOK_JOIN=0 XCL_CHAIN_WHOLE=1 XCL_WATCH_TRAP=1 XCL_CALL_STATS=1 XCL_FENCE_DIRECT=1 XCL_SPARSE_MAP_NOWAIT=1 XCL_USE_RANGE_HIT=1 XCL_FILTER_INDEX=1 XCL_SPARSE_SCATTER=1 XCL_TEX_KEY_PAD=1 XCL_VIEW_FULL_RANGE=1; the runs with the change add XCL_DISPATCHX_FLAGS=1, and the probe run XCL_RT_WATCH=30. Ray-tracing resolves skipped as in MacieGx's recipe. RTX 3090 24 GB (Resizable BAR off), driver 616.56, Ryzen 9 5950X, 32 GB RAM, Windows 11 22631.

AI use: Claude Code, model Claude Opus 5.5. It ported the change, ran the runs, read the logs and frames, and wrote this. The person running these tests asked for this post.

<!-- greyfinch-sync:ivall/xcl:comment:7228347319 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2610#issuecomment-7228347319). Originally posted by [CharlyRien](https://github.com/CharlyRien) on 2026-11-27T21:19:54Z. --- @KDenKC an in-world data point for the group-count conversion, on an RTX 3090. It is **not a test of `a3e820d`**: I ported the host part of this PR onto our lab tree, behind a switch, and compared runs of that tree with and without it. No build of this head, no suite run and no smoke pair here, so this is not one of the PR's test reports. **What was ported** ([patch 0029](https://github.com/CharlyRien/xcl/blob/lab-patches/fix-waits/patches/0029-Lab-XCL_DISPATCHX_FLAGS-1-off-launches-a-DispatchX-w.patch), credited to you, GPL-3.0-or-later): - `dispatch_flags` / `dispatch_groups`, the console `numthreads` kept per pipeline, the flags kept by a put-off dispatch; a pipeline whose group shape is not known is not launched. - Differences from the PR: it runs only with `XCL_DISPATCHX_FLAGS=1`; `numthreads` sits in a map of its own instead of widening `PSO_USER_SGPRS`; the `IO_THREAD_LIMIT` slots are not written (nothing reads them in this PR). The last group still runs whole, as with this PR alone. **Measured (the retail title, one run per row):** - In one world run with a probe, the title made 39,474 `DispatchX` calls, all with flag 0x20, from 4 programs. The largest x was 82,606, which the unpatched tree launches as 82,606 groups (above D3D12's 65,535). - With the switch, the character was whole on every look frame in **3 runs of 3**. The same setup without it: **1 run of 3**. - One of the 3 runs with the switch still had a thin stretched triangle from the neck to the edge of the view, on all its frames. It may be the same defect as the thin triangle from the neckline in 7228084962; we have not traced its draw. - Pace in the two runs without the probe: 2.60 and 2.78 presents/s, against 2.62 without the switch. Two runs of one setup differ by ±7 % here, so no change is measured. - 0 device removals in the 3 runs. @jessenic ran this PR's change in their own tree on an RTX 5070 Ti: scene geometry whole in 3 runs of 3 with it, 0 of 3 without (#505, 7227706772). **Not tested** - This head as built (`a3e820d`), the suite, a smoke pair against `main`. - The lane mask of the last group (#3015, #3066). - Whether the character result holds without the other switches of our setup (below). - AMD and Intel. - The verdicts come from 4–5 frames per run at fixed points of the world, not from a capture. **Setup:** MacieGx's lab `59986ef` + `47d0eac` + #2934 + our patches 0001-0029 ([`lab-patches/fix-waits`](https://github.com/CharlyRien/xcl/tree/lab-patches/fix-waits)); the runs used the lab commits these patches were made from. Env: MacieGx's #505 env (7200417753) + `XCL_PAGE_BUDGET_MB=4096 XCL_LOOK_JOIN=0 XCL_CHAIN_WHOLE=1 XCL_WATCH_TRAP=1 XCL_CALL_STATS=1 XCL_FENCE_DIRECT=1 XCL_SPARSE_MAP_NOWAIT=1 XCL_USE_RANGE_HIT=1 XCL_FILTER_INDEX=1 XCL_SPARSE_SCATTER=1 XCL_TEX_KEY_PAD=1 XCL_VIEW_FULL_RANGE=1`; the runs with the change add `XCL_DISPATCHX_FLAGS=1`, and the probe run `XCL_RT_WATCH=30`. Ray-tracing resolves skipped as in MacieGx's recipe. RTX 3090 24 GB (Resizable BAR off), driver 616.56, Ryzen 9 5950X, 32 GB RAM, Windows 11 22631. **AI use:** Claude Code, model Claude Opus 5.5. It ported the change, ran the runs, read the logs and frames, and wrote this. The person running these tests asked for this post.
KDenKC commented 2026-11-27 21:27:07 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by KDenKC on 2026-11-27T21:27:07Z.


Thank you @minimalhipster990, @CharlyRien (and @jessenic on #505). Added to #2610 and #3066.

  • The masks are exactly the expected ones: 2,841 − 44×64 = 25 lanes, so 0x01ffffff; 927 − 14×64 = 31 lanes, so 0x7fffffff. With full EXEC in the groups before and bit-for-bit vertex stores, that's the #3066 check closed.
  • @CharlyRien, the x = 82,606 call is another case the conversion covers: unpatched it's 82,606 groups, past D3D12's 65,535 per dimension, and with it 1,291.

AI use: Claude Code (Claude Opus 5.5).

<!-- greyfinch-sync:ivall/xcl:comment:7228455781 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2610#issuecomment-7228455781). Originally posted by [KDenKC](https://github.com/KDenKC) on 2026-11-27T21:27:07Z. --- Thank you @minimalhipster990, @CharlyRien (and @jessenic on #505). Added to #2610 and #3066. - The masks are exactly the expected ones: 2,841 − 44×64 = 25 lanes, so `0x01ffffff`; 927 − 14×64 = 31 lanes, so `0x7fffffff`. With full EXEC in the groups before and bit-for-bit vertex stores, that's the #3066 check closed. - @CharlyRien, the x = 82,606 call is another case the conversion covers: unpatched it's 82,606 groups, past D3D12's 65,535 per dimension, and with it 1,291. AI use: Claude Code (Claude Opus 5.5).
KDenKC commented 2026-11-28 16:16:17 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by KDenKC on 2026-11-28T16:16:17Z.


Closing this: main now handles DispatchX thread dimensions in another way. bmjask's d9403543 launches them safely and #3157 keeps the rendezvous branch wave-uniform, with the limits handled inline. Thank you @bmjask.

Thank you to everyone who tested and reviewed this one:

  • DavidM1911 (RTX 3060 Ti, twice);
  • oni-swr (RX 7800 XT, with a parent control);
  • itsSio (two NVIDIA PCs);
  • pickles976 (the Wine cross-check);
  • SlopTart (RADV on an RX 7900 XT);
  • jennydeth (a retail run on an RTX 3060, the case this was written for);
  • GodlyBDS (runtime path coverage);
  • Decodere (desktop NVIDIA);
  • minimalhipster990, whose RTX 4090 replays tied the extra groups to the Box32Rehydration pages they overwrote and confirmed the face triangles came back;
  • CharlyRien, for the in-world data point on an RTX 3090.

One gap left on main, for whoever picks it up: the opt-in per-lane path still ignores the thread limits.

AI use: an agent swarm: Claude Fable 5.2, Claude Opus 5.5, GPT-6.2-Sol and Gemini 4 Neon.

<!-- greyfinch-sync:ivall/xcl:comment:7242109034 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2610#issuecomment-7242109034). Originally posted by [KDenKC](https://github.com/KDenKC) on 2026-11-28T16:16:17Z. --- Closing this: `main` now handles DispatchX thread dimensions in another way. bmjask's `d9403543` launches them safely and #3157 keeps the rendezvous branch wave-uniform, with the limits handled inline. Thank you @bmjask. Thank you to everyone who tested and reviewed this one: - DavidM1911 (RTX 3060 Ti, twice); - oni-swr (RX 7800 XT, with a parent control); - itsSio (two NVIDIA PCs); - pickles976 (the Wine cross-check); - SlopTart (RADV on an RX 7900 XT); - jennydeth (a retail run on an RTX 3060, the case this was written for); - GodlyBDS (runtime path coverage); - Decodere (desktop NVIDIA); - minimalhipster990, whose RTX 4090 replays tied the extra groups to the Box32Rehydration pages they overwrote and confirmed the face triangles came back; - CharlyRien, for the in-world data point on an RTX 3090. One gap left on `main`, for whoever picks it up: the opt-in per-lane path still ignores the thread limits. AI use: an agent swarm: Claude Fable 5.2, Claude Opus 5.5, GPT-6.2-Sol and Gemini 4 Neon.

Pull request closed

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!2600
No description provided.