aboutsummaryrefslogtreecommitdiff
path: root/mesalib/src/glsl/ir_builder.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'mesalib/src/glsl/ir_builder.cpp')
-rw-r--r--mesalib/src/glsl/ir_builder.cpp6
1 files changed, 1 insertions, 5 deletions
diff --git a/mesalib/src/glsl/ir_builder.cpp b/mesalib/src/glsl/ir_builder.cpp
index f03941443..a2f6f2967 100644
--- a/mesalib/src/glsl/ir_builder.cpp
+++ b/mesalib/src/glsl/ir_builder.cpp
@@ -271,11 +271,7 @@ clamp(operand a, operand b, operand c)
ir_expression *
saturate(operand a)
{
- void *mem_ctx = ralloc_parent(a.val);
-
- return expr(ir_binop_max,
- expr(ir_binop_min, a, new(mem_ctx) ir_constant(1.0f)),
- new(mem_ctx) ir_constant(0.0f));
+ return expr(ir_unop_saturate, a);
}
ir_expression *