aboutsummaryrefslogtreecommitdiffstats
path: root/src/glsl/ir_builder.cpp
diff options
context:
space:
mode:
authorMatt Turner <[email protected]>2015-01-30 13:50:28 -0800
committerMatt Turner <[email protected]>2015-02-11 13:50:19 -0800
commita5455ab1cae85dbe40c12ada9030bc4b4537ced7 (patch)
tree3ef71e67d0927d92ed277371778ab50c6fbdbf11 /src/glsl/ir_builder.cpp
parentd91390634ff8c50b217d55372db186d03996e9f7 (diff)
glsl: Add trunc() to ir_builder.
Diffstat (limited to 'src/glsl/ir_builder.cpp')
-rw-r--r--src/glsl/ir_builder.cpp5
1 files changed, 5 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);