Get an EGLConfig supporting pbuffers
authorJuan A. Suarez Romero <jasuarez@igalia.com>
Wed, 6 Jun 2018 14:29:37 +0000 (14:29 +0000)
committerAlexander Galazin <Alexander.Galazin@arm.com>
Sun, 8 Jul 2018 14:09:15 +0000 (10:09 -0400)
Several tests create pbuffer surfaces, but they are asking for EGL
configuration that supports windows, instead of pbuffers.

Affected tests:
dEQP-EGL.functional.multicontext.*
dEQP-EGL.functional.sharing.gles2.multithread.*

Components: OpenGL

VK-GL-CTS issue: 1204

Change-Id: Ifcee406eb37cbf5fb16ffba851247772909992b6

modules/egl/teglGLES2SharingThreadedTests.cpp
modules/egl/teglMultiContextTests.cpp

index a51a674..da3c859 100644 (file)
@@ -2142,7 +2142,7 @@ void GLES2SharingRandomTest::init (void)
        const EGLint attribList[] =
        {
                EGL_RENDERABLE_TYPE,    EGL_OPENGL_ES2_BIT,
-               EGL_SURFACE_TYPE,               EGL_WINDOW_BIT,
+               EGL_SURFACE_TYPE,               EGL_PBUFFER_BIT,
                EGL_ALPHA_SIZE,                 1,
                EGL_NONE
        };
@@ -3032,7 +3032,7 @@ void GLES2ThreadedSharingTest::init (void)
        const EGLint attribList[] =
        {
                EGL_RENDERABLE_TYPE,    EGL_OPENGL_ES2_BIT,
-               EGL_SURFACE_TYPE,               EGL_WINDOW_BIT,
+               EGL_SURFACE_TYPE,               EGL_PBUFFER_BIT,
                EGL_ALPHA_SIZE,                 1,
                EGL_NONE
        };
index 7774ff2..ed9b504 100644 (file)
@@ -91,10 +91,16 @@ bool isES2Renderable (const eglu::CandidateConfig& c)
        return (c.get(EGL_RENDERABLE_TYPE) & EGL_OPENGL_ES2_BIT) == EGL_OPENGL_ES2_BIT;
 }
 
+bool supportsPBuffer (const eglu::CandidateConfig& c)
+{
+       return (c.get(EGL_SURFACE_TYPE) & EGL_PBUFFER_BIT) == EGL_PBUFFER_BIT;
+}
+
 eglw::EGLConfig getConfig (const eglw::Library& egl, eglw::EGLDisplay display)
 {
        eglu::FilterList filters;
        filters << isES2Renderable;
+       filters << supportsPBuffer;
        return eglu::chooseSingleConfig(egl, display, filters);
 }