r300/compiler: Abs doesn't cancel Negate (in the conversion to native swizzles)
authorMarek Olšák <maraeo@gmail.com>
Sat, 12 Mar 2011 09:18:45 +0000 (10:18 +0100)
committerMarek Olšák <maraeo@gmail.com>
Sat, 12 Mar 2011 09:18:45 +0000 (10:18 +0100)
NOTE: This is a candidate for the 7.9 and 7.10 branches.

src/mesa/drivers/dri/r300/compiler/r300_fragprog_swizzle.c
src/mesa/drivers/dri/r300/compiler/r500_fragprog.c

index fa906f2fddef94647fb13ca3bdd262ee029d1829..5223aaa71a4e4bc717a3d3463554e34b5bee3c7d 100644 (file)
@@ -98,9 +98,6 @@ static int r300_swizzle_is_native(rc_opcode opcode, struct rc_src_register reg)
        unsigned int relevant;
        int j;
 
-       if (reg.Abs)
-               reg.Negate = RC_MASK_NONE;
-
        if (opcode == RC_OPCODE_KIL ||
            opcode == RC_OPCODE_TEX ||
            opcode == RC_OPCODE_TXB ||
@@ -140,9 +137,6 @@ static void r300_swizzle_split(
                struct rc_src_register src, unsigned int mask,
                struct rc_swizzle_split * split)
 {
-       if (src.Abs)
-               src.Negate = RC_MASK_NONE;
-
        split->NumPhases = 0;
 
        while(mask) {
index ef81be48f7779afe93c651db5fdfc27198abb0e1..899f0d9829a4845cb3d41c9b59ded828a687779c 100644 (file)
@@ -103,9 +103,6 @@ static int r500_swizzle_is_native(rc_opcode opcode, struct rc_src_register reg)
                return 0;
        } else {
                /* ALU instructions support almost everything */
-               if (reg.Abs)
-                       return 1;
-
                relevant = 0;
                for(i = 0; i < 3; ++i) {
                        unsigned int swz = GET_SWZ(reg.Swizzle, i);