compute: accept gfx1013 image_atomic_umin on R32_UINT #2654

Merged
SimSalabimse merged 2 commits from upstream-pr/2662 into main 2026-11-26 01:15:51 +00:00
SimSalabimse commented 2026-11-26 01:06:56 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by SimSalabimse on 2026-11-26T01:06:56Z.


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.
<!-- greyfinch-sync:R0Y00/Xbox2Windows:issue:6617147966 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/2662). Originally posted by [SimSalabimse](https://github.com/SimSalabimse) on 2026-11-26T01:06:56Z. --- ## 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.
upstream-sync closed this pull request 2026-11-26 02:04:59 +00:00
tedin7 commented 2026-11-26 02:05:00 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by tedin7 on 2026-11-26T01:11:54Z.

Review: COMMENTED


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.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:review:6067217863 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/2662#pullrequestreview-6067217863). Originally posted by [tedin7](https://github.com/tedin7) on 2026-11-26T01:11:54Z. **Review:** COMMENTED --- 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.
SimSalabimse commented 2026-11-26 02:05:09 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by SimSalabimse on 2026-11-26T01:09:02Z.


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
<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7179482875 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/2662#issuecomment-7179482875). Originally posted by [SimSalabimse](https://github.com/SimSalabimse) on 2026-11-26T01:09:02Z. --- 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 ```
tedin7 commented 2026-11-26 02:05:10 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by tedin7 on 2026-11-26T01:12:36Z.


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.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7179542719 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/2662#issuecomment-7179542719). Originally posted by [tedin7](https://github.com/tedin7) on 2026-11-26T01:12:36Z. --- 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.
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!2654
No description provided.