egl/wayland: Check queryImage return for wl_buffer
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)
commit6273d2f2693c365ac84e8808577d16698a6ae46a
treee1e6658b38128fa3bd72018405a3208fd845bf2d
parentd246aa3a0dbbdf0766521392669251eabdd67e79
egl/wayland: Check queryImage return for wl_buffer

When creating a wl_buffer from a DRIImage, we extract all the DRIImage
information via queryImage. Check whether or not it actually succeeds,
either bailing out if the query was critical, or providing sensible
fallbacks for information which was not available in older DRIImage
versions.

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