Mesa (master): mesa/main: clean up extension-check for GL_TEXTURE_RECTANGLE

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Wed Apr 1 11:21:52 UTC 2020


Module: Mesa
Branch: master
Commit: 421a1accf0e7840f476d88e63e5861ec4f8deb76
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=421a1accf0e7840f476d88e63e5861ec4f8deb76

Author: Erik Faye-Lund <erik.faye-lund at collabora.com>
Date:   Mon Feb 25 12:52:37 2019 +0100

mesa/main: clean up extension-check for GL_TEXTURE_RECTANGLE

Signed-off-by: Erik Faye-Lund <erik.faye-lund at collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/329>

---

 src/mesa/main/enable.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/src/mesa/main/enable.c b/src/mesa/main/enable.c
index b9743dd66f4..945c7cf6aab 100644
--- a/src/mesa/main/enable.c
+++ b/src/mesa/main/enable.c
@@ -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 */



More information about the mesa-commit mailing list