dxil: batch consecutive v_readfirstlane/v_readlane exchanges in split-wave64 #2333

Open
zondy1i wants to merge 1 commit from upstream-pr/2343 into main
zondy1i commented 2026-11-25 16:07:29 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by zondy1i on 2026-11-25T16:07:29Z.


Part of #1269. Re-opens #2071 (rebased onto current main b49be183; #2071 was auto-closed after its fork branch was briefly deleted while nudging a stalled GitHub PR sync).

Prior independent hardware verification on #2071 (same implementation, pre-rebase): RTX 3090 multi-wave Partner::Spin (@WebIdentity1), Intel Arc A770 (@JJAutoCompare), vkd3d-proton / dxil-spirv (@JoaoPauluu), AMD RX 9070 XT + RTX 3060 (@DarkPanda69), and RTX 3060 Ti (@DavidM1911). On the previous head 77a9a6e of this PR: Linux / Wine / vkd3d-proton on an RX 7900 XT (@SlopTart), native Windows RX 9070 XT + RTX 3060 including gpu::dxil::fuzz_tests (@DarkPanda69), and a review by @bmjask (no source-level defect found).

Brings the split-wave64 v_readfirstlane_b32 / v_readlane_b32 exchange batching idea (similar to #944 for HLSL) to the direct DXIL backend (crates/xcl/src/gpu/dxil/).

In split-wave64 mode (wave64 console shaders running on 32-lane hardware such as NVIDIA/Intel GPUs), every v_readfirstlane_b32 / v_readlane_b32 previously emitted its own single-word exchange_n(&[m]) — 2 group barriers per instruction in Partner::Present (64-thread groups) and a full 4-block spin-wait loop with 2 TGSM_FENCE barriers and 2 groupshared atomicrmw ops per instruction in Partner::Spin (>64-thread groups). Consecutive independent runs now share a single exchange_n call. Native wave64 and wave32 lowering is untouched.

What changed

  • crates/xcl/src/gpu/dxil/lanes.rs:
    • Add Lw::read_lane_uniform_batch(&[(Value, Value)]) to perform one cross-half exchange_n across a run of independent lane reads (reusing l & 31 and lh == self.half when consecutive items share the same lane index).
  • crates/xcl/src/gpu/dxil/lower_valu.rs:
    • Add Lw::lower_block_insts to greedily batch consecutive Variant::Plain v_readfirstlane_b32 / v_readlane_b32 instructions within a basic block up to self.xslot, stopping at any SGPR read-after-write hazard (including EXEC, VCCZ, EXECZ, M0, or EXEC writes).
    • Add max_readlane_batch (stopping at CFG block leaders) to size split-wave64 exchange slots in Lw::new.
  • crates/xcl/src/gpu/dxil/kernel.rs & crates/xcl/src/gpu/dxil/compact.rs:
    • Lower block instructions through Lw::lower_block_insts in both the standard and compact forms.
    • Size slot in Lw::new when split and max_readlane_batch >= 2 (up to 16 words without LDS; bounded to at most 256 total dwords = 1 KiB when sharing LDS).
  • crates/xcl/src/gpu/dxil/core_tests.rs:
    • split_readlane_batch_merges_present_and_spin_exchanges: verifies 6 consecutive v_readfirstlane_b32 / v_readlane_b32 collapse from 13 to 3 barriers (Partner::Present) and from 13 to 3 atomicrmw add spin ops (Partner::Spin).
    • split_readlane_batch_respects_sgpr_hazards: verifies lane-selector RAW dependencies and EXEC writes break the batch.
    • gpu_split_readlane_batch_executes_correctly: GPU execution check on lower-half, upper-half, masked-lower-half, and dependent-chain cases.

Tested

  • Toolchain: Windows 11 x64, rustc 1.100.0, DXC / dxil.dll 1.9.2602.17, NVIDIA GeForce RTX 3060 Ti 8 GB (driver 621.01).
  • cargo test --workspace -- --test-threads=4 on 3ec09d7: 1438 passed, 0 failed, 47 ignored across 37 test binaries (29 runtime SKIPPED notices from adapter-gated tests); includes split_readlane_batch_merges_present_and_spin_exchanges, split_readlane_batch_respects_sgpr_hazards and gpu_split_readlane_batch_executes_correctly.
  • xcl shaders <corpus> --direct --sample 500 --seed 1 --max-bytes 262144 --split 1 --validate --threads 8: 500/500 translated and validated (0 unsupported, 0 validator failures, 0 panics), run on the previous head 77a9a6e; the rebase onto current main resolved one conflict in core_tests.rs (both sides appended tests) and changed no code.

Not tested

  • By me on this head: gpu::dxil::fuzz_tests, AMD / Intel GPUs, Linux / Wine / vkd3d-proton (the reports above ran them on 77a9a6e).
  • A graphics-stage (pixel / geometry) execution case for the shared lowering, suggested in review; the new execution test is compute-only.

Regression run
main:

xcl-smoke v1
commit: 568e7db7729c8fa6c8f0f4b32d798faaf11462bb
gpu: NVIDIA GeForce RTX 3060 Ti
title: 3c290c16
seconds: 60
exit: 0x0
frames shown: 1580 (PresentX 1580)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 15495 MB

PR:

xcl-smoke v1
commit: 3ec09d711cb17c59dd8a2ddd28ea2e9b0b0da316
gpu: NVIDIA GeForce RTX 3060 Ti
title: 3c290c16
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: 14888 MB

AI use
Antigravity (Gemini 4 Neon) assisted with implementation, IR/hazard/GPU tests, and validation; all changes were reviewed and verified locally.

<!-- greyfinch-sync:ivall/xcl:issue:5494817908 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2343). Originally posted by [zondy1i](https://github.com/zondy1i) on 2026-11-25T16:07:29Z. --- Part of #1269. Re-opens #2071 (rebased onto current `main` `b49be183`; #2071 was auto-closed after its fork branch was briefly deleted while nudging a stalled GitHub PR sync). Prior independent hardware verification on #2071 (same implementation, pre-rebase): RTX 3090 multi-wave `Partner::Spin` (@WebIdentity1), Intel Arc A770 (@JJAutoCompare), vkd3d-proton / dxil-spirv (@JoaoPauluu), AMD RX 9070 XT + RTX 3060 (@DarkPanda69), and RTX 3060 Ti (@DavidM1911). On the previous head `77a9a6e` of this PR: Linux / Wine / vkd3d-proton on an RX 7900 XT (@SlopTart), native Windows RX 9070 XT + RTX 3060 including `gpu::dxil::fuzz_tests` (@DarkPanda69), and a review by @bmjask (no source-level defect found). Brings the split-wave64 `v_readfirstlane_b32` / `v_readlane_b32` exchange batching idea (similar to #944 for HLSL) to the direct DXIL backend (`crates/xcl/src/gpu/dxil/`). In split-wave64 mode (wave64 console shaders running on 32-lane hardware such as NVIDIA/Intel GPUs), every `v_readfirstlane_b32` / `v_readlane_b32` previously emitted its own single-word `exchange_n(&[m])` — 2 group barriers per instruction in `Partner::Present` (64-thread groups) and a full 4-block spin-wait loop with 2 `TGSM_FENCE` barriers and 2 groupshared `atomicrmw` ops per instruction in `Partner::Spin` (>64-thread groups). Consecutive independent runs now share a single `exchange_n` call. Native wave64 and wave32 lowering is untouched. **What changed** - `crates/xcl/src/gpu/dxil/lanes.rs`: - Add `Lw::read_lane_uniform_batch(&[(Value, Value)])` to perform one cross-half `exchange_n` across a run of independent lane reads (reusing `l & 31` and `lh == self.half` when consecutive items share the same lane index). - `crates/xcl/src/gpu/dxil/lower_valu.rs`: - Add `Lw::lower_block_insts` to greedily batch consecutive `Variant::Plain` `v_readfirstlane_b32` / `v_readlane_b32` instructions within a basic block up to `self.xslot`, stopping at any SGPR read-after-write hazard (including `EXEC`, `VCCZ`, `EXECZ`, `M0`, or `EXEC` writes). - Add `max_readlane_batch` (stopping at CFG block `leaders`) to size split-wave64 exchange slots in `Lw::new`. - `crates/xcl/src/gpu/dxil/kernel.rs` & `crates/xcl/src/gpu/dxil/compact.rs`: - Lower block instructions through `Lw::lower_block_insts` in both the standard and compact forms. - Size `slot` in `Lw::new` when `split` and `max_readlane_batch >= 2` (up to 16 words without LDS; bounded to at most 256 total dwords = 1 KiB when sharing LDS). - `crates/xcl/src/gpu/dxil/core_tests.rs`: - `split_readlane_batch_merges_present_and_spin_exchanges`: verifies 6 consecutive `v_readfirstlane_b32` / `v_readlane_b32` collapse from 13 to 3 barriers (`Partner::Present`) and from 13 to 3 `atomicrmw add` spin ops (`Partner::Spin`). - `split_readlane_batch_respects_sgpr_hazards`: verifies lane-selector RAW dependencies and `EXEC` writes break the batch. - `gpu_split_readlane_batch_executes_correctly`: GPU execution check on lower-half, upper-half, masked-lower-half, and dependent-chain cases. **Tested** - Toolchain: Windows 11 x64, `rustc 1.100.0`, DXC / `dxil.dll` `1.9.2602.17`, NVIDIA GeForce RTX 3060 Ti 8 GB (driver `621.01`). - `cargo test --workspace -- --test-threads=4` on `3ec09d7`: 1438 passed, 0 failed, 47 ignored across 37 test binaries (29 runtime `SKIPPED` notices from adapter-gated tests); includes `split_readlane_batch_merges_present_and_spin_exchanges`, `split_readlane_batch_respects_sgpr_hazards` and `gpu_split_readlane_batch_executes_correctly`. - `xcl shaders <corpus> --direct --sample 500 --seed 1 --max-bytes 262144 --split 1 --validate --threads 8`: **500/500 translated and validated** (0 unsupported, 0 validator failures, 0 panics), run on the previous head `77a9a6e`; the rebase onto current `main` resolved one conflict in `core_tests.rs` (both sides appended tests) and changed no code. **Not tested** - By me on this head: `gpu::dxil::fuzz_tests`, AMD / Intel GPUs, Linux / Wine / vkd3d-proton (the reports above ran them on `77a9a6e`). - A graphics-stage (pixel / geometry) execution case for the shared lowering, suggested in review; the new execution test is compute-only. **Regression run** `main`: ``` xcl-smoke v1 commit: 568e7db7729c8fa6c8f0f4b32d798faaf11462bb gpu: NVIDIA GeForce RTX 3060 Ti title: 3c290c16 seconds: 60 exit: 0x0 frames shown: 1580 (PresentX 1580) presents per 2 s (last 3): 60 60 60 device removals: 0 crashes: 0 peak commit: 15495 MB ``` PR: ``` xcl-smoke v1 commit: 3ec09d711cb17c59dd8a2ddd28ea2e9b0b0da316 gpu: NVIDIA GeForce RTX 3060 Ti title: 3c290c16 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: 14888 MB ``` **AI use** Antigravity (Gemini 4 Neon) assisted with implementation, IR/hazard/GPU tests, and validation; all changes were reviewed and verified locally.
SlopTart commented 2026-11-25 17:07:19 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by SlopTart on 2026-11-25T16:22:32Z.


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

No Linux/Wine report in the thread yet; adding one.

  • gpu_ suite (--release --locked, --test-threads=2): 145 passed / 3 failed / 1 ignored, same three baseline failures as plain origin/main on this rig (rig's known baseline: fuzz seed 1003 of #2115, gpu_nonfused_mad_and_mac_prevent_fma_contraction, gpu_depth_buffer_created_for_unordered_access_is_placed). The +1 pass vs the pre-PR count is this PR's new gpu_split_readlane_batch_executes_correctly, green.
  • The two new unit tests outside the filter, gpu::dxil::core_tests::split_readlane_batch_merges_present_and_spin_exchanges and ...split_readlane_batch_respects_sgpr_hazards: both pass, targeted run.
  • This lane is a fixed wave64 part (RDNA3), so the split-wave64 batching path is the real shape here, not an emulated one.

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:7167875169 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2343#issuecomment-7167875169). Originally posted by [SlopTart](https://github.com/SlopTart) on 2026-11-25T16:22:32Z. --- **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). No Linux/Wine report in the thread yet; adding one. - `gpu_` suite (`--release --locked`, `--test-threads=2`): 145 passed / 3 failed / 1 ignored, same three baseline failures as plain `origin/main` on this rig (rig's known baseline: fuzz seed 1003 of #2115, `gpu_nonfused_mad_and_mac_prevent_fma_contraction`, `gpu_depth_buffer_created_for_unordered_access_is_placed`). The +1 pass vs the pre-PR count is this PR's new `gpu_split_readlane_batch_executes_correctly`, green. - The two new unit tests outside the filter, `gpu::dxil::core_tests::split_readlane_batch_merges_present_and_spin_exchanges` and `...split_readlane_batch_respects_sgpr_hazards`: both pass, targeted run. - This lane is a fixed wave64 part (RDNA3), so the split-wave64 batching path is the real shape here, not an emulated one. **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.
DarkPanda69 commented 2026-11-25 17:07:22 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by DarkPanda69 on 2026-11-25T16:31:18Z.


Update for head 3ec09d7: paired rerun on main b49be18 with XCL_DIRECT_DXIL=1, same cards. On both, the only result changes against main are gpu_split_readlane_batch_executes_correctly, split_readlane_batch_merges_present_and_spin_exchanges and split_readlane_batch_respects_sgpr_hazards, all ok, with no new skips. RX 9070 XT: 708 → 711 passed, 2 failed (the #2115 fuzz seeds 722 / 1599, the same on main), 6 SKIPPED. RTX 3060: 710 → 713 passed, 0 failed, 24 SKIPPED.

Native Windows AMD run, including gpu::dxil::fuzz_tests (both listed as untested; the AMD run above is Linux / RADV), plus an RTX 3060, paired against main with the direct translator on.

Head 77a9a6e applied on main 3f4495a, debug, Windows 11 Pro 26200:

  • cargo test -p xcl --lib -- gpu:: --test-threads=4: gpu_split_readlane_batch_executes_correctly ok on both cards. RX 9070 XT (RDNA4, 32.0.32029.2010): 646 passed, 2 failed, 22 ignored. RTX 3060 (32.0.16.1088): 648 passed, 0 failed.
  • gpu::dxil::fuzz_tests: on the RX 9070 XT the same two fail with and without this PR, fuzz_validate_and_gpu_1 (seed 722) and fuzz_validate_and_gpu_3 (seed 1599), the AMD driver issue tracked in #2115; every other fuzz group passes. On the RTX 3060 all pass. So the PR adds no fuzz failure.
  • Paired with XCL_DIRECT_DXIL=1 for the whole gpu:: filter: on both cards the only differences from main are the 3 new tests (all ok); no existing test changes result or skip state.

Not tested: a title, Intel.
AI use: Claude Code (Claude Opus 5.5) ran the tests on this machine and wrote this report.

<!-- greyfinch-sync:ivall/xcl:comment:7168112664 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2343#issuecomment-7168112664). Originally posted by [DarkPanda69](https://github.com/DarkPanda69) on 2026-11-25T16:31:18Z. --- **Update for head `3ec09d7`:** paired rerun on `main` `b49be18` with `XCL_DIRECT_DXIL=1`, same cards. On both, the only result changes against `main` are `gpu_split_readlane_batch_executes_correctly`, `split_readlane_batch_merges_present_and_spin_exchanges` and `split_readlane_batch_respects_sgpr_hazards`, all ok, with no new skips. RX 9070 XT: 708 → 711 passed, 2 failed (the #2115 fuzz seeds 722 / 1599, the same on `main`), 6 SKIPPED. RTX 3060: 710 → 713 passed, 0 failed, 24 SKIPPED. Native Windows AMD run, including `gpu::dxil::fuzz_tests` (both listed as untested; the AMD run above is Linux / RADV), plus an RTX 3060, paired against `main` with the direct translator on. Head `77a9a6e` applied on `main` `3f4495a`, debug, Windows 11 Pro 26200: - `cargo test -p xcl --lib -- gpu:: --test-threads=4`: `gpu_split_readlane_batch_executes_correctly` ok on both cards. RX 9070 XT (RDNA4, 32.0.32029.2010): 646 passed, 2 failed, 22 ignored. RTX 3060 (32.0.16.1088): 648 passed, 0 failed. - `gpu::dxil::fuzz_tests`: on the RX 9070 XT the same two fail with and without this PR, `fuzz_validate_and_gpu_1` (seed 722) and `fuzz_validate_and_gpu_3` (seed 1599), the AMD driver issue tracked in #2115; every other fuzz group passes. On the RTX 3060 all pass. So the PR adds no fuzz failure. - Paired with `XCL_DIRECT_DXIL=1` for the whole `gpu::` filter: on both cards the only differences from `main` are the 3 new tests (all ok); no existing test changes result or skip state. Not tested: a title, Intel. AI use: Claude Code (Claude Opus 5.5) ran the tests on this machine and wrote this report.
DavidM1911 commented 2026-11-25 19:09:04 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by DavidM1911 on 2026-11-25T18:25:26Z.


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!

<!-- greyfinch-sync:ivall/xcl:comment:7170887293 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2343#issuecomment-7170887293). Originally posted by [DavidM1911](https://github.com/DavidM1911) on 2026-11-25T18:25:26Z. --- 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!
bmjask commented 2026-11-25 20:45:34 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by bmjask on 2026-11-25T20:45:34Z.

Review: COMMENTED


No concrete source-level defect found. Batching preserves read/write ordering and stops on SGPR/EXEC/VCC/M0 hazards; current CI and compute GPU coverage are strong. Nonblocking gap: execution coverage is compute-only while this shared lowering also applies to Direct-DXIL graphics. Add a split-wave64 graphics-stage execution case, ideally pixel/helper-lane or geometry, to exercise that path.

<!-- greyfinch-sync:ivall/xcl:review:6064746055 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2343#pullrequestreview-6064746055). Originally posted by [bmjask](https://github.com/bmjask) on 2026-11-25T20:45:34Z. **Review:** COMMENTED --- No concrete source-level defect found. Batching preserves read/write ordering and stops on SGPR/EXEC/VCC/M0 hazards; current CI and compute GPU coverage are strong. Nonblocking gap: execution coverage is compute-only while this shared lowering also applies to Direct-DXIL graphics. Add a split-wave64 graphics-stage execution case, ideally pixel/helper-lane or geometry, to exercise that path.
zondy1i commented 2026-11-26 03:06:39 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by zondy1i on 2026-11-26T03:04:02Z.


Rebased onto current main (b49be183); the only conflict was in core_tests.rs (both sides appended tests at the end, kept both) and no code changed. Re-ran the full workspace suite (1438 passed, 0 failed) and a 60 s smoke on the new head 3ec09d7; description updated with the new smoke block.

Re @bmjask's non-blocking note: a graphics-stage (pixel / geometry) execution case for the shared lowering is not in this PR; the new GPU test is compute-only. I listed it under "Not tested".

<!-- greyfinch-sync:ivall/xcl:comment:7181364952 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2343#issuecomment-7181364952). Originally posted by [zondy1i](https://github.com/zondy1i) on 2026-11-26T03:04:02Z. --- Rebased onto current `main` (`b49be183`); the only conflict was in `core_tests.rs` (both sides appended tests at the end, kept both) and no code changed. Re-ran the full workspace suite (1438 passed, 0 failed) and a 60 s smoke on the new head `3ec09d7`; description updated with the new smoke block. Re @bmjask's non-blocking note: a graphics-stage (pixel / geometry) execution case for the shared lowering is not in this PR; the new GPU test is compute-only. I listed it under "Not tested".
artor410 commented 2026-11-28 07:56:54 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by artor410 on 2026-11-28T07:56:54Z.


Test report, head 3ec09d7, NVIDIA GeForce RTX 3070 Ti (driver 610.88), Windows 11, rustc 1.100.0, debug build, no game data (no XCL_SAMPLE_* set).

cargo test --workspace -- --test-threads=4: 1391 passed, 1 failed, 31 ignored.

The one failure is e2e::test_title_runs_under_the_debug_layer_with_dred (test title exits 0xC0000005 under the debug layer). It fails the same way on main e429936 on this machine, so it is not from this PR. Everything else passes.

AI use: Claude Code (Claude Opus 5.5) ran the suite and wrote this.

<!-- greyfinch-sync:ivall/xcl:comment:7236263410 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2343#issuecomment-7236263410). Originally posted by [artor410](https://github.com/artor410) on 2026-11-28T07:56:54Z. --- Test report, head 3ec09d7, NVIDIA GeForce RTX 3070 Ti (driver 610.88), Windows 11, rustc 1.100.0, debug build, no game data (no XCL_SAMPLE_* set). `cargo test --workspace -- --test-threads=4`: 1391 passed, 1 failed, 31 ignored. The one failure is `e2e::test_title_runs_under_the_debug_layer_with_dred` (test title exits 0xC0000005 under the debug layer). It fails the same way on main e429936 on this machine, so it is not from this PR. Everything else passes. AI use: Claude Code (Claude Opus 5.5) ran the suite and wrote this.
Foniass commented 2026-12-01 07:52:20 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by Foniass on 2026-12-01T07:52:20Z.


Triage (#1607) – head 3ec09d7

This re-opens #2071, which is closed. #944 batches the same v_readfirstlane_b32 / v_readlane_b32 exchanges, but it does so in the HLSL backend (recomp/emit.rs), while this PR changes the direct DXIL backend, so they are not the same change. #1193 and #3563 skip some first-lane exchanges entirely and would interact with this PR, but they do not batch them. This PR conflicts with main. Since then main has added dxil/waterfall.rs and dxil/mask_exchange.rs, which also deal with V_READFIRSTLANE runs and EXEC exchanges. After the rebase, check that the batched path in lower_block_insts, which bypasses Lw::inst, still does what those now expect. No problems found in the diff on its own base.
Recommendation: keep open.

AI review: Claude Code (Claude Opus 5.5), diffs read only, not built or run; not checked by a human.

<!-- greyfinch-sync:ivall/xcl:comment:7304587943 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2343#issuecomment-7304587943). Originally posted by [Foniass](https://github.com/Foniass) on 2026-12-01T07:52:20Z. --- **Triage (#1607)** – head 3ec09d7 This re-opens #2071, which is closed. #944 batches the same `v_readfirstlane_b32` / `v_readlane_b32` exchanges, but it does so in the HLSL backend (recomp/emit.rs), while this PR changes the direct DXIL backend, so they are not the same change. #1193 and #3563 skip some first-lane exchanges entirely and would interact with this PR, but they do not batch them. This PR conflicts with main. Since then main has added `dxil/waterfall.rs` and `dxil/mask_exchange.rs`, which also deal with `V_READFIRSTLANE` runs and EXEC exchanges. After the rebase, check that the batched path in `lower_block_insts`, which bypasses `Lw::inst`, still does what those now expect. No problems found in the diff on its own base. Recommendation: keep open. AI review: Claude Code (Claude Opus 5.5), diffs read only, not built or run; not checked by a human.
This pull request cannot be merged automatically due to conflicts.
Merge manually to resolve the conflicts.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin 'upstream-pr/2343:upstream-pr/2343'
git switch 'upstream-pr/2343'

Merge

Merge the changes and update on Forgejo.

Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.

git switch 'main'
git merge --no-ff 'upstream-pr/2343'
git switch 'upstream-pr/2343'
git rebase 'main'
git switch 'main'
git merge --ff-only 'upstream-pr/2343'
git switch 'upstream-pr/2343'
git rebase 'main'
git switch 'main'
git merge --no-ff 'upstream-pr/2343'
git switch 'main'
git merge --squash 'upstream-pr/2343'
git switch 'main'
git merge --ff-only 'upstream-pr/2343'
git switch 'main'
git merge 'upstream-pr/2343'
git push origin 'main'
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!2333
No description provided.