shader: lower wide private LDS transfers #918

Merged
stan495 merged 5 commits from upstream-pr/925 into main 2026-11-23 18:17:51 +00:00
stan495 commented 2026-11-23 17:23:02 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by stan495 on 2026-11-23T17:23:02Z.


Scope

Lower ds_write_b64, ds_read_b64, ds_write_b96, ds_read_b96 and ds_read2_b32 for a proven private 16-byte record at local_x << 4. Require 512 bytes of LDS, initialized read slots and an immediate LDS wait. Reject mixed scalar and wide address strides because the regions could overlap across lanes.

Verification

Tested d686d24 on Windows 11 25H2 (10.0.26200.9974). WARP used Microsoft Basic Render Driver 10.0.26100.9818. Hardware used AMD Radeon RX 7900 XTX with driver 32.0.32029.2010. The D3D12 debug layer was enabled.

cmake --build --preset dev --target offscreen_check
$env:XBOX2WINDOWS_ADAPTER = '7900 XTX'
ctest --preset dev --no-tests=error -R '^compute_store_aot_(lds_private|ds_route|guard_read)_(warp|hardware)$|^compute_store_aot_warp$' -V

7 passed, 0 failed and 0 skipped. Both backends matched the CPU reference for the entire 320-word UAV after one and three groups. Reading the wrong qword, clearing a source word and swapping dual-read offsets each changed the comparison at word 0.

python3 -B tests/compute_store_check.py binary llvm-mc-15 llvm-objcopy-15 libLLVM-15.so.1

LLVM 15.0.7 assembled and decoded the fixtures, and both translation paths reproduced the same HLSL. The records count all five added DS forms.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:issue:6564892529 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/925). Originally posted by [stan495](https://github.com/stan495) on 2026-11-23T17:23:02Z. --- ## Scope Lower `ds_write_b64`, `ds_read_b64`, `ds_write_b96`, `ds_read_b96` and `ds_read2_b32` for a proven private 16-byte record at `local_x << 4`. Require 512 bytes of LDS, initialized read slots and an immediate LDS wait. Reject mixed scalar and wide address strides because the regions could overlap across lanes. ## Verification Tested `d686d24` on Windows 11 25H2 (10.0.26200.9974). WARP used Microsoft Basic Render Driver 10.0.26100.9818. Hardware used AMD Radeon RX 7900 XTX with driver 32.0.32029.2010. The D3D12 debug layer was enabled. ```powershell cmake --build --preset dev --target offscreen_check $env:XBOX2WINDOWS_ADAPTER = '7900 XTX' ctest --preset dev --no-tests=error -R '^compute_store_aot_(lds_private|ds_route|guard_read)_(warp|hardware)$|^compute_store_aot_warp$' -V ``` 7 passed, 0 failed and 0 skipped. Both backends matched the CPU reference for the entire 320-word UAV after one and three groups. Reading the wrong qword, clearing a source word and swapping dual-read offsets each changed the comparison at word 0. ```sh python3 -B tests/compute_store_check.py binary llvm-mc-15 llvm-objcopy-15 libLLVM-15.so.1 ``` LLVM 15.0.7 assembled and decoded the fixtures, and both translation paths reproduced the same HLSL. The records count all five added DS forms.
upstream-sync closed this pull request 2026-11-24 06:45:26 +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!918
No description provided.