shader: lower gfx1030 four-sample image_msaa_load #1444

Manually merged
github merged 1 commit from gh-pr/1444/head into gh-pr/1444/base 2026-11-26 23:07:37 +00:00
Owner

@⁠stan495 on GitHub · 2026-11-24 11:37 UTC · original
stan495:codex/gfx1030-mimg-msaa-load → main · +361 −8 · 11 files · 1 commits · merged 2026-11-24 12:02 UTC

Summary

Lower gfx1030 image_msaa_load for a 2D, four-sample R32_UINT SRV. The profile supports contiguous 32-bit x/y/fragment address registers, a statically zero fragment ID, dmask:0xf, and unorm. It returns sample IDs 0–3 in order, including when address and destination VGPRs alias. Descriptor provenance and lgkmcnt(0) / vmcnt(0) readiness are checked. Other dimensions, masks, fragment IDs, packed operands, NSA and unsupported flags are rejected.

Verification

Tested clean head ff2297cc7f045719bc6fdbb626ebf8715a4caa1c.

. .\tools\dev.ps1
cmake --preset dev -DINTAKE_PYTHON=<python.exe>
cmake --build --preset dev --target offscreen_check
ctest --preset dev --no-tests=error -R '^(compute_store_aot_mimg_|compute_root_|compute_tables_)' -V --output-junit out/msaa.xml
python -B tools/form_coverage.py out/msaa.xml --records out/build/dev/form_coverage --json out/msaa-coverage.json
python -B tests/form_coverage_check.py
python -B tests/docs_links_check.py
python -B tests/bidi_controls_check.py

CTest: 18 passed, 0 failed, 0 skipped. The four-sample texture is rendered from source and the translated DXIL is dispatched. The independent CPU reference checks all 320 UAV words, including 64 untouched words. The same run's JUnit and form records report 12/111 gfx1030 MIMG mnemonics in this compute subset, including image_msaa_load.

Both backends detected the mutated entry points: repeated sample zero first differed at word 1 (91010000 expected, 91000000 actual), reversed samples at word 0 (91000000 / 91030000), and exchanged coordinates at word 4 (91000001 / 91000100). Rejection cases also cover a premature result read, a nonzero or variable fragment ID, and unverified operands and flags.

Windows 11 build 26300.9974, Microsoft Basic Render Driver (WARP) 10.0.26100.9818, and Intel Arc B390 32.0.101.8509. The debug layer was unavailable on both backends.

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

LLVM 15 assembles and disassembles the gfx1030 source, then the container CLI translates it successfully. git diff --check HEAD^ passed. git merge-tree --write-tree origin/main HEAD succeeded against upstream 5bfafce2cf75bc246643dbf0fbdacdc9e50226e1.

**@⁠stan495** on GitHub · 2026-11-24 11:37 UTC · [original](https://github.com/R0Y00/Xbox2Windows/pull/1444) `stan495:codex/gfx1030-mimg-msaa-load` → `main` · +361 −8 · 11 files · 1 commits · merged 2026-11-24 12:02 UTC ## Summary Lower gfx1030 `image_msaa_load` for a 2D, four-sample `R32_UINT` SRV. The profile supports contiguous 32-bit x/y/fragment address registers, a statically zero fragment ID, `dmask:0xf`, and `unorm`. It returns sample IDs 0–3 in order, including when address and destination VGPRs alias. Descriptor provenance and `lgkmcnt(0)` / `vmcnt(0)` readiness are checked. Other dimensions, masks, fragment IDs, packed operands, NSA and unsupported flags are rejected. ## Verification Tested clean head `ff2297cc7f045719bc6fdbb626ebf8715a4caa1c`. ```powershell . .\tools\dev.ps1 cmake --preset dev -DINTAKE_PYTHON=<python.exe> cmake --build --preset dev --target offscreen_check ctest --preset dev --no-tests=error -R '^(compute_store_aot_mimg_|compute_root_|compute_tables_)' -V --output-junit out/msaa.xml python -B tools/form_coverage.py out/msaa.xml --records out/build/dev/form_coverage --json out/msaa-coverage.json python -B tests/form_coverage_check.py python -B tests/docs_links_check.py python -B tests/bidi_controls_check.py ``` CTest: 18 passed, 0 failed, 0 skipped. The four-sample texture is rendered from source and the translated DXIL is dispatched. The independent CPU reference checks all 320 UAV words, including 64 untouched words. The same run's JUnit and form records report 12/111 gfx1030 MIMG mnemonics in this compute subset, including `image_msaa_load`. Both backends detected the mutated entry points: repeated sample zero first differed at word 1 (`91010000` expected, `91000000` actual), reversed samples at word 0 (`91000000` / `91030000`), and exchanged coordinates at word 4 (`91000001` / `91000100`). Rejection cases also cover a premature result read, a nonzero or variable fragment ID, and unverified operands and flags. Windows 11 build `26300.9974`, Microsoft Basic Render Driver (WARP) `10.0.26100.9818`, and Intel Arc B390 `32.0.101.8509`. The debug layer was unavailable on both backends. ```sh python3 -B tests/compute_mimg_msaa_check.py --binary llvm-mc-15 llvm-objcopy-15 libLLVM-15.so.1 ``` LLVM 15 assembles and disassembles the gfx1030 source, then the container CLI translates it successfully. `git diff --check HEAD^` passed. `git merge-tree --write-tree origin/main HEAD` succeeded against upstream `5bfafce2cf75bc246643dbf0fbdacdc9e50226e1`.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 23:07:36 +00:00
github manually merged commit ff2297cc7f into gh-pr/1444/base 2026-11-26 23:07:37 +00:00
This discussion has been locked. Commenting is limited to contributors.
No description provided.