mesa/main: correct extension-checks for GL_PRIMITIVE_RESTART_FIXED_INDEX
authorErik Faye-Lund <erik.faye-lund@collabora.com>
Mon, 25 Feb 2019 12:34:41 +0000 (13:34 +0100)
committerErik Faye-Lund <erik.faye-lund@collabora.com>
Wed, 29 May 2019 08:54:09 +0000 (10:54 +0200)
This shouldn't be allowed in GLES 1/2.

Signed-off-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
src/mesa/main/enable.c

index 42b862b625899fcb55492a0ec26be1b99f188d08..3d59d322ca5956ce54b602a554d86bf9c3200034 100644 (file)
@@ -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 */