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.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/glsl/ir.cpp') diff --git a/src/glsl/ir.cpp b/src/glsl/ir.cpp index ae67d6bddec..149ddbd5342 100644 --- a/src/glsl/ir.cpp +++ b/src/glsl/ir.cpp @@ -398,6 +398,8 @@ ir_expression::ir_expression(int op, ir_rvalue *op0, ir_rvalue *op1) this->type = glsl_type::uint_type; break; + case ir_binop_carry: + case ir_binop_borrow: case ir_binop_lshift: case ir_binop_rshift: case ir_binop_bfm: @@ -528,6 +530,8 @@ static const char *const operator_strs[] = { "-", "*", "/", + "carry", + "borrow", "%", "<", ">", -- cgit v1.2.3