From 5a459b8f6b0b59814865bc5869a868269f8f7ebf Mon Sep 17 00:00:00 2001 From: Filip Gawin Date: Thu, 3 Mar 2022 02:39:00 +0100 Subject: [PATCH] r300: fix swizzle handling in transformation of abs Helps with scalar opcodes like pow. (which are propagating first used channel) Part-of: --- src/gallium/drivers/r300/compiler/r3xx_vertprog.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/gallium/drivers/r300/compiler/r3xx_vertprog.c b/src/gallium/drivers/r300/compiler/r3xx_vertprog.c index 39db61e1682..bbfbf6ea9dd 100644 --- a/src/gallium/drivers/r300/compiler/r3xx_vertprog.c +++ b/src/gallium/drivers/r300/compiler/r3xx_vertprog.c @@ -700,12 +700,13 @@ static int transform_nonnative_modifiers( new_inst->U.I.DstReg.File = RC_FILE_TEMPORARY; new_inst->U.I.DstReg.Index = temp; new_inst->U.I.SrcReg[0] = inst->U.I.SrcReg[i]; + new_inst->U.I.SrcReg[0].Swizzle = RC_SWIZZLE_XYZW; new_inst->U.I.SrcReg[1] = inst->U.I.SrcReg[i]; + new_inst->U.I.SrcReg[1].Swizzle = RC_SWIZZLE_XYZW; new_inst->U.I.SrcReg[1].Negate ^= RC_MASK_XYZW; inst->U.I.SrcReg[i].File = RC_FILE_TEMPORARY; inst->U.I.SrcReg[i].Index = temp; - inst->U.I.SrcReg[i].Swizzle = RC_SWIZZLE_XYZW; inst->U.I.SrcReg[i].RelAddr = 0; } }