diff options
author | Matt Turner <mattst88@gmail.com> | 2013-09-19 12:56:10 -0700 |
---|---|---|
committer | Matt Turner <mattst88@gmail.com> | 2013-10-07 10:41:16 -0700 |
commit | 499d7a7f6e47403a4a3da448eddaf15bdf56395c (patch) | |
tree | 2fa4bb92dd8d52622ead91fb7c2880c069cc7144 /src/glsl/ir_builder.cpp | |
parent | ae514416b20e0117d58822253069f594b4a3ee57 (diff) | |
download | external_mesa3d-499d7a7f6e47403a4a3da448eddaf15bdf56395c.zip external_mesa3d-499d7a7f6e47403a4a3da448eddaf15bdf56395c.tar.gz external_mesa3d-499d7a7f6e47403a4a3da448eddaf15bdf56395c.tar.bz2 |
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>
Diffstat (limited to 'src/glsl/ir_builder.cpp')
-rw-r--r-- | src/glsl/ir_builder.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/glsl/ir_builder.cpp b/src/glsl/ir_builder.cpp index 98b4322..b6ce889 100644 --- a/src/glsl/ir_builder.cpp +++ b/src/glsl/ir_builder.cpp @@ -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); |