From de740d7b0aa39419c625cb3640e272c85b58a8a2 Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Tue, 20 Sep 2011 11:55:58 -0600 Subject: meta: use _mesa_set_enable() in more places Avoids an extra context lookup. Reviewed-by: Eric Anholt --- src/mesa/drivers/common/meta.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/mesa') diff --git a/src/mesa/drivers/common/meta.c b/src/mesa/drivers/common/meta.c index be1953ab2f9..9703475d031 100644 --- a/src/mesa/drivers/common/meta.c +++ b/src/mesa/drivers/common/meta.c @@ -1223,7 +1223,7 @@ blitframebuffer_texture(struct gl_context *ctx, GL_SKIP_DECODE_EXT); } if (ctx->Extensions.EXT_framebuffer_sRGB) { - _mesa_Disable(GL_FRAMEBUFFER_SRGB_EXT); + _mesa_set_enable(ctx, GL_FRAMEBUFFER_SRGB_EXT, GL_FALSE); } _mesa_TexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_REPLACE); @@ -1291,7 +1291,7 @@ blitframebuffer_texture(struct gl_context *ctx, _mesa_TexParameteri(target, GL_TEXTURE_SRGB_DECODE_EXT, srgbSave); } if (ctx->Extensions.EXT_framebuffer_sRGB && fbo_srgb_save) { - _mesa_Enable(GL_FRAMEBUFFER_SRGB_EXT); + _mesa_set_enable(ctx, GL_FRAMEBUFFER_SRGB_EXT, GL_TRUE); } /* Done with color buffer */ @@ -2748,7 +2748,7 @@ _mesa_meta_GenerateMipmap(struct gl_context *ctx, GLenum target, GL_SKIP_DECODE_EXT); } if (ctx->Extensions.EXT_framebuffer_sRGB) { - _mesa_Disable(GL_FRAMEBUFFER_SRGB_EXT); + _mesa_set_enable(ctx, GL_FRAMEBUFFER_SRGB_EXT, GL_FALSE); } _mesa_set_enable(ctx, target, GL_TRUE); @@ -2900,7 +2900,7 @@ _mesa_meta_GenerateMipmap(struct gl_context *ctx, GLenum target, srgbDecodeSave); } if (ctx->Extensions.EXT_framebuffer_sRGB && srgbBufferSave) { - _mesa_Enable(GL_FRAMEBUFFER_SRGB_EXT); + _mesa_set_enable(ctx, GL_FRAMEBUFFER_SRGB_EXT, GL_TRUE); } _mesa_lock_texture(ctx, texObj); /* relock */ @@ -3207,7 +3207,7 @@ decompress_texture_image(struct gl_context *ctx, GL_SKIP_DECODE_EXT); } if (ctx->Extensions.EXT_framebuffer_sRGB) { - _mesa_Disable(GL_FRAMEBUFFER_SRGB_EXT); + _mesa_set_enable(ctx, GL_FRAMEBUFFER_SRGB_EXT, GL_FALSE); } /* render quad w/ texture into renderbuffer */ -- cgit v1.2.3