diff options
Diffstat (limited to 'src/compiler/nir/nir_lower_flrp.c')
-rw-r--r-- | src/compiler/nir/nir_lower_flrp.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/src/compiler/nir/nir_lower_flrp.c b/src/compiler/nir/nir_lower_flrp.c index 3b4d23bae11..d9c45877dd0 100644 --- a/src/compiler/nir/nir_lower_flrp.c +++ b/src/compiler/nir/nir_lower_flrp.c @@ -366,7 +366,17 @@ convert_flrp_instruction(nir_builder *bld, nir_alu_instr *alu, bool always_precise) { - bool have_ffma = !bld->shader->options->lower_ffma; + bool have_ffma = false; + unsigned bit_size = nir_dest_bit_size(alu->dest.dest); + + if (bit_size == 16) + have_ffma = !bld->shader->options->lower_ffma16; + else if (bit_size == 32) + have_ffma = !bld->shader->options->lower_ffma32; + else if (bit_size == 64) + have_ffma = !bld->shader->options->lower_ffma64; + else + unreachable("invalid bit_size"); bld->cursor = nir_before_instr(&alu->instr); |