From c0df85cca4da06e3d27bfdee3d3d6bd84d432d2a Mon Sep 17 00:00:00 2001 From: Jason Ekstrand Date: Tue, 3 Feb 2015 12:41:36 -0800 Subject: [PATCH] nir/lower_source_mods: Don't lower saturate for non-float outputs Reviewed-by: Connor Abbott --- src/glsl/nir/nir_lower_to_source_mods.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/glsl/nir/nir_lower_to_source_mods.c b/src/glsl/nir/nir_lower_to_source_mods.c index c3f39bcd19f..d6bf77f17c1 100644 --- a/src/glsl/nir/nir_lower_to_source_mods.c +++ b/src/glsl/nir/nir_lower_to_source_mods.c @@ -120,6 +120,10 @@ nir_lower_to_source_mods_block(nir_block *block, void *state) if (!alu->dest.dest.is_ssa) continue; + /* We can only saturate float destinations */ + if (nir_op_infos[alu->op].output_type != nir_type_float) + continue; + if (alu->dest.dest.ssa.if_uses->entries != 0) continue; -- 2.30.2