From 381ea0d67a6d84a34d23571c49bbf4339ffda364 Mon Sep 17 00:00:00 2001 From: Benjamin Franzke Date: Fri, 4 Feb 2011 12:32:05 +0100 Subject: st/egl: Add wayland platform --- src/gallium/state_trackers/egl/common/egl_g3d.c | 8 ++++++++ src/gallium/state_trackers/egl/common/native.h | 3 +++ 2 files changed, 11 insertions(+) (limited to 'src/gallium/state_trackers/egl/common') diff --git a/src/gallium/state_trackers/egl/common/egl_g3d.c b/src/gallium/state_trackers/egl/common/egl_g3d.c index 9024f945b8..ddca1408b0 100644 --- a/src/gallium/state_trackers/egl/common/egl_g3d.c +++ b/src/gallium/state_trackers/egl/common/egl_g3d.c @@ -101,6 +101,11 @@ egl_g3d_get_platform(_EGLDriver *drv, _EGLPlatformType plat) plat_name = "X11"; #ifdef HAVE_X11_BACKEND nplat = native_get_x11_platform(); +#endif + case _EGL_PLATFORM_WAYLAND: + plat_name = "wayland"; +#ifdef HAVE_WAYLAND_BACKEND + nplat = native_get_wayland_platform(); #endif break; case _EGL_PLATFORM_DRM: @@ -546,6 +551,9 @@ egl_g3d_initialize(_EGLDriver *drv, _EGLDisplay *dpy) dpy->Extensions.MESA_drm_image = EGL_TRUE; } + if (dpy->Platform == _EGL_PLATFORM_WAYLAND && gdpy->native->buffer) + dpy->Extensions.MESA_drm_image = EGL_TRUE; + if (egl_g3d_add_configs(drv, dpy, 1) == 1) { _eglError(EGL_NOT_INITIALIZED, "eglInitialize(unable to add configs)"); goto fail; diff --git a/src/gallium/state_trackers/egl/common/native.h b/src/gallium/state_trackers/egl/common/native.h index 6461b5edbd..42889075a3 100644 --- a/src/gallium/state_trackers/egl/common/native.h +++ b/src/gallium/state_trackers/egl/common/native.h @@ -238,6 +238,9 @@ native_get_gdi_platform(void); const struct native_platform * native_get_x11_platform(void); +const struct native_platform * +native_get_wayland_platform(void); + const struct native_platform * native_get_drm_platform(void); -- cgit v1.2.3