shader: lower indexed gfx1030 tbuffer_load_format_x #1169

Merged
stan495 merged 1 commit from upstream-pr/1176 into main 2026-11-24 03:16:29 +00:00
stan495 commented 2026-11-24 02:31:43 +00:00 (Migrated from github.com)

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


Scope

Lower indexed gfx1030 tbuffer_load_format_x with BUF_FMT_32_UINT, a zero scalar offset, and an aligned instruction offset within the bound source stride. Require a ready, read-only source descriptor and vmcnt(0) before the result is consumed. Assumes a valid unswizzled native binding and in-range accesses; no general format conversion or native bounds emulation is claimed.

Validation

Tested d8fe7a699a7b3d4f7452de457dc6f2f982c0f6aa on Windows 11 25H2 build 26200.9974 with the D3D12 debug layer enabled. RX 7900 XTX driver 32.0.32029.2010; 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. The new fixture checks all 320 words after one and three groups. Changing the source stride from 12 to 8 produced the expected first mismatch on both adapters: word=3 expected=8b12f6b5 actual=8b0ee304.
  • python3 -B tests/compute_store_check.py binary llvm-mc-15 llvm-objcopy-15 libLLVM-15.so.1: passed on LLVM 15.0.7. The new case also verifies CLI output after assembling and decoding the source-built 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 reported one gfx1030 MTBUF form covered by this run.

Desktop DXIL is compared to the CPU reference; the fixture does not run the original ISA on a native gfx1030 target.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:issue:6573290903 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/1176). Originally posted by [stan495](https://github.com/stan495) on 2026-11-24T02:31:43Z. --- ## Scope Lower indexed gfx1030 `tbuffer_load_format_x` with `BUF_FMT_32_UINT`, a zero scalar offset, and an aligned instruction offset within the bound source stride. Require a ready, read-only source descriptor and `vmcnt(0)` before the result is consumed. Assumes a valid unswizzled native binding and in-range accesses; no general format conversion or native bounds emulation is claimed. ## Validation Tested `d8fe7a699a7b3d4f7452de457dc6f2f982c0f6aa` on Windows 11 25H2 build 26200.9974 with the D3D12 debug layer enabled. RX 7900 XTX driver 32.0.32029.2010; 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. The new fixture checks all 320 words after one and three groups. Changing the source stride from 12 to 8 produced the expected first mismatch on both adapters: `word=3 expected=8b12f6b5 actual=8b0ee304`. - `python3 -B tests/compute_store_check.py binary llvm-mc-15 llvm-objcopy-15 libLLVM-15.so.1`: passed on LLVM 15.0.7. The new case also verifies CLI output after assembling and decoding the source-built 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` reported one gfx1030 MTBUF form covered by this run. Desktop DXIL is compared to the CPU reference; the fixture does not run the original ISA on a native gfx1030 target.
upstream-sync closed this pull request 2026-11-24 06:46:42 +00:00
tedin7 commented 2026-11-24 06:46:43 +00:00 (Migrated from github.com)

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

Review: COMMENTED


Reviewed at commit d8fe7a699a7b3d4f7452de457dc6f2f982c0f6aa.

  • Code notes: tools/compute_store_aot.py extends the read matcher to gfx1030 tbuffer_load_format_x with format:[BUF_FMT_32_UINT] and idxen (without offen), reusing source_stride bounds validation, vmcnt(0) tracking, and ByteAddressBuffer.Load lowering, and tightens descriptor lane-order checking from a set to an ordered tuple. tests/compute_store_check.py adds negative/diagnostic controls and a source_stride=8 mismatch case.
  • Linux checks passed:
    • python3 tests/docs_links_check.py, python3 tests/bidi_controls_check.py, python3 tests/gpu_report_format_check.py, python3 tests/xgameruntime_table_check.py
    • python3 -m py_compile tools/compute_store_aot.py tests/compute_store_check.py
    • python3 tests/rdna2_tools_check.py (110 tests OK, 10 skipped)
    • mtbuf_load_controls() and python3 -B tests/compute_store_check.py binary llvm-mc-19 llvm-objcopy-19 /usr/lib/llvm-19/lib/libLLVM-19.so
  • Not run on Linux: Windows DXC/WARP/hardware CTest compute_store_aot_mtbuf_load_{warp,hardware} (4 Windows CI checks currently pending).
<!-- greyfinch-sync:R0Y00/Xbox2Windows:review:6032871741 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/1176#pullrequestreview-6032871741). Originally posted by [tedin7](https://github.com/tedin7) on 2026-11-24T02:40:22Z. **Review:** COMMENTED --- Reviewed at commit `d8fe7a699a7b3d4f7452de457dc6f2f982c0f6aa`. - **Code notes**: `tools/compute_store_aot.py` extends the read matcher to `gfx1030` `tbuffer_load_format_x` with `format:[BUF_FMT_32_UINT]` and `idxen` (without `offen`), reusing `source_stride` bounds validation, `vmcnt(0)` tracking, and `ByteAddressBuffer.Load` lowering, and tightens descriptor lane-order checking from a `set` to an ordered `tuple`. `tests/compute_store_check.py` adds negative/diagnostic controls and a `source_stride=8` mismatch case. - **Linux checks passed**: - `python3 tests/docs_links_check.py`, `python3 tests/bidi_controls_check.py`, `python3 tests/gpu_report_format_check.py`, `python3 tests/xgameruntime_table_check.py` - `python3 -m py_compile tools/compute_store_aot.py tests/compute_store_check.py` - `python3 tests/rdna2_tools_check.py` (110 tests OK, 10 skipped) - `mtbuf_load_controls()` and `python3 -B tests/compute_store_check.py binary llvm-mc-19 llvm-objcopy-19 /usr/lib/llvm-19/lib/libLLVM-19.so` - **Not run on Linux**: Windows DXC/WARP/hardware CTest `compute_store_aot_mtbuf_load_{warp,hardware}` (4 Windows CI 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!1169
No description provided.