summaryrefslogtreecommitdiffstats
path: root/src/mesa/main/enable.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesa/main/enable.c')
-rw-r--r--src/mesa/main/enable.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/mesa/main/enable.c b/src/mesa/main/enable.c
index 1b0f7417aff..bbe66304eb9 100644
--- a/src/mesa/main/enable.c
+++ b/src/mesa/main/enable.c
@@ -1119,7 +1119,9 @@ _mesa_set_enable(struct gl_context *ctx, GLenum cap, GLboolean state)
/* GL3.0 - GL_framebuffer_sRGB */
case GL_FRAMEBUFFER_SRGB_EXT:
- CHECK_EXTENSION(EXT_framebuffer_sRGB);
+ if (!_mesa_has_EXT_framebuffer_sRGB(ctx) &&
+ !_mesa_has_EXT_sRGB_write_control(ctx))
+ goto invalid_enum_error;
_mesa_set_framebuffer_srgb(ctx, state);
return;
@@ -1743,7 +1745,9 @@ _mesa_IsEnabled( GLenum cap )
/* GL3.0 - GL_framebuffer_sRGB */
case GL_FRAMEBUFFER_SRGB_EXT:
- CHECK_EXTENSION(EXT_framebuffer_sRGB);
+ if (!_mesa_has_EXT_framebuffer_sRGB(ctx) &&
+ !_mesa_has_EXT_sRGB_write_control(ctx))
+ goto invalid_enum_error;
return ctx->Color.sRGBEnabled;
/* GL_OES_EGL_image_external */