}
-/*
- * ARB_blend_func_extended - ERRORS section
- * "The error INVALID_OPERATION is generated by Begin or any procedure that
- * implicitly calls Begin if any draw buffer has a blend function requiring the
- * second color input (SRC1_COLOR, ONE_MINUS_SRC1_COLOR, SRC1_ALPHA or
- * ONE_MINUS_SRC1_ALPHA), and a framebuffer is bound that has more than
- * the value of MAX_DUAL_SOURCE_DRAW_BUFFERS-1 active color attachements."
- */
-static GLboolean
-_mesa_check_blend_func_error(struct gl_context *ctx)
+static bool
+check_blend_func_error(struct gl_context *ctx)
{
- GLuint i;
- for (i = ctx->Const.MaxDualSourceDrawBuffers;
+ /* The ARB_blend_func_extended spec's ERRORS section says:
+ *
+ * "The error INVALID_OPERATION is generated by Begin or any procedure
+ * that implicitly calls Begin if any draw buffer has a blend function
+ * requiring the second color input (SRC1_COLOR, ONE_MINUS_SRC1_COLOR,
+ * SRC1_ALPHA or ONE_MINUS_SRC1_ALPHA), and a framebuffer is bound that
+ * has more than the value of MAX_DUAL_SOURCE_DRAW_BUFFERS-1 active
+ * color attachements."
+ */
+ for (unsigned 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 false;
}
}
- return GL_TRUE;
+ return true;
}
return GL_FALSE;
}
- if (_mesa_check_blend_func_error(ctx) == GL_FALSE) {
+ if (!check_blend_func_error(ctx)) {
return GL_FALSE;
}