aboutsummaryrefslogtreecommitdiff
path: root/mesalib/src/mesa/main/context.c
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2012-05-25 15:31:52 +0200
committermarha <marha@users.sourceforge.net>2012-05-25 15:31:52 +0200
commite37e5c7e6678395a7f5dff1aea1c240a5b1c8f66 (patch)
tree9e46ba338311cb6658589a7767ebcb7f525eb369 /mesalib/src/mesa/main/context.c
parentaebbd673a0fb4d5e9ae4e8e690b29fb364376875 (diff)
parenteef864d36de97903007f04fad9fa43afe297745b (diff)
downloadvcxsrv-e37e5c7e6678395a7f5dff1aea1c240a5b1c8f66.tar.gz
vcxsrv-e37e5c7e6678395a7f5dff1aea1c240a5b1c8f66.tar.bz2
vcxsrv-e37e5c7e6678395a7f5dff1aea1c240a5b1c8f66.zip
Merge remote-tracking branch 'origin/released'
Diffstat (limited to 'mesalib/src/mesa/main/context.c')
-rw-r--r--mesalib/src/mesa/main/context.c24
1 files changed, 7 insertions, 17 deletions
diff --git a/mesalib/src/mesa/main/context.c b/mesalib/src/mesa/main/context.c
index df0452cd1..3bcedecd9 100644
--- a/mesalib/src/mesa/main/context.c
+++ b/mesalib/src/mesa/main/context.c
@@ -1703,13 +1703,6 @@ _mesa_set_mvp_with_dp4( struct gl_context *ctx,
ctx->mvp_with_dp4 = flag;
}
-static GLboolean
-blend_factor_is_dual_src(GLenum factor)
-{
- return factor == GL_SRC1_COLOR || factor == GL_SRC1_ALPHA ||
- factor == GL_ONE_MINUS_SRC1_COLOR || factor == GL_ONE_MINUS_SRC1_ALPHA;
-}
-
/*
* ARB_blend_func_extended - ERRORS section
* "The error INVALID_OPERATION is generated by Begin or any procedure that
@@ -1722,16 +1715,13 @@ static GLboolean
_mesa_check_blend_func_error(struct gl_context *ctx)
{
GLuint i;
- for (i = 0; i < ctx->DrawBuffer->_NumColorDrawBuffers; i++) {
- if (blend_factor_is_dual_src(ctx->Color.Blend[i].SrcRGB) ||
- blend_factor_is_dual_src(ctx->Color.Blend[i].DstRGB) ||
- blend_factor_is_dual_src(ctx->Color.Blend[i].SrcA) ||
- blend_factor_is_dual_src(ctx->Color.Blend[i].DstA)) {
- if (i >= ctx->Const.MaxDualSourceDrawBuffers) {
- _mesa_error(ctx, GL_INVALID_OPERATION,
- "dual source blend on illegal attachment");
- return GL_FALSE;
- }
+ for (i = ctx->Const.MaxDualSourceDrawBuffers;
+ i < ctx->DrawBuffer->_NumColorDrawBuffers;
+ i++) {
+ if (ctx->Color.Blend[i]._UsesDualSrc) {
+ _mesa_error(ctx, GL_INVALID_OPERATION,
+ "dual source blend on illegal attachment");
+ return GL_FALSE;
}
}
return GL_TRUE;