From affbfb6a28cfb2a5385e8a2e0417137599f06fa0 Mon Sep 17 00:00:00 2001 From: nyorain Date: Fri, 12 Oct 2018 22:04:12 +0200 Subject: Support older wlr_linux_dmabuf_v1 clients If a client uses an older version of the dmabuf protocol, use the `formats` event instead of `modifiers` (since that didn't exist in older versions). With a bit of necessary guessing, support dmabuf importing even when EGL_EXT_image_dma_buf_import_modifiers isn't present instead of failing up front. --- include/wlr/render/dmabuf.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'include/wlr') diff --git a/include/wlr/render/dmabuf.h b/include/wlr/render/dmabuf.h index 33c3a129..32cfe874 100644 --- a/include/wlr/render/dmabuf.h +++ b/include/wlr/render/dmabuf.h @@ -16,6 +16,10 @@ #define DRM_FORMAT_MOD_INVALID ((1ULL<<56) - 1) #endif +#ifndef DRM_FORMAT_MOD_LINEAR +#define DRM_FORMAT_MOD_LINEAR 0 +#endif + #define WLR_DMABUF_MAX_PLANES 4 enum wlr_dmabuf_attributes_flags { -- cgit v1.2.3