shader: lower indexed gfx1030 UINT typed-buffer stores #1179

Manually merged
github merged 1 commit from gh-pr/1179/head into gh-pr/1179/base 2026-11-26 22:46:39 +00:00
Owner

@⁠stan495 on GitHub · 2026-11-24 02:38 UTC · original
stan495:codex/gfx1030-tbuffer-store-format → main · +124 −12 · 5 files · 1 commits · merged 2026-11-24 03:25 UTC

Scope

Lower gfx1030 tbuffer_store_format_{x,xy,xyz,xyzw} with matching 32-bit UINT components to one to four raw UAV DWORD writes. Require idxen, a proven dispatch-thread index, zero scalar offset, a ready UAV descriptor, and a DWORD-aligned span contained in its bound record. The raw store overlap check also applies across typed and raw stores. This does not emulate native bounds checks or other format conversions.

Validation

Tested fe4fab25f78b3447a23ea254fa66cd1c3e61549d on Windows 11 25H2 build 26200.9974 with the D3D12 debug layer enabled; 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_' -V: 24 passed, 0 failed, 0 skipped. Each width checks all 320 words after one and two groups. Moving the write one DWORD earlier caused the expected first mismatch on both adapters for every width: word=0 expected=c5c5c5c5 actual=01234567.
  • python3 -B tests/compute_store_check.py binary llvm-mc-15 llvm-objcopy-15 libLLVM-15.so.1: passed using LLVM 15.0.7. All four forms assembled, decoded, and lowered to the same HLSL as the text fixture.
  • python -B tests/form_coverage_check.py, python -B tests/docs_links_check.py, python -B tests/bidi_controls_check.py: passed. python -B tools/form_coverage.py out/results.xml recorded four gfx1030 MTBUF forms in this run.

The GPU runs execute translated desktop DXIL, not the original gfx1030 instructions.

**@⁠stan495** on GitHub · 2026-11-24 02:38 UTC · [original](https://github.com/R0Y00/Xbox2Windows/pull/1179) `stan495:codex/gfx1030-tbuffer-store-format` → `main` · +124 −12 · 5 files · 1 commits · merged 2026-11-24 03:25 UTC ## Scope Lower gfx1030 `tbuffer_store_format_{x,xy,xyz,xyzw}` with matching 32-bit UINT components to one to four raw UAV DWORD writes. Require `idxen`, a proven dispatch-thread index, zero scalar offset, a ready UAV descriptor, and a DWORD-aligned span contained in its bound record. The raw store overlap check also applies across typed and raw stores. This does not emulate native bounds checks or other format conversions. ## Validation Tested `fe4fab25f78b3447a23ea254fa66cd1c3e61549d` on Windows 11 25H2 build 26200.9974 with the D3D12 debug layer enabled; 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_' -V`: 24 passed, 0 failed, 0 skipped. Each width checks all 320 words after one and two groups. Moving the write one DWORD earlier caused the expected first mismatch on both adapters for every width: `word=0 expected=c5c5c5c5 actual=01234567`. - `python3 -B tests/compute_store_check.py binary llvm-mc-15 llvm-objcopy-15 libLLVM-15.so.1`: passed using LLVM 15.0.7. All four forms assembled, decoded, and lowered to the same HLSL as the text fixture. - `python -B tests/form_coverage_check.py`, `python -B tests/docs_links_check.py`, `python -B tests/bidi_controls_check.py`: passed. `python -B tools/form_coverage.py out/results.xml` recorded four gfx1030 MTBUF forms in this run. The GPU runs execute translated desktop DXIL, not the original gfx1030 instructions.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 22:46:37 +00:00
github manually merged commit fe4fab25f7 into gh-pr/1179/base 2026-11-26 22:46:39 +00:00
Author
Owner

@⁠tedin7 on GitHub · 2026-11-24 02:51 UTC · original · reviewed

Review of fe4fab25f78b3447a23ea254fa66cd1c3e61549d (Linux):

  • tools/compute_store_aot.py: cleanly extends the raw UAV store matcher to tbuffer_store_format_{x,xy,xyz,xyzw} on gfx1030 with idxen (no offen), matching BUF_FMT_(32_){1,4}UINT, DWORD-aligned span within stride, and shared overlap checks.
  • tests/compute_store_check.py: mtbuf_store_cases() and mtbuf_store_draw() exercise all 4 widths, negative controls (target, offen, format, s_waitcnt, tight stride, overlap, shifted offset), and FORM_COVERAGE_RECORD.
  • Linux checks run and passed: py_compile on tools/compute_store_aot.py and tests/compute_store_check.py, compute_store_check.controls() + mtbuf_store_cases() lowering/negative checks, docs_links_check.py (257 links), bidi_controls_check.py (956 files), gpu_report_format_check.py (10 tests), xgameruntime_table_check.py, and rdna2_tools_check.py (110 tests, 10 skipped). (form_coverage_check.py was blocked here by missing iced_x86.)
  • Note: llvm-mc-15 binary assembly and Windows DXC/WARP/hardware execution rely on CI (4 checks currently pending).
**@⁠tedin7** on GitHub · 2026-11-24 02:51 UTC · [original](https://github.com/R0Y00/Xbox2Windows/pull/1179#pullrequestreview-6032952875) · **reviewed** Review of `fe4fab25f78b3447a23ea254fa66cd1c3e61549d` (Linux): - `tools/compute_store_aot.py`: cleanly extends the raw UAV store matcher to `tbuffer_store_format_{x,xy,xyz,xyzw}` on `gfx1030` with `idxen` (no `offen`), matching `BUF_FMT_(32_){1,4}UINT`, DWORD-aligned span within `stride`, and shared overlap checks. - `tests/compute_store_check.py`: `mtbuf_store_cases()` and `mtbuf_store_draw()` exercise all 4 widths, negative controls (target, `offen`, format, `s_waitcnt`, tight `stride`, overlap, shifted `offset`), and `FORM_COVERAGE_RECORD`. - Linux checks run and passed: `py_compile` on `tools/compute_store_aot.py` and `tests/compute_store_check.py`, `compute_store_check.controls()` + `mtbuf_store_cases()` lowering/negative checks, `docs_links_check.py` (257 links), `bidi_controls_check.py` (956 files), `gpu_report_format_check.py` (10 tests), `xgameruntime_table_check.py`, and `rdna2_tools_check.py` (110 tests, 10 skipped). (`form_coverage_check.py` was blocked here by missing `iced_x86`.) - Note: `llvm-mc-15` binary assembly and Windows DXC/WARP/hardware execution rely on CI (4 checks currently pending).
This discussion has been locked. Commenting is limited to contributors.
No description provided.