test: cover v_min_u32 with DPP quad swaps in the pixel translator #2172

Manually merged
github merged 1 commit from gh-pr/2172/head into gh-pr/2172/base 2026-11-27 00:02:43 +00:00
Owner

@⁠tedin7 on GitHub · 2026-11-25 02:48 UTC · original
tedin7:x2w-2023h-vmin-u32-dpp → main · +39 −14 · 2 files · 1 commits · merged 2026-11-25 03:38 UTC

Part of #2023

What this unblocks: Item H, v_min_u32 with a DPP16 quad swap, now has a pinned lowering with a real WARP readback instead of relying on an untested table entry.

v_min_u32 is already in the integer VOP2 table, and the DPP quad-swap base (#2141/#2143) lowers any table entry through QuadReadAcross{X,Y,Diagonal}. No translator change is needed. This PR adds the missing coverage to the existing startup_gfx2hlsl_dpp_quad_swap suite and its docs paragraph:

  • A third fixture, v_min_u32_dpp vN, v0, v0 for each of the three swaps. The exchanged position is src0; src1 stays the lane's own position (AMD RDNA 2 ISA, "Data-Parallel Primitives"; LLVM 15 quad_perm).
  • The reference is an integer unsigned minimum of neighbour and own position. Positions order by y first, so the result is the neighbour for some pixels and the lane itself for others. A plain exchange or a maximum reads a different image.
  • Controls: translation text (min(QuadReadAcrossX(v0), v0) etc.), decode of the fixture words, the missing s_wqm refusal, and llvm-mc reassembly of the fixture to the same words.
  • Draw mutations: wrong exchanges, no exchange, min replaced by max, and references with one swap dropped.

Still refused (unchanged): DPP8, row shifts, mirrors, partial masks, broadcasts, source modifiers and non-whole-quad EXEC.

Verification (Linux, executed locally):

  • git diff --check origin/main...HEAD: clean
  • tests/startup_gfx2hlsl_dpp_quad_swap_check.py: PASS
  • tests/startup_gfx2hlsl_dpp_quad_swap_check.py binary llvm-mc-19: PASS (min fixture reassembles to the same words)
  • tests/docs_links_check.py, tests/bidi_controls_check.py, tests/startup_gfx2hlsl_operand_count_check.py, tests/startup_translator_check.py, tests/startup_gfx2hlsl_refusals_check.py: PASS

Win2025 WARP (Windows Server 2025 build 26100, MSVC 14.44.35207, D3D12 WARP, head 70ae4f7a, executed locally):

  • ctest --preset dev -R <regex below> --no-tests=error --output-on-failure: 2/2 passed (controls 0.26s, warp 2.22s)
  • ctest --preset release with the same regex, after a fresh release build of offscreen_check: 2/2 passed (controls 0.33s, warp 2.15s)
  • No skips. The hardware variant is not run (the VM has WARP only).
    ctest regex: ^(startup_gfx2hlsl_dpp_quad_swap_controls|startup_gfx2hlsl_dpp_quad_swap_warp)$

AI-assisted; commands listed were executed locally.

**@⁠tedin7** on GitHub · 2026-11-25 02:48 UTC · [original](https://github.com/R0Y00/Xbox2Windows/pull/2172) `tedin7:x2w-2023h-vmin-u32-dpp` → `main` · +39 −14 · 2 files · 1 commits · merged 2026-11-25 03:38 UTC Part of #2023 What this unblocks: Item H, `v_min_u32` with a DPP16 quad swap, now has a pinned lowering with a real WARP readback instead of relying on an untested table entry. `v_min_u32` is already in the integer VOP2 table, and the DPP quad-swap base (#2141/#2143) lowers any table entry through `QuadReadAcross{X,Y,Diagonal}`. No translator change is needed. This PR adds the missing coverage to the existing `startup_gfx2hlsl_dpp_quad_swap` suite and its docs paragraph: - A third fixture, `v_min_u32_dpp vN, v0, v0` for each of the three swaps. The exchanged position is `src0`; `src1` stays the lane's own position (AMD RDNA 2 ISA, "Data-Parallel Primitives"; LLVM 15 `quad_perm`). - The reference is an integer unsigned minimum of neighbour and own position. Positions order by `y` first, so the result is the neighbour for some pixels and the lane itself for others. A plain exchange or a maximum reads a different image. - Controls: translation text (`min(QuadReadAcrossX(v0), v0)` etc.), decode of the fixture words, the missing `s_wqm` refusal, and llvm-mc reassembly of the fixture to the same words. - Draw mutations: wrong exchanges, no exchange, `min` replaced by `max`, and references with one swap dropped. Still refused (unchanged): DPP8, row shifts, mirrors, partial masks, broadcasts, source modifiers and non-whole-quad EXEC. Verification (Linux, executed locally): - `git diff --check origin/main...HEAD`: clean - `tests/startup_gfx2hlsl_dpp_quad_swap_check.py`: PASS - `tests/startup_gfx2hlsl_dpp_quad_swap_check.py binary llvm-mc-19`: PASS (min fixture reassembles to the same words) - `tests/docs_links_check.py`, `tests/bidi_controls_check.py`, `tests/startup_gfx2hlsl_operand_count_check.py`, `tests/startup_translator_check.py`, `tests/startup_gfx2hlsl_refusals_check.py`: PASS Win2025 WARP (Windows Server 2025 build 26100, MSVC 14.44.35207, D3D12 WARP, head 70ae4f7a, executed locally): - `ctest --preset dev -R <regex below> --no-tests=error --output-on-failure`: 2/2 passed (controls 0.26s, warp 2.22s) - `ctest --preset release` with the same regex, after a fresh release build of `offscreen_check`: 2/2 passed (controls 0.33s, warp 2.15s) - No skips. The hardware variant is not run (the VM has WARP only). ctest regex: `^(startup_gfx2hlsl_dpp_quad_swap_controls|startup_gfx2hlsl_dpp_quad_swap_warp)$` AI-assisted; commands listed were executed locally.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-27 00:02:41 +00:00
github manually merged commit 70ae4f7a86 into gh-pr/2172/base 2026-11-27 00:02:43 +00:00
Author
Owner

@⁠tedin7 on GitHub · 2026-11-25 03:05 UTC · original

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

  • Build (cmake --build --preset dev --target offscreen_check -- -j 4): 1.03s
  • Test (ctest --preset dev -R '^(startup_gfx2hlsl_dpp_quad_swap_controls|startup_gfx2hlsl_dpp_quad_swap_warp)$' --parallel 3 --no-tests=error --output-on-failure): 2/2 passed (startup_gfx2hlsl_dpp_quad_swap_controls 0.28s, startup_gfx2hlsl_dpp_quad_swap_warp 2.42s)

The WARP draw includes the new v_min_u32_dpp program (DXC vs_6_0/ps_6_0, 16 x 16 pixels against the integer reference) and its mutations, including min replaced by max. Hardware variant not run (VM has WARP only).

AI-assisted; commands listed were executed locally.

**@⁠tedin7** on GitHub · 2026-11-25 03:05 UTC · [original](https://github.com/R0Y00/Xbox2Windows/pull/2172#issuecomment-7151581550) Verified on Windows Server 2025 (Build 26100, MSVC 14.44.35207 + D3D12 WARP) at commit `70ae4f7a866a9d372956fb33b699a69fabc76cd3`: - Build (`cmake --build --preset dev --target offscreen_check -- -j 4`): 1.03s - Test (`ctest --preset dev -R '^(startup_gfx2hlsl_dpp_quad_swap_controls|startup_gfx2hlsl_dpp_quad_swap_warp)$' --parallel 3 --no-tests=error --output-on-failure`): 2/2 passed (`startup_gfx2hlsl_dpp_quad_swap_controls` 0.28s, `startup_gfx2hlsl_dpp_quad_swap_warp` 2.42s) The WARP draw includes the new `v_min_u32_dpp` program (DXC vs_6_0/ps_6_0, 16 x 16 pixels against the integer reference) and its mutations, including `min` replaced by `max`. Hardware variant not run (VM has WARP only). AI-assisted; commands listed were executed locally.
Author
Owner

@⁠chatgpt-codex-connector[bot] on GitHub · 2026-11-25 03:12 UTC · original · edited 2026-11-25 03:14 UTC

Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-25T03:14:40.140670Z 70ae4f7 Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@⁠codex review" or "@⁠codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

**@⁠chatgpt-codex-connector[bot]** on GitHub · 2026-11-25 03:12 UTC · [original](https://github.com/R0Y00/Xbox2Windows/pull/2172#issuecomment-7151692866) · edited 2026-11-25 03:14 UTC <!-- codex-pull-request-review-summary --> <!-- codex-review-state:v1 {"code_review":{"commit_sha":"70ae4f7a866a9d372956fb33b699a69fabc76cd3","has_any_findings":false,"has_unresolved_findings":false,"status":"completed"},"security_review":{"commit_sha":null,"has_any_findings":null,"has_unresolved_findings":null,"status":null}} --> <details> <summary><strong>Codex Review Summary</strong>: ✅ Completed</summary> This comment shows the latest Codex review activity on this pull request. | Review | Status | Commit | Review trigger | | --- | --- | --- | --- | | 📝 **Code Review** | ✅ **Completed** <relative-time datetime="2026-11-25T03:14:40.140670Z">2026-11-25T03:14:40.140670Z</relative-time> | `70ae4f7` | Draft marked ready | <details> <summary>ℹ️ About Codex in GitHub</summary> <br/> [Your team has set up Codex to review pull requests in this repo](https://chatgpt.com/codex/cloud/settings/general). Reviews are triggered when you - Open a pull request for review - Mark a draft as ready - Comment "@⁠codex review" or "@⁠codex security review". Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. </details> </details>
This discussion has been locked. Commenting is limited to contributors.
No description provided.