[Piglit] [PATCH 02/11] util: Add piglit_is_egl_extension_supported()
Matt Turner
mattst88 at gmail.com
Tue Jul 31 18:38:33 PDT 2012
---
tests/util/piglit-util-egl.c | 9 +++++++++
tests/util/piglit-util-egl.h | 5 +++++
2 files changed, 14 insertions(+), 0 deletions(-)
diff --git a/tests/util/piglit-util-egl.c b/tests/util/piglit-util-egl.c
index b286ee5..5de290a 100644
--- a/tests/util/piglit-util-egl.c
+++ b/tests/util/piglit-util-egl.c
@@ -74,3 +74,12 @@ void piglit_expect_egl_error(EGLint expected_error, enum piglit_result result)
piglit_report_result(result);
}
+
+bool
+piglit_is_egl_extension_supported(EGLDisplay egl_dpy, const char *name)
+{
+ const char *const egl_extension_list =
+ eglQueryString(egl_dpy, EGL_EXTENSIONS);
+
+ return piglit_is_extension_in_string(egl_extension_list, name);
+}
diff --git a/tests/util/piglit-util-egl.h b/tests/util/piglit-util-egl.h
index 22f8b1a..db94eeb 100644
--- a/tests/util/piglit-util-egl.h
+++ b/tests/util/piglit-util-egl.h
@@ -50,6 +50,11 @@ const char* piglit_get_egl_error_name(EGLint error);
*/
void piglit_expect_egl_error(EGLint expected_error, enum piglit_result result);
+/**
+ * \brief Checks whether an EGL extension is supported.
+ */
+bool piglit_is_egl_extension_supported(EGLDisplay egl_dpy, const char *name);
+
#ifdef __cplusplus
} /* end extern "C" */
#endif
--
1.7.8.6
More information about the Piglit
mailing list