shader: lower indexed gfx1030 multichannel UINT typed-buffer loads #1206

Manually merged
github merged 1 commit from gh-pr/1206/head into gh-pr/1206/base 2026-11-26 22:48:44 +00:00
Owner

@⁠stan495 on GitHub · 2026-11-24 03:33 UTC · original
stan495:codex/gfx1030-tbuffer-load-format-wide-upstream → main · +72 −21 · 4 files · 1 commits · merged 2026-11-24 04:29 UTC

Scope

Add xy, xyz and xyzw with matching 32-bit UINT formats. Wait on the full destination range and require all components to fit in one record.

Follow-up to R0Y00/Xbox2Windows#1176, which has merged.

Validation

Tested de3b1b266787fd0858ce6537d5d808feb79c090e on Windows 11 25H2 build 26200.9974 with the D3D12 debug layer enabled. The adapters were RX 7900 XTX driver 32.0.32029.2010 and Microsoft WARP 10.0.26100.9818.

  • cmake --preset dev -DINTAKE_PYTHON=<dev-python> and cmake --build --preset dev --target offscreen_check passed.
  • ctest --preset dev --no-tests=error -R '^compute_store_aot_(mtbuf_load|guard_read)_' -V reported 4 passes, zero failures and zero skips. Moving the source load one DWORD earlier changes word 1 from 8b06bba2 to 8b02a7f1.
  • python3 -B tests/compute_store_check.py binary llvm-mc-15 llvm-objcopy-15 libLLVM-15.so.1 passed on LLVM 15.0.7.
  • python -B tests/form_coverage_check.py, python -B tests/docs_links_check.py and python -B tests/bidi_controls_check.py passed. python -B tools/form_coverage.py out/results.xml recorded the new instruction forms from passing readbacks.

The GPU measurements execute translated desktop DXIL against CPU references.

