startup: lower v_mul_i32_i24 and v_mad_i32_i24 in gfx2hlsl #2402

Merged
R0D4X merged 2 commits from upstream-pr/2410 into main 2026-11-25 19:37:22 +00:00
R0D4X commented 2026-11-25 15:38:38 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by R0D4X on 2026-11-25T15:38:38Z.


Summary

  • Lower the signed 24-bit vector multiply and multiply-add instructions (v_mul_i32_i24 in both VOP2 _e32 and VOP3A _e64 encodings, and v_mad_i32_i24 VOP3A) in tools/startup/gfx2hlsl.py, completing the signed counterparts to v_mul_u32_u24 and v_mad_u32_u24 in VEC_U.
  • Reuse the UB-free 32-bit sign-extension expression (asuint(asint({0} << 8) >> 8) * asuint(asint({1} << 8) >> 8) [+ {2}]) matching tools/pixel_aot.py, with no new helper in Pipeline.common().
  • Preserve strict refusals for unmodeled modifiers (including integer clamp, mul:2, div:2, op_sel, -v, |v|) and wrong operand counts.
  • Add tests/startup_gfx2hlsl_mul_mad_i24_check.py covering CPU evaluation across 256x4 (v_mul_i32_i24) and 384x4 (v_mad_i32_i24) edge cases (24-bit sign boundaries, upper-byte noise, 32-bit wraparound), unsigned-24-bit mutation controls, exec-masked emission, modifier/arity refusals, binary <llvm-mc> round-trip checks, and FXC ps_5_1 + DXC ps_6_0 WARP/hardware draws.
  • Register startup_gfx2hlsl_mul_mad_i24_{controls,warp,hardware} in CMakeLists.txt and wire tests/startup_gfx2hlsl_mul_mad_i24_check.py into pixel-binary and python-linux in .github/workflows/windows.yml.

Verification

  • Base commit: 7092683a (upstream/main)
  • Branch commit: 05cbd7c7
  • Host environment: Windows 11 x64 (10.0.26300.9974), MSVC 19.44.35230, Windows SDK 10.0.26100.0, FXC + DXC 1.9.2602.17
  • WARP: Microsoft Basic Render Driver (1414:008c), driver 10.0.26100.9818, D3D12 debug layer enabled
  • Hardware GPU: NVIDIA GeForce RTX 5080 (10de:2c02), driver 32.0.16.2124, D3D12 debug layer enabled

Commands and Observed Results

.\out\pe-env\Scripts\python.exe -B tests/startup_gfx2hlsl_mul_mad_i24_check.py
.\out\pe-env\Scripts\python.exe -B tests/startup_gfx2hlsl_operand_count_check.py
.\out\pe-env\Scripts\python.exe -B tests/startup_gfx2hlsl_handler_arity_check.py
.\out\pe-env\Scripts\python.exe -B tests/startup_gfx2hlsl_bit_alu_check.py
.\out\pe-env\Scripts\python.exe -B tests/startup_translator_check.py
.\out\pe-env\Scripts\python.exe -B tests/docs_links_check.py
.\out\pe-env\Scripts\python.exe -B tests/bidi_controls_check.py
ctest --preset dev --no-tests=error -j 1 -R '^(startup_gfx2hlsl_mul_mad_i24_|startup_tools_lint$)' -V
ctest --preset release --no-tests=error -j 1 -R '^startup_gfx2hlsl_mul_mad_i24_' -V
  • Observed: all Python/neighbor/lint checks passed (docs_links_check.py: 19 files / 464 links; bidi_controls_check.py: 1723 files; startup_tools_lint: passed).
  • Self-mutation check: 3/3 mutations (mul_unsigned24, mad_unsigned24, mad_drop_addend) caught (rc=1) and reverted cleanly.
  • dev: 4 passed, 0 skipped, 0 failed (debug_errors=0 debug_warnings=0 on WARP and RTX 5080 for both FXC ps_5_1 and DXC ps_6_0, including unsigned-24-bit GPU mutation controls).
  • release: 3 passed, 0 skipped, 0 failed (4.22 s, RTX 5080 3.09 s).
  • Note: tests/startup_gfx2hlsl_mul_mad_i24_check.py binary llvm-mc-15 was not run locally (llvm-mc is not installed on this Windows host); fixture words were cross-checked against tools/disasm_rdna2.py / gfx2hlsl.decode() and are exercised by the Ubuntu pixel-binary CI job.
  • Scope note: these passing fixtures verify v_mul_i32_i24 / v_mad_i32_i24 lowering and desktop GPU execution in isolation; they do not establish full-game startup.
