nouveau: misc NV40 fixes
authorBen Skeggs <darktama@iinet.net.au>
Tue, 30 Jan 2007 05:49:27 +0000 (16:49 +1100)
committerBen Skeggs <darktama@iinet.net.au>
Tue, 30 Jan 2007 05:49:27 +0000 (16:49 +1100)
src/mesa/drivers/dri/nouveau/nv30_state.c

index db13ec70b426ec7e9db6a213ba68acccab55e2d3..e1e0da98d497a0d7e4ba3b6ced9957594b656a51 100644 (file)
@@ -244,6 +244,8 @@ static void nv30Enable(GLcontext *ctx, GLenum cap, GLboolean state)
                        OUT_RING_CACHE(state);
                        break;
                case GL_FOG:
+                       if (!NOUVEAU_CARD_USING_SHADERS)
+                               break;
                        BEGIN_RING_CACHE(NvSub3D, NV30_TCL_PRIMITIVE_3D_FOG_ENABLE, 1);
                        OUT_RING_CACHE(state);
                        break;
@@ -736,9 +738,13 @@ void (*TexParameter)(GLcontext *ctx, GLenum target,
 static void nv30TextureMatrix(GLcontext *ctx, GLuint unit, const GLmatrix *mat)
 {
         nouveauContextPtr nmesa = NOUVEAU_CONTEXT(ctx);
-        BEGIN_RING_CACHE(NvSub3D, NV30_TCL_PRIMITIVE_3D_TX_MATRIX(unit, 0), 16);
-        /*XXX: This SHOULD work.*/
-        OUT_RING_CACHEp(mat->m, 16);
+
+       if (!NOUVEAU_CARD_USING_SHADERS) {
+               BEGIN_RING_CACHE(NvSub3D,
+                                NV30_TCL_PRIMITIVE_3D_TX_MATRIX(unit, 0), 16);
+               /*XXX: This SHOULD work.*/
+               OUT_RING_CACHEp(mat->m, 16);
+       }
 }
 
 static void nv30WindowMoved(nouveauContextPtr nmesa)