aboutsummaryrefslogtreecommitdiff
path: root/mesalib/src/mesa/main/attrib.c
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2012-08-13 10:11:17 +0200
committermarha <marha@users.sourceforge.net>2012-08-13 10:11:17 +0200
commitf5a4fa87e844b3ea2658a2355a4c4ac3393a65a1 (patch)
tree921a5a742930124e7bd7e9a7e73f6029bd74338d /mesalib/src/mesa/main/attrib.c
parentec4051f308e8e84146e0ecc39b6d228e500e9636 (diff)
parent9ddf44af81782451cee798e06749ce3067a14a41 (diff)
downloadvcxsrv-f5a4fa87e844b3ea2658a2355a4c4ac3393a65a1.tar.gz
vcxsrv-f5a4fa87e844b3ea2658a2355a4c4ac3393a65a1.tar.bz2
vcxsrv-f5a4fa87e844b3ea2658a2355a4c4ac3393a65a1.zip
Merge remote-tracking branch 'origin/released'
Diffstat (limited to 'mesalib/src/mesa/main/attrib.c')
-rw-r--r--mesalib/src/mesa/main/attrib.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/mesalib/src/mesa/main/attrib.c b/mesalib/src/mesa/main/attrib.c
index 8bc7c348f..9cab35b0c 100644
--- a/mesalib/src/mesa/main/attrib.c
+++ b/mesalib/src/mesa/main/attrib.c
@@ -135,6 +135,9 @@ struct gl_enable_attrib
/* GL_ARB_point_sprite / GL_NV_point_sprite */
GLboolean PointSprite;
GLboolean FragmentShaderATI;
+
+ /* GL_ARB_framebuffer_sRGB / GL_EXT_framebuffer_sRGB */
+ GLboolean sRGBEnabled;
};
@@ -322,6 +325,9 @@ _mesa_PushAttrib(GLbitfield mask)
attr->VertexProgramPointSize = ctx->VertexProgram.PointSizeEnabled;
attr->VertexProgramTwoSide = ctx->VertexProgram.TwoSideEnabled;
save_attrib_data(&head, GL_ENABLE_BIT, attr);
+
+ /* GL_ARB_framebuffer_sRGB / GL_EXT_framebuffer_sRGB */
+ attr->sRGBEnabled = ctx->Color.sRGBEnabled;
}
if (mask & GL_EVAL_BIT) {
@@ -617,6 +623,10 @@ pop_enable_group(struct gl_context *ctx, const struct gl_enable_attrib *enable)
enable->VertexProgramTwoSide,
GL_VERTEX_PROGRAM_TWO_SIDE_ARB);
+ /* GL_ARB_framebuffer_sRGB / GL_EXT_framebuffer_sRGB */
+ TEST_AND_UPDATE(ctx->Color.sRGBEnabled, enable->sRGBEnabled,
+ GL_FRAMEBUFFER_SRGB);
+
/* texture unit enables */
for (i = 0; i < ctx->Const.MaxTextureUnits; i++) {
const GLbitfield enabled = enable->Texture[i];
@@ -981,6 +991,9 @@ _mesa_PopAttrib(void)
_mesa_set_enable(ctx, GL_DITHER, color->DitherFlag);
_mesa_ClampColorARB(GL_CLAMP_FRAGMENT_COLOR_ARB, color->ClampFragmentColor);
_mesa_ClampColorARB(GL_CLAMP_READ_COLOR_ARB, color->ClampReadColor);
+
+ /* GL_ARB_framebuffer_sRGB / GL_EXT_framebuffer_sRGB */
+ _mesa_set_enable(ctx, GL_FRAMEBUFFER_SRGB, color->sRGBEnabled);
}
break;
case GL_CURRENT_BIT: