Merge changes I5f7e56e3,I7f88e1da into oreo-cts-dev am: 67694b5635 am: aa425927d0...
[platform/upstream/VK-GL-CTS.git] / modules / egl / teglWideColorTests.cpp
index d6a8549..31afd28 100644 (file)
@@ -406,7 +406,7 @@ void WideColorTest::checkFP16Support (void)
        if (numConfigs <= 0)
        {
                log << tcu::TestLog::Message << "No configs returned." << tcu::TestLog::EndMessage;
-               TCU_THROW(NotSupportedError, "10:10:10:2 pixel format is not supported");
+               TCU_THROW(NotSupportedError, "16:16:16:16 pixel format is not supported");
        }
 
        log << tcu::TestLog::Message << numConfigs << " configs returned" << tcu::TestLog::EndMessage;
@@ -1125,7 +1125,7 @@ void WideColorSurfaceTest::executeTest (void)
                attribs.push_back(128);
                attribs.push_back(EGL_HEIGHT);
                attribs.push_back(128);
-               if (m_colorSpace)
+               if (m_colorSpace != EGL_NONE)
                {
                        attribs.push_back(EGL_GL_COLORSPACE_KHR);
                        attribs.push_back(m_colorSpace);
@@ -1153,7 +1153,7 @@ void WideColorSurfaceTest::executeTest (void)
 
                de::UniquePtr<eglu::NativeWindow>       window                  (windowFactory.createWindow(&nativeDisplay, m_eglDisplay, m_eglConfig, DE_NULL, eglu::WindowParams(128, 128, eglu::parseWindowVisibility(m_testCtx.getCommandLine()))));
                std::vector<EGLAttrib>          attribs;
-               if (m_colorSpace)
+               if (m_colorSpace != EGL_NONE)
                {
                        attribs.push_back(EGL_GL_COLORSPACE_KHR);
                        attribs.push_back(m_colorSpace);
@@ -1161,7 +1161,18 @@ void WideColorSurfaceTest::executeTest (void)
                attribs.push_back(EGL_NONE);
                attribs.push_back(EGL_NONE);
 
-               const EGLSurface                                        surface                 = eglu::createWindowSurface(nativeDisplay, *window, m_eglDisplay, m_eglConfig, attribs.data());
+               EGLSurface      surface;
+               try
+               {
+                       surface = eglu::createWindowSurface(nativeDisplay, *window, m_eglDisplay, m_eglConfig, attribs.data());
+               }
+               catch (const eglu::Error& error)
+               {
+                       if (error.getError() == EGL_BAD_MATCH)
+                               TCU_THROW(NotSupportedError, "createWindowSurface is not supported for this config");
+
+                       throw;
+               }
                TCU_CHECK(surface != EGL_NO_SURFACE);
                EGLU_CHECK_MSG(egl, "eglCreateWindowSurface()");