shader: lower bounded DS lane rotations in compute #850

Merged
stan495 merged 1 commit from upstream-pr/856 into main 2026-11-23 14:09:39 +00:00
stan495 commented 2026-11-23 13:51:17 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by stan495 on 2026-11-23T13:51:17Z.


Change

Lower ds_bpermute_b32 gather and ds_permute_b32 scatter in 32×1×1 gfx1030 compute groups. The supported byte address is a verified lane rotation with zero DS offset. The lowering uses separate groupshared storage per operation and synchronizes before reading the forward or inverse mapping.

Verification

Tested 58408d1 based on d4620fd. On WARP and hardware, each dispatch compared all 320 UAV words against the CPU reference, including the untouched tail. The fixtures exercised one and three groups. All four CTest entries passed with zero skips. Windows 11 25H2 build 26200.9974, DXC 1.8.2502.11, Radeon RX 7900 XTX driver 32.0.32029.2010, WARP 10.0.26100.9818. The D3D12 debug layer reported zero errors and warnings.

Reversing the HLSL rotation mismatches at word 0, 5 versus 27 for gather and 27 versus 5 for scatter. The controls also reject unknown addresses or source words, masked EXEC, non-zero DS offsets and missing waits.

LLVM 15.0.7 assembled the original gfx1030 wave32 fixtures, decoded the exact DS instructions and reproduced the HLSL through the compute CLI. The existing gfx1013 compute binary fixtures and the LLVM-enabled RDNA2 disassembler suite also passed. The coverage records include each new DS mnemonic.

.\tools\dev.ps1
$env:XBOX2WINDOWS_ADAPTER = '7900 XTX'
cmake --preset dev
cmake --build --preset dev --target offscreen_check
ctest --preset dev --no-tests=error -R '^compute_store_aot(_ds_route)?_(warp|hardware)$' --output-junit "$PWD/out/results.xml" -V
python -B tools/form_coverage.py out/results.xml --gaps gfx1030
python -B tests/form_coverage_check.py
python -B tests/docs_links_check.py
python -B tests/bidi_controls_check.py
git diff --check origin/main...HEAD
python3 -B tests/compute_store_check.py binary llvm-mc-15 llvm-objcopy-15 libLLVM-15.so.1

AI-assisted (Codex and DeepSeek Harness).

<!-- greyfinch-sync:R0Y00/Xbox2Windows:issue:6560807783 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/856). Originally posted by [stan495](https://github.com/stan495) on 2026-11-23T13:51:17Z. --- ## Change Lower `ds_bpermute_b32` gather and `ds_permute_b32` scatter in 32×1×1 gfx1030 compute groups. The supported byte address is a verified lane rotation with zero DS offset. The lowering uses separate groupshared storage per operation and synchronizes before reading the forward or inverse mapping. ## Verification Tested `58408d1` based on `d4620fd`. On WARP and hardware, each dispatch compared all 320 UAV words against the CPU reference, including the untouched tail. The fixtures exercised one and three groups. All four CTest entries passed with zero skips. Windows 11 25H2 build 26200.9974, DXC 1.8.2502.11, Radeon RX 7900 XTX driver 32.0.32029.2010, WARP 10.0.26100.9818. The D3D12 debug layer reported zero errors and warnings. Reversing the HLSL rotation mismatches at word 0, 5 versus 27 for gather and 27 versus 5 for scatter. The controls also reject unknown addresses or source words, masked EXEC, non-zero DS offsets and missing waits. LLVM 15.0.7 assembled the original gfx1030 wave32 fixtures, decoded the exact DS instructions and reproduced the HLSL through the compute CLI. The existing gfx1013 compute binary fixtures and the LLVM-enabled RDNA2 disassembler suite also passed. The coverage records include each new DS mnemonic. ```powershell .\tools\dev.ps1 $env:XBOX2WINDOWS_ADAPTER = '7900 XTX' cmake --preset dev cmake --build --preset dev --target offscreen_check ctest --preset dev --no-tests=error -R '^compute_store_aot(_ds_route)?_(warp|hardware)$' --output-junit "$PWD/out/results.xml" -V python -B tools/form_coverage.py out/results.xml --gaps gfx1030 python -B tests/form_coverage_check.py python -B tests/docs_links_check.py python -B tests/bidi_controls_check.py git diff --check origin/main...HEAD ``` ```sh python3 -B tests/compute_store_check.py binary llvm-mc-15 llvm-objcopy-15 libLLVM-15.so.1 ``` AI-assisted (Codex and DeepSeek Harness).
upstream-sync closed this pull request 2026-11-24 06:45:06 +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!850
No description provided.