[Piglit] [PATCH] egl_mesa_platform_surfaceless: don't fail build with old headers

Ilia Mirkin imirkin at alum.mit.edu
Wed Oct 19 17:00:32 UTC 2016


Signed-off-by: Ilia Mirkin <imirkin at alum.mit.edu>
---
 .../egl_mesa_platform_surfaceless/egl_mesa_platform_surfaceless.c | 8 ++++++++
 tests/util/piglit-util-egl.h                                      | 1 +
 2 files changed, 9 insertions(+)

diff --git a/tests/egl/spec/egl_mesa_platform_surfaceless/egl_mesa_platform_surfaceless.c b/tests/egl/spec/egl_mesa_platform_surfaceless/egl_mesa_platform_surfaceless.c
index 3bbd6aa..0dfb565 100644
--- a/tests/egl/spec/egl_mesa_platform_surfaceless/egl_mesa_platform_surfaceless.c
+++ b/tests/egl/spec/egl_mesa_platform_surfaceless/egl_mesa_platform_surfaceless.c
@@ -24,6 +24,8 @@
 #include "piglit-util.h"
 #include "piglit-util-egl.h"
 
+#ifdef EGL_KHR_no_config_context
+
 static void
 test_setup(EGLDisplay *dpy)
 {
@@ -185,10 +187,15 @@ static const struct piglit_subtest subtests[] = {
 	{ "create_pbuffer", "create_pbuffer", test_create_pbuffer },
 	{ 0 },
 };
+#endif
+
 
 int
 main(int argc, char **argv)
 {
+#ifndef EGL_KHR_no_config_context
+	piglit_report_result(PIGLIT_SKIP);
+#else
 	enum piglit_result result = PIGLIT_SKIP;
 	const char **selected_names = NULL;
 	size_t num_selected = 0;
@@ -208,4 +215,5 @@ main(int argc, char **argv)
 	result = piglit_run_selected_subtests(subtests, selected_names,
 					      num_selected, result);
 	piglit_report_result(result);
+#endif
 }
diff --git a/tests/util/piglit-util-egl.h b/tests/util/piglit-util-egl.h
index 60fb199..2440651 100644
--- a/tests/util/piglit-util-egl.h
+++ b/tests/util/piglit-util-egl.h
@@ -37,6 +37,7 @@ extern "C" {
 #define EGL_PLATFORM_WAYLAND_EXT          0x31D8
 #define EGL_PLATFORM_X11_EXT              0x31D5
 #define EGL_PLATFORM_GBM_MESA             0x31D7
+#define EGL_PLATFORM_SURFACELESS_MESA     0x31DD
 
 /**
  * \brief Convert an EGL error to a string.
-- 
2.7.3



More information about the Piglit mailing list