Require EGL_KHR_gl_colorspace for wide_color tests.
authorTapani Pälli <tapani.palli@intel.com>
Mon, 28 Aug 2017 06:20:53 +0000 (09:20 +0300)
committerTapani Pälli <tapani.palli@intel.com>
Tue, 29 Aug 2017 04:50:01 +0000 (07:50 +0300)
These tests utilize enum EGL_GL_COLORSPACE_KHR which is introduced by
EGL_KHR_gl_colorspace extension, check first for support and skip the
test if extension is not supported.

v2: loosen the check, only check when enum in use (Courtney)

Change-Id: I891a6fdcce49ac6dcd42577076d4cf64a143dd38
Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
modules/egl/teglWideColorTests.cpp

index 9a5cf71..4508433 100644 (file)
@@ -605,6 +605,9 @@ void WideColorSurfaceTest::init (void)
                        break;
        }
 
+       if (m_colorSpace != DE_NULL && !eglu::hasExtension(egl, m_eglDisplay, "EGL_KHR_gl_colorspace"))
+               TCU_THROW(NotSupportedError, "EGL_KHR_gl_colorspace is not supported");
+
        switch (m_colorSpace) {
                case EGL_GL_COLORSPACE_DISPLAY_P3_EXT:
                        checkDisplayP3Support();