From 052d2a58ced7c64c708fdaf71d81bd6d0b066efe Mon Sep 17 00:00:00 2001 From: "james.glanville" Date: Wed, 17 May 2017 13:45:37 +0100 Subject: [PATCH] Reset GL_FRAMEBUFFER_SRGB state for ES tests GL_EXT_sRGB_write_control adds new state "GL_FRAMEBUFFER_SRGB" which is enabled by default. This was not reset between tests, meaning state could leak between tests. Affects: dEQP-GLES31.functional.fbo.srgb_write_control. framebuffer_srgb_enabled Components: AOSP --- framework/opengl/gluStateReset.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/framework/opengl/gluStateReset.cpp b/framework/opengl/gluStateReset.cpp index 63319d6..fe159b3 100644 --- a/framework/opengl/gluStateReset.cpp +++ b/framework/opengl/gluStateReset.cpp @@ -369,6 +369,11 @@ void resetStateES (const RenderContext& renderCtx, const ContextInfo& ctxInfo) gl.enable (GL_DITHER); + if (ctxInfo.isExtensionSupported("GL_EXT_sRGB_write_control")) + { + gl.enable (GL_FRAMEBUFFER_SRGB); + } + GLU_EXPECT_NO_ERROR(gl.getError(), "Pixel operation state reset failed"); } -- 2.7.4