aboutsummaryrefslogtreecommitdiffstats
path: root/src/mesa/main/state.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesa/main/state.c')
-rw-r--r--src/mesa/main/state.c19
1 files changed, 18 insertions, 1 deletions
diff --git a/src/mesa/main/state.c b/src/mesa/main/state.c
index 56b835f5373..784757e91f9 100644
--- a/src/mesa/main/state.c
+++ b/src/mesa/main/state.c
@@ -1,6 +1,6 @@
/*
* Mesa 3-D graphics library
- * Version: 6.5
+ * Version: 6.5.1
*
* Copyright (C) 1999-2006 Brian Paul All Rights Reserved.
*
@@ -985,6 +985,20 @@ update_viewport_matrix(GLcontext *ctx)
}
+/**
+ * Update derived color/blend/logicop state.
+ */
+static void
+update_color(GLcontext *ctx)
+{
+ /* This is needed to support 1.1's RGB logic ops AND
+ * 1.0's blending logicops.
+ */
+ ctx->Color._LogicOpEnabled = (ctx->Color.ColorLogicOpEnabled ||
+ (ctx->Color.BlendEnabled &&
+ ctx->Color.BlendEquationRGB == GL_LOGIC_OP));
+}
+
/**
* If __GLcontextRec::NewState is non-zero then this function \b must be called
@@ -1046,6 +1060,9 @@ _mesa_update_state( GLcontext *ctx )
if (new_state & (_NEW_BUFFERS | _NEW_VIEWPORT))
update_viewport_matrix(ctx);
+ if (new_state & _NEW_COLOR)
+ update_color( ctx );
+
if (ctx->_MaintainTexEnvProgram) {
if (new_state & (_NEW_TEXTURE | _DD_NEW_SEPARATE_SPECULAR | _NEW_FOG))
_mesa_UpdateTexEnvProgram(ctx);