<!-- greyfinch-sync:R0Y00/Xbox2Windows:issue:6608157373 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/2410). Originally posted by [R0D4X](https://github.com/R0D4X) on 2026-11-25T15:38:38Z. --- ## Summary - Lower the signed 24-bit vector multiply and multiply-add instructions (`v_mul_i32_i24` in both VOP2 `_e32` and VOP3A `_e64` encodings, and `v_mad_i32_i24` VOP3A) in `tools/startup/gfx2hlsl.py`, completing the signed counterparts to `v_mul_u32_u24` and `v_mad_u32_u24` in `VEC_U`. - Reuse the UB-free 32-bit sign-extension expression (`asuint(asint({0} << 8) >> 8) * asuint(asint({1} << 8) >> 8)` [+ `{2}`]) matching `tools/pixel_aot.py`, with no new helper in `Pipeline.common()`. - Preserve strict refusals for unmodeled modifiers (including integer `clamp`, `mul:2`, `div:2`, `op_sel`, `-v`, `|v|`) and wrong operand counts. - Add `tests/startup_gfx2hlsl_mul_mad_i24_check.py` covering CPU evaluation across 256x4 (`v_mul_i32_i24`) and 384x4 (`v_mad_i32_i24`) edge cases (24-bit sign boundaries, upper-byte noise, 32-bit wraparound), unsigned-24-bit mutation controls, `exec`-masked emission, modifier/arity refusals, `binary <llvm-mc>` round-trip checks, and FXC `ps_5_1` + DXC `ps_6_0` WARP/hardware draws. - Register `startup_gfx2hlsl_mul_mad_i24_{controls,warp,hardware}` in `CMakeLists.txt` and wire `tests/startup_gfx2hlsl_mul_mad_i24_check.py` into `pixel-binary` and `python-linux` in `.github/workflows/windows.yml`. ## Verification - **Base commit:** `7092683a` (`upstream/main`) - **Branch commit:** `05cbd7c7` - **Host environment:** Windows 11 x64 (`10.0.26300.9974`), MSVC `19.44.35230`, Windows SDK `10.0.26100.0`, FXC + DXC `1.9.2602.17` - **WARP:** `Microsoft Basic Render Driver` (`1414:008c`), driver `10.0.26100.9818`, D3D12 debug layer enabled - **Hardware GPU:** `NVIDIA GeForce RTX 5080` (`10de:2c02`), driver `32.0.16.2124`, D3D12 debug layer enabled ### Commands and Observed Results ```powershell .\out\pe-env\Scripts\python.exe -B tests/startup_gfx2hlsl_mul_mad_i24_check.py .\out\pe-env\Scripts\python.exe -B tests/startup_gfx2hlsl_operand_count_check.py .\out\pe-env\Scripts\python.exe -B tests/startup_gfx2hlsl_handler_arity_check.py .\out\pe-env\Scripts\python.exe -B tests/startup_gfx2hlsl_bit_alu_check.py .\out\pe-env\Scripts\python.exe -B tests/startup_translator_check.py .\out\pe-env\Scripts\python.exe -B tests/docs_links_check.py .\out\pe-env\Scripts\python.exe -B tests/bidi_controls_check.py ctest --preset dev --no-tests=error -j 1 -R '^(startup_gfx2hlsl_mul_mad_i24_|startup_tools_lint$)' -V ctest --preset release --no-tests=error -j 1 -R '^startup_gfx2hlsl_mul_mad_i24_' -V ``` - Observed: all Python/neighbor/lint checks passed (`docs_links_check.py`: 19 files / 464 links; `bidi_controls_check.py`: 1723 files; `startup_tools_lint`: passed). - Self-mutation check: 3/3 mutations (`mul_unsigned24`, `mad_unsigned24`, `mad_drop_addend`) caught (`rc=1`) and reverted cleanly. - `dev`: **4 passed, 0 skipped, 0 failed** (`debug_errors=0 debug_warnings=0` on WARP and RTX 5080 for both FXC `ps_5_1` and DXC `ps_6_0`, including unsigned-24-bit GPU mutation controls). - `release`: **3 passed, 0 skipped, 0 failed** (4.22 s, RTX 5080 3.09 s). - Note: `tests/startup_gfx2hlsl_mul_mad_i24_check.py binary llvm-mc-15` was not run locally (`llvm-mc` is not installed on this Windows host); fixture words were cross-checked against `tools/disasm_rdna2.py` / `gfx2hlsl.decode()` and are exercised by the Ubuntu `pixel-binary` CI job. - Scope note: these passing fixtures verify `v_mul_i32_i24` / `v_mad_i32_i24` lowering and desktop GPU execution in isolation; they do not establish full-game startup.
KelboLive commented 2026-11-25 16:05:26 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by KelboLive on 2026-11-25T16:04:25Z.


APPROVED: Lowering v_mul_i32_i24 and v_mad_i32_i24 in gfx2hlsl.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7167568639 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/2410#issuecomment-7167568639). Originally posted by [KelboLive](https://github.com/KelboLive) on 2026-11-25T16:04:25Z. --- APPROVED: Lowering v_mul_i32_i24 and v_mad_i32_i24 in gfx2hlsl.
MasterDomino commented 2026-11-25 17:01:30 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by MasterDomino on 2026-11-25T16:15:24Z.

Review: COMMENTED


Review of head 05cbd7c7 (base 7092683a). It adds an AMD hardware run and the llvm-mc round-trip the PR body notes as not run locally.

Result: no P1 or P2 findings. Two observations and a nit.

What I checked

  • tools/startup/gfx2hlsl.py: the two VEC_U entries sign-extend bits 23:0 of each source (<< 8, then an arithmetic >> 8 on int) and multiply as uint, which wraps to the low 32 bits of the signed product. For v_mad_i32_i24 they add the full 32-bit S2 with wraparound. That matches the ISA definition. The expression shape matches the unsigned siblings and tools/pixel_aot.py.
  • Registration: CMake adds the controls and the warp/hardware draws in the same shape as the neighbouring shift64 entries. The workflow adds the binary llvm-mc-15 entry and the Python-job line, with the \ continuations intact.

Commands executed (Windows 11 build 26300)

python -B tests/startup_gfx2hlsl_mul_mad_i24_check.py
python -B tests/startup_gfx2hlsl_mul_mad_i24_check.py binary <llvm-mc 15.0.7>
python -B tests/startup_gfx2hlsl_mul_mad_i24_check.py draw <dxc> <offscreen_check> warp <fxc>
python -B tests/startup_gfx2hlsl_mul_mad_i24_check.py draw <dxc> <offscreen_check> hardware <fxc>
python -B tests/startup_gfx2hlsl_{operand_count,handler_arity,bit_alu}_check.py
Check Result
Controls pass
binary, llvm-mc 15.0.7 pass: fixture words match llvm-mc
Draw, WARP 10.0.26100.9818, debug layer on, FXC ps_5_1 and DXC 1.8.2502.11 ps_6_0 pass
Draw, AMD Radeon RX 9070 XT (1002:7550, driver 32.0.32029.2010), debug layer on, FXC and DXC pass
Built-in unsigned-24 mutations, CPU and GPU fail as expected on both adapters (01fffffe,01800000,ff800000,00000000 and 02000003,81800000,ff7fffff,7e000000)
Neighbouring checks: operand count, handler arity, bit ALU pass

offscreen_check was a Release build at the base commit.

My own mutation: replacing the v_mul_i32_i24 expression with a full 32-bit signed multiply, asuint(asint({0}) * asint({1})), makes the controls fail: emitted expressions match reference on 256 cases x 4 lanes: MISMATCH, exit 1. Reverted.

Observations, not blocking

  1. SDWA forms of v_mul_i32_i24 are now lowered through the existing generic SDWA path, which neither the PR body nor its tests mention. With llvm-mc-assembled words:

    • src0_sel:BYTE_0 emits asuint(asint(((v0 >> 0u) & 0xffu) << 8) >> 8) * ...;
    • dst_sel:WORD_1 dst_unused:UNUSED_PRESERVE emits the preserved-low-word merge.

    The semantics compose correctly: the selection zero-extends, or sign-extends under sext(), to 32 bits before the 24-bit read. A single SDWA case would pin that: for example src0_sel:WORD_1 on a high word with bit 15 set, plain (positive) and under sext() (negative). Alternatively the body could say that SDWA comes through the generic path and is covered elsewhere.

  2. DPP: quad_perm reaches the generic DPP path, which needs a straight-line pixel stage, and row_shl is refused. clamp is refused on both ops. Inline constants, literals and SGPR sources lower correctly, for example 1.0 is read as integer bits 0x3f800000.

Nit

  • Fixture comment and set 0 claim: in DRAW['v_mul_i32_i24'], the comment INT24_MIN * INT24_MIN = 0 (mod 2^32) -> wait: 2^46 mod 2^32 = 0 reads like a leftover note. That lane also gives 00000000 under the unsigned-24 mutation (2^46 mod 2^32 = 0 either way), so the "Set 0 separates signed 24-bit from unsigned 24-bit on every lane" comment doesn't hold for lane 3 of the multiply. The other draw sets cover the difference, so it's only wording.

Title and body are neutral. The change is original in-repo work.

AI-assisted; commands listed were executed locally.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:review:6061000127 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/2410#pullrequestreview-6061000127). Originally posted by [MasterDomino](https://github.com/MasterDomino) on 2026-11-25T16:15:24Z. **Review:** COMMENTED --- Review of head `05cbd7c7` (base `7092683a`). It adds an AMD hardware run and the `llvm-mc` round-trip the PR body notes as not run locally. **Result: no P1 or P2 findings. Two observations and a nit.** ### What I checked - **`tools/startup/gfx2hlsl.py`:** the two `VEC_U` entries sign-extend bits 23:0 of each source (`<< 8`, then an arithmetic `>> 8` on `int`) and multiply as `uint`, which wraps to the low 32 bits of the signed product. For `v_mad_i32_i24` they add the full 32-bit `S2` with wraparound. That matches the ISA definition. The expression shape matches the unsigned siblings and `tools/pixel_aot.py`. - **Registration:** CMake adds the controls and the `warp`/`hardware` draws in the same shape as the neighbouring `shift64` entries. The workflow adds the `binary llvm-mc-15` entry and the Python-job line, with the `\` continuations intact. ### Commands executed (Windows 11 build 26300) ```powershell python -B tests/startup_gfx2hlsl_mul_mad_i24_check.py python -B tests/startup_gfx2hlsl_mul_mad_i24_check.py binary <llvm-mc 15.0.7> python -B tests/startup_gfx2hlsl_mul_mad_i24_check.py draw <dxc> <offscreen_check> warp <fxc> python -B tests/startup_gfx2hlsl_mul_mad_i24_check.py draw <dxc> <offscreen_check> hardware <fxc> python -B tests/startup_gfx2hlsl_{operand_count,handler_arity,bit_alu}_check.py ``` | Check | Result | |---|---| | Controls | pass | | `binary`, llvm-mc 15.0.7 | **pass**: `fixture words match llvm-mc` | | Draw, WARP 10.0.26100.9818, debug layer on, FXC `ps_5_1` and DXC 1.8.2502.11 `ps_6_0` | pass | | Draw, **AMD Radeon RX 9070 XT** (1002:7550, driver 32.0.32029.2010), debug layer on, FXC and DXC | pass | | Built-in unsigned-24 mutations, CPU and GPU | fail as expected on both adapters (`01fffffe,01800000,ff800000,00000000` and `02000003,81800000,ff7fffff,7e000000`) | | Neighbouring checks: operand count, handler arity, bit ALU | pass | `offscreen_check` was a Release build at the base commit. **My own mutation:** replacing the `v_mul_i32_i24` expression with a full 32-bit signed multiply, `asuint(asint({0}) * asint({1}))`, makes the controls fail: `emitted expressions match reference on 256 cases x 4 lanes: MISMATCH`, exit 1. Reverted. ### Observations, not blocking 1. **SDWA forms of `v_mul_i32_i24` are now lowered through the existing generic SDWA path**, which neither the PR body nor its tests mention. With llvm-mc-assembled words: - `src0_sel:BYTE_0` emits `asuint(asint(((v0 >> 0u) & 0xffu) << 8) >> 8) * ...`; - `dst_sel:WORD_1 dst_unused:UNUSED_PRESERVE` emits the preserved-low-word merge. The semantics compose correctly: the selection zero-extends, or sign-extends under `sext()`, to 32 bits before the 24-bit read. A single SDWA case would pin that: for example `src0_sel:WORD_1` on a high word with bit 15 set, plain (positive) and under `sext()` (negative). Alternatively the body could say that SDWA comes through the generic path and is covered elsewhere. 2. **DPP:** `quad_perm` reaches the generic DPP path, which needs a straight-line pixel stage, and `row_shl` is refused. `clamp` is refused on both ops. Inline constants, literals and SGPR sources lower correctly, for example `1.0` is read as integer bits `0x3f800000`. ### Nit - **Fixture comment and set 0 claim:** in `DRAW['v_mul_i32_i24']`, the comment `INT24_MIN * INT24_MIN = 0 (mod 2^32) -> wait: 2^46 mod 2^32 = 0` reads like a leftover note. That lane also gives `00000000` under the unsigned-24 mutation (2^46 mod 2^32 = 0 either way), so the "Set 0 separates signed 24-bit from unsigned 24-bit on every lane" comment doesn't hold for lane 3 of the multiply. The other draw sets cover the difference, so it's only wording. Title and body are neutral. The change is original in-repo work. AI-assisted; commands listed were executed locally.
ChazY11 commented 2026-11-25 17:02:00 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by ChazY11 on 2026-11-25T16:59:05Z.


Five mutations, all caught — including the two I expected to be equivalent

Baseline on this branch: tests/startup_gfx2hlsl_mul_mad_i24_check.py → six … ok lines, exit 0.

mutation result
v_mul_i32_i24: drop the sign extension (asuint({0}) * asuint({1})) caught
v_mul_i32_i24: one shift short (asint(x << 8) without >> 8) caught
v_mad_i32_i24: drop the + {2} addend caught
signed 24-bit → unsigned mask ({0} & 0xffffffu) caught
<< 8) >> 8 → << 7) >> 7 caught

