i965: Drop GLSL ABS code, which is translated away in brw_wm_fp.
authorEric Anholt <eric@anholt.net>
Wed, 12 Aug 2009 01:13:57 +0000 (18:13 -0700)
committerEric Anholt <eric@anholt.net>
Wed, 12 Aug 2009 19:43:43 +0000 (12:43 -0700)
src/mesa/drivers/dri/i965/brw_wm_glsl.c

index 3a68e05173c9eb007e98fd329b932f74ad2a9b85..f480609b532f674516228a4d9bc70139605c8240 100644 (file)
@@ -640,23 +640,6 @@ static void invoke_subroutine( struct brw_wm_compile *c,
     }
 }
 
-static void emit_abs( struct brw_wm_compile *c,
-                      const struct prog_instruction *inst)
-{
-    int i;
-    struct brw_compile *p = &c->func;
-    brw_set_saturate(p, inst->SaturateMode != SATURATE_OFF);
-    for (i = 0; i < 4; i++) {
-       if (inst->DstReg.WriteMask & (1<<i)) {
-           struct brw_reg src, dst;
-           dst = get_dst_reg(c, inst, i);
-           src = get_src_reg(c, inst, 0, i);
-           brw_MOV(p, dst, brw_abs(src));
-       }
-    }
-    brw_set_saturate(p, 0);
-}
-
 static void emit_trunc( struct brw_wm_compile *c,
                         const struct prog_instruction *inst)
 {
@@ -2834,9 +2817,6 @@ static void brw_wm_emit_glsl(struct brw_context *brw, struct brw_wm_compile *c)
            case WM_FRONTFACING:
                emit_frontfacing(c, inst);
                break;
-           case OPCODE_ABS:
-               emit_abs(c, inst);
-               break;
            case OPCODE_ADD:
                emit_add(c, inst);
                break;