shader: lower typed gfx1030 2D image stores #1344

Manually merged
github merged 2 commits from gh-pr/1344/head into gh-pr/1344/base 2026-11-26 22:59:47 +00:00
Owner

@⁠stan495 on GitHub · 2026-11-24 08:43 UTC · original
stan495:codex/gfx1030-mimg-typed-stores → main · +353 −40 · 8 files · 2 commits · merged 2026-11-24 10:19 UTC

Scope

Lower gfx1030 image_store and image_store_mip for linear R32G32B32A32_UINT 2D images. Both opcodes write one full texel at u0 and zero channels omitted by DMASK. The translator accepts one store per shader and both 32-bit and a16 address forms. Use --image-uav-mip to bind a single view. An explicit native mip must be a compile-time constant that matches the view. Coordinates must be in range and each invocation must write a distinct texel.

This extends the gfx1030 compute MIMG path from #1310 and #1321.

Validation

Tested 382d1db2201cec10f17bac580372994e1eb98246 on Windows 11 build 26300.9974 with Intel Arc B390 (driver 32.0.101.8509) and WARP (Microsoft Basic Render Driver, driver 10.0.26100.9818). Both reported debug_layer=unavailable.

. .\tools\dev.ps1
cmake --preset dev -DINTAKE_PYTHON=<dev-python>
cmake --build --preset dev --target offscreen_check
ctest --preset dev --no-tests=error -R '^(compute_store_aot_|compute_root_|compute_tables_|offscreen_capability_table_self_test$)' -V -j 2 --output-junit <absolute-path-to-1344-junit.xml>
python -B tools/form_coverage.py <absolute-path-to-1344-junit.xml> --records out/build/dev/form_coverage --json out/1344-coverage.json --gaps gfx1030
python -B tests/form_coverage_check.py
python -B tests/docs_links_check.py
python -B tests/bidi_controls_check.py

CTest reported 57 passed, 0 failed and 0 skipped. Each backend executed 18 typed write variants using mip levels 0, 1 and 2, two address widths, DMASKs 0x1, 0xa, 0xf, and dispatches of one or two groups. The independent CPU reference compared all 1,344 channel values across three mips, including untouched texels. The masked-channel mutation first differed at mip=0 word=0 expected=00000000 actual=deadbeef. The wrong UAV mip mutation first differed at mip=0 word=0 expected=c0000000 actual=11000000. The tests reject dynamic or mismatched mip levels, unexpected flags, a second image store, and invalid descriptor bindings and waits. The JUnit-backed gfx1030 compute coverage includes both new MIMG mnemonics. The same run covered formatted MUBUF stores and the upstream D16 load and atomic reduction cases from #1343, #1346 and #1354.

python3 -B tests/compute_store_check.py binary llvm-mc-15 llvm-objcopy-15 libLLVM-15.so.1

LLVM 15 assembled and disassembled all 18 write cases. The synthetic container CLI emitted the same HLSL as the text path. The GPU tests ran the translated desktop DXIL.

