egl/wayland: set correct format with wl_dmabuf as wl_drm is missing
authorEmil Velikov <emil.velikov@collabora.com>
Sun, 27 Aug 2017 10:20:32 +0000 (11:20 +0100)
committerEmil Velikov <emil.l.velikov@gmail.com>
Tue, 29 Aug 2017 12:43:04 +0000 (13:43 +0100)
For most/all cases today, we have wl_drm available alongside wl_dmabuf.
Yet in the long run, we want to make sure the latter can operate without
any traces of the former.

Fixes: 02cc35937277 ("egl/wayland: Use linux-dmabuf interface for buffers")
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Daniel Stone <daniels@collabora.com>
src/egl/drivers/dri2/platform_wayland.c

index c0a1c5870de5bbaf45fb3b90077da86f9950d996..017a2eb98ca0a2726d270c2c5426927b9eef4af7 100644 (file)
@@ -145,7 +145,7 @@ dri2_wl_create_window_surface(_EGLDriver *drv, _EGLDisplay *disp,
    if (!_eglInitSurface(&dri2_surf->base, disp, EGL_WINDOW_BIT, conf, attrib_list))
       goto cleanup_surf;
 
-   if (dri2_dpy->wl_drm) {
+   if (dri2_dpy->wl_dmabuf || dri2_dpy->wl_drm) {
       if (conf->RedSize == 5)
          dri2_surf->format = WL_DRM_FORMAT_RGB565;
       else if (conf->AlphaSize == 0)