glsl: Add i2b() and b2i() to ir_builder.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Chad Versace <chad.versace@linux.intel.com>
This commit is contained in:
Matt Turner 2013-08-07 13:00:48 -07:00
parent 1cf76c72da
commit 57a6bcd56b
2 changed files with 14 additions and 0 deletions

View 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)

View 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.