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.cpp48
1 files changed, 48 insertions, 0 deletions
diff --git a/mesalib/src/glsl/ir_builder.cpp b/mesalib/src/glsl/ir_builder.cpp
index 8fb30a02a..7d9cf5e47 100644
--- a/mesalib/src/glsl/ir_builder.cpp
+++ b/mesalib/src/glsl/ir_builder.cpp
@@ -219,6 +219,12 @@ saturate(operand a)
new(mem_ctx) ir_constant(0.0f));
}
+ir_expression *
+abs(operand a)
+{
+ return expr(ir_unop_abs, a);
+}
+
ir_expression*
equal(operand a, operand b)
{
@@ -226,6 +232,12 @@ equal(operand a, operand b)
}
ir_expression*
+nequal(operand a, operand b)
+{
+ return expr(ir_binop_nequal, a, b);
+}
+
+ir_expression*
less(operand a, operand b)
{
return expr(ir_binop_less, a, b);
@@ -304,12 +316,24 @@ f2i(operand a)
}
ir_expression*
+bitcast_f2i(operand a)
+{
+ return expr(ir_unop_bitcast_f2i, a);
+}
+
+ir_expression*
i2f(operand a)
{
return expr(ir_unop_i2f, a);
}
ir_expression*
+bitcast_i2f(operand a)
+{
+ return expr(ir_unop_bitcast_i2f, a);
+}
+
+ir_expression*
i2u(operand a)
{
return expr(ir_unop_i2u, a);
@@ -328,11 +352,35 @@ f2u(operand a)
}
ir_expression*
+bitcast_f2u(operand a)
+{
+ return expr(ir_unop_bitcast_f2u, a);
+}
+
+ir_expression*
u2f(operand a)
{
return expr(ir_unop_u2f, a);
}
+ir_expression*
+bitcast_u2f(operand a)
+{
+ return expr(ir_unop_bitcast_u2f, a);
+}
+
+ir_expression*
+i2b(operand a)
+{
+ return expr(ir_unop_i2b, a);
+}
+
+ir_expression*
+b2i(operand a)
+{
+ return expr(ir_unop_b2i, a);
+}
+
ir_if*
if_tree(operand condition,
ir_instruction *then_branch)