aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/compiler/nir/nir_lower_flrp.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/compiler/nir/nir_lower_flrp.c b/src/compiler/nir/nir_lower_flrp.c
index bc5d71db1b0..38be18ecc6b 100644
--- a/src/compiler/nir/nir_lower_flrp.c
+++ b/src/compiler/nir/nir_lower_flrp.c
@@ -84,7 +84,7 @@ replace_with_single_ffma(struct nir_builder *bld, struct u_vector *dead_flrp,
nir_instr_as_alu(neg_c->parent_instr)->exact = alu->exact;
nir_ssa_def *const one_minus_c =
- nir_fadd(bld, nir_imm_float(bld, 1.0f), neg_c);
+ nir_fadd(bld, nir_imm_floatN_t(bld, 1.0f, c->bit_size), neg_c);
nir_instr_as_alu(one_minus_c->parent_instr)->exact = alu->exact;
nir_ssa_def *const b_times_c = nir_fmul(bld, b, c);
@@ -117,7 +117,7 @@ replace_with_strict(struct nir_builder *bld, struct u_vector *dead_flrp,
nir_instr_as_alu(neg_c->parent_instr)->exact = alu->exact;
nir_ssa_def *const one_minus_c =
- nir_fadd(bld, nir_imm_float(bld, 1.0f), neg_c);
+ nir_fadd(bld, nir_imm_floatN_t(bld, 1.0f, c->bit_size), neg_c);
nir_instr_as_alu(one_minus_c->parent_instr)->exact = alu->exact;
nir_ssa_def *const first_product = nir_fmul(bld, a, one_minus_c);