shader: return old LDS words from min, max and reverse subtract #915

Manually merged
github merged 1 commit from gh-pr/915/head into gh-pr/915/base 2026-11-26 22:27:55 +00:00
Owner

@⁠stan495 on GitHub · 2026-11-23 17:01 UTC · original
stan495:codex/gfx1030-ds-min-rtn-i32 → main · +37 −18 · 3 files · 1 commits · merged 2026-11-23 17:16 UTC

Scope

Add the returning forms of the five private LDS word updates from #898. ds_rsub_rtn_u32, ds_min_rtn_i32, ds_max_rtn_i32, ds_min_rtn_u32 and ds_max_rtn_u32 write the pre-update word to the destination VGPR. The same zero-offset private address, initialization, EXEC and wait checks apply.

Verification

Tested a329153 on Windows 11 25H2 (10.0.26200.9974) with the D3D12 debug layer enabled. Hardware used the AMD Radeon RX 7900 XTX (driver 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_private|ds_route|guard_read)_(warp|hardware)$|^compute_store_aot_warp$' -V

7 passed, 0 failed, 0 skipped. For each opcode, both backends compared two returned words and the final LDS word across the whole 320-word UAV for one and three groups. Each program aliases the destination with the data VGPR once and the address VGPR once. All 15 mutants produced the expected first mismatch on both backends. For reverse subtract, changing the order produced 7ffffff8 at word 1 instead of 80000008. Returning the new word and dropping the second write also produced mismatches.

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

Passed with LLVM 15.0.7 in WSL Ubuntu 24.04. The decoded forms match the source fixture, the direct and CLI paths generate the same HLSL, and the coverage records include all five forms.

**@⁠stan495** on GitHub · 2026-11-23 17:01 UTC · [original](https://github.com/R0Y00/Xbox2Windows/pull/915) `stan495:codex/gfx1030-ds-min-rtn-i32` → `main` · +37 −18 · 3 files · 1 commits · merged 2026-11-23 17:16 UTC ## Scope Add the returning forms of the five private LDS word updates from #898. `ds_rsub_rtn_u32`, `ds_min_rtn_i32`, `ds_max_rtn_i32`, `ds_min_rtn_u32` and `ds_max_rtn_u32` write the pre-update word to the destination VGPR. The same zero-offset private address, initialization, EXEC and wait checks apply. ## Verification Tested `a329153` on Windows 11 25H2 (10.0.26200.9974) with the D3D12 debug layer enabled. Hardware used the AMD Radeon RX 7900 XTX (driver 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_private|ds_route|guard_read)_(warp|hardware)$|^compute_store_aot_warp$' -V ``` 7 passed, 0 failed, 0 skipped. For each opcode, both backends compared two returned words and the final LDS word across the whole 320-word UAV for one and three groups. Each program aliases the destination with the data VGPR once and the address VGPR once. All 15 mutants produced the expected first mismatch on both backends. For reverse subtract, changing the order produced `7ffffff8` at word 1 instead of `80000008`. Returning the new word and dropping the second write also produced mismatches. ```sh python3 -B tests/compute_store_check.py binary llvm-mc-15 llvm-objcopy-15 libLLVM-15.so.1 ``` Passed with LLVM 15.0.7 in WSL Ubuntu 24.04. The decoded forms match the source fixture, the direct and CLI paths generate the same HLSL, and the coverage records include all five forms.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 22:27:53 +00:00
github manually merged commit a329153d18 into gh-pr/915/base 2026-11-26 22:27:55 +00:00
This discussion has been locked. Commenting is limited to contributors.
No description provided.