summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/glsl/ir_builder.cpp5
-rw-r--r--src/glsl/ir_builder.h1
2 files changed, 6 insertions, 0 deletions
diff --git a/src/glsl/ir_builder.cpp b/src/glsl/ir_builder.cpp
index a2f6f2967d1..2872c516b14 100644
--- a/src/glsl/ir_builder.cpp
+++ b/src/glsl/ir_builder.cpp
@@ -246,6 +246,11 @@ ir_expression *borrow(operand a, operand b)
return expr(ir_binop_borrow, a, b);
}
+ir_expression *trunc(operand a)
+{
+ return expr(ir_unop_trunc, a);
+}
+
ir_expression *round_even(operand a)
{
return expr(ir_unop_round_even, a);
diff --git a/src/glsl/ir_builder.h b/src/glsl/ir_builder.h
index 573596cf135..514275e2857 100644
--- a/src/glsl/ir_builder.h
+++ b/src/glsl/ir_builder.h
@@ -137,6 +137,7 @@ ir_expression *imul_high(operand a, operand b);
ir_expression *div(operand a, operand b);
ir_expression *carry(operand a, operand b);
ir_expression *borrow(operand a, operand b);
+ir_expression *trunc(operand a);
ir_expression *round_even(operand a);
ir_expression *dot(operand a, operand b);
ir_expression *clamp(operand a, operand b, operand c);