[Piglit] [PATCH 26/29] tests/egl: Make test appear to be running from glut_waffle

Pauli Nieminen pauli.nieminen at linux.intel.com
Mon May 21 11:09:01 PDT 2012


When checking supported extensions and versions egl utils is asking from
glut_waffle what platform is used to verify that egl should be used. But
custom egl tests won't initialize glut_waffle.

Those custom egl tests have to fake glutGetPlatform that returns EGL
platform.

Signed-off-by: Pauli Nieminen <pauli.nieminen at linux.intel.com>
---
 tests/egl/egl-util.c |   10 ++++++++++
 1 files changed, 10 insertions(+), 0 deletions(-)

diff --git a/tests/egl/egl-util.c b/tests/egl/egl-util.c
index 639515e..5fcb2bd 100644
--- a/tests/egl/egl-util.c
+++ b/tests/egl/egl-util.c
@@ -33,6 +33,16 @@
 #include "piglit-util.h"
 #include "egl-util.h"
 
+#ifdef USE_WAFFLE
+#include <waffle/waffle_enum.h>
+
+int glutGetPlatform(void)
+{
+	return WAFFLE_PLATFORM_X11_EGL;
+}
+
+#endif
+
 static int automatic;
 
 int depth;
-- 
1.7.5.4



More information about the Piglit mailing list