Commit 195c2ef8 authored by Kenneth Graunke's avatar Kenneth Graunke

glamor: Add a function to get the driver name via EGL_MESA_query_driver

This maps to eglGetDisplayDriverName if EGL_MESA_query_render is
supported, otherwise it returns NULL.
parent 60003023
......@@ -399,6 +399,8 @@ extern _X_EXPORT Bool
struct gbm_bo *bo,
Bool used_modifiers);
extern _X_EXPORT const char *glamor_egl_get_driver_name(ScreenPtr screen);
#endif
extern _X_EXPORT void glamor_egl_screen_init(ScreenPtr screen,
......
......@@ -700,6 +700,22 @@ glamor_get_modifiers(ScreenPtr screen, uint32_t format,
#endif
}
_X_EXPORT const char *
glamor_egl_get_driver_name(ScreenPtr screen)
{
#ifdef GLAMOR_HAS_EGL_QUERY_DRIVER
struct glamor_egl_screen_private *glamor_egl;
glamor_egl = glamor_egl_get_screen_private(xf86ScreenToScrn(screen));
if (epoxy_has_egl_extension(glamor_egl->display, "EGL_MESA_query_driver"))
return eglGetDisplayDriverName(glamor_egl->display);
#endif
return NULL;
}
static Bool
glamor_egl_destroy_pixmap(PixmapPtr pixmap)
{
......
......@@ -97,6 +97,8 @@ conf_data.set('HAVE_XSHMFENCE', xshmfence_dep.found())
conf_data.set('WITH_LIBDRM', libdrm_required)
conf_data.set('GLAMOR_HAS_EGL_QUERY_DMABUF',
epoxy_dep.found() and epoxy_dep.version().version_compare('>= 1.4.4'))
conf_data.set('GLAMOR_HAS_EGL_QUERY_DRIVER',
epoxy_dep.found() and epoxy_dep.version().version_compare('>= 1.5.4'))
conf_data.set('GLXEXT', build_glx)
conf_data.set('GLAMOR', build_glamor)
conf_data.set('GLAMOR_HAS_GBM', gbm_dep.found())
......
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