diff options
Diffstat (limited to 'src/mesa')
-rw-r--r-- | src/mesa/program/prog_to_nir.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/mesa/program/prog_to_nir.c b/src/mesa/program/prog_to_nir.c index a5ac37af908..84ba708d0be 100644 --- a/src/mesa/program/prog_to_nir.c +++ b/src/mesa/program/prog_to_nir.c @@ -456,7 +456,10 @@ ptn_lrp(nir_builder *b, nir_alu_dest dest, nir_ssa_def **src) static void ptn_kil(nir_builder *b, nir_ssa_def **src) { + /* flt must be exact, because NaN shouldn't discard. (apps rely on this) */ + b->exact = true; nir_ssa_def *cmp = nir_bany(b, nir_flt(b, src[0], nir_imm_float(b, 0.0))); + b->exact = false; nir_intrinsic_instr *discard = nir_intrinsic_instr_create(b->shader, nir_intrinsic_discard_if); |