diff options
Diffstat (limited to 'src/egl/drivers/dri2/egl_dri2.h')
-rw-r--r-- | src/egl/drivers/dri2/egl_dri2.h | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/src/egl/drivers/dri2/egl_dri2.h b/src/egl/drivers/dri2/egl_dri2.h index 244baf4e854..85d4b85eae2 100644 --- a/src/egl/drivers/dri2/egl_dri2.h +++ b/src/egl/drivers/dri2/egl_dri2.h @@ -397,4 +397,28 @@ const __DRIconfig * dri2_get_dri_config(struct dri2_egl_config *conf, EGLint surface_type, EGLenum colorspace); +static inline void +dri2_set_WL_bind_wayland_display(_EGLDriver *drv, _EGLDisplay *disp) +{ +#ifdef HAVE_WAYLAND_PLATFORM + struct dri2_egl_display *dri2_dpy = dri2_egl_display(disp); + + (void) drv; + + if (dri2_dpy->device_name && dri2_dpy->image) { + if (dri2_dpy->image->base.version >= 10 && + dri2_dpy->image->getCapabilities != NULL) { + int capabilities; + + capabilities = + dri2_dpy->image->getCapabilities(dri2_dpy->dri_screen); + disp->Extensions.WL_bind_wayland_display = + (capabilities & __DRI_IMAGE_CAP_GLOBAL_NAMES) != 0; + } else { + disp->Extensions.WL_bind_wayland_display = EGL_TRUE; + } + } +#endif +} + #endif /* EGL_DRI2_INCLUDED */ |