intel/brw: port over to nir_op_ffma

Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
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-20 17:13:33 +02:00 committed by Marge Bot
parent 6208a590cb
commit a9206a271a
3 changed files with 4 additions and 1 deletions

View file

@ -29,6 +29,8 @@ const struct nir_shader_compiler_options brw_scalar_nir_options = {
.has_pack_32_4x8 = true,
.has_uclz = true,
.has_pixel_coord = true,
.float_mul_add16 = nir_float_muladd_support_has_ffma,
.float_mul_add32 = nir_float_muladd_support_has_ffma,
.lower_base_vertex = true,
.lower_bitfield_extract = true,
.lower_bitfield_extract8 = true,

View file

@ -1646,6 +1646,7 @@ brw_from_nir_emit_alu(nir_to_brw_state &ntb, nir_alu_instr *instr,
inst->saturate = true;
break;
case nir_op_ffma:
case nir_op_ffma_old:
if (nir_has_any_rounding_mode_enabled(execution_mode)) {
brw_rnd_mode rnd =

View file

@ -201,7 +201,7 @@ intel_nir_opt_peephole_ffma_instr(nir_builder *b,
if (negate)
mul_src[0] = nir_fneg(b, mul_src[0]);
nir_alu_instr *ffma = nir_alu_instr_create(b->shader, nir_op_ffma_old);
nir_alu_instr *ffma = nir_alu_instr_create(b->shader, nir_op_ffma);
ffma->fp_math_ctrl = b->fp_math_ctrl;
for (unsigned i = 0; i < 2; i++) {