diff options
author | Ian Romanick <idr@us.ibm.com> | 2004-05-05 20:16:17 +0000 |
---|---|---|
committer | Ian Romanick <idr@us.ibm.com> | 2004-05-05 20:16:17 +0000 |
commit | 95a0bd6762737bb25bdf5c4147da9d1372f6aac3 (patch) | |
tree | 4621bed2826ef56c66ea12e401a75bdf062a332f /src/mesa/drivers/dri/r200/r200_swtcl.c | |
parent | 4045b6e5b85ee407a21559155c34d16fd63dc79c (diff) |
Added support for the 3rd texture coordinate for cubemaps and 3D
textures. progs/demos/cubemap and progs/demos/stex3d seem to work
correctly at all tcl_mode settings. x86 / SSE codegen is currently
disabled.
Diffstat (limited to 'src/mesa/drivers/dri/r200/r200_swtcl.c')
-rw-r--r-- | src/mesa/drivers/dri/r200/r200_swtcl.c | 21 |
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 ); |