**@⁠stan495** on GitHub · 2026-11-24 03:33 UTC · [original](https://github.com/R0Y00/Xbox2Windows/pull/1206) `stan495:codex/gfx1030-tbuffer-load-format-wide-upstream` → `main` · +72 −21 · 4 files · 1 commits · merged 2026-11-24 04:29 UTC ## Scope Add xy, xyz and xyzw with matching 32-bit UINT formats. Wait on the full destination range and require all components to fit in one record. Follow-up to R0Y00/Xbox2Windows#1176, which has merged. ## Validation Tested `de3b1b266787fd0858ce6537d5d808feb79c090e` on Windows 11 25H2 build 26200.9974 with the D3D12 debug layer enabled. The adapters were RX 7900 XTX driver 32.0.32029.2010 and Microsoft WARP 10.0.26100.9818. - `cmake --preset dev -DINTAKE_PYTHON=<dev-python>` and `cmake --build --preset dev --target offscreen_check` passed. - `ctest --preset dev --no-tests=error -R '^compute_store_aot_(mtbuf_load|guard_read)_' -V` reported 4 passes, zero failures and zero skips. Moving the source load one DWORD earlier changes word 1 from 8b06bba2 to 8b02a7f1. - `python3 -B tests/compute_store_check.py binary llvm-mc-15 llvm-objcopy-15 libLLVM-15.so.1` passed on LLVM 15.0.7. - `python -B tests/form_coverage_check.py`, `python -B tests/docs_links_check.py` and `python -B tests/bidi_controls_check.py` passed. `python -B tools/form_coverage.py out/results.xml` recorded the new instruction forms from passing readbacks. The GPU measurements execute translated desktop DXIL against CPU references.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 22:48:42 +00:00
github manually merged commit de3b1b2667 into gh-pr/1206/base 2026-11-26 22:48:44 +00:00
Author
Owner

@⁠tedin7 on GitHub · 2026-11-24 04:31 UTC · original

Windows Server 2025 retest at de3b1b26 (Windows Server 2025 Build 26100, MSVC 14.44.35207, AMD Ryzen 5 PRO 5650U, WARP):

Debug (dev preset)

Commands:

cmake --build --preset dev --target offscreen_check -- -j 6
ctest --preset dev -R "^compute_store_aot" --no-tests=error --output-on-failure

Results: 26 passed, 0 failed, 0 skipped (Total Test time: 156.18 sec, including compute_store_aot_mtbuf_load_hardware and compute_store_aot_mtbuf_load_warp).

Release (/O2, release preset)

Commands:

cmake --build --preset release --target offscreen_check -- -j 6
ctest --preset release -R "^compute_store_aot" --no-tests=error --output-on-failure

Results: 26 passed, 0 failed, 0 skipped (Total Test time: 161.48 sec, including compute_store_aot_mtbuf_load_hardware (3.87 sec) and compute_store_aot_mtbuf_load_warp (4.05 sec)).

**@⁠tedin7** on GitHub · 2026-11-24 04:31 UTC · [original](https://github.com/R0Y00/Xbox2Windows/pull/1206#issuecomment-7122097645) Windows Server 2025 retest at `de3b1b26` (`Windows Server 2025 Build 26100, MSVC 14.44.35207, AMD Ryzen 5 PRO 5650U, WARP`): ### Debug (`dev` preset) Commands: ```powershell cmake --build --preset dev --target offscreen_check -- -j 6 ctest --preset dev -R "^compute_store_aot" --no-tests=error --output-on-failure ``` Results: **26 passed, 0 failed, 0 skipped** (Total Test time: `156.18 sec`, including `compute_store_aot_mtbuf_load_hardware` and `compute_store_aot_mtbuf_load_warp`). ### Release (`/O2`, `release` preset) Commands: ```powershell cmake --build --preset release --target offscreen_check -- -j 6 ctest --preset release -R "^compute_store_aot" --no-tests=error --output-on-failure ``` Results: **26 passed, 0 failed, 0 skipped** (Total Test time: `161.48 sec`, including `compute_store_aot_mtbuf_load_hardware` (`3.87 sec`) and `compute_store_aot_mtbuf_load_warp` (`4.05 sec`)).
Author
Owner

@⁠tedin7 on GitHub · 2026-11-24 03:45 UTC · original · reviewed

Reviewed de3b1b26 on Linux (Windows build and D3D12 ctest execution were not run locally).

Diff audit

  • tools/compute_store_aot.py: extends tbuffer_load_format_{x,xy,xyz,xyzw} lowering (cpu == "gfx1030", idxen, no offen).
    • Enforces matching BUF_FMT_{32,32_32,32_32_32,32_32_32_32}_UINT format (Unsupported typed buffer read format), contiguous destination VGPR range v[dst:dst+count-1] within dst + count <= 256 (Unverified buffer read destination), and offset + 4 * count <= source_stride (Read leaves its source element).
    • Populates loading[reg] for all count destination VGPRs so none can be consumed before s_waitcnt vmcnt(0).
  • tests/compute_store_check.py: adds mtbuf_load_{xy,xyz,xyzw} cases, negative controls (destination range, format, pre-wait read, stride overflow), and offset-removal mutant check.
  • README.md and docs/experiments.md: consistent and title-neutral. No conflicts with #1207 (tbuffer_store_format_d16_*); #1211 is stacked on this commit.

Linux checks (/root/.local/share/x2w-rev-venv/bin/python -B)

  • tests/compute_store_check.py binary llvm-mc-19 llvm-objcopy-19 /usr/lib/llvm-19/lib/libLLVM-19.so: passed (0 failures)
  • tests/form_coverage_check.py: passed
  • tests/docs_links_check.py: passed (15 Markdown files, 268 links)
  • tests/bidi_controls_check.py: passed (977 files)
  • Windows offscreen_check and ctest -R '^compute_store_aot_(mtbuf_load|guard_read)_' not run locally.
**@⁠tedin7** on GitHub · 2026-11-24 03:45 UTC · [original](https://github.com/R0Y00/Xbox2Windows/pull/1206#pullrequestreview-6033342020) · **reviewed** Reviewed `de3b1b26` on Linux (Windows build and D3D12 `ctest` execution were not run locally). ### Diff audit - `tools/compute_store_aot.py`: extends `tbuffer_load_format_{x,xy,xyz,xyzw}` lowering (`cpu == "gfx1030"`, `idxen`, no `offen`). - Enforces matching `BUF_FMT_{32,32_32,32_32_32,32_32_32_32}_UINT` format (`Unsupported typed buffer read format`), contiguous destination VGPR range `v[dst:dst+count-1]` within `dst + count <= 256` (`Unverified buffer read destination`), and `offset + 4 * count <= source_stride` (`Read leaves its source element`). - Populates `loading[reg]` for all `count` destination VGPRs so none can be consumed before `s_waitcnt vmcnt(0)`. - `tests/compute_store_check.py`: adds `mtbuf_load_{xy,xyz,xyzw}` cases, negative controls (destination range, format, pre-wait read, stride overflow), and offset-removal mutant check. - `README.md` and `docs/experiments.md`: consistent and title-neutral. No conflicts with #1207 (`tbuffer_store_format_d16_*`); #1211 is stacked on this commit. ### Linux checks (`/root/.local/share/x2w-rev-venv/bin/python -B`) - `tests/compute_store_check.py binary llvm-mc-19 llvm-objcopy-19 /usr/lib/llvm-19/lib/libLLVM-19.so`: passed (0 failures) - `tests/form_coverage_check.py`: passed - `tests/docs_links_check.py`: passed (15 Markdown files, 268 links) - `tests/bidi_controls_check.py`: passed (977 files) - Windows `offscreen_check` and `ctest -R '^compute_store_aot_(mtbuf_load|guard_read)_'` not run locally.
This discussion has been locked. Commenting is limited to contributors.
No description provided.