glsl: Add trunc() to ir_builder.
authorMatt Turner <mattst88@gmail.com>
Fri, 30 Jan 2015 21:50:28 +0000 (13:50 -0800)
committerMatt Turner <mattst88@gmail.com>
Wed, 11 Feb 2015 21:50:19 +0000 (13:50 -0800)
src/glsl/ir_builder.cpp
src/glsl/ir_builder.h

index a2f6f29..2872c51 100644 (file)
@@ -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);
index 573596c..514275e 100644 (file)
@@ -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);