r300: fix swizzle handling in transformation of abs

Helps with scalar opcodes like pow.
(which are propagating first used channel)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15222>
This commit is contained in:
Filip Gawin 2022-03-03 02:39:00 +01:00 committed by Marge Bot
parent 85ae6598fa
commit 5a459b8f6b

View File

@ -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;
}
}