mesa/main: clean up extension-check for GL_TEXTURE_RECTANGLE
authorErik Faye-Lund <erik.faye-lund@collabora.com>
Mon, 25 Feb 2019 11:52:37 +0000 (12:52 +0100)
committerErik Faye-Lund <erik.faye-lund@collabora.com>
Wed, 1 Apr 2020 10:57:57 +0000 (12:57 +0200)
Signed-off-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/329>

src/mesa/main/enable.c

index b9743dd66f41847deda6d371da48277aaa94e3f6..945c7cf6aab2598ca8054be7f0b0ff3a10faf455 100644 (file)
@@ -1058,9 +1058,8 @@ _mesa_set_enable(struct gl_context *ctx, GLenum cap, GLboolean state)
 
       /* GL_NV_texture_rectangle */
       case GL_TEXTURE_RECTANGLE_NV:
-         if (ctx->API != API_OPENGL_COMPAT)
+         if (!_mesa_has_NV_texture_rectangle(ctx))
             goto invalid_enum_error;
-         CHECK_EXTENSION(NV_texture_rectangle);
          if (!enable_texture(ctx, state, TEXTURE_RECT_BIT)) {
             return;
          }
@@ -1827,9 +1826,8 @@ _mesa_IsEnabled( GLenum cap )
 
       /* GL_NV_texture_rectangle */
       case GL_TEXTURE_RECTANGLE_NV:
-         if (ctx->API != API_OPENGL_COMPAT)
+         if (!_mesa_has_NV_texture_rectangle(ctx))
             goto invalid_enum_error;
-         CHECK_EXTENSION(NV_texture_rectangle);
          return is_texture_enabled(ctx, TEXTURE_RECT_BIT);
 
       /* GL_EXT_stencil_two_side */