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.
This commit is contained in:
nyorain 2018-10-12 22:04:12 +02:00
parent 4897267bd6
commit affbfb6a28
3 changed files with 61 additions and 21 deletions

View file

@ -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 {