Reset GL_FRAMEBUFFER_SRGB state for ES tests
authorjames.glanville <james.glanville@imgtec.com>
Wed, 17 May 2017 12:45:37 +0000 (13:45 +0100)
committerMika Isojärvi <misojarvi@google.com>
Tue, 11 Jul 2017 17:30:37 +0000 (10:30 -0700)
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

index f91b921..7a0eba2 100644 (file)
@@ -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");
        }