mesa/main: clean up extension-check for GL_FRAGMENT_SHADER_ATI
authorErik Faye-Lund <erik.faye-lund@collabora.com>
Mon, 25 Feb 2019 12:00:07 +0000 (13:00 +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 a5a69a3a68ac1868f13837d2351e1ec94f1894b8..6495d4154c2b3a0677d064334ba988e22d08a46f 100644 (file)
@@ -1138,9 +1138,8 @@ _mesa_set_enable(struct gl_context *ctx, GLenum cap, GLboolean state)
          break;
 
       case GL_FRAGMENT_SHADER_ATI:
-         if (ctx->API != API_OPENGL_COMPAT)
-            goto invalid_enum_error;
-        CHECK_EXTENSION(ATI_fragment_shader);
+        if (!_mesa_has_ATI_fragment_shader(ctx))
+           goto invalid_enum_error;
         if (ctx->ATIFragmentShader.Enabled == state)
            return;
         FLUSH_VERTICES(ctx, _NEW_PROGRAM);
@@ -1862,9 +1861,8 @@ _mesa_IsEnabled( GLenum cap )
          return ctx->Transform.DepthClampFar;
 
       case GL_FRAGMENT_SHADER_ATI:
-         if (ctx->API != API_OPENGL_COMPAT)
+         if (!_mesa_has_ATI_fragment_shader(ctx))
             goto invalid_enum_error;
-         CHECK_EXTENSION(ATI_fragment_shader);
          return ctx->ATIFragmentShader.Enabled;
 
       case GL_TEXTURE_CUBE_MAP_SEAMLESS: