summaryrefslogtreecommitdiffstats
path: root/src/mesa/main/blend.c
diff options
context:
space:
mode:
authorMarek Olšák <[email protected]>2015-06-10 02:53:33 +0200
committerMarek Olšák <[email protected]>2015-07-03 16:23:28 +0200
commit9e127325ef461a11345df7ba6884e77c7168ab37 (patch)
tree4e35e4070d7394409e0014e1d0ec621b88b257b2 /src/mesa/main/blend.c
parent32aa1d769de070c4e8756922571c35deaf12a40a (diff)
mesa: fix sRGB rendering for GLES1
Diffstat (limited to 'src/mesa/main/blend.c')
-rw-r--r--src/mesa/main/blend.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/src/mesa/main/blend.c b/src/mesa/main/blend.c
index d869fa2aa09..d36530541ec 100644
--- a/src/mesa/main/blend.c
+++ b/src/mesa/main/blend.c
@@ -930,12 +930,10 @@ void _mesa_init_color( struct gl_context * ctx )
ctx->Color._ClampFragmentColor = GL_FALSE;
ctx->Color.ClampReadColor = GL_FIXED_ONLY_ARB;
- if (ctx->API == API_OPENGLES2) {
- /* GLES 3 behaves as though GL_FRAMEBUFFER_SRGB is always enabled. */
- ctx->Color.sRGBEnabled = GL_TRUE;
- } else {
- ctx->Color.sRGBEnabled = GL_FALSE;
- }
+ /* GLES 1/2/3 behaves as though GL_FRAMEBUFFER_SRGB is always enabled
+ * if EGL_KHR_gl_colorspace has been used to request sRGB.
+ */
+ ctx->Color.sRGBEnabled = _mesa_is_gles(ctx);
}
/*@}*/