shader: lower v_madmk_f32 and v_madak_f32 in direct Compute and Pixel DXIL #3249

Closed
opened 2026-11-28 01:46:00 +00:00 by legacy-code-archaeologist · 0 comments
legacy-code-archaeologist commented 2026-11-28 01:46:00 +00:00 (Migrated from github.com)
Contributor

Imported from R0Y00/Xbox2Windows. Originally posted by legacy-code-archaeologist on 2026-11-28T01:46:00Z.


DirectCompute::float_alu() (src/gfx1013_direct_compute.inl) lowers v_mad_f32, v_mad_legacy_f32, v_mac_f32, and v_mac_legacy_f32, while v_madmk_f32 (VOP2 0x20: S0 * K + S1) and v_madak_f32 (VOP2 0x21: S0 * S1 + K) — already decoded with trailing literal support in src/gfx1013_compute_native.cpp — remain unlowered.

Lowering v_madmk_f32 and v_madak_f32 in the unfused_mad path (with input/product/addend/sum FTZ and separate fmul + fadd with no FMA contraction, matching #3005) finishes unfused f32 multiply-add coverage in both direct Compute and Pixel DXIL (#2935).

Refs #2935
Refs #3005

AI-assisted.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:issue:6657384363 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/issues/3249). Originally posted by [legacy-code-archaeologist](https://github.com/legacy-code-archaeologist) on 2026-11-28T01:46:00Z. --- `DirectCompute::float_alu()` (`src/gfx1013_direct_compute.inl`) lowers `v_mad_f32`, `v_mad_legacy_f32`, `v_mac_f32`, and `v_mac_legacy_f32`, while `v_madmk_f32` (`VOP2 0x20`: `S0 * K + S1`) and `v_madak_f32` (`VOP2 0x21`: `S0 * S1 + K`) — already decoded with trailing literal support in `src/gfx1013_compute_native.cpp` — remain unlowered. Lowering `v_madmk_f32` and `v_madak_f32` in the `unfused_mad` path (with input/product/addend/sum FTZ and separate `fmul` + `fadd` with no FMA contraction, matching #3005) finishes unfused f32 multiply-add coverage in both direct Compute and Pixel DXIL (#2935). Refs #2935 Refs #3005 AI-assisted.
Sign in to join this conversation.
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#3249
No description provided.