[Mesa-dev] [PATCH 1/2] nir/lower_source_mods: Don't lower saturate for non-float outputs
Jason Ekstrand
jason at jlekstrand.net
Tue Feb 3 12:43:58 PST 2015
---
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 c3f39bc..d6bf77f 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.2.2
More information about the mesa-dev
mailing list