tests: add supplemental SDWA 32-bit integer compare draws and refusal controls #1916

Merged
KomaGuy merged 1 commit from upstream-pr/1923 into main 2026-11-25 17:19:48 +00:00
KomaGuy commented 2026-11-24 21:20:38 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by KomaGuy on 2026-11-24T21:20:38Z.


Rebased onto current main (214ed093) after #1790 landed all 46 non-cmpx SDWA comparisons in tools/pixel_aot.py and tools/scan_unsupported_shaders.py, keeping the supplemental per-predicate 32-bit integer draw and refusal test coverage:

What this adds

  • Per-predicate draw coverage (tests/pixel_aot_check.py, CMakeLists.txt): four 4-channel groups (i32_lo, i32_hi, u32_lo, u32_hi) covering all 16 v_cmp_*_{i32,u32}_sdwa forms across all 7 src0_sel/src1_sel selectors, zero/sign extension (sext()), and SGPR/VGPR source pairs, with 41 targeted single-channel negative controls (pixel_aot_sdwa_int_compare_{warp,hardware}) and LLVM binary round-trip fixtures in check_binary.
  • Additional static lowering & refusal controls (check_sdwa_int_compare_lowering): whole-dword equivalence with e32, single-register destination enforcement (vcc/vcc_lo/s52 accepted, SGPR pairs s[52:53]/s[51:52]/s[105:106] and out-of-range s106 rejected), low16 VGPR source rejection, pending sample and pending scalar source/destination rejection, non-entry mask rejection, float modifiers (-s44, |v18|, abs(v18), sext(-s44)), clamp, dst_sel, and remaining unlowered SDWA compare neighbours (i64, v_cmpx).
  • Docs (docs/experiments.md): notes the supplemental fixture alongside #1790's entry.

Verification (Linux)

  • git merge-tree --write-tree --name-only origin/main HEAD: clean, no conflicts.
  • python3 tests/pixel_aot_check.py: PASS.
  • python3 tests/docs_links_check.py: PASS (19 files, 457 links).
  • python3 tests/bidi_controls_check.py: PASS (1641 files).
  • python3 tests/rdna2_tools_check.py: PASS (156 tests OK, 19 skipped).
  • git diff --check origin/main...HEAD: clean.

