From: Courtney Goeltzenleuchter Date: Mon, 11 Sep 2017 19:06:48 +0000 (-0600) Subject: Fix handling of EGL_NONE as color space X-Git-Tag: upstream/0.1.0^2^2~9^2~26 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=dd7aa9e15d5742ad9b1716c29e2bcca16824a1cc;p=platform%2Fupstream%2FVK-GL-CTS.git Fix handling of EGL_NONE as color space Color space of EGL_NONE was getting passed down and driver threw EGL_BAD_ATTRIBUTE in response. Issue was caused when changing the colorspace from nullptr to EGL_NONE, missed a couple of places that needed to test against EGL_NONE instead of nullptr. Bug: 65376495 Test: adb -d shell am start \ -n com.drawelements.deqp/android.app.NativeActivity \ -e cmdLine '"deqp --deqp-case=dEQP-EGL.functional.wide_color.* \ --deqp-log-filename=/sdcard/dEQP-Log.qpa"' Change-Id: If8812725be9d3858bf610c647ba53ff38944dd50 (cherry picked from commit 0d4e616c35fd3cbad82eb3c1f0a604dbbc6c8662) --- diff --git a/modules/egl/teglWideColorTests.cpp b/modules/egl/teglWideColorTests.cpp index e8147ff..24ed3a8 100644 --- a/modules/egl/teglWideColorTests.cpp +++ b/modules/egl/teglWideColorTests.cpp @@ -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 window (windowFactory.createWindow(&nativeDisplay, m_eglDisplay, m_eglConfig, DE_NULL, eglu::WindowParams(128, 128, eglu::parseWindowVisibility(m_testCtx.getCommandLine())))); std::vector attribs; - if (m_colorSpace) + if (m_colorSpace != EGL_NONE) { attribs.push_back(EGL_GL_COLORSPACE_KHR); attribs.push_back(m_colorSpace);