[Mesa-dev] [PATCH 030/133] nir/glsl: Add support for saturate
Jason Ekstrand
jason at jlekstrand.net
Mon Dec 15 22:04:40 PST 2014
---
src/glsl/nir/glsl_to_nir.cpp | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/src/glsl/nir/glsl_to_nir.cpp b/src/glsl/nir/glsl_to_nir.cpp
index c4dff0d..60a24bc 100644
--- a/src/glsl/nir/glsl_to_nir.cpp
+++ b/src/glsl/nir/glsl_to_nir.cpp
@@ -1012,6 +1012,11 @@ nir_visitor::visit(ir_expression *ir)
dest_size, srcs);
instr->src[0].abs = true;
break;
+ case ir_unop_saturate:
+ assert(types[0] == GLSL_TYPE_FLOAT);
+ instr = emit(nir_op_fmov, dest_size, srcs);
+ instr->dest.saturate = true;
+ break;
case ir_unop_sign:
emit(types[0] == GLSL_TYPE_FLOAT ? nir_op_fsign : nir_op_isign,
dest_size, srcs);
--
2.2.0
More information about the mesa-dev
mailing list