glsl: Add ir_binop_carry and ir_binop_borrow.

Calculates the carry out of the addition of two values and the
borrow from subtraction respectively. Will be used in uaddCarry() and
usubBorrow() built-in implementations.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
This commit is contained in:
Matt Turner
2013-09-19 12:56:10 -07:00
parent ae514416b2
commit 499d7a7f6e
7 changed files with 42 additions and 0 deletions
+10
View File
@@ -221,6 +221,16 @@ ir_expression *div(operand a, operand b)
return expr(ir_binop_div, a, b);
}
ir_expression *carry(operand a, operand b)
{
return expr(ir_binop_carry, a, b);
}
ir_expression *borrow(operand a, operand b)
{
return expr(ir_binop_borrow, a, b);
}
ir_expression *round_even(operand a)
{
return expr(ir_unop_round_even, a);