ntt: use ffma_weak

It used the TGSI MAD opcode to implement the old ffma, but this one let's
the driver choose to implement it as unfused or fused, so ffma_weak is a
better git over ffma or fmad.

Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41165>
This commit is contained in:
Karol Herbst 2026-04-23 16:03:37 +02:00 committed by Marge Bot
parent 688e5cda94
commit 2a6633a8ba

View file

@ -1570,6 +1570,9 @@ ntt_emit_alu(struct ntt_compile *c, nir_alu_instr *instr)
[nir_op_fmax] = { TGSI_OPCODE_MAX, TGSI_OPCODE_DMAX },
[nir_op_imax] = { TGSI_OPCODE_IMAX, TGSI_OPCODE_I64MAX },
[nir_op_umax] = { TGSI_OPCODE_UMAX, TGSI_OPCODE_U64MAX },
/* This is fine as long as drivers implement TGSI MAD as fmad */
[nir_op_fmad] = { TGSI_OPCODE_MAD, TGSI_OPCODE_DMAD },
[nir_op_ffma_weak] = { TGSI_OPCODE_MAD, TGSI_OPCODE_DMAD },
[nir_op_ffma_old] = { TGSI_OPCODE_MAD, TGSI_OPCODE_DMAD },
[nir_op_ldexp] = { TGSI_OPCODE_LDEXP, 0 },
};