Commit 15223f78 authored by Matt Turner's avatar Matt Turner

util: Add piglit_is_egl_extension_supported()

parent 42f6be8b
......@@ -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);
}
......@@ -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
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment