Recompiler & D3D12.X: mask 9-bit EXP PRIM vertex indices and map newer DispatchMesh to slot #129 #1984

Manually merged
github merged 1 commit from gh-pr/1984/head into gh-pr/1984/base 2026-11-26 05:12:56 +00:00
Owner

@⁠raylitebull on GitHub · 2026-11-25 00:22 UTC · original
raylitebull:feat/dispatch-mesh-9bit-v2 → main · +43 −3 · 3 files · 1 commits · merged 2026-11-25 10:40 UTC

Masks EXP PRIM vertex indices to 9 bits (0x1FFu) in RDNA2 mesh-shader pass-through lowering and maps newer-layout command list DispatchMesh calls at slot #129 to older slot #126 (two-pass DispatchMesh / ExecuteIndirect execution paths have been split out of this PR and deferred cleanly to #724 and #1887).

Part of #1833.

What is in it

  • crates/xcl/src/gpu/recomp/emit.rs: mask EXP PRIM vertex indices with 0x1FFu in both unsplit and #304-split mesh pass-through emission paths to strip RDNA2 per-edge flags at bits [9], [19], and [29].
  • crates/xcl/src/gpu/recomp/tests.rs: add mesh_passthrough_strips_rdna2_edge_flag_bits unit test.
  • crates/xcl/src/hle/d3d12x/real.rs: map (129, 126) in NEWER_LIST_SLOTS for newer-layout DispatchMesh and add newer_layout_maps_dispatch_mesh_to_slot_129_not_128.

Tested

  • Toolchain: Windows 11 x64, rustc 1.99.1 (58cf8f9c3 2026-10-13), rebased cleanly onto aa9ab8a (3eab40a).
  • Targeted unit tests (mesh_passthrough_strips_rdna2_edge_flag_bits and newer_layout_maps_dispatch_mesh_to_slot_129_not_128): 2 passed, 0 failed (0 new warnings).
  • Exact-head 60 s scripts/smoke.ps1 regression pair on AMD Radeon RX 9070 (@Toons29): passed (0 device removals, 0 crashes).

Regression run
60 s scripts/smoke.ps1 pair on exact head 3eab40a vs main (AMD Radeon RX 9070, driver 32.0.32029.2010, Windows 11 26300, release, XCL_NETWORK=0 on a retail title), contributed by @Toons29:

main:

xcl-smoke v1
commit: cbc296ab65a2661a61e3e2da109134bcd5319f60
gpu: AMD Radeon RX 9070
title: 34df7c50
seconds: 60
exit: 0x0
frames shown: 1623 (PresentX 1623)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 14648 MB

this PR:

xcl-smoke v1
commit: 3eab40a4bb48c15d4b79ed3f756deba52eb89bdb
gpu: AMD Radeon RX 9070
title: 34df7c50
seconds: 60
exit: 0x0
frames shown: 1626 (PresentX 1626)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 14817 MB

Not tested

  • 60 s scripts/smoke.ps1 pair on 3eab40a, full cargo test --workspace suite, runtime GPU execution across AMD / NVIDIA / Intel hardware, and Linux/Wine/vkd3d-proton.

AI use

  • Antigravity assisted with implementation, splitting, and unit tests; the author reviewed the diff and test output.
