shader: refuse DPP spellings of VOP3-only ALU ops in pixel_aot #794

Merged
JB2WIN merged 1 commit from upstream-pr/800 into main 2026-11-23 06:07:39 +00:00
JB2WIN commented 2026-11-23 05:40:07 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by JB2WIN on 2026-11-23T05:40:07Z.


Change

DPP_ALU was built from every ALU entry except fma. That let the VOP3-only ops mad, mad_legacy, min3, max3 and med3 reach the DPP branch of lower(). For example, v_mad_f32_dpp v23, v20, v20, v20 quad_perm:[3,2,1,0] row_mask:0xf bank_mask:0xf crashed with IndexError: Replacement index 1 out of range at the DPP_ALU[...].format(...) call instead of being refused. LLVM 15 has no DPP form for any of them: llvm-mc for gfx1013 reports "dpp variant of this instruction is not supported" for all five, and for fma. The scanner already rejected them.

This change excludes these ops from DPP_ALU, so the line now falls through to the normal Unsupported instruction refusal. A control in check_controls covers all five. v_mac_f32_dpp, which LLVM does accept, keeps its existing behaviour: it is refused as "Invalid DPP operand count".

AI-assisted (Claude Code).

Verification

On Windows 11 10.0.26200.9974, NVIDIA GeForce RTX 3080 (driver 32.0.16.2124) and WARP, at 16b433c.

  • Dev-time check (not committed): without the change, the new control fails.
  • Checks that pass:
    • the controls;
    • form_coverage_check.py, rdna2_tools_check.py, pso_readiness_check.py and docs_links_check.py;
    • the LLVM 15 binary round trip;
    • pixel_aot_hardware.
  • Full ctest --preset dev --no-tests=error -j4: 364 of 367 passed. The three failures were timeouts in compute_store_aot_hardware, pixel_aot_predicate_rounding_hardware and pixel_aot_blend_scalar_hardware. During that run a second worktree was doing a full build on the same machine. Rerun alone, pixel_aot_blend_scalar_hardware passed in 51.7 s. The other two time out alone as well. They time out the same way on plain main on this RTX 3080, as reported in #448, and this change does not touch their modes.

🤖 Generated with Claude Code

<!-- greyfinch-sync:R0Y00/Xbox2Windows:issue:6553062375 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/800). Originally posted by [JB2WIN](https://github.com/JB2WIN) on 2026-11-23T05:40:07Z. --- ## Change `DPP_ALU` was built from every `ALU` entry except `fma`. That let the VOP3-only ops `mad`, `mad_legacy`, `min3`, `max3` and `med3` reach the DPP branch of `lower()`. For example, `v_mad_f32_dpp v23, v20, v20, v20 quad_perm:[3,2,1,0] row_mask:0xf bank_mask:0xf` crashed with `IndexError: Replacement index 1 out of range` at the `DPP_ALU[...].format(...)` call instead of being refused. LLVM 15 has no DPP form for any of them: llvm-mc for gfx1013 reports "dpp variant of this instruction is not supported" for all five, and for `fma`. The scanner already rejected them. This change excludes these ops from `DPP_ALU`, so the line now falls through to the normal `Unsupported instruction` refusal. A control in `check_controls` covers all five. `v_mac_f32_dpp`, which LLVM does accept, keeps its existing behaviour: it is refused as "Invalid DPP operand count". AI-assisted (Claude Code). ## Verification On Windows 11 10.0.26200.9974, NVIDIA GeForce RTX 3080 (driver 32.0.16.2124) and WARP, at `16b433c`. - **Dev-time check (not committed):** without the change, the new control fails. - **Checks that pass:** - the controls; - `form_coverage_check.py`, `rdna2_tools_check.py`, `pso_readiness_check.py` and `docs_links_check.py`; - the LLVM 15 binary round trip; - `pixel_aot_hardware`. - **Full `ctest --preset dev --no-tests=error -j4`:** 364 of 367 passed. The three failures were timeouts in `compute_store_aot_hardware`, `pixel_aot_predicate_rounding_hardware` and `pixel_aot_blend_scalar_hardware`. During that run a second worktree was doing a full build on the same machine. Rerun alone, `pixel_aot_blend_scalar_hardware` passed in 51.7 s. The other two time out alone as well. They time out the same way on plain `main` on this RTX 3080, as reported in #448, and this change does not touch their modes. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
upstream-sync closed this pull request 2026-11-24 06:44:50 +00:00
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!794
No description provided.