summaryrefslogtreecommitdiff
path: root/src/mesa/drivers/dri/r200/r200_swtcl.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesa/drivers/dri/r200/r200_swtcl.c')
-rw-r--r--src/mesa/drivers/dri/r200/r200_swtcl.c21
1 files changed, 7 insertions, 14 deletions
diff --git a/src/mesa/drivers/dri/r200/r200_swtcl.c b/src/mesa/drivers/dri/r200/r200_swtcl.c
index 2a0cd5b9d1..80f6f5f91c 100644
--- a/src/mesa/drivers/dri/r200/r200_swtcl.c
+++ b/src/mesa/drivers/dri/r200/r200_swtcl.c
@@ -147,22 +147,15 @@ static void r200SetVertexFormat( GLcontext *ctx )
GLuint sz = VB->TexCoordPtr[i]->size;
GLuint emit;
- /* r200 doesn't like 1D or 4D texcoords (is that true?):
+ /* r200 doesn't like 4D texcoords (is that true?):
*/
- switch (sz) {
- case 1:
- case 2:
- case 3: /* no attempt at cube texturing so far */
- emit = EMIT_2F;
- sz = 2;
- break;
- case 4:
+ if (sz != 4) {
+ emit = EMIT_1F + (sz - 1);
+ }
+ else {
+ sz = 3;
emit = EMIT_3F_XYW;
- sz = 3;
- break;
- default:
- continue;
- };
+ }
fmt_1 |= sz << (3 * i);
EMIT_ATTR( _TNL_ATTRIB_TEX0+i, EMIT_SZ(sz), 0 );