[04/10] egl: allow RGB565 formats in eglCreateWaylandBufferFromImageWL

Submitted by Emil Velikov on Aug. 27, 2017, 10:20 a.m.

Details

Message ID 20170827102035.8957-5-emil.l.velikov@gmail.com
State New
Headers show
Series "egl: mixed bag of fixes/cleanups" ( rev: 2 1 ) in Mesa

Not browsing as part of any series.

Commit Message

Emil Velikov Aug. 27, 2017, 10:20 a.m.
From: Emil Velikov <emil.velikov@collabora.com>

There's nothing special required, but a simple format check.

Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
---
 src/egl/drivers/dri2/platform_wayland.c | 4 ++++
 1 file changed, 4 insertions(+)

Patch hide | download patch | download mbox

diff --git a/src/egl/drivers/dri2/platform_wayland.c b/src/egl/drivers/dri2/platform_wayland.c
index 754ce6c3990..4a6574350aa 100644
--- a/src/egl/drivers/dri2/platform_wayland.c
+++ b/src/egl/drivers/dri2/platform_wayland.c
@@ -925,6 +925,10 @@  dri2_wl_create_wayland_buffer_from_image(_EGLDriver *drv,
       if (!(dri2_dpy->formats & HAS_XRGB8888))
          goto bad_format;
       break;
+   case __DRI_IMAGE_FORMAT_RGB565:
+      if (!(dri2_dpy->formats & HAS_RGB565))
+         goto bad_format;
+      break;
    default:
       goto bad_format;
    }