summaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers/dri/r128
diff options
context:
space:
mode:
authorEric Anholt <[email protected]>2004-10-08 23:24:04 +0000
committerEric Anholt <[email protected]>2004-10-08 23:24:04 +0000
commit57f1b25caf9c3ef6c274bff18785901cb9ec8b3b (patch)
treebd7064e92edc8326aae90374be34d12b4dfbd136 /src/mesa/drivers/dri/r128
parentea6f4f6079de8f35b6e3d597525d958bcedc7bad (diff)
Use the right FALLBACK macro for projtex so that projective textures actually
cause a fallback, and simplify the tmu handling a little.
Diffstat (limited to 'src/mesa/drivers/dri/r128')
-rw-r--r--src/mesa/drivers/dri/r128/r128_tris.c18
1 files changed, 7 insertions, 11 deletions
diff --git a/src/mesa/drivers/dri/r128/r128_tris.c b/src/mesa/drivers/dri/r128/r128_tris.c
index 7e72467da5d..9bc9d3f4a63 100644
--- a/src/mesa/drivers/dri/r128/r128_tris.c
+++ b/src/mesa/drivers/dri/r128/r128_tris.c
@@ -603,23 +603,19 @@ static void r128RenderStart( GLcontext *ctx )
EMIT_PAD( 1 );
}
- if ( index & _TNL_BIT_TEX(0) ) {
- if ( VB->TexCoordPtr[0]->size > 2 )
+ if ( index & _TNL_BIT_TEX(rmesa->tmu_source[0]) ) {
+ if ( VB->TexCoordPtr[rmesa->tmu_source[0]]->size > 2 )
fallback_projtex = GL_TRUE;
EMIT_ATTR( _TNL_ATTRIB_TEX0, EMIT_2F, R128_CCE_VC_FRMT_S_T, 8 );
- if ( index & _TNL_BIT_TEX(1) ) {
- if ( VB->TexCoordPtr[1]->size > 2 )
- fallback_projtex = GL_TRUE;
- EMIT_ATTR( _TNL_ATTRIB_TEX1, EMIT_2F, R128_CCE_VC_FRMT_S2_T2, 8 );
- }
- } else if ( index & _TNL_BIT_TEX(1) ) {
- if ( VB->TexCoordPtr[1]->size > 2 )
+ }
+ if ( index & _TNL_BIT_TEX(rmesa->tmu_source[1]) ) {
+ if ( VB->TexCoordPtr[rmesa->tmu_source[1]]->size > 2 )
fallback_projtex = GL_TRUE;
- EMIT_ATTR( _TNL_ATTRIB_TEX1, EMIT_2F, R128_CCE_VC_FRMT_S_T, 8 );
+ EMIT_ATTR( _TNL_ATTRIB_TEX1, EMIT_2F, R128_CCE_VC_FRMT_S2_T2, 8 );
}
/* projective textures are not supported by the hardware */
- FALLBACK( rmesa, R128_FALLBACK_TEXTURE, fallback_projtex );
+ FALLBACK( rmesa, R128_FALLBACK_PROJTEX, fallback_projtex );
/* Only need to change the vertex emit code if there has been a
* statechange to a TNL index.