**@⁠stan495** on GitHub · 2026-11-24 08:43 UTC · [original](https://github.com/R0Y00/Xbox2Windows/pull/1344) `stan495:codex/gfx1030-mimg-typed-stores` → `main` · +353 −40 · 8 files · 2 commits · merged 2026-11-24 10:19 UTC ## Scope Lower gfx1030 `image_store` and `image_store_mip` for linear `R32G32B32A32_UINT` 2D images. Both opcodes write one full texel at `u0` and zero channels omitted by DMASK. The translator accepts one store per shader and both 32-bit and `a16` address forms. Use `--image-uav-mip` to bind a single view. An explicit native mip must be a compile-time constant that matches the view. Coordinates must be in range and each invocation must write a distinct texel. This extends the gfx1030 compute MIMG path from #1310 and #1321. ## Validation Tested `382d1db2201cec10f17bac580372994e1eb98246` on Windows 11 build 26300.9974 with Intel Arc B390 (driver 32.0.101.8509) and WARP (Microsoft Basic Render Driver, driver 10.0.26100.9818). Both reported `debug_layer=unavailable`. ```powershell . .\tools\dev.ps1 cmake --preset dev -DINTAKE_PYTHON=<dev-python> cmake --build --preset dev --target offscreen_check ctest --preset dev --no-tests=error -R '^(compute_store_aot_|compute_root_|compute_tables_|offscreen_capability_table_self_test$)' -V -j 2 --output-junit <absolute-path-to-1344-junit.xml> python -B tools/form_coverage.py <absolute-path-to-1344-junit.xml> --records out/build/dev/form_coverage --json out/1344-coverage.json --gaps gfx1030 python -B tests/form_coverage_check.py python -B tests/docs_links_check.py python -B tests/bidi_controls_check.py ``` CTest reported 57 passed, 0 failed and 0 skipped. Each backend executed 18 typed write variants using mip levels 0, 1 and 2, two address widths, DMASKs `0x1`, `0xa`, `0xf`, and dispatches of one or two groups. The independent CPU reference compared all 1,344 channel values across three mips, including untouched texels. The masked-channel mutation first differed at `mip=0 word=0 expected=00000000 actual=deadbeef`. The wrong UAV mip mutation first differed at `mip=0 word=0 expected=c0000000 actual=11000000`. The tests reject dynamic or mismatched mip levels, unexpected flags, a second image store, and invalid descriptor bindings and waits. The JUnit-backed gfx1030 compute coverage includes both new MIMG mnemonics. The same run covered formatted MUBUF stores and the upstream D16 load and atomic reduction cases from #1343, #1346 and #1354. ```sh python3 -B tests/compute_store_check.py binary llvm-mc-15 llvm-objcopy-15 libLLVM-15.so.1 ``` LLVM 15 assembled and disassembled all 18 write cases. The synthetic container CLI emitted the same HLSL as the text path. The GPU tests ran the translated desktop DXIL.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 22:59:45 +00:00
github manually merged commit f236a41bf1 into gh-pr/1344/base 2026-11-26 22:59:47 +00:00
Author
Owner

@⁠tablefrogpillow on GitHub · 2026-11-24 10:08 UTC · original

Ran the PR's validation subset on AMD hardware, which the Validation section (Intel Arc + WARP) didn't cover.

Host: AMD Radeon RX 7900 GRE (Navi31, RDNA3), vendor 1002 device 744c, driver 31.0.22030.2, Windows 11 26300, D3D12 (debug_layer=unavailable). Built offscreen_check at head 382d1db.

ctest --preset dev -R '^(compute_store_aot_|compute_root_|compute_tables_|offscreen_capability_table_self_test$)' -j 1 → 57/57 passed. The gfx1030 image-store cases pass — compute_store_aot_mimg_store_hardware and compute_store_aot_mimg_mip_hardware, compared_words=1344 mismatches=0 across mips 0/1/2 and 1–2 groups — with the built-in controls catching the mutations (masked-channel → mip=0 word=0 expected=00000000 actual=deadbeef; wrong-UAV-mip → expected=c0000000 actual=11000000).

Note for single-GPU hosts: with -j 2 (as in the PR command) every *_hardware test spuriously fails here — concurrent D3D12 submissions to one adapter contend; -j 1 is clean. Single-gen RDNA3 datapoint. AI-assisted (Claude).

**@⁠tablefrogpillow** on GitHub · 2026-11-24 10:08 UTC · [original](https://github.com/R0Y00/Xbox2Windows/pull/1344#issuecomment-7128366943) Ran the PR's validation subset on **AMD hardware**, which the `Validation` section (Intel Arc + WARP) didn't cover. **Host:** AMD Radeon RX 7900 GRE (Navi31, RDNA3), vendor `1002` device `744c`, driver `31.0.22030.2`, Windows 11 26300, D3D12 (`debug_layer=unavailable`). Built `offscreen_check` at head `382d1db`. `ctest --preset dev -R '^(compute_store_aot_|compute_root_|compute_tables_|offscreen_capability_table_self_test$)' -j 1` → **57/57 passed**. The gfx1030 image-store cases pass — `compute_store_aot_mimg_store_hardware` and `compute_store_aot_mimg_mip_hardware`, `compared_words=1344 mismatches=0` across mips 0/1/2 and 1–2 groups — with the built-in controls catching the mutations (masked-channel → `mip=0 word=0 expected=00000000 actual=deadbeef`; wrong-UAV-mip → `expected=c0000000 actual=11000000`). Note for single-GPU hosts: with `-j 2` (as in the PR command) every `*_hardware` test spuriously fails here — concurrent D3D12 submissions to one adapter contend; **`-j 1` is clean**. Single-gen RDNA3 datapoint. AI-assisted (Claude).
Author
Owner

@⁠R0Y00 on GitHub · 2026-11-24 10:16 UTC · original

I kept your updated image-store revision and integrated the current raw reductions before pushing f236a41b. The image-UAV path now explicitly rejects both 32-bit and 64-bit raw atomics, with controls for both. I reran typed image stores on RTX 4060 Laptop and WARP after the sync. The earlier integration also passed the 64-bit atomic and formatted D16 readback regressions on both adapters. CI is checking the updated head.

**@⁠R0Y00** on GitHub · 2026-11-24 10:16 UTC · [original](https://github.com/R0Y00/Xbox2Windows/pull/1344#issuecomment-7128544334) I kept your updated image-store revision and integrated the current raw reductions before pushing f236a41b. The image-UAV path now explicitly rejects both 32-bit and 64-bit raw atomics, with controls for both. I reran typed image stores on RTX 4060 Laptop and WARP after the sync. The earlier integration also passed the 64-bit atomic and formatted D16 readback regressions on both adapters. CI is checking the updated head.
This discussion has been locked. Commenting is limited to contributors.
No description provided.