shader: lower the first active lane at compute dispatch entry #2389

Manually merged
github merged 1 commit from gh-pr/2389/head into gh-pr/2389/base 2026-11-27 00:47:37 +00:00
Owner

@⁠R0Y00 on GitHub · 2026-11-25 14:55 UTC · original
R0Y00:codex/compute-indirect-producer → main · +41 −2 · 3 files · 1 commits · merged 2026-11-25 15:09 UTC

Refs #870. The startup compute translator can fold s_ff1_i32_b32 sN, exec_lo to zero while lane zero is provably active in the dispatch entry block. This brings the entry-mask case already covered by #1903 into the startup translator. A changed mask, a back edge into entry, and a VCC operand have rejection controls. Existing scalar-word work in #2028 covers a different operand.

The source-built dispatch overwrites a nonzero stride in a 24-thread group. Ignoring the instruction changes the expected output. Tested commit 42a7c533 on Windows 11 build 26200, RTX 4060 Laptop driver 32.0.16.1656 and WARP 10.0.26100.9818, with the D3D12 debug layer enabled.

python -B tests/startup_gfx2hlsl_compute_check.py
python -B tests/startup_gfx2hlsl_handler_arity_check.py
ctest --test-dir out/build/release --no-tests=error -R '^startup_gfx2hlsl_compute_(hardware|warp)$' --output-on-failure

Both Python checks passed. Both device tests passed without skips. Each adapter matched all 320 words in the added case with zero debug errors and warnings.

AI-assisted. Commands listed above were run locally.

**@⁠R0Y00** on GitHub · 2026-11-25 14:55 UTC · [original](https://github.com/R0Y00/Xbox2Windows/pull/2389) `R0Y00:codex/compute-indirect-producer` → `main` · +41 −2 · 3 files · 1 commits · merged 2026-11-25 15:09 UTC Refs #870. The startup compute translator can fold `s_ff1_i32_b32 sN, exec_lo` to zero while lane zero is provably active in the dispatch entry block. This brings the entry-mask case already covered by #1903 into the startup translator. A changed mask, a back edge into entry, and a VCC operand have rejection controls. Existing scalar-word work in #2028 covers a different operand. The source-built dispatch overwrites a nonzero stride in a 24-thread group. Ignoring the instruction changes the expected output. Tested commit 42a7c533 on Windows 11 build 26200, RTX 4060 Laptop driver 32.0.16.1656 and WARP 10.0.26100.9818, with the D3D12 debug layer enabled. ```powershell python -B tests/startup_gfx2hlsl_compute_check.py python -B tests/startup_gfx2hlsl_handler_arity_check.py ctest --test-dir out/build/release --no-tests=error -R '^startup_gfx2hlsl_compute_(hardware|warp)$' --output-on-failure ``` Both Python checks passed. Both device tests passed without skips. Each adapter matched all 320 words in the added case with zero debug errors and warnings. AI-assisted. Commands listed above were run locally.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-27 00:47:35 +00:00
github manually merged commit 42a7c53316 into gh-pr/2389/base 2026-11-27 00:47:37 +00:00
This discussion has been locked. Commenting is limited to contributors.
No description provided.