shader: cover the s_pack half masks and the DPP16 src1 neg modifier #578

Manually merged
github merged 1 commit from gh-pr/578/head into gh-pr/578/base 2026-11-26 22:03:18 +00:00
Owner

@⁠Leyukaka on GitHub · 2026-11-22 13:50 UTC · original
Leyukaka:shader-controls → main · +11 −2 · 1 files · 1 commits · merged 2026-11-22 14:13 UTC

Change

This closes three coverage gaps in tools/pixel_aot.py. Each was a one-line mutation of the translator that passed every WARP test on main. Only tests/pixel_aot_check.py changes; the translator does not.

  • check_scalar_pack_draw gains a third word pair, (0x0000ffff, 0xffffffff). It sets every bit of each half that s_pack_ll_b32_b16, s_pack_lh_b32_b16 and s_pack_hh_b32_b16 select, so a mask that drops one bit of the selected low or high half no longer compares equal. The two existing pairs keep their flags (index % 2), and the LL-against-LH control still runs on the first pair only.
  • DPP_BODY gains v_add_f32_dpp v45, v23, -v23 quad_perm:[3,2,1,0], folded into channel 0. v23 is 3.0 in every lane, so the result is 0 and dpp_reference is unchanged; without the src1 negation it is 6. A must-mismatch control removes the modifier, in the same style as the existing src0 control.

Verification

On 8da68ed (branch on d4c7656), Windows 11 build 26300.9974, MSVC 14.44.35207, Python 3.14, WARP and NVIDIA GeForce RTX 5080:

ctest --preset dev --no-tests=error -R '_warp$' -j 4
ctest --preset dev --no-tests=error -j 4

All WARP tests pass, and so does the full suite (275 of 275, including pixel_aot_hardware).

Each mutation was applied to tools/pixel_aot.py one at a time, and all WARP tests were run. On main, all of them passed for each mutation. A control that replaced QuadReadAcrossX with QuadReadAcrossY was caught, so the run does detect a broken translator. On this branch:

Mutation Caught by
s_pack_ll_b32_b16 low mask 0xffff becomes 0xfffd pixel_aot_predicate_rounding_warp
s_pack_lh_b32_b16 high mask 0xffff0000 becomes 0xfffe0000 pixel_aot_predicate_rounding_warp
the DPP16 src1 neg modifier is dropped pixel_aot_warp

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. (No capability changed.)
  • I did not include game files, dumps, distribution links or secrets.

AI-assisted.

**@⁠Leyukaka** on GitHub · 2026-11-22 13:50 UTC · [original](https://github.com/R0Y00/Xbox2Windows/pull/578) `Leyukaka:shader-controls` → `main` · +11 −2 · 1 files · 1 commits · merged 2026-11-22 14:13 UTC ## Change This closes three coverage gaps in `tools/pixel_aot.py`. Each was a one-line mutation of the translator that passed every WARP test on `main`. Only `tests/pixel_aot_check.py` changes; the translator does not. - `check_scalar_pack_draw` gains a third word pair, `(0x0000ffff, 0xffffffff)`. It sets every bit of each half that `s_pack_ll_b32_b16`, `s_pack_lh_b32_b16` and `s_pack_hh_b32_b16` select, so a mask that drops one bit of the selected low or high half no longer compares equal. The two existing pairs keep their flags (`index % 2`), and the LL-against-LH control still runs on the first pair only. - `DPP_BODY` gains `v_add_f32_dpp v45, v23, -v23 quad_perm:[3,2,1,0]`, folded into channel 0. `v23` is 3.0 in every lane, so the result is 0 and `dpp_reference` is unchanged; without the src1 negation it is 6. A must-mismatch control removes the modifier, in the same style as the existing src0 control. ## Verification On `8da68ed` (branch on `d4c7656`), Windows 11 build 26300.9974, MSVC 14.44.35207, Python 3.14, WARP and NVIDIA GeForce RTX 5080: ```text ctest --preset dev --no-tests=error -R '_warp$' -j 4 ctest --preset dev --no-tests=error -j 4 ``` All WARP tests pass, and so does the full suite (275 of 275, including `pixel_aot_hardware`). Each mutation was applied to `tools/pixel_aot.py` one at a time, and all WARP tests were run. On `main`, all of them passed for each mutation. A control that replaced `QuadReadAcrossX` with `QuadReadAcrossY` was caught, so the run does detect a broken translator. On this branch: | Mutation | Caught by | |---|---| | `s_pack_ll_b32_b16` low mask `0xffff` becomes `0xfffd` | `pixel_aot_predicate_rounding_warp` | | `s_pack_lh_b32_b16` high mask `0xffff0000` becomes `0xfffe0000` | `pixel_aot_predicate_rounding_warp` | | the DPP16 src1 `neg` modifier is dropped | `pixel_aot_warp` | ## 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. - [ ] I updated README/docs when a capability or build requirement changed. (No capability changed.) - [x] I did not include game files, dumps, distribution links or secrets. AI-assisted.
A third scalar pack pair, (0x0000ffff, 0xffffffff), sets every bit of each
selected half, so a mask that drops one bit of the low or high half no
longer compares equal. DPP_BODY adds v_add_f32_dpp v45, v23, -v23, which is
zero when src1 is negated and 6 when the modifier is lost, with a
must-mismatch control in the same style as the src0 one. Each covers a
pixel_aot mutation that passed every WARP test before.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 22:03:15 +00:00
github manually merged commit 8da68ed747 into gh-pr/578/base 2026-11-26 22:03:18 +00:00
This discussion has been locked. Commenting is limited to contributors.
No description provided.