shader: lower RDNA2 s_absdiff_i32 in pixel_aot #618

Merged
stan495 merged 1 commit from upstream-pr/624 into main 2026-11-23 02:19:41 +00:00
stan495 commented 2026-11-22 16:19:39 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by stan495 on 2026-11-22T16:19:39Z.


Translate RDNA2 32-bit signed scalar absolute difference instruction s_absdiff_i32 in tools/pixel_aot.py as asuint(abs(asint({0}) - asint({1}))) with scalar condition code NONZERO (dest != 0u).

Update opcode definitions in tools/disasm_rdna2.py (0x2c), scanner recognition in tools/scan_unsupported_shaders.py, and synthetic opcode decoding tests in tests/rdna2_tools_check.py. Add static checks, rejection controls, form coverage assertions in tests/form_coverage_check.py, and RGBA32_UINT integer readback draw checks verifying signed absolute differences and SCC nonzero conditions across positive difference, negative difference, zero difference (clearing SCC), double-negative inputs, mixed-sign inputs, and INT_MIN boundaries in tests/pixel_aot_check.py.

Change

Translates the scalar 32-bit signed absolute difference instruction s_absdiff_i32 (SOP2 opcode 0x2c) in pixel shaders to desktop HLSL, and advances scalar ALU coverage in pixel_aot.

  • Defines SOP2 opcode 0x2c as s_absdiff_i32 in tools/disasm_rdna2.py.
  • Recognizes s_absdiff_i32 in tools/scan_unsupported_shaders.py.
  • Lowers s_absdiff_i32 in tools/pixel_aot.py as asuint(abs(asint({0}) - asint({1}))) and updates SCC = (dest != 0u).
  • Updates tests/rdna2_tools_check.py with synthetic disassembly tests for 0x2c.
  • Removes s_absdiff_i32 from the must_reject list in tests/pixel_aot_check.py, adding static translation assertions, rejection controls for invalid types/arities/vector operands, and integer render target draw tests (check_absdiff_i32_draw).
  • Asserts ("SOP2", "s_absdiff_i32") coverage in tests/form_coverage_check.py and records rejection controls for unsupported s_absdiff_i64 and s_absdiff_u32.
  • Documents the lowering in docs/experiments.md.

Verification

Commit under test: 79a3529

  • ctest --preset dev --no-tests=error -R 'pixel_aot_e64_warp' -V:
    Passed (3.90s, Microsoft Basic Render Driver vendor 1414 device 008c, driver 10.0.26100.9711, debug layer enabled).
  • python -B tests/rdna2_tools_check.py: Passed (51 tests).
  • python -B tests/form_coverage_check.py: Passed.
  • python -B tests/pixel_aot_check.py: Passed.
  • python -B tests/docs_links_check.py: Passed (122 links).
  • python -B tests/bidi_controls_check.py: Passed (557 files checked).

Evidence and follow-up

All fixtures are synthetic source-built programs following the project guidelines.
Negative controls verify that:

  • oracle-mismatch reports a pixel mismatch when the expected readback or SCC does not match.
  • Rejection controls verify that unsupported widths (s_absdiff_i64), types (s_absdiff_u32), operand counts (1 or 3 operands), and invalid vector source/destination operands (v12, v13) fail translation.

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.

AI-assisted: yes

