From: Corbin Simpson Date: Fri, 5 Jun 2009 06:56:32 +0000 (-0700) Subject: r300-gallium: vs: Fix negation calculation. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=4c66c5bf921357c94611e583d1a64f653e957765;p=mesa.git r300-gallium: vs: Fix negation calculation. Still doesn't draw right, but at least it's the right numbers now. Thanks to taiu in #dri-devel. --- diff --git a/src/gallium/drivers/r300/r300_state_tcl.c b/src/gallium/drivers/r300/r300_state_tcl.c index 30a8dab307a..8cf8250425e 100644 --- a/src/gallium/drivers/r300/r300_state_tcl.c +++ b/src/gallium/drivers/r300/r300_state_tcl.c @@ -164,13 +164,13 @@ static uint32_t r300_vs_op(unsigned op) static uint32_t r300_vs_swiz(struct tgsi_full_src_register* reg) { if (reg->SrcRegister.Extended) { - return (reg->SrcRegister.Negate ? R300_PVS_NEGATE_XYZW : 0) | + return (reg->SrcRegister.Negate ? (0xf << 12) : 0) | reg->SrcRegisterExtSwz.ExtSwizzleX | (reg->SrcRegisterExtSwz.ExtSwizzleY << 3) | (reg->SrcRegisterExtSwz.ExtSwizzleZ << 6) | (reg->SrcRegisterExtSwz.ExtSwizzleW << 9); } else { - return (reg->SrcRegister.Negate ? R300_PVS_NEGATE_XYZW : 0) | + return (reg->SrcRegister.Negate ? (0xf << 12) : 0) | reg->SrcRegister.SwizzleX | (reg->SrcRegister.SwizzleY << 3) | (reg->SrcRegister.SwizzleZ << 6) | @@ -182,13 +182,13 @@ static uint32_t r300_vs_swiz(struct tgsi_full_src_register* reg) static uint32_t r300_vs_scalar_swiz(struct tgsi_full_src_register* reg) { if (reg->SrcRegister.Extended) { - return (reg->SrcRegister.Negate ? R300_PVS_NEGATE_XYZW : 0) | + return (reg->SrcRegister.Negate ? (0xf << 12) : 0) | reg->SrcRegisterExtSwz.ExtSwizzleX | (reg->SrcRegisterExtSwz.ExtSwizzleX << 3) | (reg->SrcRegisterExtSwz.ExtSwizzleX << 6) | (reg->SrcRegisterExtSwz.ExtSwizzleX << 9); } else { - return (reg->SrcRegister.Negate ? R300_PVS_NEGATE_XYZW : 0) | + return (reg->SrcRegister.Negate ? (0xf << 12) : 0) | reg->SrcRegister.SwizzleX | (reg->SrcRegister.SwizzleX << 3) | (reg->SrcRegister.SwizzleX << 6) |