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

Merged
stan495 merged 1 commit from upstream-pr/1179 into main 2026-11-24 03:25:41 +00:00
stan495 commented 2026-11-24 02:38:12 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by stan495 on 2026-11-24T02:38:12Z.


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.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:issue:6573367560 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/1179). Originally posted by [stan495](https://github.com/stan495) on 2026-11-24T02:38:12Z. --- ## 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.
upstream-sync closed this pull request 2026-11-24 06:46:43 +00:00
tedin7 commented 2026-11-24 06:46:44 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by tedin7 on 2026-11-24T02:51:26Z.

Review: COMMENTED


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).
<!-- greyfinch-sync:R0Y00/Xbox2Windows:review:6032952875 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/1179#pullrequestreview-6032952875). Originally posted by [tedin7](https://github.com/tedin7) on 2026-11-24T02:51:26Z. **Review:** COMMENTED --- 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).
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!1172
No description provided.