cogl: glBlendEquationSeparate is always available

So we don't need glBlendEquation.

https://gitlab.gnome.org/GNOME/mutter/merge_requests/903
This commit is contained in:
Adam Jackson 2019-10-22 19:27:53 -04:00 committed by Georges Basile Stavracas Neto
parent 6944839ab6
commit 07ca100130
3 changed files with 2 additions and 20 deletions

View File

@ -216,16 +216,6 @@ validate_blend_statements (CoglBlendStringStatement *statements,
_COGL_GET_CONTEXT (ctx, 0);
if (n_statements == 2 &&
!ctx->glBlendEquationSeparate &&
statements[0].function->type != statements[1].function->type)
{
error_string = "Separate blend functions for the RGB an A "
"channels isn't supported by the driver";
detail = COGL_BLEND_STRING_ERROR_GPU_UNSUPPORTED_ERROR;
goto error;
}
for (i = 0; i < n_statements; i++)
for (j = 0; j < statements[i].function->argc; j++)
{

View File

@ -495,14 +495,8 @@ _cogl_pipeline_flush_color_blend_alpha_depth_state (
GE (ctx, glBlendColor (red, green, blue, alpha));
}
if (ctx->glBlendEquationSeparate &&
blend_state->blend_equation_rgb !=
blend_state->blend_equation_alpha)
GE (ctx,
glBlendEquationSeparate (blend_state->blend_equation_rgb,
blend_state->blend_equation_alpha));
else
GE (ctx, glBlendEquation (blend_state->blend_equation_rgb));
GE (ctx, glBlendEquationSeparate (blend_state->blend_equation_rgb,
blend_state->blend_equation_alpha));
if (ctx->glBlendFuncSeparate &&
(blend_state->blend_src_factor_rgb !=

View File

@ -121,8 +121,6 @@ COGL_EXT_BEGIN (blending, 1, 2,
COGL_EXT_IN_GLES2,
"\0",
"\0")
COGL_EXT_FUNCTION (void, glBlendEquation,
(GLenum mode))
COGL_EXT_FUNCTION (void, glBlendColor,
(GLclampf red,
GLclampf green,