From: Erik Faye-Lund Date: Mon, 25 Feb 2019 12:34:41 +0000 (+0100) Subject: mesa/main: correct extension-checks for GL_PRIMITIVE_RESTART_FIXED_INDEX X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=b9e9d701dc8f08e6f9934de00a4059800a23d159;p=mesa.git 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 --- 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 */