dxil: prefer live lanes in PS v_readfirstlane and lane-mask SCC tests #2491

Merged
Decodere merged 1 commit from upstream-pr/2501 into main 2026-11-29 12:19:00 +00:00
Decodere commented 2026-11-25 20:52:04 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by Decodere on 2026-11-25T20:52:04Z.


Bring the direct DXIL pixel-shader lowering into parity with the HLSL recompiler's live-lane handling for helper lanes under s_wqm (v_readfirstlane and VCC/EXEC lane-mask SCC checks). Part of #675. Part of #1401. Part of #1833.

What is in it

  • crates/xcl/src/gpu/dxil/lanes.rs:
    • Added Lw::is_pixel (reused in ballot and rla) and Lw::live_lanes, which emits WaveActiveBallot(true) and selects the active half in wave32-in-64 mode (matching HLSL ballot(true)).
    • Updated Lw::first_lane so pixel shaders intersect (lo, hi) with live_lanes() before firstbitlow when any live lane bit is set, falling back to raw (lo, hi) when only helper lanes are set (parity with HLSL first_lane_live; non-pixel stages unchanged).
  • crates/xcl/src/gpu/dxil/lower.rs:
    • Added Lw::ps_mask_live_scc matching pixel-shader ENC_SOP2 s_and_b32, s_andn2_b32, s_and_b64, and s_andn2_b64 instructions with VCC (106) or EXEC (126) as SSRC0, SSRC1, or SDST.
    • Updated Lw::salu and Lw::salu64 to mask only the SCC zero-check by live_lanes() when ps_mask_live_scc holds, leaving the destination register write (write32 / write64) unmasked (parity with HLSL mask_live, extended to 64-bit masks).
  • crates/xcl/src/gpu/dxil/lanes.rs (ps_ballot_tests):
    • direct_ps_readfirstlane_filters_exec_by_live_lanes: pure-CPU DXC 1.9 validation and disassembly check for wave32/wave64 PS plus compute negative control.
    • direct_ps_mask_and_scc_counts_live_lanes_only: pure-CPU DXC 1.9 validation and disassembly check for wave32/wave64 PS s_and/s_andn2 touching VCC/EXEC (including SDST=NULL) plus non-mask PS and compute negative controls.
    • gpu_direct_ps_readfirstlane_and_mask_live_on_triangle_edges: draws two triangles sharing a diagonal (32x32) on wave32 (and wave64 when supported) verifying v_readfirstlane selects a live lane (2.0), helper-only s_andn2 sets SCC == 0 while preserving helper bits in the destination and live-lane s_and sets SCC == 1, and a 6-pass march loop exits at 6.0 on all 1024/1024 pixels (cleanly skipped on WARP/CI without wave32).

Tested

  • Hardware / toolchain: NVIDIA GeForce RTX 4060 8 GB (driver 621.14, 32-lane waves), Intel Core i5-11400F, Windows 11 Home build 26200, Rust 1.100.0, DXC / dxil.dll 1.9.2609.5, release build.
  • Failing-first before the lanes.rs / lower.rs fix (on origin/main e0d93c8): both new pure-CPU/DXC tests failed (0 passed, 2 failed).
  • Targeted cargo test --release -p xcl --lib -- gpu::dxil::lanes::ps_ballot_tests:: --nocapture:
    • RTX 4060: 7 passed, 0 failed, 0 ignored (0.43 s, 0 skipped; 1024/1024 pixels passed for both wave64 = false and wave64 = true).
    • XCL_ADAPTER=warp: 7 passed, 0 failed, 0 ignored (0.05 s; all 5 pure-CPU/DXC tests passed with 0 skips; the 2 GPU edge-draw tests cleanly skipped with no wave32 / no wave64).
  • cargo test --release --workspace --no-fail-fast -- --test-threads=4 --nocapture (RTX 4060): 1424 passed, 0 failed, 46 ignored across 37 test binaries (184/184 gpu::dxil::* passed; 29 pre-existing SKIPPED GPU/environment checks: 21 no wave64, 3 per-lane wave32 refused, 3 no D3D12 debug layer, 1 no heap windows, 1 cannot disable driver cache; 0 skipped in ps_ballot_tests).

Regression run
main:

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

PR:

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

