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

Author: Erik Faye-Lund <[email protected]>
Date:   Mon Feb 25 13:00:07 2019 +0100

mesa/main: clean up extension-check for GL_FRAGMENT_SHADER_ATI

Signed-off-by: Erik Faye-Lund <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/329>

---

 src/mesa/main/enable.c | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)

diff --git a/src/mesa/main/enable.c b/src/mesa/main/enable.c
index a5a69a3a68a..6495d4154c2 100644
--- a/src/mesa/main/enable.c
+++ b/src/mesa/main/enable.c
@@ -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:

_______________________________________________
mesa-commit mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/mesa-commit

Reply via email to