The last two are the ones worth noting. & 0xffffffu is the natural "simplification" of the sign extension and it is wrong in exactly the way that matters (a negative i24 becomes a large positive), and a shift pair of 7 is off by one byte but still symmetric — a fixture that only tried values below 0x7f would pass both.

Independent check of the lowering itself

asuint(asint(x << 8) >> 8) is the 24-bit sign extension everyone writes and nobody verifies, so I evaluated it against sext24 on the values that matter:

0xffffff -> -1          0x800000 -> -8388608
0x7fffff -> 8388607     0x1000000 -> 0        0x80000001 -> 1
                                   (all 10 boundary values agree)

So the idiom is right for v_mul_i32_i24's two sources. The v_mad_i32_i24 addend is not sign-extended in the ISA either (only the two multiplicands are i24), and the text adds {2} as a full dword — worth one comment in the table, because a reader will assume all three operands are narrowed.

One thing I would pin

The check refuses modifiers and wrong operand counts, and covers the arithmetic — but v_mul_i32_i24 also exists as v_mul_u32_u24 and v_mad_u32_u24 in the same encoding family. If those stay unlowered, the refusal has to name them rather than fall through to the generic unknown-op message, otherwise a title that uses the unsigned form reads as "instruction not supported at all" in the census instead of "this form not lowered yet". If they are already refused by name, ignore this.

