From: Maciej Cencora Date: Thu, 23 Apr 2009 13:41:08 +0000 (+0200) Subject: r300: handle texcoords properly X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=25dd867c58e5008029dbb5277a82acbcc961a05a;p=mesa.git r300: handle texcoords properly add 1D texture case and setup default Q value to 1.0 --- diff --git a/src/mesa/drivers/dri/r300/r300_swtcl.c b/src/mesa/drivers/dri/r300/r300_swtcl.c index 256a2bb5cb2..55187d4bc80 100644 --- a/src/mesa/drivers/dri/r300/r300_swtcl.c +++ b/src/mesa/drivers/dri/r300/r300_swtcl.c @@ -211,15 +211,19 @@ static void r300SetVertexFormat( GLcontext *ctx ) if (RENDERINPUTS_TEST(tnl->render_inputs_bitset, _TNL_ATTRIB_TEX(i) )) { switch (VB->TexCoordPtr[i]->size) { case 1: + format = EMIT_1F; + swiz = MAKE_SWIZZLE4(SWIZZLE_X, SWIZZLE_ZERO, SWIZZLE_ZERO, SWIZZLE_ONE); + mask = MASK_X; + break; case 2: format = EMIT_2F; - swiz = MAKE_SWIZZLE4(SWIZZLE_X, SWIZZLE_Y, SWIZZLE_ZERO, SWIZZLE_ZERO); + swiz = MAKE_SWIZZLE4(SWIZZLE_X, SWIZZLE_Y, SWIZZLE_ZERO, SWIZZLE_ONE); mask = MASK_X | MASK_Y; size = 2; break; case 3: format = EMIT_3F; - swiz = MAKE_SWIZZLE4(SWIZZLE_X, SWIZZLE_Y, SWIZZLE_Z, SWIZZLE_ZERO); + swiz = MAKE_SWIZZLE4(SWIZZLE_X, SWIZZLE_Y, SWIZZLE_Z, SWIZZLE_ONE); mask = MASK_X | MASK_Y | MASK_Z; size = 3; break;