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
diff --git a/framework/opengl/gluStateReset.cpp b/framework/opengl/gluStateReset.cpp
index f91b921..7a0eba2 100644
--- a/framework/opengl/gluStateReset.cpp
+++ b/framework/opengl/gluStateReset.cpp
@@ -369,6 +369,11 @@
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");
}