From: Erik Faye-Lund Date: Mon, 25 Feb 2019 12:00:07 +0000 (+0100) Subject: mesa/main: clean up extension-check for GL_FRAGMENT_SHADER_ATI X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=994675b24d74e9092d9b41541436e911ae8faf18;p=mesa.git mesa/main: clean up extension-check for GL_FRAGMENT_SHADER_ATI Signed-off-by: Erik Faye-Lund Part-of: --- 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: