diff options
author | Matt Turner <[email protected]> | 2013-09-19 12:56:10 -0700 |
---|---|---|
committer | Matt Turner <[email protected]> | 2013-10-07 10:41:16 -0700 |
commit | 499d7a7f6e47403a4a3da448eddaf15bdf56395c (patch) | |
tree | 2fa4bb92dd8d52622ead91fb7c2880c069cc7144 /src/glsl/ir_validate.cpp | |
parent | ae514416b20e0117d58822253069f594b4a3ee57 (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_validate.cpp')
-rw-r--r-- | src/glsl/ir_validate.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/glsl/ir_validate.cpp b/src/glsl/ir_validate.cpp index 2c64f4e582a..38db8c20677 100644 --- a/src/glsl/ir_validate.cpp +++ b/src/glsl/ir_validate.cpp @@ -429,6 +429,13 @@ ir_validate::visit_leave(ir_expression *ir) } break; + case ir_binop_carry: + case ir_binop_borrow: + assert(ir->type == ir->operands[0]->type); + assert(ir->type == ir->operands[1]->type); + assert(ir->type->base_type == GLSL_TYPE_UINT); + break; + case ir_binop_less: case ir_binop_greater: case ir_binop_lequal: |