ir_to_mesa: Add support for ir_unop_abs.
authorEric Anholt <eric@anholt.net>
Tue, 29 Jun 2010 23:39:38 +0000 (16:39 -0700)
committerEric Anholt <eric@anholt.net>
Wed, 30 Jun 2010 00:18:28 +0000 (17:18 -0700)
src/mesa/shader/ir_to_mesa.cpp

index 152cb1d9e55e280652590c87518b19016816286b..85ede3e3280bbd076d7a805fe6d6ad896112a3fa 100644 (file)
@@ -610,6 +610,10 @@ ir_to_mesa_visitor::visit(ir_expression *ir)
       op[0].negate = ~op[0].negate;
       result_src = op[0];
       break;
+   case ir_unop_abs:
+      ir_to_mesa_emit_op1(ir, OPCODE_ABS, result_dst, op[0]);
+      break;
+
    case ir_unop_exp:
       ir_to_mesa_emit_scalar_op1(ir, OPCODE_EXP, result_dst, op[0]);
       break;