From: Brian Paul Date: Thu, 2 Nov 2006 17:49:47 +0000 (+0000) Subject: new RGBA_LOGICOP_ENABLED() macro X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=abc73d9cba655479af493fabd13a488e5f7951eb;p=mesa.git new RGBA_LOGICOP_ENABLED() macro --- diff --git a/src/mesa/main/context.h b/src/mesa/main/context.h index c72fe8a56ac..e7e0fda72ea 100644 --- a/src/mesa/main/context.h +++ b/src/mesa/main/context.h @@ -317,4 +317,12 @@ do { \ ) +/** + * Is RGBA LogicOp enabled? + */ +#define RGBA_LOGICOP_ENABLED(CTX) \ + ((CTX)->Color.ColorLogicOpEnabled || \ + ((CTX)->Color.BlendEnabled && (CTX)->Color.BlendEquationRGB == GL_LOGIC_OP)) + + #endif /* CONTEXT_H */ diff --git a/src/mesa/main/state.c b/src/mesa/main/state.c index 1ced2a081e5..de513926de5 100644 --- a/src/mesa/main/state.c +++ b/src/mesa/main/state.c @@ -983,9 +983,7 @@ 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)); + ctx->Color._LogicOpEnabled = RGBA_LOGICOP_ENABLED(ctx); }