What the PR gets right

The table entry is one line and the two instructions share their shape with the existing v_mul_lo_u32 neighbour, so there is nothing to review in the lowering beyond the shift idiom; the value is in the fixture, and the fixture is what this branch adds — including the "exec-masked v_mad_i32_i24 guards assignment" case, which is the one I would not have thought to write.

AI-assisted; the five mutations and the sign-extension check were run locally on Windows 11 build 26300.9974.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7168826650 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/2410#issuecomment-7168826650). Originally posted by [ChazY11](https://github.com/ChazY11) on 2026-11-25T16:59:05Z. --- ## Five mutations, all caught — including the two I expected to be equivalent Baseline on this branch: `tests/startup_gfx2hlsl_mul_mad_i24_check.py` → six `… ok` lines, exit 0. | mutation | result | |---|---| | `v_mul_i32_i24`: drop the sign extension (`asuint({0}) * asuint({1})`) | **caught** | | `v_mul_i32_i24`: one shift short (`asint(x << 8)` without `>> 8`) | **caught** | | `v_mad_i32_i24`: drop the `+ {2}` addend | **caught** | | signed 24-bit → unsigned mask (`{0} & 0xffffffu`) | **caught** | | `<< 8) >> 8` → `<< 7) >> 7` | **caught** | The last two are the ones worth noting. `& 0xffffffu` is the natural "simplification" of the sign extension and it is wrong in exactly the way that matters (a negative i24 becomes a large positive), and a shift pair of 7 is off by one byte but still symmetric — a fixture that only tried values below `0x7f` would pass both. ## Independent check of the lowering itself `asuint(asint(x << 8) >> 8)` is the 24-bit sign extension everyone writes and nobody verifies, so I evaluated it against `sext24` on the values that matter: ```text 0xffffff -> -1 0x800000 -> -8388608 0x7fffff -> 8388607 0x1000000 -> 0 0x80000001 -> 1 (all 10 boundary values agree) ``` So the idiom is right for `v_mul_i32_i24`'s two sources. The `v_mad_i32_i24` addend is *not* sign-extended in the ISA either (only the two multiplicands are i24), and the text adds `{2}` as a full dword — worth one comment in the table, because a reader will assume all three operands are narrowed. ## One thing I would pin The check refuses modifiers and wrong operand counts, and covers the arithmetic — but `v_mul_i32_i24` also exists as `v_mul_u32_u24` and `v_mad_u32_u24` in the same encoding family. If those stay unlowered, the refusal has to name them rather than fall through to the generic unknown-op message, otherwise a title that uses the unsigned form reads as "instruction not supported at all" in the census instead of "this form not lowered yet". If they are already refused by name, ignore this. ## What the PR gets right The table entry is one line and the two instructions share their shape with the existing `v_mul_lo_u32` neighbour, so there is nothing to review in the lowering beyond the shift idiom; the value is in the fixture, and the fixture is what this branch adds — including the "exec-masked `v_mad_i32_i24` guards assignment" case, which is the one I would not have thought to write. AI-assisted; the five mutations and the sign-extension check were run locally on Windows 11 build 26300.9974.
upstream-sync closed this pull request 2026-11-25 20:04:08 +00:00
tedin7 commented 2026-11-25 20:04:08 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by tedin7 on 2026-11-25T19:24:53Z.

