summaryrefslogtreecommitdiffstats
path: root/src/glsl/ir.h
diff options
context:
space:
mode:
authorMatt Turner <[email protected]>2013-09-19 12:56:10 -0700
committerMatt Turner <[email protected]>2013-10-07 10:41:16 -0700
commit499d7a7f6e47403a4a3da448eddaf15bdf56395c (patch)
tree2fa4bb92dd8d52622ead91fb7c2880c069cc7144 /src/glsl/ir.h
parentae514416b20e0117d58822253069f594b4a3ee57 (diff)
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 <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
Diffstat (limited to 'src/glsl/ir.h')
-rw-r--r--src/glsl/ir.h15
1 files changed, 15 insertions, 0 deletions
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
@@ -1095,6 +1095,21 @@ enum ir_expression_operation {
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:
*
* - mod(vecN, vecN)