r300/compiler: fix swizzling in the transformation of Abs modifiers
authorMarek Olšák <maraeo@gmail.com>
Tue, 13 Jul 2010 23:59:28 +0000 (01:59 +0200)
committerMarek Olšák <maraeo@gmail.com>
Wed, 14 Jul 2010 00:01:03 +0000 (02:01 +0200)
src/mesa/drivers/dri/r300/compiler/r3xx_vertprog.c

index d5b08dd95926b23a015ada8836e41714c259b5a2..d347b4df9cd6c17aed1a175c140fdd5b31928f74 100644 (file)
@@ -518,10 +518,10 @@ static int transform_nonnative_modifiers(
                        new_inst->U.I.SrcReg[1] = inst->U.I.SrcReg[i];
                        new_inst->U.I.SrcReg[1].Negate ^= RC_MASK_XYZW;
 
+                       memset(&inst->U.I.SrcReg[i], 0, sizeof(inst->U.I.SrcReg[i]));
                        inst->U.I.SrcReg[i].File = RC_FILE_TEMPORARY;
                        inst->U.I.SrcReg[i].Index = temp;
-                       inst->U.I.SrcReg[i].Negate = 0;
-                       inst->U.I.SrcReg[i].RelAddr = 0;
+                       inst->U.I.SrcReg[i].Swizzle = RC_SWIZZLE_XYZW;
                }
        }
        return 1;