**@⁠raylitebull** on GitHub · 2026-11-25 00:22 UTC · [original](https://github.com/xcl-dev/xcl/pull/1984) `raylitebull:feat/dispatch-mesh-9bit-v2` → `main` · +43 −3 · 3 files · 1 commits · merged 2026-11-25 10:40 UTC Masks `EXP PRIM` vertex indices to 9 bits (`0x1FFu`) in RDNA2 mesh-shader pass-through lowering and maps newer-layout command list `DispatchMesh` calls at slot `#129` to older slot `#126` *(two-pass `DispatchMesh` / `ExecuteIndirect` execution paths have been split out of this PR and deferred cleanly to #724 and #1887)*. Part of #1833. **What is in it** - `crates/xcl/src/gpu/recomp/emit.rs`: mask `EXP PRIM` vertex indices with `0x1FFu` in both unsplit and `#304`-split mesh pass-through emission paths to strip RDNA2 per-edge flags at bits `[9]`, `[19]`, and `[29]`. - `crates/xcl/src/gpu/recomp/tests.rs`: add `mesh_passthrough_strips_rdna2_edge_flag_bits` unit test. - `crates/xcl/src/hle/d3d12x/real.rs`: map `(129, 126)` in `NEWER_LIST_SLOTS` for newer-layout `DispatchMesh` and add `newer_layout_maps_dispatch_mesh_to_slot_129_not_128`. **Tested** - Toolchain: Windows 11 x64, `rustc 1.99.1 (58cf8f9c3 2026-10-13)`, rebased cleanly onto `aa9ab8a` (`3eab40a`). - Targeted unit tests (`mesh_passthrough_strips_rdna2_edge_flag_bits` and `newer_layout_maps_dispatch_mesh_to_slot_129_not_128`): 2 passed, 0 failed (`0` new warnings). - Exact-head 60 s `scripts/smoke.ps1` regression pair on AMD Radeon RX 9070 (`@Toons29`): passed (0 device removals, 0 crashes). **Regression run** 60 s `scripts/smoke.ps1` pair on exact head `3eab40a` vs `main` (AMD Radeon RX 9070, driver 32.0.32029.2010, Windows 11 26300, release, `XCL_NETWORK=0` on a retail title), contributed by `@Toons29`: main: ``` xcl-smoke v1 commit: cbc296ab65a2661a61e3e2da109134bcd5319f60 gpu: AMD Radeon RX 9070 title: 34df7c50 seconds: 60 exit: 0x0 frames shown: 1623 (PresentX 1623) presents per 2 s (last 3): 60 60 60 device removals: 0 crashes: 0 peak commit: 14648 MB ``` this PR: ``` xcl-smoke v1 commit: 3eab40a4bb48c15d4b79ed3f756deba52eb89bdb gpu: AMD Radeon RX 9070 title: 34df7c50 seconds: 60 exit: 0x0 frames shown: 1626 (PresentX 1626) presents per 2 s (last 3): 60 60 60 device removals: 0 crashes: 0 peak commit: 14817 MB ``` **Not tested** - 60 s `scripts/smoke.ps1` pair on `3eab40a`, full `cargo test --workspace` suite, runtime GPU execution across AMD / NVIDIA / Intel hardware, and Linux/Wine/vkd3d-proton. **AI use** - Antigravity assisted with implementation, splitting, and unit tests; the author reviewed the diff and test output.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 05:12:54 +00:00
github manually merged commit 3eab40a4bb into gh-pr/1984/base 2026-11-26 05:12:56 +00:00
Author
Owner

@⁠upipibi on GitHub · 2026-11-25 00:27 UTC · original

Overlap note, from reading the descriptions and file lists (not run):

  • Two-pass DispatchMesh / ExecuteIndirect execution is #724 (Cattn). It changes the same bind.rs, console_list.rs, device_x.rs and real.rs. Its review points have been worked into a rebased branch, PracticalStudios/xcl mesh/two-pass-execution; see the last comments there, including measured mesh user-SGPR layouts from 9,282 shaders. Two implementations of the same path would conflict, so comparing against that branch first would save work.
  • The indirect argument type 107 → DISPATCH_MESH mapping for CreateCommandSignature is #1887.

The parts that look independent of both are the NEWER_LIST_SLOTS DispatchMesh slot (129 rather than 128) and the 9-bit (0x1FF) vertex index mask in mesh passthrough. Each could go in a small PR of its own, with the evidence for it.

AI-assisted (Claude Code).

**@⁠upipibi** on GitHub · 2026-11-25 00:27 UTC · [original](https://github.com/xcl-dev/xcl/pull/1984#issuecomment-7148526230) Overlap note, from reading the descriptions and file lists (not run): - **Two-pass `DispatchMesh` / `ExecuteIndirect` execution** is #724 (Cattn). It changes the same `bind.rs`, `console_list.rs`, `device_x.rs` and `real.rs`. Its review points have been worked into a rebased branch, PracticalStudios/xcl `mesh/two-pass-execution`; see the last comments there, including measured mesh user-SGPR layouts from 9,282 shaders. Two implementations of the same path would conflict, so comparing against that branch first would save work. - **The indirect argument type 107 → `DISPATCH_MESH`** mapping for `CreateCommandSignature` is #1887. The parts that look independent of both are the `NEWER_LIST_SLOTS` `DispatchMesh` slot (129 rather than 128) and the 9-bit (`0x1FF`) vertex index mask in mesh passthrough. Each could go in a small PR of its own, with the evidence for it. AI-assisted (Claude Code).
Author
Owner

@⁠eizispark on GitHub · 2026-11-25 00:32 UTC · original

Hardware test report — commit ffcf056

Verified ffcf056f0f41757e90c93f7becd6790b81e32656 (based on 8c4a46a3c2d50498691cbda79cbbf4fadb45fbe8; clean merge with current main 6567c5f): pass (0 new failures vs main; all 4 new unit tests and live RDNA4 mesh-shader GPU tests pass).

Tested

  • Hardware: Windows 11 x64, AMD Ryzen 7 9800X3D, AMD Radeon RX 9070 XT (RDNA4, native wave32 + wave64, mesh shaders Tier 1, driver 32.0.32015.16001), 32 GB RAM, rustc 1.100.0 (0ef1bc386 2026-11-09) (stable-x86_64-pc-windows-msvc), debug tests + release smoke
  • Unfiltered cargo test --workspace --no-fail-fast -- --test-threads=4: 997 passed, 2 failed, 45 ignored (8 skipped) — 0 new failures:
    • All 4 new PR unit tests (gpu::recomp::tests::mesh_passthrough_strips_rdna2_edge_flag_bits, hle::d3d12x::bind::tests::dispatch_mesh_signature_tracking_returns_companion_and_clears, hle::d3d12x::console_list::tests::mesh_arguments_go_in_user_sgprs_from_s16, hle::d3d12x::real::queue_tests::newer_layout_maps_dispatch_mesh_to_slot_129_not_128) passed
    • Live RDNA4 mesh-shader & wave64 GPU tests (gpu::recomp::tests::gpu_mesh_mode_two_passes with the 0x1FFu 9-bit vertex index mask, gpu_mesh_mode_reads_memory_windows, hle::d3d12x::real::passthrough_mesh_stream_accepts_a_triangle_driver_blob, retail_mesh_pipelines_through_the_hook, mesh_dispatch::tests::*, gpu_geometry_wave32_prefix_count_over_a_mask, gpu_wave32_program_in_wave64_hardware, console_wave64_compute_through_the_pso_hook_dispatch_and_read_back) all executed on the GPU (0 skips) and passed
    • The 2 failures (gpu::dxil::fuzz_tests::fuzz_validate_and_gpu_1 seed 722 and fuzz_validate_and_gpu_3 seed 1599) are pre-existing on main (#1679); 8 skipped = 6 lower_dxil f16/f32 #1426-semantics sub-cases, pso_measurement_compiles_an_exact_synthetic_record (0x887A002D), and heap_window_out_of_memory_falls_back_to_the_switch_form: no heap windows

Regression run
main (8e87fc7b62a87ea589ccb9ea6182f514016cf7db):

xcl-smoke v1
commit: 8e87fc7b62a87ea589ccb9ea6182f514016cf7db
gpu: AMD Radeon RX 9070 XT
title: 9cc6a39e
seconds: 60
exit: 0x0
frames shown: 1675 (PresentX 1675)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 14861 MB

PR (ffcf056f0f41757e90c93f7becd6790b81e32656):

xcl-smoke v1
commit: ffcf056f0f41757e90c93f7becd6790b81e32656
gpu: AMD Radeon RX 9070 XT
title: 9cc6a39e
seconds: 60
exit: 0x0
frames shown: 1675 (PresentX 1675)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 14860 MB

Not tested

  • live retail 3D gameplay past the menus reaching DispatchMesh / ExecuteIndirect(DispatchMesh) draws (the 60 s menu smoke run did not log DispatchMesh calls), NVIDIA/Intel GPUs, Wine/vkd3d-proton

AI use

  • Antigravity (Google DeepMind, Gemini 4 Carbon) ran the workspace test suite, mesh-shader GPU checks, and 60-second retail smoke check and formatted this report.
**@⁠eizispark** on GitHub · 2026-11-25 00:32 UTC · [original](https://github.com/xcl-dev/xcl/pull/1984#issuecomment-7148620884) ### Hardware test report — commit `ffcf056` Verified `ffcf056f0f41757e90c93f7becd6790b81e32656` (based on `8c4a46a3c2d50498691cbda79cbbf4fadb45fbe8`; clean merge with current `main` `6567c5f`): **pass** (`0` new failures vs `main`; all 4 new unit tests and live RDNA4 mesh-shader GPU tests pass). **Tested** - Hardware: Windows 11 x64, AMD Ryzen 7 9800X3D, AMD Radeon RX 9070 XT (RDNA4, native wave32 + wave64, mesh shaders Tier 1, driver `32.0.32015.16001`), 32 GB RAM, `rustc 1.100.0 (0ef1bc386 2026-11-09)` (`stable-x86_64-pc-windows-msvc`), debug tests + release smoke - Unfiltered `cargo test --workspace --no-fail-fast -- --test-threads=4`: `997 passed, 2 failed, 45 ignored` (`8 skipped`) — `0` new failures: - All 4 new PR unit tests (`gpu::recomp::tests::mesh_passthrough_strips_rdna2_edge_flag_bits`, `hle::d3d12x::bind::tests::dispatch_mesh_signature_tracking_returns_companion_and_clears`, `hle::d3d12x::console_list::tests::mesh_arguments_go_in_user_sgprs_from_s16`, `hle::d3d12x::real::queue_tests::newer_layout_maps_dispatch_mesh_to_slot_129_not_128`) passed - Live RDNA4 mesh-shader & wave64 GPU tests (`gpu::recomp::tests::gpu_mesh_mode_two_passes` with the `0x1FFu` 9-bit vertex index mask, `gpu_mesh_mode_reads_memory_windows`, `hle::d3d12x::real::passthrough_mesh_stream_accepts_a_triangle_driver_blob`, `retail_mesh_pipelines_through_the_hook`, `mesh_dispatch::tests::*`, `gpu_geometry_wave32_prefix_count_over_a_mask`, `gpu_wave32_program_in_wave64_hardware`, `console_wave64_compute_through_the_pso_hook_dispatch_and_read_back`) all executed on the GPU (`0` skips) and passed - The 2 failures (`gpu::dxil::fuzz_tests::fuzz_validate_and_gpu_1` seed `722` and `fuzz_validate_and_gpu_3` seed `1599`) are pre-existing on `main` (`#1679`); `8 skipped` = 6 `lower_dxil` f16/f32 `#1426`-semantics sub-cases, `pso_measurement_compiles_an_exact_synthetic_record` (`0x887A002D`), and `heap_window_out_of_memory_falls_back_to_the_switch_form: no heap windows` **Regression run** `main` (`8e87fc7b62a87ea589ccb9ea6182f514016cf7db`): ``` xcl-smoke v1 commit: 8e87fc7b62a87ea589ccb9ea6182f514016cf7db gpu: AMD Radeon RX 9070 XT title: 9cc6a39e seconds: 60 exit: 0x0 frames shown: 1675 (PresentX 1675) presents per 2 s (last 3): 60 60 60 device removals: 0 crashes: 0 peak commit: 14861 MB ``` PR (`ffcf056f0f41757e90c93f7becd6790b81e32656`): ``` xcl-smoke v1 commit: ffcf056f0f41757e90c93f7becd6790b81e32656 gpu: AMD Radeon RX 9070 XT title: 9cc6a39e seconds: 60 exit: 0x0 frames shown: 1675 (PresentX 1675) presents per 2 s (last 3): 60 60 60 device removals: 0 crashes: 0 peak commit: 14860 MB ``` **Not tested** - live retail 3D gameplay past the menus reaching `DispatchMesh` / `ExecuteIndirect(DispatchMesh)` draws (the 60 s menu smoke run did not log `DispatchMesh` calls), NVIDIA/Intel GPUs, Wine/vkd3d-proton **AI use** - Antigravity (Google DeepMind, Gemini 4 Carbon) ran the workspace test suite, mesh-shader GPU checks, and 60-second retail smoke check and formatted this report.
Author
Owner

@⁠raylitebull on GitHub · 2026-11-25 00:38 UTC · original

@⁠eizispark Thank you for the thorough RX 9070 XT verification (997 passed,

**@⁠raylitebull** on GitHub · 2026-11-25 00:38 UTC · [original](https://github.com/xcl-dev/xcl/pull/1984#issuecomment-7148724648) @⁠eizispark Thank you for the thorough RX 9070 XT verification (997 passed,
Author
Owner

@⁠raylitebull on GitHub · 2026-11-25 00:47 UTC · original

Thanks for the overlap breakdown, @⁠upipibi! Full credit to #724 (@⁠Cattn) on the two-pass DispatchMesh / ExecuteIndirect execution architecture and #1887 (@⁠Diskuss) on indirect argument 107 -> DispatchMesh.

For context on why #1984 is open:

  • #724 currently has merge conflicts on main and open review items on 2624f00 (such as IO_UMA_BASE_HI in bind_two_pass_stage, record buffer upper bounds, scaled-indirect lifetime cleanup, and clearing dispatch_mesh_signature on root-changing signatures), which #1984 includes.
  • #1984 also adds the independent NEWER_LIST_SLOTS slot #129 mapping in real.rs and the 9-bit (0x1FF) primitive index mask in emit.rs.

If #724 (or #1887) is updated and lands first, we will gladly rebase and trim #1984 down to only the remaining non-overlapping pieces.

**@⁠raylitebull** on GitHub · 2026-11-25 00:47 UTC · [original](https://github.com/xcl-dev/xcl/pull/1984#issuecomment-7148879431) Thanks for the overlap breakdown, @⁠upipibi! Full credit to **#724** (@⁠Cattn) on the two-pass `DispatchMesh` / `ExecuteIndirect` execution architecture and **#1887** (@⁠Diskuss) on indirect argument `107 -> DispatchMesh`. For context on why #1984 is open: - **#724** currently has merge conflicts on `main` and open review items on `2624f00` (such as `IO_UMA_BASE_HI` in `bind_two_pass_stage`, record buffer upper bounds, scaled-indirect lifetime cleanup, and clearing `dispatch_mesh_signature` on root-changing signatures), which #1984 includes. - #1984 also adds the independent **`NEWER_LIST_SLOTS` slot `#129`** mapping in `real.rs` and the **9-bit (`0x1FF`) primitive index mask** in `emit.rs`. If #724 (or #1887) is updated and lands first, we will gladly rebase and trim #1984 down to only the remaining non-overlapping pieces.
Author
Owner

@⁠gsucristo on GitHub · 2026-11-25 00:57 UTC · original

Technical review findings:

Blocking

  1. Unconditional INDIRECT_ARGUMENT -> NON_PIXEL_SHADER_RESOURCE transition (bind.rs, make_scaled_args_buffer): Transitions src unconditionally from INDIRECT_ARGUMENT to NON_PIXEL_SHADER_RESOURCE and back. Indirect argument buffers are frequently in GENERIC_READ (mandatory for UPLOAD heaps, where transitioning away from GENERIC_READ is invalid), COMMON, or combined read states.
  2. Multi-command ExecuteIndirect(DispatchMesh) (max > 1) races on res_buf (bind.rs, execute_indirect): Runs all max compute dispatches into res_buf starting at offset 0 without per-command offsets or intermediate UAV barriers, then runs all max mesh dispatches reading from offset 0.
  3. Unclamped OOB UAV writes/reads on res_buf (bind.rs, dispatch_mesh & execute_indirect): clear_groups is clamped to res_cap / rec_bytes, but list.Dispatch(groups, 1, 1), pc_dm(...), and companion_dispatch are not clamped/rejected when groups * rec_bytes > res_cap.
  4. COM refcount leak on companion ID3D12CommandSignature (device_x.rs, create_command_signature_x; bind.rs, DISPATCH_MESH_SIGS): companion is stored as a raw usize and never Release()d on map overwrite, clear_dispatch_mesh_signature, or signature destruction.

Major

  • let groups = x.saturating_mul(y.max(1)).saturating_mul(z.max(1)) turns a zero-work DispatchMesh(N, 0, 1) into N groups instead of returning early, and flattening 3D (x, y, z) to (groups, 1, 1) breaks console MS shaders reading SV_GroupID.y/z.
  • make_scaled_args_buffer allocates a new committed DEFAULT buffer of max * stride bytes on every ExecuteIndirect call instead of pooling/reusing.
  • clear_record_headers, emit_uav_barrier, and make_scaled_args_buffer don't guard against D3D12_COMMAND_LIST_TYPE_BUNDLE, and dispatch_mesh overwrites the compute RS/PSO without restoring them.

(The #129 NEWER_LIST_SLOTS fix and 0x1FFu 9-bit EXP PRIM mask look clean and would be great split out on their own.)

**@⁠gsucristo** on GitHub · 2026-11-25 00:57 UTC · [original](https://github.com/xcl-dev/xcl/pull/1984#issuecomment-7149054746) Technical review findings: **Blocking** 1. **Unconditional `INDIRECT_ARGUMENT -> NON_PIXEL_SHADER_RESOURCE` transition (`bind.rs`, `make_scaled_args_buffer`)**: Transitions `src` unconditionally from `INDIRECT_ARGUMENT` to `NON_PIXEL_SHADER_RESOURCE` and back. Indirect argument buffers are frequently in `GENERIC_READ` (mandatory for `UPLOAD` heaps, where transitioning away from `GENERIC_READ` is invalid), `COMMON`, or combined read states. 2. **Multi-command `ExecuteIndirect(DispatchMesh)` (`max > 1`) races on `res_buf` (`bind.rs`, `execute_indirect`)**: Runs all `max` compute dispatches into `res_buf` starting at offset `0` without per-command offsets or intermediate UAV barriers, then runs all `max` mesh dispatches reading from offset `0`. 3. **Unclamped OOB UAV writes/reads on `res_buf` (`bind.rs`, `dispatch_mesh` & `execute_indirect`)**: `clear_groups` is clamped to `res_cap / rec_bytes`, but `list.Dispatch(groups, 1, 1)`, `pc_dm(...)`, and `companion_dispatch` are not clamped/rejected when `groups * rec_bytes > res_cap`. 4. **COM refcount leak on companion `ID3D12CommandSignature` (`device_x.rs`, `create_command_signature_x`; `bind.rs`, `DISPATCH_MESH_SIGS`)**: `companion` is stored as a raw `usize` and never `Release()`d on map overwrite, `clear_dispatch_mesh_signature`, or signature destruction. **Major** - `let groups = x.saturating_mul(y.max(1)).saturating_mul(z.max(1))` turns a zero-work `DispatchMesh(N, 0, 1)` into `N` groups instead of returning early, and flattening 3D `(x, y, z)` to `(groups, 1, 1)` breaks console MS shaders reading `SV_GroupID.y/z`. - `make_scaled_args_buffer` allocates a new committed DEFAULT buffer of `max * stride` bytes on every `ExecuteIndirect` call instead of pooling/reusing. - `clear_record_headers`, `emit_uav_barrier`, and `make_scaled_args_buffer` don't guard against `D3D12_COMMAND_LIST_TYPE_BUNDLE`, and `dispatch_mesh` overwrites the compute RS/PSO without restoring them. *(The `#129` `NEWER_LIST_SLOTS` fix and `0x1FFu` 9-bit `EXP PRIM` mask look clean and would be great split out on their own.)*
Author
Owner

@⁠raylitebull on GitHub · 2026-11-25 01:15 UTC · original

Thanks for the review and split recommendation, @upipibi, @gsucristo, @Cattn, and @Diskuss!

Split and rebased #1984 cleanly onto aa9ab8a (3eab40a, +43 / -3 across 3 files):

  • Split out the two-pass DispatchMesh / ExecuteIndirect execution path (deferring cleanly to #724 + #1887 and removing all overlapping indirect-scaling code).
  • Kept only the two independent, self-contained fixes:
    1. EXP PRIM 9-bit (0x1FFu) vertex index masking in crates/xcl/src/gpu/recomp/emit.rs (both unsplit and #304-split mesh pass-through paths) + mesh_passthrough_strips_rdna2_edge_flag_bits.
    2. NEWER_LIST_SLOTS mapping (129, 126) for newer-layout DispatchMesh in crates/xcl/src/hle/d3d12x/real.rs + newer_layout_maps_dispatch_mesh_to_slot_129_not_128.

Verified locally (2 passed, 0 failed, 0 new warnings).

**@⁠raylitebull** on GitHub · 2026-11-25 01:15 UTC · [original](https://github.com/xcl-dev/xcl/pull/1984#issuecomment-7149370189) Thanks for the review and split recommendation, `@upipibi`, `@gsucristo`, `@Cattn`, and `@Diskuss`! Split and rebased `#1984` cleanly onto `aa9ab8a` (`3eab40a`, `+43 / -3` across 3 files): - Split out the two-pass `DispatchMesh` / `ExecuteIndirect` execution path (deferring cleanly to `#724` + `#1887` and removing all overlapping indirect-scaling code). - Kept only the two independent, self-contained fixes: 1. `EXP PRIM` 9-bit (`0x1FFu`) vertex index masking in `crates/xcl/src/gpu/recomp/emit.rs` (both unsplit and `#304`-split mesh pass-through paths) + `mesh_passthrough_strips_rdna2_edge_flag_bits`. 2. `NEWER_LIST_SLOTS` mapping `(129, 126)` for newer-layout `DispatchMesh` in `crates/xcl/src/hle/d3d12x/real.rs` + `newer_layout_maps_dispatch_mesh_to_slot_129_not_128`. Verified locally (`2 passed, 0 failed`, `0` new warnings).
Author
Owner

@⁠JJAutoCompare on GitHub · 2026-11-25 02:38 UTC · original

PR #1984 compatibility verification

Tested detached head 3eab40a4bb48c15d4b79ed3f756deba52eb89bdb from origin (refs/pull/1984/head). The tracked checkout was clean.

Environment

  • STOR-WINLAB, Windows 11 Enterprise Evaluation build 26200.9974, AMD Ryzen 7 3800X, Intel Arc A770 16 GiB, driver 32.0.101.9175. DoublePrecisionFloatShaderOps=0, wave range 8–32, and d3d12SDKLayers.dll absent.
  • rustc 1.100.0 (0ef1bc386 2026-11-09). DXC and DXIL 1.9.2609.5. Cargo dev/test builds used no debug info or incremental compilation. The suite selected XCL_ADAPTER=A770 and used the assigned slot on L: for the Cargo target, temp directory, and DXIL cache.

Build and focused tests

  • cargo build --workspace and cargo test --workspace --no-run both exited 0 outside the GPU lock.
  • cargo test -p xcl --lib mesh_passthrough_strips_rdna2_edge_flag_bits -- --nocapture — 1 passed, 0 failed, 0 ignored, 0 skipped. The test checks that both mesh pass-through variants emit three 0x1FFu masks at shifts 0, 10, and 20, excluding the packed EXP PRIM edge flags.
  • cargo test -p xcl --lib newer_layout_maps_dispatch_mesh_to_slot_129_not_128 -- --nocapture — 1 passed, 0 failed, 0 ignored, 0 skipped. The test checks newer slot #129 maps to the older DispatchMesh handler at #126 and that the map has no entry for #128.

Full workspace suite

cargo test --workspace --no-fail-fast -- --test-threads=4 ran once under L:/XclTooling/Invoke-ArcTest.ps1. Cargo exited 101 after all 19 test binaries and the doc-test target reported results. Combined suite log (pr1984-suite.log)

gpu::recomp::tests::gpu_mesh_mode_two_passes also passed on the Arc without a skip notice. It checks that the synthetic unsplit and split draws produce identical pixels. Its EXP PRIM record has all edge flag bits clear.

Target Passed Failed Ignored
unittests src/lib.rs (xcl) 1009 26 26
unittests src/main.rs (xcl) 0 0 0
tests/bcpack_parity.rs 1 0 0
tests/console_dlls_e2e.rs 13 0 0
tests/console_shaders.rs 3 0 4
tests/disasm_e2e.rs 1 0 0
tests/e2e.rs 2 1 0
tests/gpu_compute_e2e.rs 4 0 0
tests/gpu_pso_e2e.rs 7 0 0
tests/heap_probe.rs 0 0 4
tests/low_va.rs 1 0 0
tests/pls_quota.rs 1 0 0
tests/predication_e2e.rs 1 0 0
tests/rpf_e2e.rs 2 0 0
tests/shaders_e2e.rs 4 0 0
tests/sparse_reinit.rs 1 0 0
tests/texture_states.rs 1 0 0
tests/xg_oracle.rs 6 0 12
unittests src/main.rs (xcl_testtitle) 0 0 0
Doc-tests xcl 0 0 0
Total (harness counts) 1057 27 46

Failures

All 27 failures are outside the changed mesh pass-through and DispatchMesh paths. The 25 matching failures also appear in the earlier STOR-WINLAB PR #1982 log at 354ce0c7189d0820ddf7d05bc5c662013ff7a5f4, which has the former mask and lacks the slot mapping. The two remaining cases exercise direct-DXIL denormal rounding and split-wave64 compute reductions. Earlier Arc suite log (pr1982-suite.log)

CreateComputePipelineState returned 0x80070057 in 22 tests.

  • gpu::dxil::fuzz_tests::fuzz_validate_and_gpu_0
  • gpu::dxil::fuzz_tests::fuzz_validate_and_gpu_1
  • gpu::dxil::fuzz_tests::fuzz_validate_and_gpu_2
  • gpu::dxil::fuzz_tests::fuzz_validate_and_gpu_3
  • gpu::dxil::ops_tests::doubles_match_cpu
  • gpu::dxil::ops_tests::groupshared_barrier_and_atomics_run
  • gpu::dxil::round_tests::gpu_direct_f32_round_modes_dynamic_and_denormals
  • gpu::dxil::round_tests::gpu_direct_f32_round_modes_static
  • gpu::dxil::round_tests::gpu_direct_f32_round_preserved_denormal_times_inf_is_inf
  • gpu::recomp::lower_dxil::tests::f64_programs_on_the_gpu
  • gpu::recomp::tests::gpu_clamp_and_omod_per_instruction
  • gpu::recomp::tests::gpu_f64_class_compare
  • gpu::recomp::tests::gpu_f64_compares_with_nan
  • gpu::recomp::tests::gpu_f64_literal_high_word
  • gpu::recomp::tests::gpu_f64_math_random
  • gpu::recomp::tests::gpu_f64_roots
  • gpu::recomp::tests::gpu_f64_rounding_and_conversions
  • gpu::recomp::tests::gpu_float_compares_random
  • gpu::recomp::tests::gpu_frexp_f64_exp_and_mant
  • gpu::recomp::tests::gpu_ldexp_f64
  • gpu::recomp::tests::gpu_rndne_f64
  • gpu::recomp::tests::gpu_split_wave64_reduction_tails

Five additional tests failed assertions.

  • gpu::recomp::tests::gpu_nonfused_mad_and_mac_prevent_fma_contraction returned 2139095040 for the fused overflow control, expected 1946157055.
  • gpu::recomp::tests::gpu_ps_image_sample_offset_implicit_lod_between_mips returned 25.609375 at pixel (0,0), expected 26.
  • gpu::recomp::tests::gpu_valu_16_and_64_bit failed the v_add_f16 high-half preservation assertion in lane 0.
  • gpu::recomp::tests::gpu_wave64_ps_whole_wave_reductions returned [2, 217, 2] for the pixel 0 min/sum reduction, expected [2, 216, 2].
  • e2e::test_title_runs_and_game_folder_is_untouched failed the synthetic title's dynamic depth-bias check at RSSetDepthBiasX slot #94. The top-right pixel was blue, expected green.

Skips

The log contains exactly 23 lines beginning with SKIPPED across 13 tests. The harness passed count includes tests that returned early or exercised only some subcases. Excluded from coverage were 18 wave64 cases, three refused wave32 DXIL lowering cases (V_MUL_F16, V_PK_MUL_F16, V_CVT_F16_F32), one driver-cache measurement (0x887A002D), and one heap-window OOM fallback.

Not tested

  • A retail Xbox title run, live console calls to newer DispatchMesh slot #129, or a GPU draw with EXP PRIM edge flags set. The run used the synthetic mesh and title tests, and XCL_SAMPLE_* was unset.
  • D3D12 debug-layer checks. The root-signature and texture-state tests can return early with notices captured by libtest, outside the 23 logged lines.
  • A same-run main baseline or retail smoke comparison, AMD and NVIDIA GPUs, and native wave64 hardware.

AI use

T3 Code / Codex (gpt-6.2-sol, reasoningEffort: high) ran the build and verification. Coordinator #2 (T3 Code / Antigravity, gemini-4-neon) verified the counts against pr1984-suite.log and published this report.

**@⁠JJAutoCompare** on GitHub · 2026-11-25 02:38 UTC · [original](https://github.com/xcl-dev/xcl/pull/1984#issuecomment-7150980652) # PR #1984 compatibility verification Tested detached head `3eab40a4bb48c15d4b79ed3f756deba52eb89bdb` from `origin` (`refs/pull/1984/head`). The tracked checkout was clean. **Environment** - STOR-WINLAB, Windows 11 Enterprise Evaluation build `26200.9974`, AMD Ryzen 7 3800X, Intel Arc A770 16 GiB, driver `32.0.101.9175`. `DoublePrecisionFloatShaderOps=0`, wave range 8–32, and `d3d12SDKLayers.dll` absent. - `rustc 1.100.0 (0ef1bc386 2026-11-09)`. DXC and DXIL `1.9.2609.5`. Cargo dev/test builds used no debug info or incremental compilation. The suite selected `XCL_ADAPTER=A770` and used the assigned slot on `L:` for the Cargo target, temp directory, and DXIL cache. **Build and focused tests** - `cargo build --workspace` and `cargo test --workspace --no-run` both exited 0 outside the GPU lock. - `cargo test -p xcl --lib mesh_passthrough_strips_rdna2_edge_flag_bits -- --nocapture` — 1 passed, 0 failed, 0 ignored, 0 skipped. The test checks that both mesh pass-through variants emit three `0x1FFu` masks at shifts 0, 10, and 20, excluding the packed EXP PRIM edge flags. - `cargo test -p xcl --lib newer_layout_maps_dispatch_mesh_to_slot_129_not_128 -- --nocapture` — 1 passed, 0 failed, 0 ignored, 0 skipped. The test checks newer slot `#129` maps to the older `DispatchMesh` handler at `#126` and that the map has no entry for `#128`. **Full workspace suite** `cargo test --workspace --no-fail-fast -- --test-threads=4` ran once under `L:/XclTooling/Invoke-ArcTest.ps1`. Cargo exited `101` after all 19 test binaries and the doc-test target reported results. Combined suite log (`pr1984-suite.log`) `gpu::recomp::tests::gpu_mesh_mode_two_passes` also passed on the Arc without a skip notice. It checks that the synthetic unsplit and split draws produce identical pixels. Its EXP PRIM record has all edge flag bits clear. | Target | Passed | Failed | Ignored | | --- | ---: | ---: | ---: | | `unittests src/lib.rs (xcl)` | 1009 | 26 | 26 | | `unittests src/main.rs (xcl)` | 0 | 0 | 0 | | `tests/bcpack_parity.rs` | 1 | 0 | 0 | | `tests/console_dlls_e2e.rs` | 13 | 0 | 0 | | `tests/console_shaders.rs` | 3 | 0 | 4 | | `tests/disasm_e2e.rs` | 1 | 0 | 0 | | `tests/e2e.rs` | 2 | 1 | 0 | | `tests/gpu_compute_e2e.rs` | 4 | 0 | 0 | | `tests/gpu_pso_e2e.rs` | 7 | 0 | 0 | | `tests/heap_probe.rs` | 0 | 0 | 4 | | `tests/low_va.rs` | 1 | 0 | 0 | | `tests/pls_quota.rs` | 1 | 0 | 0 | | `tests/predication_e2e.rs` | 1 | 0 | 0 | | `tests/rpf_e2e.rs` | 2 | 0 | 0 | | `tests/shaders_e2e.rs` | 4 | 0 | 0 | | `tests/sparse_reinit.rs` | 1 | 0 | 0 | | `tests/texture_states.rs` | 1 | 0 | 0 | | `tests/xg_oracle.rs` | 6 | 0 | 12 | | `unittests src/main.rs (xcl_testtitle)` | 0 | 0 | 0 | | `Doc-tests xcl` | 0 | 0 | 0 | | **Total (harness counts)** | **1057** | **27** | **46** | **Failures** All 27 failures are outside the changed mesh pass-through and DispatchMesh paths. The 25 matching failures also appear in the earlier STOR-WINLAB PR #1982 log at `354ce0c7189d0820ddf7d05bc5c662013ff7a5f4`, which has the former mask and lacks the slot mapping. The two remaining cases exercise direct-DXIL denormal rounding and split-wave64 compute reductions. Earlier Arc suite log (`pr1982-suite.log`) `CreateComputePipelineState` returned `0x80070057` in 22 tests. - `gpu::dxil::fuzz_tests::fuzz_validate_and_gpu_0` - `gpu::dxil::fuzz_tests::fuzz_validate_and_gpu_1` - `gpu::dxil::fuzz_tests::fuzz_validate_and_gpu_2` - `gpu::dxil::fuzz_tests::fuzz_validate_and_gpu_3` - `gpu::dxil::ops_tests::doubles_match_cpu` - `gpu::dxil::ops_tests::groupshared_barrier_and_atomics_run` - `gpu::dxil::round_tests::gpu_direct_f32_round_modes_dynamic_and_denormals` - `gpu::dxil::round_tests::gpu_direct_f32_round_modes_static` - `gpu::dxil::round_tests::gpu_direct_f32_round_preserved_denormal_times_inf_is_inf` - `gpu::recomp::lower_dxil::tests::f64_programs_on_the_gpu` - `gpu::recomp::tests::gpu_clamp_and_omod_per_instruction` - `gpu::recomp::tests::gpu_f64_class_compare` - `gpu::recomp::tests::gpu_f64_compares_with_nan` - `gpu::recomp::tests::gpu_f64_literal_high_word` - `gpu::recomp::tests::gpu_f64_math_random` - `gpu::recomp::tests::gpu_f64_roots` - `gpu::recomp::tests::gpu_f64_rounding_and_conversions` - `gpu::recomp::tests::gpu_float_compares_random` - `gpu::recomp::tests::gpu_frexp_f64_exp_and_mant` - `gpu::recomp::tests::gpu_ldexp_f64` - `gpu::recomp::tests::gpu_rndne_f64` - `gpu::recomp::tests::gpu_split_wave64_reduction_tails` Five additional tests failed assertions. - `gpu::recomp::tests::gpu_nonfused_mad_and_mac_prevent_fma_contraction` returned 2139095040 for the fused overflow control, expected 1946157055. - `gpu::recomp::tests::gpu_ps_image_sample_offset_implicit_lod_between_mips` returned 25.609375 at pixel (0,0), expected 26. - `gpu::recomp::tests::gpu_valu_16_and_64_bit` failed the `v_add_f16` high-half preservation assertion in lane 0. - `gpu::recomp::tests::gpu_wave64_ps_whole_wave_reductions` returned `[2, 217, 2]` for the pixel 0 min/sum reduction, expected `[2, 216, 2]`. - `e2e::test_title_runs_and_game_folder_is_untouched` failed the synthetic title's dynamic depth-bias check at `RSSetDepthBiasX` slot `#94`. The top-right pixel was blue, expected green. **Skips** The log contains exactly 23 lines beginning with `SKIPPED ` across 13 tests. The harness passed count includes tests that returned early or exercised only some subcases. Excluded from coverage were 18 wave64 cases, three refused wave32 DXIL lowering cases (`V_MUL_F16`, `V_PK_MUL_F16`, `V_CVT_F16_F32`), one driver-cache measurement (`0x887A002D`), and one heap-window OOM fallback. **Not tested** - A retail Xbox title run, live console calls to newer DispatchMesh slot `#129`, or a GPU draw with EXP PRIM edge flags set. The run used the synthetic mesh and title tests, and `XCL_SAMPLE_*` was unset. - D3D12 debug-layer checks. The root-signature and texture-state tests can return early with notices captured by libtest, outside the 23 logged lines. - A same-run `main` baseline or retail smoke comparison, AMD and NVIDIA GPUs, and native wave64 hardware. **AI use** T3 Code / Codex (gpt-6.2-sol, reasoningEffort: high) ran the build and verification. Coordinator #2 (T3 Code / Antigravity, gemini-4-neon) verified the counts against `pr1984-suite.log` and published this report.
Author
Owner

@⁠DavidM1911 on GitHub · 2026-11-25 03:31 UTC · original

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

  • cargo test -p xcl --lib: all passed, 0 failed, ~26 ignored. (Intermittent single-test flake / 0xc0000005 abort under parallel scheduling — tracked in #1978; clean on single-threaded rerun.)

Thanks!

**@⁠DavidM1911** on GitHub · 2026-11-25 03:31 UTC · [original](https://github.com/xcl-dev/xcl/pull/1984#issuecomment-7151995332) Verification on RTX 3060 Ti (Windows 11), branch merged with current `main`: - `cargo test -p xcl --lib`: all passed, 0 failed, ~26 ignored. (Intermittent single-test flake / 0xc0000005 abort under parallel scheduling — tracked in #1978; clean on single-threaded rerun.) Thanks!
Author
Owner

@⁠Toons29 on GitHub · 2026-11-25 04:36 UTC · original

Regression run of 3eab40a4 on the retail title, for this PR's Regression run section. Both blocks are from scripts/smoke.ps1 as printed, not edited: main on cbc296ab, this PR on its head commit with no uncommitted changes, same title and time.

xcl-smoke v1
commit: cbc296ab65a2661a61e3e2da109134bcd5319f60
gpu: AMD Radeon RX 9070
title: 34df7c50
seconds: 60
exit: 0x0
frames shown: 1623 (PresentX 1623)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 14648 MB
xcl-smoke v1
commit: 3eab40a4bb48c15d4b79ed3f756deba52eb89bdb
gpu: AMD Radeon RX 9070
title: 34df7c50
seconds: 60
exit: 0x0
frames shown: 1626 (PresentX 1626)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 14817 MB

Against the limits in CONTRIBUTING.md: 100 % of main's frames, 101 % of its peak commit, no crash, no device removal.

AMD Radeon RX 9070 (RDNA4, driver 32.0.32029.2010), Ryzen 7 7800X3D, 32 GB, Windows 11 build 26300, Rust 1.100.0, cargo build --release -p xcl, 60 s, XCL_NETWORK=0. This is a regression check only: it does not show whether the run reaches the code this PR changes.

AI use: Claude Code (Claude Opus 5.5) built both trees and ran scripts/smoke.ps1; a script posted this right after the run, with both blocks exactly as printed.

**@⁠Toons29** on GitHub · 2026-11-25 04:36 UTC · [original](https://github.com/xcl-dev/xcl/pull/1984#issuecomment-7153003671) Regression run of `3eab40a4` on the retail title, for this PR's **Regression run** section. Both blocks are from `scripts/smoke.ps1` as printed, not edited: `main` on `cbc296ab`, this PR on its head commit with no uncommitted changes, same title and time. ``` xcl-smoke v1 commit: cbc296ab65a2661a61e3e2da109134bcd5319f60 gpu: AMD Radeon RX 9070 title: 34df7c50 seconds: 60 exit: 0x0 frames shown: 1623 (PresentX 1623) presents per 2 s (last 3): 60 60 60 device removals: 0 crashes: 0 peak commit: 14648 MB ``` ``` xcl-smoke v1 commit: 3eab40a4bb48c15d4b79ed3f756deba52eb89bdb gpu: AMD Radeon RX 9070 title: 34df7c50 seconds: 60 exit: 0x0 frames shown: 1626 (PresentX 1626) presents per 2 s (last 3): 60 60 60 device removals: 0 crashes: 0 peak commit: 14817 MB ``` Against the limits in CONTRIBUTING.md: 100 % of `main`'s frames, 101 % of its peak commit, no crash, no device removal. AMD Radeon RX 9070 (RDNA4, driver 32.0.32029.2010), Ryzen 7 7800X3D, 32 GB, Windows 11 build 26300, Rust 1.100.0, `cargo build --release -p xcl`, 60 s, `XCL_NETWORK=0`. This is a regression check only: it does not show whether the run reaches the code this PR changes. AI use: Claude Code (Claude Opus 5.5) built both trees and ran `scripts/smoke.ps1`; a script posted this right after the run, with both blocks exactly as printed.
Author
Owner

@⁠raylitebull on GitHub · 2026-11-25 10:37 UTC · original

Thanks @⁠Toons29 for running and sharing the exact-head 60 s scripts/smoke.ps1 pair on 3eab40a (0 device removals, 0 crashes) — added to the PR description!

**@⁠raylitebull** on GitHub · 2026-11-25 10:37 UTC · [original](https://github.com/xcl-dev/xcl/pull/1984#issuecomment-7159959597) Thanks @⁠Toons29 for running and sharing the exact-head 60 s `scripts/smoke.ps1` pair on `3eab40a` (0 device removals, 0 crashes) — added to the PR description!
This discussion has been locked. Commenting is limited to contributors.
No description provided.