egl/wayland: Don't use DRM format codes for SHM
authorDaniel Stone <daniels@collabora.com>
Mon, 13 Feb 2017 14:06:10 +0000 (14:06 +0000)
committerEmil Velikov <emil.l.velikov@gmail.com>
Wed, 1 Mar 2017 18:36:55 +0000 (18:36 +0000)
commita1727aa75ed252cd19c296ccf83cb595be971744
tree390590876d4b5cdf227983307712b5ffb468e1d7
parentc0e9e61c9a1eaaee9ca4dfc2f05da85a791c4c5d
egl/wayland: Don't use DRM format codes for SHM

The wl_drm interface (akin to X11's DRI2) uses the standard set of DRM
FourCC format codes. wl_shm copies this, except for ARGB8888/XRGB8888,
which use their own definitions.

Make sure we only use wl_shm format codes when we're working with
wl_shm. Otherwise, using swrast with 32bpp formats would fail with an
error.

Cc: mesa-stable@lists.freedesktop.org
Signed-off-by: Daniel Stone <daniels@collabora.com> (v1)
Fixes: cb5e799448 ("egl/wayland: unify dri2_wl_create_surface implementations")
v2: [Emil Velikov: move to dri2_wl_create_window_surface]
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Daniel Stone <daniels@collabora.com> (IRC)
src/egl/drivers/dri2/platform_wayland.c