egl/wayland: Don't use dmabuf with no modifiers
authorDaniel Stone <daniels@collabora.com>
Mon, 2 Oct 2017 15:40:53 +0000 (16:40 +0100)
committerDaniel Stone <daniels@collabora.com>
Wed, 4 Oct 2017 14:17:46 +0000 (15:17 +0100)
commitb65d6dafd602813c56ccc59a5d8ddb473fddfd74
tree45a832c08aa82b075d793f84a08da664a2512656
parent6273d2f2693c365ac84e8808577d16698a6ae46a
egl/wayland: Don't use dmabuf with no modifiers

The dmabuf interface requires a valid modifier to be sent. If we don't
explicitly get a modifier from the driver, we can't know what to send;
it must be inferred from legacy side-channels (or assumed to linear, if
none exists).

If we have no modifier, then we can only have a single-plane format
anyway, so fall back to the old wl_drm buffer import path.

Fixes: a65db0ad1c ("st/dri: don't expose modifiers in EGL if the driver doesn't implement them")
Fixes: 02cc359372 ("egl/wayland: Use linux-dmabuf interface for buffers")
Signed-off-by: Daniel Stone <daniels@collabora.com>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
Reported-by: Andy Furniss <adf.lists@gmail.com>
Cc: Marek Olšák <marek.olsak@amd.com>
src/egl/drivers/dri2/platform_wayland.c