compute: accept gfx1013 image_atomic_umin on R32_UINT #2662

Manually merged
github merged 2 commits from gh-pr/2662/head into gh-pr/2662/base 2026-11-27 01:12:20 +00:00
Owner

@⁠SimSalabimse on GitHub · 2026-11-26 01:06 UTC · original
SimSalabimse:cursor/image-atomic-umin-e885 → main · +46 −30 · 4 files · 2 commits · merged 2026-11-26 01:15 UTC

Change

Refs #2618 (batch M200-01, work code A).

gfx1013 image atomics accepted add, umax and cmpswap only. M200-01 A stops at image_atomic_umin.

  • Allow image_atomic_umin on gfx1013 R32_UINT with the shared gfx1030 InterlockedMin lowering (unsigned; no asint).
  • Extend tests/compute_image_atomics_gfx1013_check.py: umin case, machine words 080154f0080e0600, mutant Max-for-Min.
  • High-bit ordering: minmax operand 0x80000011; umin vs smin CPU references differ.
  • Other integer image atomics on gfx1013 stay refused. Buffer umin on gfx1013 unchanged.

AI-assisted.

Verification

Commit under test: this PR head.

PYTHONPATH=tests python3 -B tests/compute_image_atomics_gfx1013_check.py

Passed on Linux. This agent could not run DXC / WARP / hardware draws or llvm-mc binary checks.

Windows verification:

ctest --preset dev --no-tests=error -R '^compute_image_atomics_gfx1013' -V

Expect: controls pass; warp/hardware draws include umin; hardware may skip 77.

Evidence and follow-up

  • Source-built fixtures only; no retail bytes.
  • Negative control: Max-for-Min mutant must mismatch; smin on R32_SINT refused.
  • Mesh/pixel image_atomic_umin in gfx2hlsl is still open (7 A rows are mesh family).
  • Does not claim capture replay; needs a capture root for those rows.

Checklist

  • This pull request covers one reviewable behavior.
  • I included the exact command and result for every check I ran.
  • I considered a negative control or failure case for a new fixture.
  • I updated README/docs when a capability or build requirement changed.
  • I did not include game files, dumps, distribution links or secrets.
