summaryrefslogtreecommitdiff
path: root/src/mesa/drivers/dri/r300
diff options
context:
space:
mode:
authorMaciej Cencora <m.cencora@gmail.com>2009-04-23 15:41:08 +0200
committerDave Airlie <airlied@linux.ie>2009-04-27 19:06:00 +1000
commit25dd867c58e5008029dbb5277a82acbcc961a05a (patch)
treebcf09f6ccd86c6a4012a456bdfe52ea461db05cd /src/mesa/drivers/dri/r300
parent199710914ab15926d19c5a848453674715bce334 (diff)
r300: handle texcoords properly
add 1D texture case and setup default Q value to 1.0
Diffstat (limited to 'src/mesa/drivers/dri/r300')
-rw-r--r--src/mesa/drivers/dri/r300/r300_swtcl.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/mesa/drivers/dri/r300/r300_swtcl.c b/src/mesa/drivers/dri/r300/r300_swtcl.c
index 256a2bb5cb..55187d4bc8 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;