shader: lower private strided paired LDS accesses #929

Merged
stan495 merged 12 commits from upstream-pr/936 into main 2026-11-23 19:08:38 +00:00
stan495 commented 2026-11-23 17:55:01 +00:00 (Migrated from github.com)

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


Scope

Lower the paired stride-64 LDS reads and writes for dwords and qwords, together with the returning dword exchange. The two planes must fit the LDS binding, start at or above byte 512, and have one element width per kernel. The dword exchange preserves both old values and captures sources even when the return registers alias them.

Verification

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

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

9 passed, 0 failed and 0 skipped. The strided fixtures compared 320 UAV words on both backends after one and two groups. Swapping the qword read offsets produced the expected first mismatch at word 0 (12345678 expected, 76543210 observed).

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

LLVM 15.0.7 round trips passed and the coverage records include all five new forms.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:issue:6565486843 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/936). Originally posted by [stan495](https://github.com/stan495) on 2026-11-23T17:55:01Z. --- ## Scope Lower the paired stride-64 LDS reads and writes for dwords and qwords, together with the returning dword exchange. The two planes must fit the LDS binding, start at or above byte 512, and have one element width per kernel. The dword exchange preserves both old values and captures sources even when the return registers alias them. ## Verification Tested `6063ede` on Windows 11 25H2 (10.0.26200.9974) with the D3D12 debug layer enabled. Hardware used AMD Radeon RX 7900 XTX (32.0.32029.2010). WARP used Microsoft Basic Render Driver (10.0.26100.9818). ```powershell cmake --build --preset dev --target offscreen_check $env:XBOX2WINDOWS_ADAPTER = '7900 XTX' ctest --preset dev --no-tests=error -R '^compute_store_aot_(lds_strided|lds_private|ds_route|guard_read)_(warp|hardware)$|^compute_store_aot_warp$' -V ``` 9 passed, 0 failed and 0 skipped. The strided fixtures compared 320 UAV words on both backends after one and two groups. Swapping the qword read offsets produced the expected first mismatch at word 0 (`12345678` expected, `76543210` observed). ```sh python3 -B tests/compute_store_check.py binary llvm-mc-15 llvm-objcopy-15 libLLVM-15.so.1 ``` LLVM 15.0.7 round trips passed and the coverage records include all five new forms.
upstream-sync closed this pull request 2026-11-24 06:45:29 +00:00
R0Y00 commented 2026-11-24 06:49:30 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by R0Y00 on 2026-11-23T18:52:42Z.


I combined your updated strided candidate with the tested #929 commit, retaining all the packed, arithmetic and replacement groups and keeping strided as its own test. LLVM 15 passed the full binary selection. The ten targeted Windows CTests passed on WARP and RTX 4060 Laptop (32.0.16.1656, debug layer enabled), including the 320-word strided readbacks and wrong-offset controls. This branch can run CI now and still merges after #929.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7110780164 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/936#issuecomment-7110780164). Originally posted by [R0Y00](https://github.com/R0Y00) on 2026-11-23T18:52:42Z. --- I combined your updated strided candidate with the tested #929 commit, retaining all the packed, arithmetic and replacement groups and keeping strided as its own test. LLVM 15 passed the full binary selection. The ten targeted Windows CTests passed on WARP and RTX 4060 Laptop (32.0.16.1656, debug layer enabled), including the 320-word strided readbacks and wrong-offset controls. This branch can run CI now and still merges after #929.
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!929
No description provided.