[Piglit] [PATCH 1/3] util/egl: Honour Surfaceless MESA in get_default_display

Daniel Díaz daniel.diaz at linaro.org
Wed May 17 23:00:15 UTC 2017


Signed-off-by: Daniel Díaz <daniel.diaz at linaro.org>
---
 tests/util/piglit-util-egl.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/tests/util/piglit-util-egl.c b/tests/util/piglit-util-egl.c
index 106c735..389fe12 100644
--- a/tests/util/piglit-util-egl.c
+++ b/tests/util/piglit-util-egl.c
@@ -85,6 +85,7 @@ piglit_egl_get_default_display(EGLenum platform)
 	static bool has_x11 = false;
 	static bool has_wayland = false;
 	static bool has_gbm = false;
+	static bool has_surfaceless_mesa = false;
 
 	static EGLDisplay (*peglGetPlatformDisplayEXT)(EGLenum platform, void *native_display, const EGLint *attrib_list);
 
@@ -99,6 +100,7 @@ piglit_egl_get_default_display(EGLenum platform)
 		has_x11 = piglit_is_egl_extension_supported(EGL_NO_DISPLAY, "EGL_EXT_platform_x11");
 		has_wayland = piglit_is_egl_extension_supported(EGL_NO_DISPLAY, "EGL_EXT_platform_wayland");
 		has_gbm = piglit_is_egl_extension_supported(EGL_NO_DISPLAY, "EGL_EXT_platform_gbm");
+		has_surfaceless_mesa = piglit_is_egl_extension_supported(EGL_NO_DISPLAY, "EGL_MESA_platform_surfaceless");
 
 		peglGetPlatformDisplayEXT = (void*) eglGetProcAddress("eglGetPlatformDisplayEXT");
 	}
@@ -123,6 +125,11 @@ piglit_egl_get_default_display(EGLenum platform)
 			return EGL_NO_DISPLAY;
 		}
 		break;
+	case EGL_PLATFORM_SURFACELESS_MESA:
+		if (!has_surfaceless_mesa) {
+			return EGL_NO_DISPLAY;
+		}
+		break;
 	default:
 		fprintf(stderr, "%s: unrecognized platform %#x\n", __func__, platform);
 		return EGL_NO_DISPLAY;
-- 
1.9.1



More information about the Piglit mailing list