summaryrefslogtreecommitdiff
path: root/src/mesa/drivers
diff options
context:
space:
mode:
authorAlan Hourihane <alanh@tungstengraphics.com>2005-01-11 09:52:10 +0000
committerAlan Hourihane <alanh@tungstengraphics.com>2005-01-11 09:52:10 +0000
commit5358682aa7b8d495c45991fcd750250883e78444 (patch)
treef77baf1ed5983e9cd5fea249bb5f5f694c3fb627 /src/mesa/drivers
parent0cb0a36d8c0a5c201eece033d331b0f9321abf22 (diff)
Fix usage of texture units, when TEX1 is enabled, but not TEX0.
Diffstat (limited to 'src/mesa/drivers')
-rw-r--r--src/mesa/drivers/dri/unichrome/via_tris.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/mesa/drivers/dri/unichrome/via_tris.c b/src/mesa/drivers/dri/unichrome/via_tris.c
index 6fd5a2a64c..660c6d7a49 100644
--- a/src/mesa/drivers/dri/unichrome/via_tris.c
+++ b/src/mesa/drivers/dri/unichrome/via_tris.c
@@ -736,15 +736,16 @@ static void viaChooseVertexState( GLcontext *ctx )
EMIT_PAD( 1 );
}
- if (index & _TNL_BIT_TEX(0)) {
- if (vmesa->ptexHack)
+ /* If Texture unit 1 is enabled, we need to enable the first as well. */
+ if (index & (_TNL_BIT_TEX(0) | _TNL_BIT_TEX(1))) {
+ if (vmesa->ptexHack && (index & _TNL_BIT_TEX(0)))
EMIT_ATTR( _TNL_ATTRIB_TEX0, EMIT_3F_XYW, VIA_EMIT_PTEX0, (HC_HVPMSK_S | HC_HVPMSK_T) );
else
EMIT_ATTR( _TNL_ATTRIB_TEX0, EMIT_2F, VIA_EMIT_TEX0, (HC_HVPMSK_S | HC_HVPMSK_T) );
}
if (index & _TNL_BIT_TEX(1)) {
- EMIT_ATTR( _TNL_ATTRIB_TEX1, EMIT_2F, VIA_EMIT_TEX1, 0 ); /* how does the hardware find out about this? */
+ EMIT_ATTR( _TNL_ATTRIB_TEX1, EMIT_2F, VIA_EMIT_TEX1, 0 ); /* how does the hardware find out about this? */
}
if (setupIndex != vmesa->setupIndex) {