[Piglit] [PATCH 4/5] util/egl: Support querying client extensions

Chad Versace chad.versace at linux.intel.com
Sun Feb 9 13:31:15 PST 2014


This patch fixes piglit_is_egl_extension_supported() to correctly handle
client extensions.

Signed-off-by: Chad Versace <chad.versace at linux.intel.com>
---
 tests/util/piglit-util-egl.c | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/tests/util/piglit-util-egl.c b/tests/util/piglit-util-egl.c
index 52fb338..2fb18ea 100644
--- a/tests/util/piglit-util-egl.c
+++ b/tests/util/piglit-util-egl.c
@@ -82,6 +82,14 @@ piglit_is_egl_extension_supported(EGLDisplay egl_dpy, const char *name)
 	const char *const egl_extension_list =
 		eglQueryString(egl_dpy, EGL_EXTENSIONS);
 
+	/* If egl_dpy is EGL_NO_DISPLAY and the EGL implementation lacks
+	 * support for client extensions, then eglQueryString() will have
+	 * returned NULL.
+	 */
+	if (egl_extension_list == NULL) {
+		return false;
+	}
+
 	return piglit_is_extension_in_string(egl_extension_list, name);
 }
 
-- 
1.8.5.3



More information about the Piglit mailing list