shader: lower gfx1030 formatted UINT buffer stores #1333

Manually merged
github merged 1 commit from gh-pr/1333/head into gh-pr/1333/base 2026-11-26 22:58:56 +00:00
Owner

@⁠stan495 on GitHub · 2026-11-24 08:25 UTC · original
stan495:codex/gfx1030-mubuf-format-stores → main · +175 −8 · 5 files · 1 commits · merged 2026-11-24 08:35 UTC

Summary

  • Lower indexed gfx1030 buffer_store_format_x, _xy, _xyz, and _xyzw to consecutive DWORD writes in the raw u0 binding. --output-format declares the corresponding one- to four-channel 32-bit UINT descriptor with identity selectors. The opcode must write the entire declared texel.
  • Reuse the compute store profile's descriptor and VGPR wait tracking, checked per-invocation addressing, record bounds, and overlap checks. The profile requires idxen and zero scalar offset. See the experiment for the caller's view and descriptor constraints.
  • Exercise each form through LLVM 15 assembly, disassembly, and the compute-container CLI. Dispatch the equivalent translated desktop DXIL for one and two groups and compare all 320 output words, including padding and the untouched tail, against the CPU reference.

This follows the descriptor-format contract introduced for reads in #1297, which is already merged. The ISA reference is the AMD RDNA 2 Shader ISA, §8.1.4 and MUBUF opcodes 4–7.

Validation

Commit tested: 23ff04e2f0af14a4326098e11c74625d05de854a.

cmake --preset dev
cmake --build --preset dev --target offscreen_check
ctest --preset dev --no-tests=error -R '^compute_store_aot_' -V --output-junit "$PWD/out/compute-store-junit.xml"
python -B tools/form_coverage.py out/compute-store-junit.xml --records out/build/dev/form_coverage --gaps gfx1030 --json out/compute-store-coverage.json
python -B tests/form_coverage_check.py
python -B tests/docs_links_check.py
  • 44 passed, 0 failed, 0 capability skips. The two compute_store_aot_mubuf_store_format_* fixtures register all four mnemonics as passing in the same CTest run. The selected run records 29 of 73 gfx1030 MUBUF forms. The coverage and documentation checks pass.
  • Windows build 26300.9974. WARP on Microsoft Basic Render Driver (10.0.26100.9818) and hardware on Intel Arc B390 (32.0.101.8509). The debug layer was unavailable on both. GPU comparisons cover translated DXIL.
  • Both adapters report first differences of word 0, expected c5c5c5c5, actual 89abcdef for the shifted x store, and word 1, expected 89abcdef, actual 01234567, dcbafed0, and 76543210 for the xy, xyz, and xyzw channel swaps respectively. Negative cases also require the expected rejection for a missing descriptor wait, pending data, a format-width mismatch, a record overrun, and overlapping stores.
python3 -B tests/compute_store_check.py binary llvm-mc-15 llvm-objcopy-15 libLLVM-15.so.1

Passed on Ubuntu 22.04.5 with LLVM 15.0.7. This checks gfx1030 encoding and container translation.

git diff --check passed. git merge-tree --write-tree refs/remotes/origin/main HEAD succeeded against 0f09ca936fe73399d8ffc8ec5e99541d6799ba1a.

**@⁠stan495** on GitHub · 2026-11-24 08:25 UTC · [original](https://github.com/R0Y00/Xbox2Windows/pull/1333) `stan495:codex/gfx1030-mubuf-format-stores` → `main` · +175 −8 · 5 files · 1 commits · merged 2026-11-24 08:35 UTC ## Summary - Lower indexed gfx1030 `buffer_store_format_x`, `_xy`, `_xyz`, and `_xyzw` to consecutive DWORD writes in the raw `u0` binding. `--output-format` declares the corresponding one- to four-channel 32-bit UINT descriptor with identity selectors. The opcode must write the entire declared texel. - Reuse the compute store profile's descriptor and VGPR wait tracking, checked per-invocation addressing, record bounds, and overlap checks. The profile requires `idxen` and zero scalar offset. See the experiment for the caller's view and descriptor constraints. - Exercise each form through LLVM 15 assembly, disassembly, and the compute-container CLI. Dispatch the equivalent translated desktop DXIL for one and two groups and compare all 320 output words, including padding and the untouched tail, against the CPU reference. This follows the descriptor-format contract introduced for reads in #1297, which is already merged. The ISA reference is the AMD RDNA 2 Shader ISA, §8.1.4 and MUBUF opcodes 4–7. ## Validation Commit tested: `23ff04e2f0af14a4326098e11c74625d05de854a`. ```powershell cmake --preset dev cmake --build --preset dev --target offscreen_check ctest --preset dev --no-tests=error -R '^compute_store_aot_' -V --output-junit "$PWD/out/compute-store-junit.xml" python -B tools/form_coverage.py out/compute-store-junit.xml --records out/build/dev/form_coverage --gaps gfx1030 --json out/compute-store-coverage.json python -B tests/form_coverage_check.py python -B tests/docs_links_check.py ``` - 44 passed, 0 failed, 0 capability skips. The two `compute_store_aot_mubuf_store_format_*` fixtures register all four mnemonics as passing in the same CTest run. The selected run records 29 of 73 gfx1030 MUBUF forms. The coverage and documentation checks pass. - Windows build `26300.9974`. WARP on Microsoft Basic Render Driver (`10.0.26100.9818`) and hardware on Intel Arc B390 (`32.0.101.8509`). The debug layer was unavailable on both. GPU comparisons cover translated DXIL. - Both adapters report first differences of word 0, expected `c5c5c5c5`, actual `89abcdef` for the shifted `x` store, and word 1, expected `89abcdef`, actual `01234567`, `dcbafed0`, and `76543210` for the `xy`, `xyz`, and `xyzw` channel swaps respectively. Negative cases also require the expected rejection for a missing descriptor wait, pending data, a format-width mismatch, a record overrun, and overlapping stores. ```sh python3 -B tests/compute_store_check.py binary llvm-mc-15 llvm-objcopy-15 libLLVM-15.so.1 ``` Passed on Ubuntu 22.04.5 with LLVM 15.0.7. This checks gfx1030 encoding and container translation. `git diff --check` passed. `git merge-tree --write-tree refs/remotes/origin/main HEAD` succeeded against `0f09ca936fe73399d8ffc8ec5e99541d6799ba1a`.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 22:58:54 +00:00
github manually merged commit 23ff04e2f0 into gh-pr/1333/base 2026-11-26 22:58:56 +00:00
This discussion has been locked. Commenting is limited to contributors.
No description provided.