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

Merged
tedin7 merged 1 commit from upstream-pr/2172 into main 2026-11-25 03:38:55 +00:00
tedin7 commented 2026-11-25 02:48:39 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by tedin7 on 2026-11-25T02:48:39Z.


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.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:issue:6596050368 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/2172). Originally posted by [tedin7](https://github.com/tedin7) on 2026-11-25T02:48:39Z. --- 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.
upstream-sync closed this pull request 2026-11-25 04:04:05 +00:00
tedin7 commented 2026-11-25 04:04:17 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by tedin7 on 2026-11-25T03:05:34Z.


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.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7151581550 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/2172#issuecomment-7151581550). Originally posted by [tedin7](https://github.com/tedin7) on 2026-11-25T03:05:34Z. --- 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.
chatgpt-codex-connector[bot commented 2026-11-25 04:04:18 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by chatgpt-codex-connector[bot] on 2026-11-25T03:12:23Z.


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.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7151692866 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/2172#issuecomment-7151692866). Originally posted by [chatgpt-codex-connector[bot]](https://github.com/chatgpt-codex-connector%5Bbot%5D) on 2026-11-25T03:12:23Z. --- <!-- 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>
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!2164
No description provided.