Not tested

  • Native 64-lane pixel-shader execution on AMD RDNA2/3/4 hardware (where driver helper-lane register zeroing occurs in loops) and D3D12 debug-layer tests requiring d3d12SDKLayers.dll.

AI use

  • Google Antigravity (Gemini 4 Neon) implemented is_pixel/live_lanes/first_lane in lanes.rs and ps_mask_live_scc in lower.rs, wrote the DXC-validated and GPU edge tests, ran the test and smoke suites, and drafted this PR description.
<!-- greyfinch-sync:ivall/xcl:issue:5498980446 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2501). Originally posted by [Decodere](https://github.com/Decodere) on 2026-11-25T20:52:04Z. --- Bring the direct DXIL pixel-shader lowering into parity with the HLSL recompiler's live-lane handling for helper lanes under `s_wqm` (`v_readfirstlane` and `VCC`/`EXEC` lane-mask `SCC` checks). Part of #675. Part of #1401. Part of #1833. **What is in it** - `crates/xcl/src/gpu/dxil/lanes.rs`: - Added `Lw::is_pixel` (reused in `ballot` and `rla`) and `Lw::live_lanes`, which emits `WaveActiveBallot(true)` and selects the active half in wave32-in-64 mode (matching HLSL `ballot(true)`). - Updated `Lw::first_lane` so pixel shaders intersect `(lo, hi)` with `live_lanes()` before `firstbitlow` when any live lane bit is set, falling back to raw `(lo, hi)` when only helper lanes are set (parity with HLSL `first_lane_live`; non-pixel stages unchanged). - `crates/xcl/src/gpu/dxil/lower.rs`: - Added `Lw::ps_mask_live_scc` matching pixel-shader `ENC_SOP2` `s_and_b32`, `s_andn2_b32`, `s_and_b64`, and `s_andn2_b64` instructions with `VCC` (`106`) or `EXEC` (`126`) as `SSRC0`, `SSRC1`, or `SDST`. - Updated `Lw::salu` and `Lw::salu64` to mask only the `SCC` zero-check by `live_lanes()` when `ps_mask_live_scc` holds, leaving the destination register write (`write32` / `write64`) unmasked (parity with HLSL `mask_live`, extended to 64-bit masks). - `crates/xcl/src/gpu/dxil/lanes.rs` (`ps_ballot_tests`): - `direct_ps_readfirstlane_filters_exec_by_live_lanes`: pure-CPU DXC 1.9 validation and disassembly check for wave32/wave64 PS plus compute negative control. - `direct_ps_mask_and_scc_counts_live_lanes_only`: pure-CPU DXC 1.9 validation and disassembly check for wave32/wave64 PS `s_and`/`s_andn2` touching `VCC`/`EXEC` (including `SDST=NULL`) plus non-mask PS and compute negative controls. - `gpu_direct_ps_readfirstlane_and_mask_live_on_triangle_edges`: draws two triangles sharing a diagonal (`32x32`) on wave32 (and wave64 when supported) verifying `v_readfirstlane` selects a live lane (`2.0`), helper-only `s_andn2` sets `SCC == 0` while preserving helper bits in the destination and live-lane `s_and` sets `SCC == 1`, and a 6-pass march loop exits at `6.0` on all `1024/1024` pixels (cleanly skipped on WARP/CI without wave32). **Tested** - Hardware / toolchain: NVIDIA GeForce RTX 4060 8 GB (driver 621.14, 32-lane waves), Intel Core i5-11400F, Windows 11 Home build 26200, Rust 1.100.0, DXC / `dxil.dll` 1.9.2609.5, release build. - Failing-first before the `lanes.rs` / `lower.rs` fix (on `origin/main` `e0d93c8`): both new pure-CPU/DXC tests failed (`0 passed, 2 failed`). - Targeted `cargo test --release -p xcl --lib -- gpu::dxil::lanes::ps_ballot_tests:: --nocapture`: - RTX 4060: `7 passed, 0 failed, 0 ignored` (`0.43 s`, `0` skipped; `1024/1024` pixels passed for both `wave64 = false` and `wave64 = true`). - `XCL_ADAPTER=warp`: `7 passed, 0 failed, 0 ignored` (`0.05 s`; all 5 pure-CPU/DXC tests passed with `0` skips; the 2 GPU edge-draw tests cleanly skipped with `no wave32` / `no wave64`). - `cargo test --release --workspace --no-fail-fast -- --test-threads=4 --nocapture` (RTX 4060): `1424 passed, 0 failed, 46 ignored` across `37` test binaries (`184/184` `gpu::dxil::*` passed; `29` pre-existing `SKIPPED` GPU/environment checks: `21` no wave64, `3` per-lane wave32 refused, `3` no D3D12 debug layer, `1` no heap windows, `1` cannot disable driver cache; `0` skipped in `ps_ballot_tests`). **Regression run** main: ``` xcl-smoke v1 commit: e0d93c84ad8253f6e17738d14741c1bab7061127 gpu: NVIDIA GeForce RTX 4060 title: 29640639 seconds: 60 exit: 0x0 frames shown: 1579 (PresentX 1579) presents per 2 s (last 3): 61 60 60 device removals: 0 crashes: 0 peak commit: 13985 MB ``` PR: ``` xcl-smoke v1 commit: de915b5adb519c9aa342107fb05fbe56540541ff gpu: NVIDIA GeForce RTX 4060 title: 29640639 seconds: 60 exit: 0x0 frames shown: 1542 (PresentX 1542) presents per 2 s (last 3): 60 60 60 device removals: 0 crashes: 0 peak commit: 13984 MB ``` **Not tested** - Native 64-lane pixel-shader execution on AMD RDNA2/3/4 hardware (where driver helper-lane register zeroing occurs in loops) and D3D12 debug-layer tests requiring `d3d12SDKLayers.dll`. **AI use** - Google Antigravity (Gemini 4 Neon) implemented `is_pixel`/`live_lanes`/`first_lane` in `lanes.rs` and `ps_mask_live_scc` in `lower.rs`, wrote the DXC-validated and GPU edge tests, ran the test and smoke suites, and drafted this PR description.
DavidM1911 commented 2026-11-25 21:05:29 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by DavidM1911 on 2026-11-25T21:03:28Z.


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:7174551292 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2501#issuecomment-7174551292). Originally posted by [DavidM1911](https://github.com/DavidM1911) on 2026-11-25T21:03:28Z. --- 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!
SlopTart commented 2026-11-25 22:06:36 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by SlopTart on 2026-11-25T21:08:18Z.


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.
Targeted run of the new mask/readfirstlane tests (direct_ps_mask_and_scc_counts_live_lanes_only, direct_ps_readfirstlane_filters_exec_by_live_lanes, gpu_direct_ps_readfirstlane_and_mask_live_on_triangle_edges, helper): 4 passed.

<!-- greyfinch-sync:ivall/xcl:comment:7174661996 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2501#issuecomment-7174661996). Originally posted by [SlopTart](https://github.com/SlopTart) on 2026-11-25T21:08:18Z. --- `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. Targeted run of the new mask/readfirstlane tests (`direct_ps_mask_and_scc_counts_live_lanes_only`, `direct_ps_readfirstlane_filters_exec_by_live_lanes`, `gpu_direct_ps_readfirstlane_and_mask_live_on_triangle_edges`, helper): 4 passed.
DarkPanda69 commented 2026-11-25 22:06:54 +00:00 (Migrated from github.com)

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


Correction: the PR test translates its wave64 pass in the native form (wave64: true, split: false), and that pass ran and passed on the RX 9070 XT. Which wave size the driver gives a pixel shader is the driver's choice, though, and the test does not check it, so this report does not show that the pass ran in 64-lane waves.

AMD RDNA4 run of the native (split: false) wave64 pixel-shader form, plus an RTX 3060: all 3 new tests pass on both cards, and nothing else changes.

Diff applied on main 6d12f58, debug, Windows 11 Pro 26200, XCL_DIRECT_DXIL=1 cargo test -p xcl --lib -- gpu:: --test-threads=4, run on main and with the PR, card chosen with XCL_ADAPTER:

  • RX 9070 XT (RDNA4, driver 32.0.32029.2010; XCL_SPLIT_WAVE64 unset): gpu_direct_ps_readfirstlane_and_mask_live_on_triangle_edges, direct_ps_readfirstlane_filters_exec_by_live_lanes and direct_ps_mask_and_scc_counts_live_lanes_only ok. 701 passed, 2 failed; the 2 failures are the AMD fuzz seeds tracked in #2115, the same on main. Same skip count as main (6).
  • RTX 3060 (driver 32.0.16.1088): the same 3 tests ok; 703 passed, 0 failed.

No other test changes result on either card.

Not tested: the D3D12 debug-layer tests (d3d12SDKLayers.dll), RDNA2/3, retail pixel shaders.
AI use: Claude Code (Claude Opus 5.5) ran the tests on this machine and wrote this report.

<!-- greyfinch-sync:ivall/xcl:comment:7174644623 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2501#issuecomment-7174644623). Originally posted by [DarkPanda69](https://github.com/DarkPanda69) on 2026-11-25T21:07:31Z. --- **Correction:** the PR test translates its `wave64` pass in the native form (`wave64: true, split: false`), and that pass ran and passed on the RX 9070 XT. Which wave size the driver gives a pixel shader is the driver's choice, though, and the test does not check it, so this report does not show that the pass ran in 64-lane waves. AMD RDNA4 run of the native (`split: false`) wave64 pixel-shader form, plus an RTX 3060: all 3 new tests pass on both cards, and nothing else changes. Diff applied on `main` `6d12f58`, debug, Windows 11 Pro 26200, `XCL_DIRECT_DXIL=1 cargo test -p xcl --lib -- gpu:: --test-threads=4`, run on `main` and with the PR, card chosen with `XCL_ADAPTER`: - **RX 9070 XT** (RDNA4, driver 32.0.32029.2010; `XCL_SPLIT_WAVE64` unset): `gpu_direct_ps_readfirstlane_and_mask_live_on_triangle_edges`, `direct_ps_readfirstlane_filters_exec_by_live_lanes` and `direct_ps_mask_and_scc_counts_live_lanes_only` ok. 701 passed, 2 failed; the 2 failures are the AMD fuzz seeds tracked in #2115, the same on `main`. Same skip count as `main` (6). - **RTX 3060** (driver 32.0.16.1088): the same 3 tests ok; 703 passed, 0 failed. No other test changes result on either card. Not tested: the D3D12 debug-layer tests (`d3d12SDKLayers.dll`), RDNA2/3, retail pixel shaders. AI use: Claude Code (Claude Opus 5.5) ran the tests on this machine and wrote this report.
luckyteagirl commented 2026-11-26 05:05:32 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by luckyteagirl on 2026-11-26T04:16:35Z.


RX 6800M focused validation on exact PR head de915b5adb519c9aa342107fb05fbe56540541ff:

  • Windows 11 Home build 26200; Ryzen 9 5980HX; Radeon RX 6800M driver 30.0.13002.13003; Rust 1.99.0 MSVC; DXC 1.9.2609.5.
  • XCL_ADAPTER=6800M, XCL_REQUIRE_GPU=wave64, pinned XCL_DXC_DIR; cargo test --locked -p xcl --lib gpu::dxil::lanes::ps_ballot_tests::gpu_direct_ps_readfirstlane_and_mask_live_on_triangle_edges -- --exact --test-threads=1 --show-output.
  • Result: 1 passed, 0 failed, 0 ignored, 0 explicit SKIPPED (1324 filtered out). The test's rendered-pixel assertions passed. Isolated guarded run exited 0 without a memory-guard stop.

The fixture does not print its selected adapter or report the driver's physical pixel-shader wave width. The XCL_ADAPTER selector and required-GPU mode were set, but this result should not be read as proof that the driver executed 64-lane pixel waves. This was one focused debug test, not a full suite or retail-title run.

AI use: Codex (exact model name not exposed to me) with a Luna subagent prepared and ran the test and drafted this report; I checked the exact head and log before posting.

<!-- greyfinch-sync:ivall/xcl:comment:7182451874 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2501#issuecomment-7182451874). Originally posted by [luckyteagirl](https://github.com/luckyteagirl) on 2026-11-26T04:16:35Z. --- RX 6800M focused validation on exact PR head `de915b5adb519c9aa342107fb05fbe56540541ff`: - Windows 11 Home build 26200; Ryzen 9 5980HX; Radeon RX 6800M driver `30.0.13002.13003`; Rust 1.99.0 MSVC; DXC 1.9.2609.5. - `XCL_ADAPTER=6800M`, `XCL_REQUIRE_GPU=wave64`, pinned `XCL_DXC_DIR`; `cargo test --locked -p xcl --lib gpu::dxil::lanes::ps_ballot_tests::gpu_direct_ps_readfirstlane_and_mask_live_on_triangle_edges -- --exact --test-threads=1 --show-output`. - Result: **1 passed, 0 failed, 0 ignored, 0 explicit SKIPPED** (1324 filtered out). The test's rendered-pixel assertions passed. Isolated guarded run exited 0 without a memory-guard stop. The fixture does not print its selected adapter or report the driver's physical pixel-shader wave width. The `XCL_ADAPTER` selector and required-GPU mode were set, but this result should not be read as proof that the driver executed 64-lane pixel waves. This was one focused debug test, not a full suite or retail-title run. AI use: Codex (exact model name not exposed to me) with a Luna subagent prepared and ran the test and drafted this report; I checked the exact head and log before posting.
ClosetPie107 commented 2026-11-27 18:00:49 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by ClosetPie107 on 2026-11-27T18:00:49Z.


Tested on AMD / Linux: de915b5a (RX 9070 16 GB, RDNA4, Mesa 26.3.1 RADV; Ryzen 5 9600X, 32 GB; CachyOS; Proton Experimental experimental-11.0-20261112 with vkd3d-proton master ec207194 plus a local patch dropping the lpVtbl checks of command allocators and lists; DXC 1.9.2609.5; Rust 1.96.0, x86_64-pc-windows-gnu debug build, tests run under Wine)

The head as it is (base e0d93c84), with main f9a0cb80 the same session as the baseline.

Tests (XCL_REQUIRE_GPU=wave64)

  • cargo test -p xcl --lib -- gpu::dxil::lanes:: --test-threads=1: 7 passed, 0 failed, 0 ignored (includes gpu_direct_ps_readfirstlane_and_mask_live_on_triangle_edges, which ran on the GPU in wave64).
  • cargo test --workspace --no-fail-fast -- --test-threads=4 with --skip compositor_blends_ui_plane_over_scene_plane --skip failed_restore_stops_before_importing_an_unbacked_window --skip grooming_leaves_a_window_under_1_gib_only_its_hole (the first loses the RADV device here, the other two run out of memory under Wine): lib 1290 passed, 8 failed, 26 ignored; main f9a0cb80 lib the same session: 1323 passed, 9 failed, 27 ignored (--test-threads=1 and two --test-threads=4 runs). All failures are among main's. The other binaries fail the same 3 tests as on main here (e2e, pls_quota, predication_e2e). d3d12_resource_and_sync ended the process, as it does on main here.

Not tested

  • A retail title
  • Native Windows, NVIDIA / Intel

AI use

  • Claude Code (Claude Opus 5.5) wrote the test scripts, ran the builds and tests on my machine and wrote this report.
<!-- greyfinch-sync:ivall/xcl:comment:7225024817 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2501#issuecomment-7225024817). Originally posted by [ClosetPie107](https://github.com/ClosetPie107) on 2026-11-27T18:00:49Z. --- **Tested on AMD / Linux: `de915b5a`** (RX 9070 16 GB, RDNA4, Mesa 26.3.1 RADV; Ryzen 5 9600X, 32 GB; CachyOS; Proton Experimental `experimental-11.0-20261112` with vkd3d-proton master `ec207194` plus a local patch dropping the `lpVtbl` checks of command allocators and lists; DXC 1.9.2609.5; Rust 1.96.0, `x86_64-pc-windows-gnu` debug build, tests run under Wine) The head as it is (base `e0d93c84`), with `main` `f9a0cb80` the same session as the baseline. **Tests** (`XCL_REQUIRE_GPU=wave64`) - `cargo test -p xcl --lib -- gpu::dxil::lanes:: --test-threads=1`: **7 passed, 0 failed**, 0 ignored (includes `gpu_direct_ps_readfirstlane_and_mask_live_on_triangle_edges`, which ran on the GPU in wave64). - `cargo test --workspace --no-fail-fast -- --test-threads=4` with `--skip compositor_blends_ui_plane_over_scene_plane --skip failed_restore_stops_before_importing_an_unbacked_window --skip grooming_leaves_a_window_under_1_gib_only_its_hole` (the first loses the RADV device here, the other two run out of memory under Wine): lib 1290 passed, 8 failed, 26 ignored; `main` `f9a0cb80` lib the same session: 1323 passed, 9 failed, 27 ignored (`--test-threads=1` and two `--test-threads=4` runs). All failures are among `main`'s. The other binaries fail the same 3 tests as on `main` here (`e2e`, `pls_quota`, `predication_e2e`). `d3d12_resource_and_sync` ended the process, as it does on `main` here. **Not tested** - A retail title - Native Windows, NVIDIA / Intel **AI use** - Claude Code (Claude Opus 5.5) wrote the test scripts, ran the builds and tests on my machine and wrote this report.
throny commented 2026-11-29 00:47:40 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by throny on 2026-11-29T00:47:40Z.


merge-check claim
head: de915b5adb

<!-- greyfinch-sync:ivall/xcl:comment:7248354314 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2501#issuecomment-7248354314). Originally posted by [throny](https://github.com/throny) on 2026-11-29T00:47:40Z. --- merge-check claim head: de915b5adb519c9aa342107fb05fbe56540541ff
throny commented 2026-11-29 01:02:11 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by throny on 2026-11-29T01:02:11Z.


merge-check
base: fa204595
head: de915b5adb
merge: clean
build: cargo build --workspace -> ok
tests: cargo test --workspace --no-fail-fast -- --test-threads=4 -> 2611 passed, 0 failed, 49 ignored (27 SKIPPED lines). Base alone at fa204595: 2608 passed, 0 failed, 49 ignored.
review: no blocking finding; all hunks read. The filter to live lanes falls back to the unfiltered mask when no lane is live, so a wave of helper lanes behaves as before. One wording point: the comment speaks of parity with the HLSL path, but HLSL filters the condition flag only for the 32-bit and/andn2 forms; this PR also filters the 64-bit ones, so for wave64 pixel shaders the two paths now differ (probably for the better; the comment should say so). The tests match on disassembly text and may be brittle. No interaction with #2128 or #2117 (other path, other files). Open from the thread: nobody has shown a driver really running these pixel shaders in 64-lane waves. The smoke pair in the description is on an old base.
performance: one more wave ballot per pixel-shader first-lane read and per qualifying and/andn2; not measured. Direct-DXIL sources only, but that is the default path for pixel shaders: those entries are translated again once.
verdict: safe to merge
hardware / tool and model: RTX 4080 16 GB (621.40), i9-12900K, Windows 11 26300, Rust 1.100.0, debug. Claude Code; merge, build and suite run by Claude Fable 5.2, diff review by Claude Opus 5.5 (every hunk read; nothing run on the GPU beyond the suite).

<!-- greyfinch-sync:ivall/xcl:comment:7248515664 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2501#issuecomment-7248515664). Originally posted by [throny](https://github.com/throny) on 2026-11-29T01:02:11Z. --- merge-check base: fa204595 head: de915b5adb519c9aa342107fb05fbe56540541ff merge: clean build: cargo build --workspace -> ok tests: cargo test --workspace --no-fail-fast -- --test-threads=4 -> 2611 passed, 0 failed, 49 ignored (27 SKIPPED lines). Base alone at fa204595: 2608 passed, 0 failed, 49 ignored. review: no blocking finding; all hunks read. The filter to live lanes falls back to the unfiltered mask when no lane is live, so a wave of helper lanes behaves as before. One wording point: the comment speaks of parity with the HLSL path, but HLSL filters the condition flag only for the 32-bit and/andn2 forms; this PR also filters the 64-bit ones, so for wave64 pixel shaders the two paths now differ (probably for the better; the comment should say so). The tests match on disassembly text and may be brittle. No interaction with #2128 or #2117 (other path, other files). Open from the thread: nobody has shown a driver really running these pixel shaders in 64-lane waves. The smoke pair in the description is on an old base. performance: one more wave ballot per pixel-shader first-lane read and per qualifying and/andn2; not measured. Direct-DXIL sources only, but that is the default path for pixel shaders: those entries are translated again once. verdict: safe to merge hardware / tool and model: RTX 4080 16 GB (621.40), i9-12900K, Windows 11 26300, Rust 1.100.0, debug. Claude Code; merge, build and suite run by Claude Fable 5.2, diff review by Claude Opus 5.5 (every hunk read; nothing run on the GPU beyond the suite).
fromthemoonx commented 2026-11-29 01:18:01 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by fromthemoonx on 2026-11-29T01:18:01Z.


merge-check
base: fa204595a4
head: de915b5adb
merge: clean
build: cargo build --workspace -> ok
tests: cargo test --workspace --no-fail-fast -- --test-threads=4 -> 2611 passed, 0 failed, 49 ignored; SKIPPED: 28 (mostly "no wave64", plus "no heap windows", "no GPU_UPLOAD heaps", "no build ahead"); failing: none (base fa20459 alone here: 2608 passed, 0 failed, 49 ignored)
review: none blocking, after reading the whole diff (dxil/lanes.rs, dxil/lower.rs, the 3 tests). live_lanes is WaveActiveBallot(true), which leaves helper lanes out. first_lane keeps the unfiltered mask when no lane of it is live. ps_mask_live_scc filters scc only for SOP2 s_and*/s_andn2* naming VCC or EXEC, so the same op on two other SGPRs holding masks still counts helper bits (a limit, as on the HLSL side). On this card (wave32 only), gpu::dxil::lanes::ps_ballot_tests:: (7 tests) passes 3/3, and the GPU draw test ran (not SKIPPED). Two scratch mutations each make the GPU readback test fail: (1) the live filter in first_lane disabled, which also fails direct_ps_readfirstlane_filters_exec_by_live_lanes; (2) ps_mask_live_scc always false, which also fails direct_ps_mask_and_scc_counts_live_lanes_only. So this driver does read helper lanes there without the change. Not run: wave64 pixel shaders (none here), a title.
performance: default path (direct DXIL is the default for pixel shaders since #3243): one extra wave ballot per PS v_readfirstlane and per qualifying s_and*/s_andn2* with scc read. Reasoned, not measured.
verdict: safe to merge
hardware / tool and model: RTX 3060 12 GB (driver 610.88), Ryzen 7 5700X, Windows 11 Pro 26300, Rust 1.100.0 MSVC, debug / Claude Code (Claude Opus 5.5)

<!-- greyfinch-sync:ivall/xcl:comment:7248692290 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2501#issuecomment-7248692290). Originally posted by [fromthemoonx](https://github.com/fromthemoonx) on 2026-11-29T01:18:01Z. --- merge-check base: fa204595a488c60c6c5f905244f0172072c9c2a9 head: de915b5adb519c9aa342107fb05fbe56540541ff merge: clean build: cargo build --workspace -> ok tests: cargo test --workspace --no-fail-fast -- --test-threads=4 -> 2611 passed, 0 failed, 49 ignored; SKIPPED: 28 (mostly "no wave64", plus "no heap windows", "no GPU_UPLOAD heaps", "no build ahead"); failing: none (base fa20459 alone here: 2608 passed, 0 failed, 49 ignored) review: none blocking, after reading the whole diff (`dxil/lanes.rs`, `dxil/lower.rs`, the 3 tests). `live_lanes` is `WaveActiveBallot(true)`, which leaves helper lanes out. `first_lane` keeps the unfiltered mask when no lane of it is live. `ps_mask_live_scc` filters `scc` only for SOP2 `s_and*`/`s_andn2*` naming VCC or EXEC, so the same op on two other SGPRs holding masks still counts helper bits (a limit, as on the HLSL side). On this card (wave32 only), `gpu::dxil::lanes::ps_ballot_tests::` (7 tests) passes 3/3, and the GPU draw test ran (not SKIPPED). Two scratch mutations each make the GPU readback test fail: (1) the live filter in `first_lane` disabled, which also fails `direct_ps_readfirstlane_filters_exec_by_live_lanes`; (2) `ps_mask_live_scc` always false, which also fails `direct_ps_mask_and_scc_counts_live_lanes_only`. So this driver does read helper lanes there without the change. Not run: wave64 pixel shaders (none here), a title. performance: default path (direct DXIL is the default for pixel shaders since #3243): one extra wave ballot per PS `v_readfirstlane` and per qualifying `s_and*`/`s_andn2*` with `scc` read. Reasoned, not measured. verdict: safe to merge hardware / tool and model: RTX 3060 12 GB (driver 610.88), Ryzen 7 5700X, Windows 11 Pro 26300, Rust 1.100.0 MSVC, debug / Claude Code (Claude Opus 5.5)
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!2491
No description provided.