From 780052d4da0c93f9210dd87d2100b116af7ff308 Mon Sep 17 00:00:00 2001 From: Simon Ser Date: Wed, 31 Mar 2021 22:20:24 +0200 Subject: render/egl: always add LINEAR to supported modifiers --- render/egl.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/render/egl.c b/render/egl.c index 1293c14b..3fcfd34b 100644 --- a/render/egl.c +++ b/render/egl.c @@ -125,6 +125,15 @@ static void init_dmabuf_formats(struct wlr_egl *egl) { wlr_drm_format_set_add(&egl->dmabuf_render_formats, fmt, DRM_FORMAT_MOD_INVALID); + if (modifiers_len == 0) { + // Asume the linear layout is supported if the driver doesn't + // explicitly say otherwise + wlr_drm_format_set_add(&egl->dmabuf_texture_formats, fmt, + DRM_FORMAT_MOD_LINEAR); + wlr_drm_format_set_add(&egl->dmabuf_render_formats, fmt, + DRM_FORMAT_MOD_LINEAR); + } + for (int j = 0; j < modifiers_len; j++) { wlr_drm_format_set_add(&egl->dmabuf_texture_formats, fmt, modifiers[j]); -- cgit v1.2.3