aboutsummaryrefslogtreecommitdiffstats
path: root/src/mesa/main/enable.c
diff options
context:
space:
mode:
authorErik Faye-Lund <[email protected]>2019-02-25 13:27:07 +0100
committerErik Faye-Lund <[email protected]>2019-05-29 10:54:09 +0200
commit34ade0dc7c1d8cc974435432d1ce4bdb034443c8 (patch)
treeba4dab0a943e71930f2356442affd221da680bb2 /src/mesa/main/enable.c
parentc0dabc619211b83f5eb77aea03d0c1a3759f975d (diff)
mesa/main: correct extension-checks for GL_BLEND_ADVANCED_COHERENT_KHR
KHR_blend_equation_advanced_coherent isn't exposed on OpenGL ES 1.x, so we shouldn't allow its enums there either. Signed-off-by: Erik Faye-Lund <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
Diffstat (limited to 'src/mesa/main/enable.c')
-rw-r--r--src/mesa/main/enable.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/mesa/main/enable.c b/src/mesa/main/enable.c
index bbe66304eb9..42b862b6258 100644
--- a/src/mesa/main/enable.c
+++ b/src/mesa/main/enable.c
@@ -1149,7 +1149,8 @@ _mesa_set_enable(struct gl_context *ctx, GLenum cap, GLboolean state)
break;
case GL_BLEND_ADVANCED_COHERENT_KHR:
- CHECK_EXTENSION(KHR_blend_equation_advanced_coherent);
+ if (!_mesa_has_KHR_blend_equation_advanced_coherent(ctx))
+ goto invalid_enum_error;
if (ctx->Color.BlendCoherent == state)
return;
FLUSH_VERTICES(ctx, ctx->DriverFlags.NewBlend ? 0 : _NEW_COLOR);
@@ -1772,7 +1773,8 @@ _mesa_IsEnabled( GLenum cap )
return ctx->Multisample.SampleShading;
case GL_BLEND_ADVANCED_COHERENT_KHR:
- CHECK_EXTENSION(KHR_blend_equation_advanced_coherent);
+ if (!_mesa_has_KHR_blend_equation_advanced_coherent(ctx))
+ goto invalid_enum_error;
return ctx->Color.BlendCoherent;
case GL_CONSERVATIVE_RASTERIZATION_INTEL: