pixel_aot: lower v_madak_f32 and v_madmk_f32 #590

Closed
opened 2026-11-26 22:04:11 +00:00 by github-bot · 0 comments
Owner

@⁠JB2WIN on GitHub · 2026-11-22 14:29 UTC · original

tools/pixel_aot.py lowers the fused literal forms v_fmaak_f32 / v_fmamk_f32 (with fma), but the non-fused VOP2 literal forms v_madak_f32 (S0·S1 + K) and v_madmk_f32 (S0·K + S1) are still rejected. #274 noted them as not covered. Both appear in docs/coverage/gfx1013.tsv.

I'm taking this, unless someone already has it in progress. Plan:

  • Lower both next to the fmaak/fmamk branch, with the same operand rules (K must be a 32-bit hex literal in the documented position, entry mask, no write over an outstanding sample).
  • Use the existing non-fused mad32 helper that v_mad_f32 / v_mac_f32 already use (ALU table "mad"), so they get the same multiply-then-add rounding and denormal handling.
  • Add static checks and draws mirroring the fmaak/fmamk fixtures, including a row where fused and non-fused results differ, so that a lowering through fma gives pixel_mismatch.
  • Add rejection rows for a register in the K position and for e64/DPP/SDWA spellings.
  • Extend the LLVM 15 round-trip fixture, the scanner and the docs.

AI-assisted.

**@⁠JB2WIN** on GitHub · 2026-11-22 14:29 UTC · [original](https://github.com/R0Y00/Xbox2Windows/issues/590) `tools/pixel_aot.py` lowers the fused literal forms `v_fmaak_f32` / `v_fmamk_f32` (with `fma`), but the non-fused VOP2 literal forms `v_madak_f32` (S0·S1 + K) and `v_madmk_f32` (S0·K + S1) are still rejected. #274 noted them as not covered. Both appear in `docs/coverage/gfx1013.tsv`. I'm taking this, unless someone already has it in progress. Plan: - Lower both next to the fmaak/fmamk branch, with the same operand rules (K must be a 32-bit hex literal in the documented position, entry mask, no write over an outstanding sample). - Use the existing non-fused `mad32` helper that `v_mad_f32` / `v_mac_f32` already use (ALU table `"mad"`), so they get the same multiply-then-add rounding and denormal handling. - Add static checks and draws mirroring the fmaak/fmamk fixtures, including a row where fused and non-fused results differ, so that a lowering through `fma` gives `pixel_mismatch`. - Add rejection rows for a register in the K position and for e64/DPP/SDWA spellings. - Extend the LLVM 15 round-trip fixture, the scanner and the docs. AI-assisted.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 22:04:11 +00:00
This discussion has been locked. Commenting is limited to contributors.
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.

Dependencies

No dependencies set

Reference
github/R0Y00--Xbox2Windows#590
No description provided.