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

Merged
R0Y00 merged 1 commit from upstream-pr/2389 into main 2026-11-25 15:09:57 +00:00
R0Y00 commented 2026-11-25 14:55:34 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by R0Y00 on 2026-11-25T14:55:34Z.


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.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:issue:6607310750 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/2389). Originally posted by [R0Y00](https://github.com/R0Y00) on 2026-11-25T14:55:34Z. --- 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.
upstream-sync closed this pull request 2026-11-25 16:05:12 +00:00
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
R0Y00/Xbox2Windows!2381
No description provided.