[Mesa-dev] [PATCH 10/10] egl/wayland: make sure HAS_$FORMAT is set for wl_dmabuf

Emil Velikov emil.l.velikov at gmail.com
Sun Aug 27 10:20:35 UTC 2017


From: Emil Velikov <emil.velikov at collabora.com>

Otherwise eglCreateWaylandBufferFromImageWL will fail, since we
have no "supported" format.

Cc: Daniel Stone <daniels at collabora.com>
Fixes: 02cc35937277 ("egl/wayland: Use linux-dmabuf interface for buffers")
Signed-off-by: Emil Velikov <emil.velikov at collabora.com>
---
 src/egl/drivers/dri2/platform_wayland.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/src/egl/drivers/dri2/platform_wayland.c b/src/egl/drivers/dri2/platform_wayland.c
index 2347f99e748..82a52bc0f7d 100644
--- a/src/egl/drivers/dri2/platform_wayland.c
+++ b/src/egl/drivers/dri2/platform_wayland.c
@@ -1061,12 +1061,15 @@ dmabuf_handle_modifier(void *data, struct zwp_linux_dmabuf_v1 *dmabuf,
    switch (format) {
    case WL_DRM_FORMAT_ARGB8888:
       mod = u_vector_add(&dri2_dpy->wl_modifiers.argb8888);
+      dri2_dpy->formats |= HAS_ARGB8888;
       break;
    case WL_DRM_FORMAT_XRGB8888:
       mod = u_vector_add(&dri2_dpy->wl_modifiers.xrgb8888);
+      dri2_dpy->formats |= HAS_XRGB8888;
       break;
    case WL_DRM_FORMAT_RGB565:
       mod = u_vector_add(&dri2_dpy->wl_modifiers.rgb565);
+      dri2_dpy->formats |= HAS_RGB565;
       break;
    default:
       break;
-- 
2.14.0



More information about the mesa-dev mailing list