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

Merged
stan495 merged 1 commit from upstream-pr/1206 into main 2026-11-24 04:29:53 +00:00
stan495 commented 2026-11-24 03:33:20 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by stan495 on 2026-11-24T03:33:20Z.


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.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:issue:6574003949 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/1206). Originally posted by [stan495](https://github.com/stan495) on 2026-11-24T03:33:20Z. --- ## 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.
upstream-sync closed this pull request 2026-11-24 06:46:54 +00:00
tedin7 commented 2026-11-24 06:46:55 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by tedin7 on 2026-11-24T03:45:29Z.

Review: COMMENTED


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.
<!-- greyfinch-sync:R0Y00/Xbox2Windows:review:6033342020 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/1206#pullrequestreview-6033342020). Originally posted by [tedin7](https://github.com/tedin7) on 2026-11-24T03:45:29Z. **Review:** COMMENTED --- 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 commented 2026-11-24 06:50:20 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by tedin7 on 2026-11-24T04:31:29Z.


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)).

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7122097645 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/1206#issuecomment-7122097645). Originally posted by [tedin7](https://github.com/tedin7) on 2026-11-24T04:31:29Z. --- 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`)).
Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
R0Y00/Xbox2Windows!1199
No description provided.