Mesa (glsl2): ir_to_mesa: Add support for ir_unop_sign.

Eric Anholt anholt at kemper.freedesktop.org
Wed Jun 30 17:34:31 PDT 2010


Module: Mesa
Branch: glsl2
Commit: 3acd92a91f3e799b9f839a074f4d76a0e88d71fe
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=3acd92a91f3e799b9f839a074f4d76a0e88d71fe

Author: Eric Anholt <eric at anholt.net>
Date:   Wed Jun 30 17:06:06 2010 -0700

ir_to_mesa: Add support for ir_unop_sign.

Fixes glsl-fs-sign, glsl-vs-sign.

---

 src/mesa/shader/ir_to_mesa.cpp |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/src/mesa/shader/ir_to_mesa.cpp b/src/mesa/shader/ir_to_mesa.cpp
index af9bdb5..b140d96 100644
--- a/src/mesa/shader/ir_to_mesa.cpp
+++ b/src/mesa/shader/ir_to_mesa.cpp
@@ -615,6 +615,9 @@ ir_to_mesa_visitor::visit(ir_expression *ir)
    case ir_unop_abs:
       ir_to_mesa_emit_op1(ir, OPCODE_ABS, result_dst, op[0]);
       break;
+   case ir_unop_sign:
+      ir_to_mesa_emit_op1(ir, OPCODE_SSG, result_dst, op[0]);
+      break;
 
    case ir_unop_exp:
       ir_to_mesa_emit_scalar_op1(ir, OPCODE_EXP, result_dst, op[0]);



More information about the mesa-commit mailing list