diff options
author | marha <marha@users.sourceforge.net> | 2012-09-27 15:09:52 +0200 |
---|---|---|
committer | marha <marha@users.sourceforge.net> | 2012-09-27 15:09:52 +0200 |
commit | 2cf1e3de4759264eac2fa8ac758ea750636542f8 (patch) | |
tree | 80298679c1f3134223c592ad3939739aee333eb8 /mesalib/src/mesa/main/enable.c | |
parent | 0ebcd32e91486caccc041c8ca23e39e160b24702 (diff) | |
download | vcxsrv-2cf1e3de4759264eac2fa8ac758ea750636542f8.tar.gz vcxsrv-2cf1e3de4759264eac2fa8ac758ea750636542f8.tar.bz2 vcxsrv-2cf1e3de4759264eac2fa8ac758ea750636542f8.zip |
mesa xserver pixman xkeyboard-config git update 27 sep 2012
xserver 0b02150c27e98f996e10d7489f9f67a30e4e3497
pixman aff796d6cee4cb81f0352c2f7d0c994229bd5ca1
xkeyboard-config 33ccc8f4b3f1c6ae95242cf9cb19e8df87f6f37e
mesa 6d6aef79742ece3bb570ae44e6c13791aae15e01
Diffstat (limited to 'mesalib/src/mesa/main/enable.c')
-rw-r--r-- | mesalib/src/mesa/main/enable.c | 26 |
1 files changed, 21 insertions, 5 deletions
diff --git a/mesalib/src/mesa/main/enable.c b/mesalib/src/mesa/main/enable.c index 3643cfb52..a607bdc10 100644 --- a/mesalib/src/mesa/main/enable.c +++ b/mesalib/src/mesa/main/enable.c @@ -264,6 +264,23 @@ _mesa_set_multisample(struct gl_context *ctx, GLboolean state) } /** + * Helper function to enable or disable GL_FRAMEBUFFER_SRGB, skipping the + * check for whether the API supports it (GLES doesn't). + */ +void +_mesa_set_framebuffer_srgb(struct gl_context *ctx, GLboolean state) +{ + if (ctx->Color.sRGBEnabled == state) + return; + FLUSH_VERTICES(ctx, _NEW_BUFFERS); + ctx->Color.sRGBEnabled = state; + + if (ctx->Driver.Enable) { + ctx->Driver.Enable(ctx, GL_FRAMEBUFFER_SRGB, state); + } +} + +/** * Helper function to enable or disable state. * * \param ctx GL context. @@ -1044,12 +1061,11 @@ _mesa_set_enable(struct gl_context *ctx, GLenum cap, GLboolean state) /* GL3.0 - GL_framebuffer_sRGB */ case GL_FRAMEBUFFER_SRGB_EXT: - if (!_mesa_is_desktop_gl(ctx) && !_mesa_is_gles3(ctx)) + if (!_mesa_is_desktop_gl(ctx)) goto invalid_enum_error; CHECK_EXTENSION(EXT_framebuffer_sRGB, cap); - FLUSH_VERTICES(ctx, _NEW_BUFFERS); - ctx->Color.sRGBEnabled = state; - break; + _mesa_set_framebuffer_srgb(ctx, state); + return; /* GL_OES_EGL_image_external */ case GL_TEXTURE_EXTERNAL_OES: @@ -1699,7 +1715,7 @@ _mesa_IsEnabled( GLenum cap ) /* GL3.0 - GL_framebuffer_sRGB */ case GL_FRAMEBUFFER_SRGB_EXT: - if (!_mesa_is_desktop_gl(ctx) && !_mesa_is_gles3(ctx)) + if (!_mesa_is_desktop_gl(ctx)) goto invalid_enum_error; CHECK_EXTENSION(EXT_framebuffer_sRGB); return ctx->Color.sRGBEnabled; |