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;
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);
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);
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()");