shader: lower private LDS word updates in compute #878

Manually merged
github merged 1 commit from gh-pr/878/head into gh-pr/878/base 2026-11-26 22:25:16 +00:00
Owner

@⁠stan495 on GitHub · 2026-11-23 15:19 UTC · original
stan495:codex/gfx1030-ds-add-u32 → main · +110 −4 · 4 files · 1 commits · merged 2026-11-23 15:38 UTC

Scope

Extend the thread-private gfx1030 LDS profile from #865 with the no-return forms ds_add_u32, ds_sub_u32, ds_and_b32, ds_or_b32 and ds_xor_b32. They update the same initialized word at offset 0, with addition and subtraction wrapping at 32 bits. Subtraction takes the old word minus the source VGPR. The existing Wave32 group, private address, allocation, EXEC and immediate wait checks apply.

The five fixtures use the same compute test file as #866. The branch merge check passed against its head e8f31c2.

Reproduction

Tested e74f6bd 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 the 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. Each backend ran all five update variants with one and three groups, comparing every UAV word against the CPU reference. The expected result was zero differences and the observed result matched. The passing LDS dispatches logged zero debug errors and warnings. Every full-write mutant differed at word 1, with 40000021 observed instead of the operation's expected result. For example, add expected 40000011 and subtract expected bfffffcf.

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 assembled gfx1030 Wave32 fixtures decoded to the expected DS forms, and both decoded and CLI translation reproduced the HLSL from source. The D3D12 readback exercised that translated HLSL. The coverage records included all five new forms.

**@⁠stan495** on GitHub · 2026-11-23 15:19 UTC · [original](https://github.com/R0Y00/Xbox2Windows/pull/878) `stan495:codex/gfx1030-ds-add-u32` → `main` · +110 −4 · 4 files · 1 commits · merged 2026-11-23 15:38 UTC ## Scope Extend the thread-private gfx1030 LDS profile from #865 with the no-return forms `ds_add_u32`, `ds_sub_u32`, `ds_and_b32`, `ds_or_b32` and `ds_xor_b32`. They update the same initialized word at offset 0, with addition and subtraction wrapping at 32 bits. Subtraction takes the old word minus the source VGPR. The existing Wave32 group, private address, allocation, EXEC and immediate wait checks apply. The five fixtures use the same compute test file as #866. The branch merge check passed against its head `e8f31c2`. ## Reproduction Tested `e74f6bd` 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 the 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. Each backend ran all five update variants with one and three groups, comparing every UAV word against the CPU reference. The expected result was zero differences and the observed result matched. The passing LDS dispatches logged zero debug errors and warnings. Every full-write mutant differed at word 1, with `40000021` observed instead of the operation's expected result. For example, add expected `40000011` and subtract expected `bfffffcf`. ```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 assembled gfx1030 Wave32 fixtures decoded to the expected DS forms, and both decoded and CLI translation reproduced the HLSL from source. The D3D12 readback exercised that translated HLSL. The coverage records included all five new forms.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 22:25:14 +00:00
github manually merged commit e74f6bd715 into gh-pr/878/base 2026-11-26 22:25:16 +00:00
This discussion has been locked. Commenting is limited to contributors.
No description provided.