shader: lower private LDS word accesses in compute #857

Manually merged
github merged 2 commits from gh-pr/857/head into gh-pr/857/base 2026-11-26 22:23:56 +00:00
Owner

@⁠stan495 on GitHub · 2026-11-23 13:51 UTC · original
stan495:codex/gfx1030-ds-read-b32 → main · +133 −22 · 5 files · 2 commits · merged 2026-11-23 14:27 UTC

Change

Lower ds_write_b32, ds_read_b32 and ds_read_u16 for a proven private LDS word per thread in a 32×1×1 gfx1030 compute group. An explicit allocation, aligned local address and immediate wait let the translator preserve the written value and extract either unsigned halfword.

Verification

Tested c139447 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.

The fixture overwrites the source VGPR after the write. Selecting the opposite halfword mismatches at word 2, expected 0x000089ab and observed 0x0000fff0. Controls reject an uninitialized read, unknown address, insufficient allocation, masked EXEC, invalid offset 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(_lds_private)?_(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

This change overlaps the gfx1030 compute decoder entry, coverage fixture registration and documentation with #856. Please review that PR first. This branch can be rebased after it lands.

AI-assisted (Codex and DeepSeek Harness).

**@⁠stan495** on GitHub · 2026-11-23 13:51 UTC · [original](https://github.com/R0Y00/Xbox2Windows/pull/857) `stan495:codex/gfx1030-ds-read-b32` → `main` · +133 −22 · 5 files · 2 commits · merged 2026-11-23 14:27 UTC ## Change Lower `ds_write_b32`, `ds_read_b32` and `ds_read_u16` for a proven private LDS word per thread in a 32×1×1 gfx1030 compute group. An explicit allocation, aligned local address and immediate wait let the translator preserve the written value and extract either unsigned halfword. ## Verification Tested `c139447` 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. The fixture overwrites the source VGPR after the write. Selecting the opposite halfword mismatches at word 2, expected `0x000089ab` and observed `0x0000fff0`. Controls reject an uninitialized read, unknown address, insufficient allocation, masked EXEC, invalid offset 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(_lds_private)?_(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 ``` This change overlaps the gfx1030 compute decoder entry, coverage fixture registration and documentation with #856. Please review that PR first. This branch can be rebased after it lands. AI-assisted (Codex and DeepSeek Harness).
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 22:23:55 +00:00
github manually merged commit 1c0fd914e7 into gh-pr/857/base 2026-11-26 22:23:56 +00:00
Author
Owner

@⁠R0Y00 on GitHub · 2026-11-23 14:17 UTC · original

I merged current main into this branch after #856. Both DS fixtures keep their readback and mutation checks. WARP 10.0.26100.9818 and RTX 4060 Laptop (32.0.16.1656) each matched all 320 words for one and three groups. The private-LDS high-half mutation failed at word 2 (0x89ab versus 0xfff0), and both reversed lane-routing mutations still failed at word 0. LLVM 15 and the docs check passed. Windows CI will rerun on the updated head. The earlier Windows failure was in the BVH WARP test.

**@⁠R0Y00** on GitHub · 2026-11-23 14:17 UTC · [original](https://github.com/R0Y00/Xbox2Windows/pull/857#issuecomment-7103763117) I merged current main into this branch after #856. Both DS fixtures keep their readback and mutation checks. WARP 10.0.26100.9818 and RTX 4060 Laptop (32.0.16.1656) each matched all 320 words for one and three groups. The private-LDS high-half mutation failed at word 2 (0x89ab versus 0xfff0), and both reversed lane-routing mutations still failed at word 0. LLVM 15 and the docs check passed. Windows CI will rerun on the updated head. The earlier Windows failure was in the BVH WARP test.
This discussion has been locked. Commenting is limited to contributors.
No description provided.