Windows draws (pixel_aot_sdwa_int_compare_{warp,hardware}) and LLVM 15 check_binary run in CI.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:issue:6591649592 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/1923). Originally posted by [KomaGuy](https://github.com/KomaGuy) on 2026-11-24T21:20:38Z. --- Rebased onto current `main` (`214ed093`) after #1790 landed all 46 non-`cmpx` SDWA comparisons in `tools/pixel_aot.py` and `tools/scan_unsupported_shaders.py`, keeping the supplemental per-predicate 32-bit integer draw and refusal test coverage: ### What this adds - **Per-predicate draw coverage** (`tests/pixel_aot_check.py`, `CMakeLists.txt`): four 4-channel groups (`i32_lo`, `i32_hi`, `u32_lo`, `u32_hi`) covering all 16 `v_cmp_*_{i32,u32}_sdwa` forms across all 7 `src0_sel`/`src1_sel` selectors, zero/sign extension (`sext()`), and SGPR/VGPR source pairs, with 41 targeted single-channel negative controls (`pixel_aot_sdwa_int_compare_{warp,hardware}`) and LLVM binary round-trip fixtures in `check_binary`. - **Additional static lowering & refusal controls** (`check_sdwa_int_compare_lowering`): whole-dword equivalence with `e32`, single-register destination enforcement (`vcc`/`vcc_lo`/`s52` accepted, SGPR pairs `s[52:53]`/`s[51:52]`/`s[105:106]` and out-of-range `s106` rejected), `low16` VGPR source rejection, pending sample and pending scalar source/destination rejection, non-entry mask rejection, float modifiers (`-s44`, `|v18|`, `abs(v18)`, `sext(-s44)`), `clamp`, `dst_sel`, and remaining unlowered SDWA compare neighbours (`i64`, `v_cmpx`). - **Docs** (`docs/experiments.md`): notes the supplemental fixture alongside #1790's entry. ### Verification (Linux) - `git merge-tree --write-tree --name-only origin/main HEAD`: clean, no conflicts. - `python3 tests/pixel_aot_check.py`: PASS. - `python3 tests/docs_links_check.py`: PASS (19 files, 457 links). - `python3 tests/bidi_controls_check.py`: PASS (1641 files). - `python3 tests/rdna2_tools_check.py`: PASS (156 tests OK, 19 skipped). - `git diff --check origin/main...HEAD`: clean. Windows draws (`pixel_aot_sdwa_int_compare_{warp,hardware}`) and LLVM 15 `check_binary` run in CI.
tedin7 commented 2026-11-24 21:27:38 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by tedin7 on 2026-11-24T21:24:12Z.

Review: COMMENTED


Review of head f81ecee36e093d04be1d7e7a4b0ce857103090e0 (first review). Verdict: not mergeable as it stands, no merge.

Blocking:

  • The PR conflicts with main: git merge-tree --write-tree --name-only origin/main HEAD reports a content conflict in tests/pixel_aot_check.py (GitHub: CONFLICTING/DIRTY). Please rebase.
  • Overlap: open PRs #1670 ("lower the integer SDWA comparisons") and #1790 ("lower the 46 non-cmpx SDWA comparisons") cover the same v_cmp_*_i32/u32_sdwa forms. Please say which of them this PR replaces or builds on, so only one lands.

Read of the diff (no P1/P2 found in the code itself):

  • tools/pixel_aot.py: new SDWA_INT_CMP_OPERANDS and a lowering branch that applies sdwa_source to both sources and reuses INT_COMPARE; asint for i32, raw words for u32; refuses an unbalanced sext(), pending/masked state and untracked registers.
  • tools/scan_unsupported_shaders.py: SDWA_INT_SOURCE moved above its first use; new supported-instruction pattern for the sixteen forms.
  • CMakeLists.txt adds only the registration of pixel_aot_sdwa_int_compare_.
  • docs/experiments.md: the new paragraph states the semantics come from LLVM 15 and are not measured on a console. It does not report a hardware or WARP run of the new draw tests.

Commands run locally (Linux):

  • git diff --check origin/main...HEAD: rc=0
  • python3 tests/docs_links_check.py: rc=0
  • python3 tests/bidi_controls_check.py: rc=0
  • python3 tests/pixel_aot_check.py: rc=0
  • python3 tests/rdna2_tools_check.py TestRdna2Scanner: rc=0, 51 tests OK

Mutation (reverted with git checkout -- ., tree clean):

  1. scanner pattern for the new forms narrowed from (i32|u32) to (i32): rdna2_tools_check fails (rc=1), v_cmp_gt_u32_sdwa counted unsupported (3, 2, 1) instead of (3, 3, 0).

Not done: the Windows draw tests (pixel_aot_check.py draw-sdwa-int-compare) were not run, since the conflict blocks a merge anyway. No GitHub checks are reported for the branch. No receipt, no merge.

AI-assisted; commands listed were executed locally.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:review:6047654755 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/1923#pullrequestreview-6047654755). Originally posted by [tedin7](https://github.com/tedin7) on 2026-11-24T21:24:12Z. **Review:** COMMENTED --- Review of head `f81ecee36e093d04be1d7e7a4b0ce857103090e0` (first review). Verdict: not mergeable as it stands, no merge. Blocking: - The PR conflicts with main: `git merge-tree --write-tree --name-only origin/main HEAD` reports a content conflict in tests/pixel_aot_check.py (GitHub: CONFLICTING/DIRTY). Please rebase. - Overlap: open PRs #1670 ("lower the integer SDWA comparisons") and #1790 ("lower the 46 non-cmpx SDWA comparisons") cover the same v_cmp_*_i32/u32_sdwa forms. Please say which of them this PR replaces or builds on, so only one lands. Read of the diff (no P1/P2 found in the code itself): - tools/pixel_aot.py: new SDWA_INT_CMP_OPERANDS and a lowering branch that applies sdwa_source to both sources and reuses INT_COMPARE; asint for i32, raw words for u32; refuses an unbalanced sext(), pending/masked state and untracked registers. - tools/scan_unsupported_shaders.py: SDWA_INT_SOURCE moved above its first use; new supported-instruction pattern for the sixteen forms. - CMakeLists.txt adds only the registration of pixel_aot_sdwa_int_compare_<adapter>. - docs/experiments.md: the new paragraph states the semantics come from LLVM 15 and are not measured on a console. It does not report a hardware or WARP run of the new draw tests. Commands run locally (Linux): - git diff --check origin/main...HEAD: rc=0 - python3 tests/docs_links_check.py: rc=0 - python3 tests/bidi_controls_check.py: rc=0 - python3 tests/pixel_aot_check.py: rc=0 - python3 tests/rdna2_tools_check.py TestRdna2Scanner: rc=0, 51 tests OK Mutation (reverted with git checkout -- ., tree clean): 1. scanner pattern for the new forms narrowed from (i32|u32) to (i32): rdna2_tools_check fails (rc=1), v_cmp_gt_u32_sdwa counted unsupported (3, 2, 1) instead of (3, 3, 0). Not done: the Windows draw tests (pixel_aot_check.py draw-sdwa-int-compare) were not run, since the conflict blocks a merge anyway. No GitHub checks are reported for the branch. No receipt, no merge. AI-assisted; commands listed were executed locally.
R0Y00 commented 2026-11-24 22:01:03 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by R0Y00 on 2026-11-24T21:34:09Z.


Thanks for the distinct signed/unsigned draw and refusal cases. The 16 production forms overlap #1670 and #1790, which are already under review. Please hold this branch while we reconcile the shared implementation. The single-register destination follows the actual SDWA encoding; an aligned SGPR pair accepted by the textual parser does not establish an encodable form. If a new fixture survives the overlap review, it can land as supplemental coverage with your attribution.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7145102296 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/1923#issuecomment-7145102296). Originally posted by [R0Y00](https://github.com/R0Y00) on 2026-11-24T21:34:09Z. --- Thanks for the distinct signed/unsigned draw and refusal cases. The 16 production forms overlap #1670 and #1790, which are already under review. Please hold this branch while we reconcile the shared implementation. The single-register destination follows the actual SDWA encoding; an aligned SGPR pair accepted by the textual parser does not establish an encodable form. If a new fixture survives the overlap review, it can land as supplemental coverage with your attribution.
KomaGuy commented 2026-11-24 22:01:03 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by KomaGuy on 2026-11-24T21:38:12Z.


Understood — I'll hold this branch while #1670 and #1790 are reconciled, and noted on the single-register SDWA destination encoding. Happy to rebase any surviving supplemental draw or refusal cases if useful.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7145191483 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/1923#issuecomment-7145191483). Originally posted by [KomaGuy](https://github.com/KomaGuy) on 2026-11-24T21:38:12Z. --- Understood — I'll hold this branch while #1670 and #1790 are reconciled, and noted on the single-register SDWA destination encoding. Happy to rebase any surviving supplemental draw or refusal cases if useful.
thepatrickworld commented 2026-11-25 04:04:19 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by thepatrickworld on 2026-11-25T03:33:36Z.


Same collision as #1747/#1793, this time on the SDWA integer comparisons: this and #1670 both add a v_cmp_*_sdwa branch to tools/pixel_aot.py, and git merge-tree pr1670 pr1923 conflicts in tests/pixel_aot_check.py, tests/rdna2_tools_check.py and tools/scan_unsupported_shaders.py. Both are dirty against main.

The two are not identical in what they cover:

  • this one matches v_cmp_(...)_(i32|u32)_sdwa only;
  • #1670 matches (i32|u32|i16|u16), so it also lowers the 16-bit comparisons;
  • this one carries the larger test surface (304 lines in pixel_aot_check.py against 198, plus form_coverage_check.py).

So the union is worth more than either alone. @R0Y00, which one do you want to land? If it is #1670, the extra cases here are worth porting; if it is this one, the i16/u16 kinds need adding.

AI-assisted.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7152027279 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/1923#issuecomment-7152027279). Originally posted by [thepatrickworld](https://github.com/thepatrickworld) on 2026-11-25T03:33:36Z. --- Same collision as #1747/#1793, this time on the SDWA integer comparisons: this and #1670 both add a `v_cmp_*_sdwa` branch to `tools/pixel_aot.py`, and `git merge-tree pr1670 pr1923` conflicts in `tests/pixel_aot_check.py`, `tests/rdna2_tools_check.py` and `tools/scan_unsupported_shaders.py`. Both are `dirty` against `main`. The two are not identical in what they cover: - this one matches `v_cmp_(...)_(i32|u32)_sdwa` only; - #1670 matches `(i32|u32|i16|u16)`, so it also lowers the 16-bit comparisons; - this one carries the larger test surface (304 lines in `pixel_aot_check.py` against 198, plus `form_coverage_check.py`). So the union is worth more than either alone. @R0Y00, which one do you want to land? If it is #1670, the extra cases here are worth porting; if it is this one, the `i16/u16` kinds need adding. _AI-assisted._
KomaGuy commented 2026-11-25 08:05:06 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by KomaGuy on 2026-11-25T07:52:04Z.


Thanks for comparing #1923 and #1670! Note that #1790 ("shader: lower the 46 non-cmpx SDWA comparisons") has since been merged into main, which already covers all 16 32-bit integer SDWA comparisons from this PR as well as the 16-bit integer and binary16/class forms.

I'm keeping this branch held per @R0Y00's earlier note — happy to close it or extract any surviving extra refusal/draw cases if useful.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7156341003 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/1923#issuecomment-7156341003). Originally posted by [KomaGuy](https://github.com/KomaGuy) on 2026-11-25T07:52:04Z. --- Thanks for comparing #1923 and #1670! Note that #1790 ("shader: lower the 46 non-cmpx SDWA comparisons") has since been merged into `main`, which already covers all 16 32-bit integer SDWA comparisons from this PR as well as the 16-bit integer and binary16/class forms. I'm keeping this branch held per @R0Y00's earlier note — happy to close it or extract any surviving extra refusal/draw cases if useful.
tedin7 commented 2026-11-25 13:00:59 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by tedin7 on 2026-11-25T12:43:58Z.


@KomaGuy could you rebase this branch onto current main and force-push?

GitHub reports head f81ecee3 as conflicting with main, so it cannot be merged as is.

Files that conflict with current main (b1a644ae):

  • tests/pixel_aot_check.py
  • tests/rdna2_tools_check.py
  • tools/pixel_aot.py
  • tools/scan_unsupported_shaders.py

Commands run locally:

git fetch origin main pull/1923/head
git merge-tree --write-tree --name-only origin/main FETCH_HEAD
gh pr view 1923 --json mergeable   # CONFLICTING

Once it is rebased and CI is green it will be re-checked right away.

AI-assisted; commands listed were executed locally.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7162778717 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/1923#issuecomment-7162778717). Originally posted by [tedin7](https://github.com/tedin7) on 2026-11-25T12:43:58Z. --- @KomaGuy could you rebase this branch onto current `main` and force-push? GitHub reports head `f81ecee3` as conflicting with `main`, so it cannot be merged as is. Files that conflict with current `main` (`b1a644ae`): - `tests/pixel_aot_check.py` - `tests/rdna2_tools_check.py` - `tools/pixel_aot.py` - `tools/scan_unsupported_shaders.py` Commands run locally: ``` git fetch origin main pull/1923/head git merge-tree --write-tree --name-only origin/main FETCH_HEAD gh pr view 1923 --json mergeable # CONFLICTING ``` Once it is rebased and CI is green it will be re-checked right away. AI-assisted; commands listed were executed locally.
upstream-sync changed title from [PR #1923] shader: lower SDWA forms of 32-bit integer comparisons in pixel_aot to [PR #1923] tests: add supplemental SDWA 32-bit integer compare draws and refusal controls 2026-11-25 14:04:19 +00:00
tedin7 commented 2026-11-25 14:04:20 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by tedin7 on 2026-11-25T13:38:44Z.

Review: COMMENTED


Review of head db10c4aca4cb7e5b75f2c8c90d2fa2325826e665. Verdict: 0 P1, 0 P2. This is a clean result.

Changes since my earlier review of f81ecee3:

  • The patch is different (patch-id changed), so this is a full re-review. The tools/ changes are gone; the lowering for v_cmp_*_{i32,u32}_sdwa is already on main (tools/pixel_aot.py, the INT_COMPARE branch). The PR now only adds tests.
  • The branch merges cleanly with main (git merge-tree --write-tree origin/main HEAD rc=0). The earlier conflict is resolved.
  • The overlap I raised before no longer applies to code: this PR adds no lowering. #1670 remains open on the same forms, so whichever lands second should check its tests against these.

Read of the diff (CMakeLists.txt, docs/experiments.md, tests/pixel_aot_check.py):

  • draw-sdwa-int-compare covers all 16 i32/u32 predicates in four groups, with 41 single-channel negative controls that must report a mismatch.
  • Static refusal checks cover low16 sources, pending loads, masked regions, float modifiers, clamp and SGPR-pair destinations.
  • CMake registers pixel_aot_sdwa_int_compare_<adapter> next to pixel_aot_sdwa_cmp_<adapter>, with the same timeout, skip code and coverage record.
  • The docs paragraph states that the semantics are not measured on a console.

Commands run locally (Linux):

  • git diff --check origin/main...HEAD: rc=0
  • python3 tests/docs_links_check.py: pass (19 files, 457 links)
  • python3 tests/bidi_controls_check.py: pass
  • python3 -B tests/pixel_aot_check.py: rc=0
  • Mutation 1: in tools/pixel_aot.py, asint selection changed from i32 to u32. check_sdwa_int_compare_lowering failed. Killed.
  • Mutation 2: operands swapped (values[::-1]) and asint replaced with asuint. The same check failed. Killed.
  • Mutations reverted with git checkout -- ..

Windows Server 2025 (D3D12 WARP):

  • Debug: ctest --preset dev -R '^(pixel_aot_sdwa_int_compare_warp|pixel_aot_sdwa_cmp_warp)$': 2/2 passed.
  • Release /O2: the same regex with --preset release: 2/2 passed.
  • tests/vk_offscreen.py: ok.
  • GitHub CI: Build and test on Windows = SUCCESS.

AI-assisted; commands listed were executed locally.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:review:6058632860 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/1923#pullrequestreview-6058632860). Originally posted by [tedin7](https://github.com/tedin7) on 2026-11-25T13:38:44Z. **Review:** COMMENTED --- Review of head `db10c4aca4cb7e5b75f2c8c90d2fa2325826e665`. Verdict: 0 P1, 0 P2. This is a clean result. Changes since my earlier review of `f81ecee3`: - The patch is different (patch-id changed), so this is a full re-review. The `tools/` changes are gone; the lowering for `v_cmp_*_{i32,u32}_sdwa` is already on main (`tools/pixel_aot.py`, the `INT_COMPARE` branch). The PR now only adds tests. - The branch merges cleanly with main (`git merge-tree --write-tree origin/main HEAD` rc=0). The earlier conflict is resolved. - The overlap I raised before no longer applies to code: this PR adds no lowering. #1670 remains open on the same forms, so whichever lands second should check its tests against these. Read of the diff (CMakeLists.txt, docs/experiments.md, tests/pixel_aot_check.py): - `draw-sdwa-int-compare` covers all 16 i32/u32 predicates in four groups, with 41 single-channel negative controls that must report a mismatch. - Static refusal checks cover low16 sources, pending loads, masked regions, float modifiers, clamp and SGPR-pair destinations. - CMake registers `pixel_aot_sdwa_int_compare_<adapter>` next to `pixel_aot_sdwa_cmp_<adapter>`, with the same timeout, skip code and coverage record. - The docs paragraph states that the semantics are not measured on a console. Commands run locally (Linux): - `git diff --check origin/main...HEAD`: rc=0 - `python3 tests/docs_links_check.py`: pass (19 files, 457 links) - `python3 tests/bidi_controls_check.py`: pass - `python3 -B tests/pixel_aot_check.py`: rc=0 - Mutation 1: in `tools/pixel_aot.py`, `asint` selection changed from i32 to u32. `check_sdwa_int_compare_lowering` failed. Killed. - Mutation 2: operands swapped (`values[::-1]`) and `asint` replaced with `asuint`. The same check failed. Killed. - Mutations reverted with `git checkout -- .`. Windows Server 2025 (D3D12 WARP): - Debug: `ctest --preset dev -R '^(pixel_aot_sdwa_int_compare_warp|pixel_aot_sdwa_cmp_warp)$'`: 2/2 passed. - Release /O2: the same regex with `--preset release`: 2/2 passed. - `tests/vk_offscreen.py`: ok. - GitHub CI: `Build and test on Windows` = SUCCESS. AI-assisted; commands listed were executed locally.
KomaGuy commented 2026-11-25 14:05:10 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by KomaGuy on 2026-11-25T13:30:55Z.


@tedin7 Rebased onto current main (214ed093) and force-pushed db10c4ac.

Since #1790 already landed the production lowering and scanner entries for all 46 non-cmpx SDWA comparisons (including the 16 32-bit integer forms and single-register destination enforcement), this rebased head drops the duplicate tools/pixel_aot.py, tools/scan_unsupported_shaders.py, tests/rdna2_tools_check.py, and tests/form_coverage_check.py changes and keeps the supplemental per-predicate 32-bit integer draw coverage (pixel_aot_sdwa_int_compare_{warp,hardware}, 4 groups with 41 single-channel negative controls, plus check_binary) and additional refusal controls (low16 VGPR source, pending sample/scalar loads, non-entry mask, SGPR pair destinations, float modifiers, clamp, whole-dword e32 equivalence).

Verified locally on Linux (pixel_aot_check.py, docs_links_check.py, bidi_controls_check.py, rdna2_tools_check.py, git merge-tree clean, git diff --check clean). Ready for re-check once CI finishes!

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7163886945 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/1923#issuecomment-7163886945). Originally posted by [KomaGuy](https://github.com/KomaGuy) on 2026-11-25T13:30:55Z. --- @tedin7 Rebased onto current `main` (`214ed093`) and force-pushed `db10c4ac`. Since #1790 already landed the production lowering and scanner entries for all 46 non-`cmpx` SDWA comparisons (including the 16 32-bit integer forms and single-register destination enforcement), this rebased head drops the duplicate `tools/pixel_aot.py`, `tools/scan_unsupported_shaders.py`, `tests/rdna2_tools_check.py`, and `tests/form_coverage_check.py` changes and keeps the supplemental per-predicate 32-bit integer draw coverage (`pixel_aot_sdwa_int_compare_{warp,hardware}`, 4 groups with 41 single-channel negative controls, plus `check_binary`) and additional refusal controls (`low16` VGPR source, pending sample/scalar loads, non-entry mask, SGPR pair destinations, float modifiers, `clamp`, whole-dword `e32` equivalence). Verified locally on Linux (`pixel_aot_check.py`, `docs_links_check.py`, `bidi_controls_check.py`, `rdna2_tools_check.py`, `git merge-tree` clean, `git diff --check` clean). Ready for re-check once CI finishes!
Makto94 commented 2026-11-25 17:01:59 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by Makto94 on 2026-11-25T16:53:54Z.


Hardware run and Windows 11 MSVC build at head db10c4ac.

Environment: Windows 11 Pro build 26300.9974, Debug (dev preset), MSVC 19.44.35230.0 (cl 14.44.35207), driver 32.0.16.2101 (the test does not print it; the value comes from another hardware test log on the same machine in the same session). The passing test does not print the adapter name; the only hardware adapter in this machine is an NVIDIA GeForce RTX 3070 Ti. The runs were serial (-j1); the hardware run was on an idle machine.

Build: cmake --build --preset dev exited 0. This PR changes no C++ source.

Tests:

  • ctest --preset dev --no-tests=error -j1 -R 'pixel_aot_sdwa_int_compare_warp' -V: 1/1 passed.
  • ctest --preset dev --no-tests=error -j1 -R 'pixel_aot_sdwa_int_compare_hardware' -V: 1/1 passed (draw-sdwa-int-compare). 0 capability skips (77).

offscreen_check enables the D3D12 debug layer when it is available, and other runs of the same renderer on this machine print debug_layer=enabled. The passing test log does not print the debug-layer state; debug-layer status for this run is therefore not stated.

Not covered by this run: AMD hardware, and the LLVM 15 binary path (pixel_aot_check.py binary).

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7168697830 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/1923#issuecomment-7168697830). Originally posted by [Makto94](https://github.com/Makto94) on 2026-11-25T16:53:54Z. --- Hardware run and Windows 11 MSVC build at head `db10c4ac`. Environment: Windows 11 Pro build 26300.9974, Debug (`dev` preset), MSVC 19.44.35230.0 (cl 14.44.35207), driver 32.0.16.2101 (the test does not print it; the value comes from another hardware test log on the same machine in the same session). The passing test does not print the adapter name; the only hardware adapter in this machine is an NVIDIA GeForce RTX 3070 Ti. The runs were serial (`-j1`); the hardware run was on an idle machine. Build: `cmake --build --preset dev` exited 0. This PR changes no C++ source. Tests: - `ctest --preset dev --no-tests=error -j1 -R 'pixel_aot_sdwa_int_compare_warp' -V`: 1/1 passed. - `ctest --preset dev --no-tests=error -j1 -R 'pixel_aot_sdwa_int_compare_hardware' -V`: 1/1 passed (`draw-sdwa-int-compare`). 0 capability skips (77). `offscreen_check` enables the D3D12 debug layer when it is available, and other runs of the same renderer on this machine print `debug_layer=enabled`. The passing test log does not print the debug-layer state; debug-layer status for this run is therefore not stated. Not covered by this run: AMD hardware, and the LLVM 15 binary path (`pixel_aot_check.py binary`).
upstream-sync closed this pull request 2026-11-25 18:00:54 +00:00
MasterDomino commented 2026-11-25 18:00:54 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by MasterDomino on 2026-11-25T17:19:44Z.

Review: APPROVED


Approved at head db10c4ac. The change is test-only after the rebase: tests/pixel_aot_check.py, one CTest registration and one docs line. This adds an AMD run and a lowering mutant to @tedin7's review and @Makto94's RTX 3070 Ti run.

Environment

  • Windows 11 build 26300, --preset dev (Debug), DXC from SDK 10.0.26100.
  • offscreen_check built at db10c4ac.
  • The only hardware adapter in this machine is an AMD Radeon RX 9070 XT (1002:7550, driver 32.0.32029.2010). The passing draw doesn't print the adapter, but in this session the startup-stream drivers enumerate only this card and WARP.

Commands executed

ctest --preset dev --no-tests=error -R '^pixel_aot_sdwa_(int_compare|cmp)_(warp|hardware)$' -V
python -B tests/pixel_aot_check.py
  • At db10c4ac: pixel_aot_sdwa_int_compare_{warp,hardware} and the neighbouring pixel_aot_sdwa_cmp_{warp,hardware} pass, 4/4, with no skips.
  • Merged with current main (a96874a6, clean merge): the same 4/4 pass. The no-argument controls exit 0; they include check_sdwa_int_compare_lowering.

Negative control on the lowering

The 41 wrong-word channels in the batches are the built-in controls. On top of those, I mutated the lowering itself: in tools/pixel_aot.py, the v_cmp_*_{i32,u32}_sdwa branch changed from values = [f"asint({word})" if kind == "i32" else word ...] to values = [word ...], so i32 compares become unsigned. The emitted i32_lo and i32_hi compares then lose their asint.

  • Hardware draw with the mutant: fails with Expected ['pass', 'pass', 'mismatch', ...], got ['mismatch', 'pass', 'mismatch', ...], so the first i32_lo row is now wrong.
  • After reverting: 2/2 pass again.

I didn't run binary mode locally. CI's LLVM 15 job ("Assemble and translate gfx1013 fixtures") passed at this head.

Merge checks: required CI passed at this head ("Build and test on Windows" and both Linux jobs). The /O2 and coverage skips come from explicit workflow conditions. There are no unresolved review threads.

Note for routing: #1670 is still open on the same forms with tools/ changes. Per @tedin7's earlier note, whichever lands second should reconcile its tests with these. That PR changes translation, so it stays with the maintainer.

AI-assisted; commands listed were executed locally.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:review:6061947686 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/1923#pullrequestreview-6061947686). Originally posted by [MasterDomino](https://github.com/MasterDomino) on 2026-11-25T17:19:44Z. **Review:** APPROVED --- Approved at head `db10c4ac`. The change is test-only after the rebase: `tests/pixel_aot_check.py`, one CTest registration and one docs line. This adds an AMD run and a lowering mutant to @tedin7's review and @Makto94's RTX 3070 Ti run. ### Environment - Windows 11 build 26300, `--preset dev` (Debug), DXC from SDK 10.0.26100. - `offscreen_check` built at `db10c4ac`. - The only hardware adapter in this machine is an **AMD Radeon RX 9070 XT** (1002:7550, driver 32.0.32029.2010). The passing draw doesn't print the adapter, but in this session the startup-stream drivers enumerate only this card and WARP. ### Commands executed ```powershell ctest --preset dev --no-tests=error -R '^pixel_aot_sdwa_(int_compare|cmp)_(warp|hardware)$' -V python -B tests/pixel_aot_check.py ``` - **At `db10c4ac`:** `pixel_aot_sdwa_int_compare_{warp,hardware}` and the neighbouring `pixel_aot_sdwa_cmp_{warp,hardware}` pass, 4/4, with no skips. - **Merged with current `main` (`a96874a6`, clean merge):** the same 4/4 pass. The no-argument controls exit 0; they include `check_sdwa_int_compare_lowering`. ### Negative control on the lowering The 41 wrong-word channels in the batches are the built-in controls. On top of those, I mutated the lowering itself: in `tools/pixel_aot.py`, the `v_cmp_*_{i32,u32}_sdwa` branch changed from `values = [f"asint({word})" if kind == "i32" else word ...]` to `values = [word ...]`, so i32 compares become unsigned. The emitted `i32_lo` and `i32_hi` compares then lose their `asint`. - **Hardware draw with the mutant:** fails with `Expected ['pass', 'pass', 'mismatch', ...], got ['mismatch', 'pass', 'mismatch', ...]`, so the first `i32_lo` row is now wrong. - **After reverting:** 2/2 pass again. I didn't run `binary` mode locally. CI's LLVM 15 job ("Assemble and translate gfx1013 fixtures") passed at this head. Merge checks: required CI passed at this head ("Build and test on Windows" and both Linux jobs). The `/O2` and coverage skips come from explicit workflow conditions. There are no unresolved review threads. Note for routing: #1670 is still open on the same forms with `tools/` changes. Per @tedin7's earlier note, whichever lands second should reconcile its tests with these. That PR changes translation, so it stays with the maintainer. 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!1916
No description provided.