From b9e9d701dc8f08e6f9934de00a4059800a23d159 Mon Sep 17 00:00:00 2001 From: Erik Faye-Lund Date: Mon, 25 Feb 2019 13:34:41 +0100 Subject: [PATCH] mesa/main: correct extension-checks for GL_PRIMITIVE_RESTART_FIXED_INDEX This shouldn't be allowed in GLES 1/2. Signed-off-by: Erik Faye-Lund Reviewed-by: Ian Romanick --- src/mesa/main/enable.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/mesa/main/enable.c b/src/mesa/main/enable.c index 42b862b6258..3d59d322ca5 100644 --- a/src/mesa/main/enable.c +++ b/src/mesa/main/enable.c @@ -1108,7 +1108,7 @@ _mesa_set_enable(struct gl_context *ctx, GLenum cap, GLboolean state) break; case GL_PRIMITIVE_RESTART_FIXED_INDEX: - if (!_mesa_is_gles3(ctx) && !ctx->Extensions.ARB_ES3_compatibility) + if (!_mesa_is_gles3(ctx) && !_mesa_has_ARB_ES3_compatibility(ctx)) goto invalid_enum_error; if (ctx->Array.PrimitiveRestartFixedIndex != state) { FLUSH_VERTICES(ctx, 0); @@ -1739,9 +1739,8 @@ _mesa_IsEnabled( GLenum cap ) return ctx->Array.PrimitiveRestart; case GL_PRIMITIVE_RESTART_FIXED_INDEX: - if (!_mesa_is_gles3(ctx) && !ctx->Extensions.ARB_ES3_compatibility) { + if (!_mesa_is_gles3(ctx) && !_mesa_has_ARB_ES3_compatibility(ctx)) goto invalid_enum_error; - } return ctx->Array.PrimitiveRestartFixedIndex; /* GL3.0 - GL_framebuffer_sRGB */ -- 2.30.2