nouveau: nv10: color logic op only for nv11+
authorPatrice Mandin <pmandin@caramail.com>
Wed, 19 Sep 2007 17:08:56 +0000 (19:08 +0200)
committerPatrice Mandin <pmandin@caramail.com>
Wed, 19 Sep 2007 17:08:56 +0000 (19:08 +0200)
src/mesa/drivers/dri/nouveau/nv10_state.c

index 148f9fdd5ecc774a76457d37cc818deddd6f6ad2..36084f3554e95ce27f31b1ef322fd97be74817b1 100644 (file)
@@ -297,8 +297,10 @@ static void nv10Enable(GLcontext *ctx, GLenum cap, GLboolean state)
                        OUT_RING_CACHE(state);
                        break;
                case GL_COLOR_LOGIC_OP:
-                       BEGIN_RING_CACHE(NvSub3D, NV10_TCL_PRIMITIVE_3D_COLOR_LOGIC_OP_ENABLE, 1);
-                       OUT_RING_CACHE(state);
+                       if (nmesa->screen->card->type >= NV_11) {
+                               BEGIN_RING_CACHE(NvSub3D, NV10_TCL_PRIMITIVE_3D_COLOR_LOGIC_OP_ENABLE, 1);
+                               OUT_RING_CACHE(state);
+                       }
                        break;
 //             case GL_COLOR_MATERIAL:
 //             case GL_COLOR_SUM_EXT:
@@ -583,6 +585,10 @@ static void nv10LineWidth(GLcontext *ctx, GLfloat width)
 
 static void nv10LogicOpcode(GLcontext *ctx, GLenum opcode)
 {
+       if (nmesa->screen->card->type < NV_11) {
+               return;
+       }
+
        nouveauContextPtr nmesa = NOUVEAU_CONTEXT(ctx);
        BEGIN_RING_CACHE(NvSub3D, NV10_TCL_PRIMITIVE_3D_COLOR_LOGIC_OP_OP, 1);
        OUT_RING_CACHE(opcode);