diff options
author | Simon Ser <contact@emersion.fr> | 2021-03-31 22:20:24 +0200 |
---|---|---|
committer | Simon Zeni <simon@bl4ckb0ne.ca> | 2021-11-26 16:40:53 +0000 |
commit | d5df8d5cbf5055a4712f3871f4ba227464ebebb5 (patch) | |
tree | 4c85586d0e647343119561f1aed95d877aae74e3 /render/egl.c | |
parent | e163a7cf486bf85e982e0fbe9c7a6588b0afb657 (diff) |
render/egl: always add LINEAR to supported modifiers
Diffstat (limited to 'render/egl.c')
-rw-r--r-- | render/egl.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/render/egl.c b/render/egl.c index a398d586..9dae0724 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]); |