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/mesa/program/ir_to_mesa.cpp | 2 ++ src/mesa/state_tracker/st_glsl_to_tgsi.cpp | 2 ++ 2 files changed, 4 insertions(+) (limited to 'src/mesa') diff --git a/src/mesa/program/ir_to_mesa.cpp b/src/mesa/program/ir_to_mesa.cpp index 6b22b507415..2f87cfd65c4 100644 --- a/src/mesa/program/ir_to_mesa.cpp +++ b/src/mesa/program/ir_to_mesa.cpp @@ -1497,6 +1497,8 @@ ir_to_mesa_visitor::visit(ir_expression *ir) case ir_quadop_bitfield_insert: case ir_binop_ldexp: case ir_triop_csel: + case ir_binop_carry: + case ir_binop_borrow: assert(!"not supported"); break; diff --git a/src/mesa/state_tracker/st_glsl_to_tgsi.cpp b/src/mesa/state_tracker/st_glsl_to_tgsi.cpp index f11305b590a..f33bea6eb02 100644 --- a/src/mesa/state_tracker/st_glsl_to_tgsi.cpp +++ b/src/mesa/state_tracker/st_glsl_to_tgsi.cpp @@ -1978,6 +1978,8 @@ glsl_to_tgsi_visitor::visit(ir_expression *ir) case ir_binop_vector_extract: case ir_triop_vector_insert: case ir_binop_ldexp: + case ir_binop_carry: + case ir_binop_borrow: /* This operation is not supported, or should have already been handled. */ assert(!"Invalid ir opcode in glsl_to_tgsi_visitor::visit()"); -- cgit v1.2.3