**@⁠SimSalabimse** on GitHub · 2026-11-26 01:06 UTC · [original](https://github.com/R0Y00/Xbox2Windows/pull/2662) `SimSalabimse:cursor/image-atomic-umin-e885` → `main` · +46 −30 · 4 files · 2 commits · merged 2026-11-26 01:15 UTC ## Change Refs #2618 (batch M200-01, work code A). gfx1013 image atomics accepted `add`, `umax` and `cmpswap` only. M200-01 A stops at `image_atomic_umin`. - Allow `image_atomic_umin` on gfx1013 `R32_UINT` with the shared gfx1030 `InterlockedMin` lowering (unsigned; no `asint`). - Extend `tests/compute_image_atomics_gfx1013_check.py`: umin case, machine words `080154f0080e0600`, mutant Max-for-Min. - High-bit ordering: minmax operand `0x80000011`; umin vs smin CPU references differ. - Other integer image atomics on gfx1013 stay refused. Buffer umin on gfx1013 unchanged. AI-assisted. ## Verification Commit under test: this PR head. ```bash PYTHONPATH=tests python3 -B tests/compute_image_atomics_gfx1013_check.py ``` Passed on Linux. This agent could not run DXC / WARP / hardware draws or llvm-mc binary checks. Windows verification: ```powershell ctest --preset dev --no-tests=error -R '^compute_image_atomics_gfx1013' -V ``` Expect: controls pass; warp/hardware draws include umin; hardware may skip **77**. ## Evidence and follow-up - Source-built fixtures only; no retail bytes. - Negative control: Max-for-Min mutant must mismatch; smin on R32_SINT refused. - Mesh/pixel `image_atomic_umin` in `gfx2hlsl` is still open (7 A rows are mesh family). - Does not claim capture replay; needs a capture root for those rows. ## Checklist - [x] This pull request covers one reviewable behavior. - [x] I included the exact command and result for every check I ran. - [x] I considered a negative control or failure case for a new fixture. - [x] I updated README/docs when a capability or build requirement changed. - [x] I did not include game files, dumps, distribution links or secrets.
gfx1013 image atomics covered add, umax and cmpswap only; M200-01 A stops at
unsigned image minimum. Allow umin with the shared gfx1030 InterlockedMin
lowering, keep it unsigned, and extend the gfx1013 fixture (high-bit operand
0x80000011 vs smin). Other ops stay refused.

Refs #2618

Co-authored-by: SimSalabimse <[email protected]>
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-27 01:12:17 +00:00
github manually merged commit 6b770c81d5 into gh-pr/2662/base 2026-11-27 01:12:20 +00:00
Author
Owner

@⁠SimSalabimse on GitHub · 2026-11-26 01:09 UTC · original

CMake registers these under the compute_store_aot_ prefix (not the script basename):

  • compute_store_aot_gfx1013_image_atomics_warp
  • compute_store_aot_gfx1013_image_atomics_hardware
cmake --build --preset dev --target offscreen_check
ctest --preset dev --no-tests=error -j 1 -R '^compute_store_aot_gfx1013_image_atomics_(warp|hardware)$' -V

Controls-only (no dedicated CMake test; runs inside --draw too):

.\out\pe-env\Scripts\python.exe -B tests\compute_image_atomics_gfx1013_check.py
**@⁠SimSalabimse** on GitHub · 2026-11-26 01:09 UTC · [original](https://github.com/R0Y00/Xbox2Windows/pull/2662#issuecomment-7179482875) CMake registers these under the `compute_store_aot_` prefix (not the script basename): - `compute_store_aot_gfx1013_image_atomics_warp` - `compute_store_aot_gfx1013_image_atomics_hardware` ```powershell cmake --build --preset dev --target offscreen_check ctest --preset dev --no-tests=error -j 1 -R '^compute_store_aot_gfx1013_image_atomics_(warp|hardware)$' -V ``` Controls-only (no dedicated CMake test; runs inside `--draw` too): ```powershell .\out\pe-env\Scripts\python.exe -B tests\compute_image_atomics_gfx1013_check.py ```
Author
Owner

@⁠tedin7 on GitHub · 2026-11-26 01:11 UTC · original · reviewed

Review of head 6b770c81 (after updating with main). Code review only, no merge decision here.

What I checked:

  • tools/compute_store_aot.py: gfx1013 now accepts umin next to add/umax/cmpswap; it reuses the gfx1030 lowering (unsigned InterlockedMin, no asint). Refusal message updated in both places. Sibling table ATOMIC_WORDS gets umin opcode 21 (080154f0080e0600), which matches the gfx10 MIMG opcode order (umin 21, umax 23).
  • Test: tests/compute_image_atomics_gfx1013_check.py adds umin to accepted ops, control HLSL, machine words, a mutant (min -> max) and a high-bit check (operand 0x80000011, so umin differs from smin). tests/compute_store_check.py updated for the shared accept/refuse list. --draw still compares every texel on a real adapter against a CPU reference.
  • No other open or merged PR covers this op.

Commands run (Linux):

  • python3 tests/compute_image_atomics_gfx1013_check.py -> passed
  • mimg_atomic_controls for integer, minmax, exchange suites -> passed
  • python3 tests/docs_links_check.py and python3 tests/bidi_controls_check.py -> passed
  • git diff --check origin/main...HEAD -> clean
  • Mutation 1: removed umin from the gfx1013 accept list -> check fails.
  • Mutation 2: lowered umin as Max -> check fails (assertion).

Findings: none blocking. Windows WARP run follows separately.

AI-assisted; commands listed were executed locally.

**@⁠tedin7** on GitHub · 2026-11-26 01:11 UTC · [original](https://github.com/R0Y00/Xbox2Windows/pull/2662#pullrequestreview-6067217863) · **reviewed** Review of head 6b770c81 (after updating with main). Code review only, no merge decision here. What I checked: - `tools/compute_store_aot.py`: gfx1013 now accepts `umin` next to add/umax/cmpswap; it reuses the gfx1030 lowering (unsigned `InterlockedMin`, no `asint`). Refusal message updated in both places. Sibling table `ATOMIC_WORDS` gets umin opcode 21 (`080154f0080e0600`), which matches the gfx10 MIMG opcode order (umin 21, umax 23). - Test: `tests/compute_image_atomics_gfx1013_check.py` adds umin to accepted ops, control HLSL, machine words, a mutant (min -> max) and a high-bit check (operand 0x80000011, so umin differs from smin). `tests/compute_store_check.py` updated for the shared accept/refuse list. `--draw` still compares every texel on a real adapter against a CPU reference. - No other open or merged PR covers this op. Commands run (Linux): - `python3 tests/compute_image_atomics_gfx1013_check.py` -> passed - `mimg_atomic_controls` for integer, minmax, exchange suites -> passed - `python3 tests/docs_links_check.py` and `python3 tests/bidi_controls_check.py` -> passed - `git diff --check origin/main...HEAD` -> clean - Mutation 1: removed `umin` from the gfx1013 accept list -> check fails. - Mutation 2: lowered `umin` as `Max` -> check fails (assertion). Findings: none blocking. Windows WARP run follows separately. AI-assisted; commands listed were executed locally.
Author
Owner

@⁠tedin7 on GitHub · 2026-11-26 01:12 UTC · original

Verified on Windows Server 2025 (Build 26100, MSVC 14.44.35207 + D3D12 WARP) at commit 6b770c81d5c664b4bd2df71acbdd240f77baaff5:

  • Debug (--preset dev):
    • Build (cmake --build --preset dev -- -j 2): 0.00s (configure 0.00s)
    • Test (ctest --preset dev -R 'compute_store_aot_(gfx1013_image_atomics|mimg_atomic_minmax)_warp' --parallel 6 --no-tests=error --output-on-failure): 2/2 passed (1.63s: compute_store_aot_mimg_atomic_minmax_warp 1.03s, compute_store_aot_gfx1013_image_atomics_warp 1.53s)
  • Release /O2 (--preset release):
    • Build (cmake --build --preset release -- -j 2): 0.00s (configure 0.00s)
    • Test (ctest --preset release -R 'compute_store_aot_(gfx1013_image_atomics|mimg_atomic_minmax)_warp' --parallel 6 --no-tests=error --output-on-failure): 2/2 passed (1.62s: compute_store_aot_mimg_atomic_minmax_warp 1.01s, compute_store_aot_gfx1013_image_atomics_warp 1.51s)
  • Windows Python checks: tests/compute_alu_bcnt64_check.py ok (0.4s), tests/compute_alu_cmp_ne_check.py ok (0.4s), tests/compute_alu_lane_gaps_check.py ok (0.4s), tests/compute_buffer_atomics_check.py ok (0.5s), tests/compute_entry_layout_check.py ok (0.1s), tests/compute_heap_store_check.py ok (0.5s), tests/compute_heap_view_check.py ok (0.5s), tests/compute_load_format_check.py ok (0.5s), tests/pso_readiness_check.py ok (0.7s), tests/startup_compute_store_format_xyzw_check.py ok (0.2s)
  • Wall: 11.8s

AI-assisted; commands listed were executed locally.

**@⁠tedin7** on GitHub · 2026-11-26 01:12 UTC · [original](https://github.com/R0Y00/Xbox2Windows/pull/2662#issuecomment-7179542719) Verified on Windows Server 2025 (Build 26100, MSVC 14.44.35207 + D3D12 WARP) at commit `6b770c81d5c664b4bd2df71acbdd240f77baaff5`: - **Debug (`--preset dev`)**: - Build (`cmake --build --preset dev -- -j 2`): `0.00s` (configure `0.00s`) - Test (`ctest --preset dev -R 'compute_store_aot_(gfx1013_image_atomics|mimg_atomic_minmax)_warp' --parallel 6 --no-tests=error --output-on-failure`): **2/2 passed** (`1.63s`: `compute_store_aot_mimg_atomic_minmax_warp` `1.03s`, `compute_store_aot_gfx1013_image_atomics_warp` `1.53s`) - **Release `/O2` (`--preset release`)**: - Build (`cmake --build --preset release -- -j 2`): `0.00s` (configure `0.00s`) - Test (`ctest --preset release -R 'compute_store_aot_(gfx1013_image_atomics|mimg_atomic_minmax)_warp' --parallel 6 --no-tests=error --output-on-failure`): **2/2 passed** (`1.62s`: `compute_store_aot_mimg_atomic_minmax_warp` `1.01s`, `compute_store_aot_gfx1013_image_atomics_warp` `1.51s`) - **Windows Python checks**: `tests/compute_alu_bcnt64_check.py` ok (`0.4s`), `tests/compute_alu_cmp_ne_check.py` ok (`0.4s`), `tests/compute_alu_lane_gaps_check.py` ok (`0.4s`), `tests/compute_buffer_atomics_check.py` ok (`0.5s`), `tests/compute_entry_layout_check.py` ok (`0.1s`), `tests/compute_heap_store_check.py` ok (`0.5s`), `tests/compute_heap_view_check.py` ok (`0.5s`), `tests/compute_load_format_check.py` ok (`0.5s`), `tests/pso_readiness_check.py` ok (`0.7s`), `tests/startup_compute_store_format_xyzw_check.py` ok (`0.2s`) - Wall: `11.8s` AI-assisted; commands listed were executed locally.
This discussion has been locked. Commenting is limited to contributors.
No description provided.