Fall back properly when GL_COLOR_LOGIC_OP is enabled and != GL_COPY.
authorFelix Kuehling <fxkuehl@gmx.de>
Sat, 12 Feb 2005 16:02:30 +0000 (16:02 +0000)
committerFelix Kuehling <fxkuehl@gmx.de>
Sat, 12 Feb 2005 16:02:30 +0000 (16:02 +0000)
Add missing per-primitive fallback for polygon stipple.

src/mesa/drivers/dri/savage/savagestate.c
src/mesa/drivers/dri/savage/savagetris.c

index b417d1e2aae9464e7ee0a1d5654dd73edc5ab77d..fd3da8262e7ba606e1d98f6045782c23b48990fb 100644 (file)
@@ -1179,17 +1179,18 @@ static void savageDDEnable_s4(GLcontext *ctx, GLenum cap, GLboolean state)
             savageBlendFunc_s4(ctx);
             break;
         case GL_BLEND:
-            /*Can't find Enable bit in the 3D registers.*/ 
-            /* For some reason enable(GL_BLEND) affects ColorLogicOpEnabled.
-             */
-           FALLBACK (ctx, SAVAGE_FALLBACK_LOGICOP,
-                     (ctx->Color.ColorLogicOpEnabled &&
-                      ctx->Color.LogicOp != GL_COPY));
             /*add the savageBlendFunc 2001/11/25
              * if call no such function, then glDisable(GL_BLEND) will do noting,
              *our chip has no disable bit
              */ 
             savageBlendFunc_s4(ctx);
+        case GL_COLOR_LOGIC_OP:
+            /* Fall through: 
+            * For some reason enable(GL_BLEND) affects ColorLogicOpEnabled.
+             */
+           FALLBACK (ctx, SAVAGE_FALLBACK_LOGICOP,
+                     (ctx->Color.ColorLogicOpEnabled &&
+                      ctx->Color.LogicOp != GL_COPY));
             break;
         case GL_DEPTH_TEST:
             savageDDDepthFunc_s4(ctx,ctx->Depth.Func);
@@ -1269,17 +1270,18 @@ static void savageDDEnable_s3d(GLcontext *ctx, GLenum cap, GLboolean state)
             savageBlendFunc_s3d(ctx);
             break;
         case GL_BLEND:
-            /*Can't find Enable bit in the 3D registers.*/ 
-            /* For some reason enable(GL_BLEND) affects ColorLogicOpEnabled.
-             */
-           FALLBACK (ctx, SAVAGE_FALLBACK_LOGICOP,
-                     (ctx->Color.ColorLogicOpEnabled &&
-                      ctx->Color.LogicOp != GL_COPY));
             /*add the savageBlendFunc 2001/11/25
              * if call no such function, then glDisable(GL_BLEND) will do noting,
              *our chip has no disable bit
              */ 
             savageBlendFunc_s3d(ctx);
+        case GL_COLOR_LOGIC_OP:
+            /* Fall through: 
+            * For some reason enable(GL_BLEND) affects ColorLogicOpEnabled.
+             */
+           FALLBACK (ctx, SAVAGE_FALLBACK_LOGICOP,
+                     (ctx->Color.ColorLogicOpEnabled &&
+                      ctx->Color.LogicOp != GL_COPY));
             break;
         case GL_DEPTH_TEST:
             savageDDDepthFunc_s3d(ctx,ctx->Depth.Func);
index f5faa3fe5688b0c8fffd415363b28aa9c7112709..405a58977b66794937e364e21415513c37bde430 100644 (file)
@@ -690,6 +690,7 @@ static void savageFastRenderClippedPoly( GLcontext *ctx, const GLuint *elts,
 #define _SAVAGE_NEW_RENDER_STATE (_DD_NEW_LINE_STIPPLE |       \
                                  _DD_NEW_LINE_SMOOTH |         \
                                  _DD_NEW_POINT_SMOOTH |        \
+                                 _DD_NEW_TRI_STIPPLE |         \
                                  _DD_NEW_TRI_SMOOTH |          \
                                  _DD_NEW_TRI_UNFILLED |        \
                                  _DD_NEW_TRI_LIGHT_TWOSIDE |   \
@@ -698,7 +699,7 @@ static void savageFastRenderClippedPoly( GLcontext *ctx, const GLuint *elts,
 /* original driver didn't have DD_POINT_SMOOTH. really needed? */
 #define POINT_FALLBACK (DD_POINT_SMOOTH)
 #define LINE_FALLBACK (DD_LINE_STIPPLE|DD_LINE_SMOOTH)
-#define TRI_FALLBACK (DD_TRI_SMOOTH)
+#define TRI_FALLBACK (DD_TRI_STIPPLE|DD_TRI_SMOOTH)
 #define ANY_FALLBACK_FLAGS (POINT_FALLBACK|LINE_FALLBACK|TRI_FALLBACK)
 #define ANY_RASTER_FLAGS (DD_TRI_LIGHT_TWOSIDE|DD_TRI_OFFSET|DD_TRI_UNFILLED)