diff --git a/src/intel/compiler/brw/brw_compiler.c b/src/intel/compiler/brw/brw_compiler.c index 29f79a0a45f..e15fbaa737b 100644 --- a/src/intel/compiler/brw/brw_compiler.c +++ b/src/intel/compiler/brw/brw_compiler.c @@ -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, diff --git a/src/intel/compiler/brw/brw_from_nir.cpp b/src/intel/compiler/brw/brw_from_nir.cpp index 341b1027ea0..e237c56487f 100644 --- a/src/intel/compiler/brw/brw_from_nir.cpp +++ b/src/intel/compiler/brw/brw_from_nir.cpp @@ -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 = diff --git a/src/intel/compiler/intel_nir_opt_peephole_ffma.c b/src/intel/compiler/intel_nir_opt_peephole_ffma.c index 6a13a863501..82419958cf3 100644 --- a/src/intel/compiler/intel_nir_opt_peephole_ffma.c +++ b/src/intel/compiler/intel_nir_opt_peephole_ffma.c @@ -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++) {