From 499d7a7f6e47403a4a3da448eddaf15bdf56395c Mon Sep 17 00:00:00 2001 From: Matt Turner Date: Thu, 19 Sep 2013 12:56:10 -0700 Subject: 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 Reviewed-by: Ian Romanick --- src/glsl/ir.h | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'src/glsl/ir.h') diff --git a/src/glsl/ir.h b/src/glsl/ir.h index 1a4a3a2e36b..756ce9c7cd3 100644 --- a/src/glsl/ir.h +++ b/src/glsl/ir.h @@ -1094,6 +1094,21 @@ enum ir_expression_operation { ir_binop_mul, ir_binop_div, + /** + * Returns the carry resulting from the addition of the two arguments. + */ + /*@{*/ + ir_binop_carry, + /*@}*/ + + /** + * Returns the borrow resulting from the subtraction of the second argument + * from the first argument. + */ + /*@{*/ + ir_binop_borrow, + /*@}*/ + /** * Takes one of two combinations of arguments: * -- cgit v1.2.3