From: Jason Ekstrand Date: Tue, 3 Feb 2015 20:41:36 +0000 (-0800) Subject: nir/lower_source_mods: Don't lower saturate for non-float outputs X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=c0df85cca4da06e3d27bfdee3d3d6bd84d432d2a;p=mesa.git nir/lower_source_mods: Don't lower saturate for non-float outputs Reviewed-by: Connor Abbott --- 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;