Review: COMMENTED


Review of head 05cbd7c7.

No blocking findings.

What I checked:

  • tools/startup/gfx2hlsl.py: the v_mul_i32_i24 and v_mad_i32_i24 entries sign-extend the low 24 bits with the UB-free shift pair, then multiply (and add src2 for mad). This matches the signed semantics and the existing unsigned siblings in VEC_U.
  • No other PR covers this slice in gfx2hlsl.py (#1596 is the compute v_mad_i32_i24 lowering, a separate path).
  • The test covers CPU evaluation edge cases, exec-masked emission, modifier and operand-count refusals, and WARP/hardware draws. CMake and windows.yml wiring is consistent with the neighbouring shift64 entries.
  • The windows.yml change is two list entries only; the PR's own CI run exercised them and is green.

Commands run locally (Linux, worktree at the PR head):

  • python3 -B tests/startup_gfx2hlsl_mul_mad_i24_check.py -> pass
  • python3 tests/docs_links_check.py -> pass
  • python3 tests/bidi_controls_check.py -> pass
  • git diff --check origin/main...HEAD -> clean
  • Mutation 1: v_mad_i32_i24 changed to the unsigned 24-bit mask -> test fails (384 cases x 4 lanes mismatch)
  • Mutation 2: v_mul_i32_i24 changed to a plain 32-bit multiply -> test fails (256 cases x 4 lanes mismatch)

Note: the branch is 60 commits behind main, so a Windows run on an updated head is still needed before merge.

AI-assisted; commands listed were executed locally.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:review:6063668935 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/2410#pullrequestreview-6063668935). Originally posted by [tedin7](https://github.com/tedin7) on 2026-11-25T19:24:53Z. **Review:** COMMENTED --- Review of head `05cbd7c7`. No blocking findings. What I checked: - `tools/startup/gfx2hlsl.py`: the `v_mul_i32_i24` and `v_mad_i32_i24` entries sign-extend the low 24 bits with the UB-free shift pair, then multiply (and add src2 for mad). This matches the signed semantics and the existing unsigned siblings in `VEC_U`. - No other PR covers this slice in `gfx2hlsl.py` (#1596 is the compute `v_mad_i32_i24` lowering, a separate path). - The test covers CPU evaluation edge cases, exec-masked emission, modifier and operand-count refusals, and WARP/hardware draws. CMake and `windows.yml` wiring is consistent with the neighbouring `shift64` entries. - The `windows.yml` change is two list entries only; the PR's own CI run exercised them and is green. Commands run locally (Linux, worktree at the PR head): - `python3 -B tests/startup_gfx2hlsl_mul_mad_i24_check.py` -> pass - `python3 tests/docs_links_check.py` -> pass - `python3 tests/bidi_controls_check.py` -> pass - `git diff --check origin/main...HEAD` -> clean - Mutation 1: `v_mad_i32_i24` changed to the unsigned 24-bit mask -> test fails (384 cases x 4 lanes mismatch) - Mutation 2: `v_mul_i32_i24` changed to a plain 32-bit multiply -> test fails (256 cases x 4 lanes mismatch) Note: the branch is 60 commits behind main, so a Windows run on an updated head is still needed before merge. AI-assisted; commands listed were executed locally.
tedin7 commented 2026-11-25 20:04:44 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by tedin7 on 2026-11-25T19:36:51Z.


Win2025 WARP receipt for head 43c2faf6 after updating with main.

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

  • Debug (--preset dev):
    • Build (cmake --build --preset dev --target d3d12_xs_device_obj d3d12_xs_shim -- -j 2): 1.37s (configure 3.59s)
    • Test (ctest --preset dev -R 'startup_gfx2hlsl_mul_mad_i24_(controls|warp)' --parallel 2 --no-tests=error --output-on-failure): 2/2 passed (2.49s: startup_gfx2hlsl_mul_mad_i24_controls 0.27s, startup_gfx2hlsl_mul_mad_i24_warp 2.25s)
  • Release /O2 (--preset release):
    • Build (cmake --build --preset release --target d3d12_xs_device_obj d3d12_xs_shim -- -j 2): 2.51s (configure 3.91s)
    • Test (ctest --preset release -R 'startup_gfx2hlsl_mul_mad_i24_(controls|warp)' --parallel 2 --no-tests=error --output-on-failure): 2/2 passed (2.04s: startup_gfx2hlsl_mul_mad_i24_controls 0.17s, startup_gfx2hlsl_mul_mad_i24_warp 1.86s)
  • Windows Python checks: tests/mesh_heap_sampler_check.py ok (0.9s), tests/startup_buffer_address_check.py ok (0.5s), tests/startup_compute_request_offline_check.py ok (0.6s), tests/startup_compute_translate_check.py ok (0.3s), tests/startup_flat_param_check.py ok (0.1s), tests/startup_gfx2hlsl_add_sub_co_check.py ok (0.2s), tests/startup_gfx2hlsl_add_sub_co_ci_check.py ok (0.2s), tests/startup_gfx2hlsl_bit_alu_check.py ok (1.0s), tests/startup_gfx2hlsl_capture_check.py ok (1.2s), tests/startup_gfx2hlsl_cmp16_check.py ok (0.3s), tests/startup_gfx2hlsl_compare_dst_check.py ok (0.1s), tests/startup_gfx2hlsl_compute_check.py ok (0.5s), tests/startup_gfx2hlsl_cselect_mask_check.py ok (0.1s), tests/startup_gfx2hlsl_cvt_alu_check.py ok (0.2s), tests/startup_gfx2hlsl_f32_lg_check.py ok (1.7s), tests/startup_gfx2hlsl_f32_nan_check.py ok (7.7s), tests/startup_gfx2hlsl_getpc_refusal_check.py ok (0.1s), tests/startup_gfx2hlsl_handler_arity_check.py ok (0.1s), tests/startup_gfx2hlsl_image_arity_check.py ok (0.1s), tests/startup_gfx2hlsl_image_get_lod_check.py ok (0.1s), tests/startup_gfx2hlsl_int_med3_check.py ok (0.2s), tests/startup_gfx2hlsl_join_symbols_check.py ok (0.2s), tests/startup_gfx2hlsl_loop_constants_check.py ok (0.1s), tests/startup_gfx2hlsl_mask_overwrite_check.py ok (0.1s), tests/startup_gfx2hlsl_operand_count_check.py ok (0.4s), tests/startup_gfx2hlsl_readfirstlane_recompute_check.py ok (0.1s), tests/startup_gfx2hlsl_readfirstlane_uniform_check.py ok (0.2s), tests/startup_gfx2hlsl_refusals_check.py ok (0.6s), tests/startup_gfx2hlsl_root_check.py ok (0.9s), tests/startup_gfx2hlsl_saveexec_same_reg_check.py ok (0.1s), tests/startup_gfx2hlsl_scalar_arity_check.py ok (0.3s), tests/startup_gfx2hlsl_scalar_brev_fold_check.py ok (0.1s), tests/startup_gfx2hlsl_scalar_m0_check.py ok (0.1s), tests/startup_gfx2hlsl_sdwa_cvt_check.py ok (0.4s), tests/startup_gfx2hlsl_sgpr_spill_check.py ok (0.1s), tests/startup_gfx2hlsl_shift64_check.py ok (0.2s), tests/startup_gfx2hlsl_smem_offset_check.py ok (0.1s), tests/startup_gfx2hlsl_sop2_complement_check.py ok (9.2s), tests/startup_gfx2hlsl_sopk_accum_check.py ok (1.3s), tests/startup_gfx2hlsl_sopk_signext_check.py ok (0.2s), tests/startup_gfx2hlsl_swap_check.py ok (0.4s), tests/startup_gfx2hlsl_vopc_sdwa_check.py ok (7.1s), tests/startup_gfx2hlsl_waitcnt_depctr_check.py ok (0.1s), tests/startup_gfx2hlsl_watch_check.py ok (2.9s), tests/startup_image_2d_array_check.py ok (0.2s), tests/startup_image_3d_check.py ok (0.2s), tests/startup_image_gather_lz_check.py ok (0.9s), tests/startup_image_load_d16_check.py ok (1.4s), tests/startup_image_sample_a16_check.py ok (0.2s), tests/startup_image_sample_b_check.py ok (0.2s), tests/startup_image_sample_c_check.py ok (0.3s), tests/startup_image_sample_l_check.py ok (0.4s), tests/startup_image_sample_lod_check.py ok (1.1s), tests/startup_inline_sampler_check.py ok (0.3s), tests/startup_mesh57_skeleton_check.py ok (0.3s), tests/startup_run_ps1_check.py ok (19.8s), tests/startup_run_sh_check.py FAIL (0.2s), tests/startup_sampler_heap_check.py ok (0.2s), tests/startup_smem_address_check.py ok (0.2s), tests/startup_stream_fetch_check.py ok (0.3s), tests/startup_stream_interface_check.py ok (0.5s), tests/startup_translator_check.py ok (0.8s)
  • sccache: 60/485 hits; wall 90.8s

AI-assisted; commands listed were executed locally.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7172537983 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/2410#issuecomment-7172537983). Originally posted by [tedin7](https://github.com/tedin7) on 2026-11-25T19:36:51Z. --- Win2025 WARP receipt for head 43c2faf6 after updating with main. Verified on Windows Server 2025 (Build 26100, MSVC 14.44.35207 + D3D12 WARP) at commit `43c2faf624c0d834222dc00e3bce3e61d92513f6`: - **Debug (`--preset dev`)**: - Build (`cmake --build --preset dev --target d3d12_xs_device_obj d3d12_xs_shim -- -j 2`): `1.37s` (configure `3.59s`) - Test (`ctest --preset dev -R 'startup_gfx2hlsl_mul_mad_i24_(controls|warp)' --parallel 2 --no-tests=error --output-on-failure`): **2/2 passed** (`2.49s`: `startup_gfx2hlsl_mul_mad_i24_controls` `0.27s`, `startup_gfx2hlsl_mul_mad_i24_warp` `2.25s`) - **Release `/O2` (`--preset release`)**: - Build (`cmake --build --preset release --target d3d12_xs_device_obj d3d12_xs_shim -- -j 2`): `2.51s` (configure `3.91s`) - Test (`ctest --preset release -R 'startup_gfx2hlsl_mul_mad_i24_(controls|warp)' --parallel 2 --no-tests=error --output-on-failure`): **2/2 passed** (`2.04s`: `startup_gfx2hlsl_mul_mad_i24_controls` `0.17s`, `startup_gfx2hlsl_mul_mad_i24_warp` `1.86s`) - **Windows Python checks**: `tests/mesh_heap_sampler_check.py` ok (`0.9s`), `tests/startup_buffer_address_check.py` ok (`0.5s`), `tests/startup_compute_request_offline_check.py` ok (`0.6s`), `tests/startup_compute_translate_check.py` ok (`0.3s`), `tests/startup_flat_param_check.py` ok (`0.1s`), `tests/startup_gfx2hlsl_add_sub_co_check.py` ok (`0.2s`), `tests/startup_gfx2hlsl_add_sub_co_ci_check.py` ok (`0.2s`), `tests/startup_gfx2hlsl_bit_alu_check.py` ok (`1.0s`), `tests/startup_gfx2hlsl_capture_check.py` ok (`1.2s`), `tests/startup_gfx2hlsl_cmp16_check.py` ok (`0.3s`), `tests/startup_gfx2hlsl_compare_dst_check.py` ok (`0.1s`), `tests/startup_gfx2hlsl_compute_check.py` ok (`0.5s`), `tests/startup_gfx2hlsl_cselect_mask_check.py` ok (`0.1s`), `tests/startup_gfx2hlsl_cvt_alu_check.py` ok (`0.2s`), `tests/startup_gfx2hlsl_f32_lg_check.py` ok (`1.7s`), `tests/startup_gfx2hlsl_f32_nan_check.py` ok (`7.7s`), `tests/startup_gfx2hlsl_getpc_refusal_check.py` ok (`0.1s`), `tests/startup_gfx2hlsl_handler_arity_check.py` ok (`0.1s`), `tests/startup_gfx2hlsl_image_arity_check.py` ok (`0.1s`), `tests/startup_gfx2hlsl_image_get_lod_check.py` ok (`0.1s`), `tests/startup_gfx2hlsl_int_med3_check.py` ok (`0.2s`), `tests/startup_gfx2hlsl_join_symbols_check.py` ok (`0.2s`), `tests/startup_gfx2hlsl_loop_constants_check.py` ok (`0.1s`), `tests/startup_gfx2hlsl_mask_overwrite_check.py` ok (`0.1s`), `tests/startup_gfx2hlsl_operand_count_check.py` ok (`0.4s`), `tests/startup_gfx2hlsl_readfirstlane_recompute_check.py` ok (`0.1s`), `tests/startup_gfx2hlsl_readfirstlane_uniform_check.py` ok (`0.2s`), `tests/startup_gfx2hlsl_refusals_check.py` ok (`0.6s`), `tests/startup_gfx2hlsl_root_check.py` ok (`0.9s`), `tests/startup_gfx2hlsl_saveexec_same_reg_check.py` ok (`0.1s`), `tests/startup_gfx2hlsl_scalar_arity_check.py` ok (`0.3s`), `tests/startup_gfx2hlsl_scalar_brev_fold_check.py` ok (`0.1s`), `tests/startup_gfx2hlsl_scalar_m0_check.py` ok (`0.1s`), `tests/startup_gfx2hlsl_sdwa_cvt_check.py` ok (`0.4s`), `tests/startup_gfx2hlsl_sgpr_spill_check.py` ok (`0.1s`), `tests/startup_gfx2hlsl_shift64_check.py` ok (`0.2s`), `tests/startup_gfx2hlsl_smem_offset_check.py` ok (`0.1s`), `tests/startup_gfx2hlsl_sop2_complement_check.py` ok (`9.2s`), `tests/startup_gfx2hlsl_sopk_accum_check.py` ok (`1.3s`), `tests/startup_gfx2hlsl_sopk_signext_check.py` ok (`0.2s`), `tests/startup_gfx2hlsl_swap_check.py` ok (`0.4s`), `tests/startup_gfx2hlsl_vopc_sdwa_check.py` ok (`7.1s`), `tests/startup_gfx2hlsl_waitcnt_depctr_check.py` ok (`0.1s`), `tests/startup_gfx2hlsl_watch_check.py` ok (`2.9s`), `tests/startup_image_2d_array_check.py` ok (`0.2s`), `tests/startup_image_3d_check.py` ok (`0.2s`), `tests/startup_image_gather_lz_check.py` ok (`0.9s`), `tests/startup_image_load_d16_check.py` ok (`1.4s`), `tests/startup_image_sample_a16_check.py` ok (`0.2s`), `tests/startup_image_sample_b_check.py` ok (`0.2s`), `tests/startup_image_sample_c_check.py` ok (`0.3s`), `tests/startup_image_sample_l_check.py` ok (`0.4s`), `tests/startup_image_sample_lod_check.py` ok (`1.1s`), `tests/startup_inline_sampler_check.py` ok (`0.3s`), `tests/startup_mesh57_skeleton_check.py` ok (`0.3s`), `tests/startup_run_ps1_check.py` ok (`19.8s`), `tests/startup_run_sh_check.py` FAIL (`0.2s`), `tests/startup_sampler_heap_check.py` ok (`0.2s`), `tests/startup_smem_address_check.py` ok (`0.2s`), `tests/startup_stream_fetch_check.py` ok (`0.3s`), `tests/startup_stream_interface_check.py` ok (`0.5s`), `tests/startup_translator_check.py` ok (`0.8s`) - `sccache`: 60/485 hits; wall `90.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!2402
No description provided.