glsl: Add i2b() and b2i() to ir_builder.
authorMatt Turner <mattst88@gmail.com>
Wed, 7 Aug 2013 20:00:48 +0000 (13:00 -0700)
committerMatt Turner <mattst88@gmail.com>
Thu, 15 Aug 2013 00:15:06 +0000 (17:15 -0700)
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Chad Versace <chad.versace@linux.intel.com>
src/glsl/ir_builder.cpp
src/glsl/ir_builder.h

index b47d131cfe19476b7e6fe980c44f561a8239a702..7d9cf5e4725d78d3e12f40f2784c78a6a5a7289b 100644 (file)
@@ -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)
index 267b673d95e01f4df8f27703f1678ef0e49b4cf6..7049476a1cf823d0089e8bbabd624c6db4c53bb6 100644 (file)
@@ -162,6 +162,8 @@ ir_expression *u2f(operand a);
 ir_expression *bitcast_u2f(operand a);
 ir_expression *i2u(operand a);
 ir_expression *u2i(operand a);
+ir_expression *b2i(operand a);
+ir_expression *i2b(operand a);
 
 /**
  * Swizzle away later components, but preserve the ordering.