From: Marek Olšák Date: Tue, 13 Jul 2010 23:59:28 +0000 (+0200) Subject: r300/compiler: fix swizzling in the transformation of Abs modifiers X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=9fa64ea67544d252c6713e21d3b9c17a2bbb0603;p=mesa.git r300/compiler: fix swizzling in the transformation of Abs modifiers --- diff --git a/src/mesa/drivers/dri/r300/compiler/r3xx_vertprog.c b/src/mesa/drivers/dri/r300/compiler/r3xx_vertprog.c index d5b08dd9592..d347b4df9cd 100644 --- a/src/mesa/drivers/dri/r300/compiler/r3xx_vertprog.c +++ b/src/mesa/drivers/dri/r300/compiler/r3xx_vertprog.c @@ -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;