summaryrefslogtreecommitdiffstats
path: root/src/glsl/ir_builder.cpp
diff options
context:
space:
mode:
authorMatt Turner <[email protected]>2013-08-07 13:00:48 -0700
committerMatt Turner <[email protected]>2013-08-14 17:15:06 -0700
commit57a6bcd56b956e7ff8aaed88e08bee9fd59dbd88 (patch)
tree55fab05a031e19b416e18335f67cc9db523c9073 /src/glsl/ir_builder.cpp
parent1cf76c72da37166dd75009ceea212bfa18626b2f (diff)
glsl: Add i2b() and b2i() to ir_builder.
Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Chad Versace <[email protected]>
Diffstat (limited to 'src/glsl/ir_builder.cpp')
-rw-r--r--src/glsl/ir_builder.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/glsl/ir_builder.cpp b/src/glsl/ir_builder.cpp
index b47d131cfe1..7d9cf5e4725 100644
--- a/src/glsl/ir_builder.cpp
+++ b/src/glsl/ir_builder.cpp
@@ -369,6 +369,18 @@ 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)