diff options
author | Alan Hourihane <alanh@tungstengraphics.com> | 2005-01-12 12:45:42 +0000 |
---|---|---|
committer | Alan Hourihane <alanh@tungstengraphics.com> | 2005-01-12 12:45:42 +0000 |
commit | 26dcb88fb97e2ecea11b5da770c7c6e65f0b790b (patch) | |
tree | d21606bb54da6c91d677d4472d266441e8ca3b6b /src/mesa/drivers/dri/unichrome/via_tris.c | |
parent | a9531eb2c54bbdbedd7f03583d540a32d9fd918f (diff) |
Fix multitexturing.
The multiarb test works now when disabling texunit0/1.
Diffstat (limited to 'src/mesa/drivers/dri/unichrome/via_tris.c')
-rw-r--r-- | src/mesa/drivers/dri/unichrome/via_tris.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/src/mesa/drivers/dri/unichrome/via_tris.c b/src/mesa/drivers/dri/unichrome/via_tris.c index 660c6d7a49f..121b90b2972 100644 --- a/src/mesa/drivers/dri/unichrome/via_tris.c +++ b/src/mesa/drivers/dri/unichrome/via_tris.c @@ -736,16 +736,19 @@ static void viaChooseVertexState( GLcontext *ctx ) EMIT_PAD( 1 ); } - /* 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))) + if (index & _TNL_BIT_TEX(0)) { + if (vmesa->ptexHack) 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? */ + if (!(index & _TNL_BIT_TEX(0))) { + EMIT_ATTR( _TNL_ATTRIB_TEX1, EMIT_2F, VIA_EMIT_TEX1, (HC_HVPMSK_S | HC_HVPMSK_T) ); + } else { + EMIT_ATTR( _TNL_ATTRIB_TEX1, EMIT_2F, VIA_EMIT_TEX1, 0 ); + } } if (setupIndex != vmesa->setupIndex) { |