<!-- greyfinch-sync:R0Y00/Xbox2Windows:issue:6544725447 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/624). Originally posted by [stan495](https://github.com/stan495) on 2026-11-22T16:19:39Z. --- Translate RDNA2 32-bit signed scalar absolute difference instruction `s_absdiff_i32` in `tools/pixel_aot.py` as `asuint(abs(asint({0}) - asint({1})))` with scalar condition code `NONZERO` (`dest != 0u`). Update opcode definitions in `tools/disasm_rdna2.py` (`0x2c`), scanner recognition in `tools/scan_unsupported_shaders.py`, and synthetic opcode decoding tests in `tests/rdna2_tools_check.py`. Add static checks, rejection controls, form coverage assertions in `tests/form_coverage_check.py`, and RGBA32_UINT integer readback draw checks verifying signed absolute differences and SCC nonzero conditions across positive difference, negative difference, zero difference (clearing SCC), double-negative inputs, mixed-sign inputs, and `INT_MIN` boundaries in `tests/pixel_aot_check.py`. ## Change Translates the scalar 32-bit signed absolute difference instruction `s_absdiff_i32` (SOP2 opcode `0x2c`) in pixel shaders to desktop HLSL, and advances scalar ALU coverage in `pixel_aot`. - Defines SOP2 opcode `0x2c` as `s_absdiff_i32` in `tools/disasm_rdna2.py`. - Recognizes `s_absdiff_i32` in `tools/scan_unsupported_shaders.py`. - Lowers `s_absdiff_i32` in `tools/pixel_aot.py` as `asuint(abs(asint({0}) - asint({1})))` and updates `SCC = (dest != 0u)`. - Updates `tests/rdna2_tools_check.py` with synthetic disassembly tests for `0x2c`. - Removes `s_absdiff_i32` from the `must_reject` list in `tests/pixel_aot_check.py`, adding static translation assertions, rejection controls for invalid types/arities/vector operands, and integer render target draw tests (`check_absdiff_i32_draw`). - Asserts `("SOP2", "s_absdiff_i32")` coverage in `tests/form_coverage_check.py` and records rejection controls for unsupported `s_absdiff_i64` and `s_absdiff_u32`. - Documents the lowering in `docs/experiments.md`. ## Verification Commit under test: `79a3529` - `ctest --preset dev --no-tests=error -R 'pixel_aot_e64_warp' -V`: Passed (3.90s, Microsoft Basic Render Driver vendor 1414 device 008c, driver 10.0.26100.9711, debug layer enabled). - `python -B tests/rdna2_tools_check.py`: Passed (51 tests). - `python -B tests/form_coverage_check.py`: Passed. - `python -B tests/pixel_aot_check.py`: Passed. - `python -B tests/docs_links_check.py`: Passed (122 links). - `python -B tests/bidi_controls_check.py`: Passed (557 files checked). ## Evidence and follow-up All fixtures are synthetic source-built programs following the project guidelines. Negative controls verify that: - `oracle-mismatch` reports a pixel mismatch when the expected readback or SCC does not match. - Rejection controls verify that unsupported widths (`s_absdiff_i64`), types (`s_absdiff_u32`), operand counts (1 or 3 operands), and invalid vector source/destination operands (`v12`, `v13`) fail translation. ## 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. AI-assisted: yes
upstream-sync closed this pull request 2026-11-24 06:44:00 +00:00
MarlomMedeiros commented 2026-11-24 06:44:01 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by MarlomMedeiros on 2026-11-22T18:02:43Z.

Review: COMMENTED


Community review + independent run on a second adapter, since the PR reports WARP only.

Environment

  • Commit under test: 79a3529 on base 7b55abc
  • Windows 11 build 26300.10075, VS 2026 MSVC 19.52, Ninja, DXC from SDK 10.0.26100
  • ctest --preset dev --no-tests=error -R '^pixel_aot_(e64|u32_from_f32)_(warp|hardware)$' -V: 4/4 passed
  • Hardware: NVIDIA GeForce RTX 5070 (vendor=10de device=2f04), driver 32.0.16.2135, D3D12 debug layer enabled, debug_errors=0 debug_warnings=0, pixels=4096 max_absolute_error=0
  • WARP: Microsoft Basic Render Driver, driver 10.0.26100.10068
  • tests/pixel_aot_check.py controls, tests/form_coverage_check.py, tests/rdna2_tools_check.py (51 tests, 1 skipped) and the LLVM 15.0.7 binary round-trip all pass

Review notes

  • The lowering asuint(abs(asint({0}) - asint({1}))) matches the ISA even at the overflow boundary: LLVM's own moveToVALU expansion of S_ABSDIFF_I32 (llvm/llvm-project#167691) emits v_sub_u32 + v_max_i32(v, -v), which is exactly wrap-then-abs. INT_MAX - INT_MIN therefore yields 1 on real hardware, identical to this emission.
  • abs(INT_MIN) returning INT_MIN bits in HLSL agrees with the hardware's 0x80000000 result, and the int-min-zero draw case pins it.
  • The draw covers both diff polarities, the zero-diff scc=0 path (through s_cselect), sign-mixed inputs and an oracle mismatch, on the lossless integer readback. Reject controls cover the i64/u32 spellings, operand counts and vector registers.
  • NONZERO SCC is the right predicate: s_absdiff sets SCC iff the result is nonzero, matching the neighbouring abs_i32 entry.
  • Heads-up: base 7b55abc sits ~10 commits behind current main (8f57366); a rebase may be asked for, but the single-table-entry change should merge trivially.

No blockers found.

AI-assisted: yes. All reported checks ran locally on the adapter and driver listed.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:review:6013647671 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/624#pullrequestreview-6013647671). Originally posted by [MarlomMedeiros](https://github.com/MarlomMedeiros) on 2026-11-22T18:02:43Z. **Review:** COMMENTED --- Community review + independent run on a second adapter, since the PR reports WARP only. ## Environment - Commit under test: `79a3529` on base `7b55abc` - Windows 11 build 26300.10075, VS 2026 MSVC 19.52, Ninja, DXC from SDK 10.0.26100 - `ctest --preset dev --no-tests=error -R '^pixel_aot_(e64|u32_from_f32)_(warp|hardware)$' -V`: **4/4 passed** - Hardware: NVIDIA GeForce RTX 5070 (vendor=10de device=2f04), driver 32.0.16.2135, D3D12 debug layer enabled, `debug_errors=0 debug_warnings=0`, `pixels=4096 max_absolute_error=0` - WARP: Microsoft Basic Render Driver, driver 10.0.26100.10068 - `tests/pixel_aot_check.py` controls, `tests/form_coverage_check.py`, `tests/rdna2_tools_check.py` (51 tests, 1 skipped) and the LLVM 15.0.7 binary round-trip all pass ## Review notes - The lowering `asuint(abs(asint({0}) - asint({1})))` matches the ISA even at the overflow boundary: LLVM's own `moveToVALU` expansion of `S_ABSDIFF_I32` (llvm/llvm-project#167691) emits `v_sub_u32` + `v_max_i32(v, -v)`, which is exactly wrap-then-abs. `INT_MAX - INT_MIN` therefore yields 1 on real hardware, identical to this emission. - `abs(INT_MIN)` returning INT_MIN bits in HLSL agrees with the hardware's 0x80000000 result, and the `int-min-zero` draw case pins it. - The draw covers both diff polarities, the zero-diff `scc=0` path (through `s_cselect`), sign-mixed inputs and an oracle mismatch, on the lossless integer readback. Reject controls cover the i64/u32 spellings, operand counts and vector registers. - `NONZERO` SCC is the right predicate: `s_absdiff` sets SCC iff the result is nonzero, matching the neighbouring `abs_i32` entry. - Heads-up: base `7b55abc` sits ~10 commits behind current `main` (`8f57366`); a rebase may be asked for, but the single-table-entry change should merge trivially. No blockers found. AI-assisted: yes. All reported checks ran locally on the adapter and driver listed.
thepatrickworld commented 2026-11-24 06:48:37 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by thepatrickworld on 2026-11-22T18:00:37Z.


@stan495 Independent AMD (RDNA4) result on 79a3529, plus one coverage observation. Measurements only, no code change.

Environment

  • Windows 11 25H2, build 26200.9711
  • MSVC 19.44.35230 (toolset 14.44.35207), Windows SDK 10.0.26100.0, DXC 1.9.2602.17
  • AMD Radeon RX 9070 XT, vendor 1002, device 7550, driver 32.0.32029.2010, native wave width 64
  • debug_layer=unavailable (Tools.Graphics.DirectX is NotPresent here)
  • Clean worktree of the PR head 79a3529.

Commands

cmake --preset dev
cmake --build --preset dev --parallel 12 --target offscreen_check
set XBOX2WINDOWS_ADAPTER=AMD Radeon RX 9070 XT
ctest --preset dev --no-tests=error -R "^pixel_aot_|^rdna2_tools"

Observed

23 tests, 23 passed, 0 failed, 0 skipped (111.87 s): rdna2_tools_check, the eleven _hardware suites and their eleven _warp counterparts. pixel_aot_hardware alone: 47 draws, 46 at pixels=4096 and one at pixels=64, every one max_absolute_error=0; same split on WARP.

The six draw cases the fixture registers are positive-diff (10, 4) → 6, negative-diff (4, 10) → 6, zero-diff (7, 7) → 0 with SCC clear, both-negative (-10, -4) → 6, mixed-signs (-5, 8) → 13 and int-min-zero (0x80000000, 0) → 0x80000000. All six drew with zero absolute error on both backends.

One coverage gap in the INT_MIN boundaries case

This is about what the fixture proves, not about the lowering being wrong.

The lowering is asuint(abs(asint(a) - asint(b))) with NONZERO = r != 0u. Both the subtraction and abs wrap in 32 bits, which matches the documented pseudo-code D = abs(S0 - S1). There are, however, two possible readings of that pseudo-code once the difference exceeds 2^31:

inputs wrap (current lowering) exact 33-bit magnitude
0x7fffffff, 0x80000000 0x00000001 0xffffffff
0x80000000, 0x00000001 0x7fffffff 0x80000001

Every case in this PR has |a-b| ≤ 2^31. int-min-zero is exactly on the boundary, where both readings agree — so it proves abs(INT_MIN) survives, which is useful, but it cannot distinguish the two semantics above. Nothing here is wrong; the fixture simply does not yet have a case in the (2^31, 2^32) window.

Two additions would make the claim discriminating: (0x7fffffff, 0x80000000) and (0x80000000, 0x00000001). Expected values are known for each reading, so a single draw decides it. Which one RDNA2 actually implements is not measurable on this machine — that needs Scarlett hardware, so the fixture would be recording an assumption rather than a measurement either way.

SCC does not diverge: |a-b| maxes at 0xffffffff, never 0, so NONZERO is identical under both readings.

Minor, unverified: abs() on a signed int is the only place in this table that uses the HLSL abs rather than an explicit (asint({0}) < 0 ? (0u - {0}) : {0}) ternary. If DXC emits llvm.abs with is_int_min_poison, the int-min-zero case would rest on optimiser behaviour rather than on the lowering. Worth checking in the generated DXIL if that case is meant to be a guarantee.

Also: this PR is currently in conflict

GitHub reports mergeable: false, mergeable_state: dirty against main, so this run measured a head that cannot merge as-is. The conflict is mechanical (nothing in the draw results suggests a semantic clash) but a rebase will be needed, and the test numbers above should be re-read against the rebased head.

AI-assisted; runs executed locally. The coverage observation was produced by a separate code review and re-verified by independent computation before posting.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7083271998 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/624#issuecomment-7083271998). Originally posted by [thepatrickworld](https://github.com/thepatrickworld) on 2026-11-22T18:00:37Z. --- @stan495 **Independent AMD (RDNA4) result on `79a3529`**, plus one coverage observation. Measurements only, no code change. ### Environment - Windows 11 25H2, build **26200.9711** - MSVC **19.44.35230** (toolset 14.44.35207), Windows SDK 10.0.26100.0, DXC **1.9.2602.17** - **AMD Radeon RX 9070 XT**, vendor 1002, device 7550, driver **32.0.32029.2010**, native wave width 64 - `debug_layer=unavailable` (`Tools.Graphics.DirectX` is `NotPresent` here) - Clean worktree of the PR head `79a3529`. ### Commands ``` cmake --preset dev cmake --build --preset dev --parallel 12 --target offscreen_check set XBOX2WINDOWS_ADAPTER=AMD Radeon RX 9070 XT ctest --preset dev --no-tests=error -R "^pixel_aot_|^rdna2_tools" ``` ### Observed **23 tests, 23 passed, 0 failed, 0 skipped** (111.87 s): `rdna2_tools_check`, the eleven `_hardware` suites and their eleven `_warp` counterparts. `pixel_aot_hardware` alone: **47 draws**, 46 at `pixels=4096` and one at `pixels=64`, every one `max_absolute_error=0`; same split on WARP. The six draw cases the fixture registers are `positive-diff` (10, 4) → 6, `negative-diff` (4, 10) → 6, `zero-diff` (7, 7) → 0 with SCC clear, `both-negative` (-10, -4) → 6, `mixed-signs` (-5, 8) → 13 and `int-min-zero` (`0x80000000`, 0) → `0x80000000`. All six drew with zero absolute error on both backends. ### One coverage gap in the `INT_MIN boundaries` case This is about what the fixture **proves**, not about the lowering being wrong. The lowering is `asuint(abs(asint(a) - asint(b)))` with `NONZERO` = `r != 0u`. Both the subtraction and `abs` wrap in 32 bits, which matches the documented pseudo-code `D = abs(S0 - S1)`. There are, however, two possible readings of that pseudo-code once the difference exceeds `2^31`: | inputs | wrap (current lowering) | exact 33-bit magnitude | |---|---|---| | `0x7fffffff`, `0x80000000` | `0x00000001` | `0xffffffff` | | `0x80000000`, `0x00000001` | `0x7fffffff` | `0x80000001` | Every case in this PR has `|a-b| ≤ 2^31`. `int-min-zero` is exactly **on** the boundary, where both readings agree — so it proves `abs(INT_MIN)` survives, which is useful, but it cannot distinguish the two semantics above. Nothing here is wrong; the fixture simply does not yet have a case in the `(2^31, 2^32)` window. Two additions would make the claim discriminating: `(0x7fffffff, 0x80000000)` and `(0x80000000, 0x00000001)`. Expected values are known for each reading, so a single draw decides it. Which one RDNA2 actually implements is not measurable on this machine — that needs Scarlett hardware, so the fixture would be recording an assumption rather than a measurement either way. SCC does not diverge: `|a-b|` maxes at `0xffffffff`, never 0, so `NONZERO` is identical under both readings. Minor, unverified: `abs()` on a signed int is the only place in this table that uses the HLSL `abs` rather than an explicit `(asint({0}) < 0 ? (0u - {0}) : {0})` ternary. If DXC emits `llvm.abs` with `is_int_min_poison`, the `int-min-zero` case would rest on optimiser behaviour rather than on the lowering. Worth checking in the generated DXIL if that case is meant to be a guarantee. ### Also: this PR is currently in conflict GitHub reports `mergeable: false`, `mergeable_state: dirty` against `main`, so this run measured a head that cannot merge as-is. The conflict is mechanical (nothing in the draw results suggests a semantic clash) but a rebase will be needed, and the test numbers above should be re-read against the rebased head. _AI-assisted; runs executed locally. The coverage observation was produced by a separate code review and re-verified by independent computation before posting._
stan495 commented 2026-11-24 06:48:54 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by stan495 on 2026-11-23T01:07:36Z.


Thanks @thepatrickworld and @MarlomMedeiros for the detailed reviews and independent hardware runs on RX 9070 XT and RTX 5070!

I have rebased the PR onto current main (67edabe) to resolve the merge conflict, and addressed the suggestions:

  1. Overflow-wrap boundary tests:
    Added the two discriminating cases in the (2^31, 2^32) difference window to check_absdiff_i32_draw in tests/pixel_aot_check.py, and updated docs/experiments.md:

    • ("overflow-wrap-max-min", (0x7fffffff, 0x80000000), (1, 1, 0, 0), "pass") (diff yields 1, SCC = 1)
    • ("overflow-wrap-min-pos", (0x80000000, 1), (0x7fffffff, 1, 0, 0), "pass") (diff yields 0x7fffffff, SCC = 1)
  2. HLSL abs() in DXIL:
    Inspected the disassembly from DXC (1.9.2602.17): DXC emits an explicit negation and signed maximum (sub i32 0, %diff followed by @dx.op.binary.i32(37, %diff, %neg) / IMax), matching LLVM's moveToVALU lowering (v_sub_u32 + v_max_i32(v, -v)). It does not emit poison on INT_MIN, guaranteeing 0x80000000 preservation across two's-complement negation.

Verification on rebased head (4525ac7)

  • ctest --preset dev --no-tests=error -R "^pixel_aot_e64_|^rdna2_tools": 7/7 passed (22.90s, including WARP and hardware draws with max_absolute_error=0)
  • python -B tests/rdna2_tools_check.py: Passed (50 tests, 1 skipped)
  • python -B tests/form_coverage_check.py: Passed
  • python -B tests/pixel_aot_check.py: Passed
  • python -B tests/docs_links_check.py: Passed (122 links)
  • python -B tests/bidi_controls_check.py: Passed (568 files)
<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7088894760 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/624#issuecomment-7088894760). Originally posted by [stan495](https://github.com/stan495) on 2026-11-23T01:07:36Z. --- Thanks @thepatrickworld and @MarlomMedeiros for the detailed reviews and independent hardware runs on RX 9070 XT and RTX 5070! I have rebased the PR onto current `main` (`67edabe`) to resolve the merge conflict, and addressed the suggestions: 1. **Overflow-wrap boundary tests**: Added the two discriminating cases in the `(2^31, 2^32)` difference window to `check_absdiff_i32_draw` in `tests/pixel_aot_check.py`, and updated `docs/experiments.md`: - `("overflow-wrap-max-min", (0x7fffffff, 0x80000000), (1, 1, 0, 0), "pass")` (diff yields `1`, `SCC = 1`) - `("overflow-wrap-min-pos", (0x80000000, 1), (0x7fffffff, 1, 0, 0), "pass")` (diff yields `0x7fffffff`, `SCC = 1`) 2. **HLSL `abs()` in DXIL**: Inspected the disassembly from DXC (`1.9.2602.17`): DXC emits an explicit negation and signed maximum (`sub i32 0, %diff` followed by `@dx.op.binary.i32(37, %diff, %neg)` / `IMax`), matching LLVM's `moveToVALU` lowering (`v_sub_u32` + `v_max_i32(v, -v)`). It does not emit poison on `INT_MIN`, guaranteeing `0x80000000` preservation across two's-complement negation. ### Verification on rebased head (`4525ac7`) - `ctest --preset dev --no-tests=error -R "^pixel_aot_e64_|^rdna2_tools"`: **7/7 passed** (22.90s, including WARP and hardware draws with `max_absolute_error=0`) - `python -B tests/rdna2_tools_check.py`: Passed (50 tests, 1 skipped) - `python -B tests/form_coverage_check.py`: Passed - `python -B tests/pixel_aot_check.py`: Passed - `python -B tests/docs_links_check.py`: Passed (122 links) - `python -B tests/bidi_controls_check.py`: Passed (568 files)
thepatrickworld commented 2026-11-24 06:49:11 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by thepatrickworld on 2026-11-23T14:19:49Z.


Merged as 3cd9df3, and the merged tree runs green on RDNA4 (native wave64). Measurements only.

Environment

  • Windows 11 25H2, build 26200.9711
  • MSVC 19.44.35230 (toolset 14.44.35207), Windows SDK 10.0.26100.0, DXC 1.9.2602.17
  • AMD Radeon RX 9070 XT, vendor 1002, device 7550, driver 32.0.32029.2010, native wave width 64
  • debug_layer=unavailable (Tools.Graphics.DirectX is NotPresent here)

The merge changed nothing

Comparing the lines 3cd9df3^1..3cd9df3 adds or removes with aeb45daf..9577694 gives the same 93 lines, character for character. The merge applied the reviewed head unchanged, so the earlier verification applies to the merged tree as-is.

Commands and results

git checkout 3cd9df3
cmake --preset dev
cmake --build --preset dev --parallel 12 --target offscreen_check
set XBOX2WINDOWS_ADAPTER=AMD Radeon RX 9070 XT
ctest --preset dev --no-tests=error -R "^pixel_aot_e64_(hardware|warp)$" -V
ctest --preset dev --no-tests=error -R "^pixel_aot_(hardware|warp)$" -V
1/2 Test #278: pixel_aot_e64_hardware ...   Passed   10.06 sec
2/2 Test #315: pixel_aot_e64_warp .......   Passed    4.49 sec
1/2 Test #265: pixel_aot_hardware .......   Passed   13.68 sec
2/2 Test #302: pixel_aot_warp ...........   Passed    7.58 sec
Total Test time (real) =  21.27 sec

check_absdiff_i32_draw is reached through check_e64_render (tests/pixel_aot_check.py:8812, mode draw-e64 at :8862), so the pixel_aot_e64_* entries are the ones that exercise it, not pixel_aot_hardware. Both are green here: the nine quadruplets — including int-min-zero, overflow-wrap-max-min and overflow-wrap-min-pos — compare bitwise equal on this adapter through R32G32B32A32_UINT.

What a green run does not settle

check_absdiff_i32_draw carries no mutation control. The only negative case is oracle-mismatch, a deliberately wrong expected word, which exercises the comparison path but says nothing about whether a different lowering would be caught; the rest of the file recompiles a knowingly wrong variant and demands a mismatch, and this test does not.

The lowering also emits abs(asint(x)), where abs_i32 elsewhere avoids abs() and writes 0u - x precisely because abs(INT_MIN) is the one input for which DXC may assume poison. int-min-zero compares equal on driver 32.0.32029.2010 — one compiler, one adapter.

CI on 3cd9df3 is 5/5, including both Windows jobs that were red on 4525ac7 before the rebase onto aeb45daf, which contains 632e60f (the NameError: name 'draw' fix). That matches the earlier finding that the failure belonged to main and not to this change.

AI-assisted; runs executed locally.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7103833738 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/624#issuecomment-7103833738). Originally posted by [thepatrickworld](https://github.com/thepatrickworld) on 2026-11-23T14:19:49Z. --- **Merged as `3cd9df3`, and the merged tree runs green on RDNA4 (native wave64).** Measurements only. ### Environment - Windows 11 25H2, build **26200.9711** - MSVC **19.44.35230** (toolset 14.44.35207), Windows SDK 10.0.26100.0, DXC **1.9.2602.17** - **AMD Radeon RX 9070 XT**, vendor 1002, device 7550, driver **32.0.32029.2010**, native wave width 64 - `debug_layer=unavailable` (`Tools.Graphics.DirectX` is `NotPresent` here) ### The merge changed nothing Comparing the lines `3cd9df3^1..3cd9df3` adds or removes with `aeb45daf..9577694` gives the same 93 lines, character for character. The merge applied the reviewed head unchanged, so the earlier verification applies to the merged tree as-is. ### Commands and results ``` git checkout 3cd9df3 cmake --preset dev cmake --build --preset dev --parallel 12 --target offscreen_check set XBOX2WINDOWS_ADAPTER=AMD Radeon RX 9070 XT ctest --preset dev --no-tests=error -R "^pixel_aot_e64_(hardware|warp)$" -V ctest --preset dev --no-tests=error -R "^pixel_aot_(hardware|warp)$" -V ``` ``` 1/2 Test #278: pixel_aot_e64_hardware ... Passed 10.06 sec 2/2 Test #315: pixel_aot_e64_warp ....... Passed 4.49 sec 1/2 Test #265: pixel_aot_hardware ....... Passed 13.68 sec 2/2 Test #302: pixel_aot_warp ........... Passed 7.58 sec Total Test time (real) = 21.27 sec ``` `check_absdiff_i32_draw` is reached through `check_e64_render` (`tests/pixel_aot_check.py:8812`, mode `draw-e64` at `:8862`), so the `pixel_aot_e64_*` entries are the ones that exercise it, not `pixel_aot_hardware`. Both are green here: the nine quadruplets — including `int-min-zero`, `overflow-wrap-max-min` and `overflow-wrap-min-pos` — compare bitwise equal on this adapter through `R32G32B32A32_UINT`. ### What a green run does not settle `check_absdiff_i32_draw` carries no mutation control. The only negative case is `oracle-mismatch`, a deliberately wrong expected word, which exercises the comparison path but says nothing about whether a different lowering would be caught; the rest of the file recompiles a knowingly wrong variant and demands a mismatch, and this test does not. The lowering also emits `abs(asint(x))`, where `abs_i32` elsewhere avoids `abs()` and writes `0u - x` precisely because `abs(INT_MIN)` is the one input for which DXC may assume poison. `int-min-zero` compares equal on driver 32.0.32029.2010 — one compiler, one adapter. CI on `3cd9df3` is 5/5, including both Windows jobs that were red on `4525ac7` before the rebase onto `aeb45daf`, which contains `632e60f` (the `NameError: name 'draw'` fix). That matches the earlier finding that the failure belonged to `main` and not to this change. _AI-assisted; runs 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!618
No description provided.