aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2011-09-17 11:13:31 -0600
committerBrian Paul <[email protected]>2011-09-17 11:14:21 -0600
commit6e423253e74b462950445a7c10a913f5ab2a11c1 (patch)
treec3797d887f2eda1235ca811ac280e428d5ff2f45 /src
parent3b29631c335bfc4a09c302cfdb7a993097c75096 (diff)
meta: fix/add checks for GL_EXT_framebuffer_sRGB
This fixes spurious GL errors when the GL_EXT_framebuffer_sRGB extension is not supported. Note: This is a candidate for the 7.11 branch
Diffstat (limited to 'src')
-rw-r--r--src/mesa/drivers/common/meta.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/mesa/drivers/common/meta.c b/src/mesa/drivers/common/meta.c
index 482bd98a254..1b71aa19445 100644
--- a/src/mesa/drivers/common/meta.c
+++ b/src/mesa/drivers/common/meta.c
@@ -1222,7 +1222,9 @@ blitframebuffer_texture(struct gl_context *ctx,
_mesa_TexParameteri(target, GL_TEXTURE_SRGB_DECODE_EXT,
GL_SKIP_DECODE_EXT);
}
- _mesa_Disable(GL_FRAMEBUFFER_SRGB_EXT);
+ if (ctx->Extensions.EXT_framebuffer_sRGB) {
+ _mesa_Disable(GL_FRAMEBUFFER_SRGB_EXT);
+ }
_mesa_TexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_REPLACE);
_mesa_set_enable(ctx, target, GL_TRUE);
@@ -1288,7 +1290,7 @@ blitframebuffer_texture(struct gl_context *ctx,
if (ctx->Extensions.EXT_texture_sRGB_decode) {
_mesa_TexParameteri(target, GL_TEXTURE_SRGB_DECODE_EXT, srgbSave);
}
- if (ctx->Extensions.EXT_texture_sRGB_decode && fbo_srgb_save) {
+ if (ctx->Extensions.EXT_framebuffer_sRGB && fbo_srgb_save) {
_mesa_Enable(GL_FRAMEBUFFER_SRGB_EXT);
}