From 2c70b7776ab481d8bde59cb06d4a95b6dea38b94 Mon Sep 17 00:00:00 2001 From: Tim Van Patten Date: Tue, 9 Apr 2019 14:41:16 -0600 Subject: [PATCH] Check for GLES 3.0 Context Before Using 3.0 Functionality The additional testFramebufferColorEncoding() testing requires a GLES 3.0 context, but only a 2.0 context is requested. This change will continue to execute those tests, but only after verifying a 3.0 context was returned. Affects: dEQP-EGL.functional.wide_color.window_fp16_colorspace_p3_passthrough dEQP-EGL.functional.wide_color.pbuffer_fp16_colorspace_p3_passthrough dEQP-EGL.functional.wide_color.window_1010102_colorspace_p3_passthrough dEQP-EGL.functional.wide_color.pbuffer_1010102_colorspace_p3_passthrough dEQP-EGL.functional.wide_color.window_8888_colorspace_p3_passthrough dEQP-EGL.functional.wide_color.pbuffer_8888_colorspace_p3_passthrough dEQP-EGL.functional.wide_color.window_888_colorspace_p3_passthrough dEQP-EGL.functional.wide_color.pbuffer_888_colorspace_p3_passthrough Components: EGL Bug: 1704 Google Bug: 124910588 Change-Id: Ifc81308c569923d4d777cd5c5329568b579f1ac1 --- modules/egl/teglWideColorTests.cpp | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/modules/egl/teglWideColorTests.cpp b/modules/egl/teglWideColorTests.cpp index 16be114..c053789 100644 --- a/modules/egl/teglWideColorTests.cpp +++ b/modules/egl/teglWideColorTests.cpp @@ -1194,7 +1194,15 @@ void WideColorSurfaceTest::doClearTest (EGLSurface surface) reference += it->increment; - testFramebufferColorEncoding(); + // Detect compatible GLES context by querying GL_MAJOR_VERSION. + // This query does not exist on GLES2 so succeeding query implies GLES3+ context. + glw::GLint majorVersion = 0; + m_gl.getIntegerv(GL_MAJOR_VERSION, &majorVersion); + if (m_gl.getError() == GL_NO_ERROR) + { + // This device is ES3 compatible, so do some additional testing + testFramebufferColorEncoding(); + } } EGLU_CHECK_CALL(egl, swapBuffers(m_eglDisplay, surface)); -- 2.7.4