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:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user