diff options
author | Simon Ser <contact@emersion.fr> | 2021-03-31 17:07:55 +0200 |
---|---|---|
committer | Simon Zeni <simon@bl4ckb0ne.ca> | 2021-11-26 16:40:53 +0000 |
commit | affe9eda5708a8368dd96870ddf2442c5b637202 (patch) | |
tree | 6912c82e67d1ad0c709179735d541e1e102114ff /render/egl.c | |
parent | d78cb808b1b051eae443e368c0b88bc90258fd02 (diff) |
Require INVALID for implicit format modifiers
See [1] for the motivation.
[1]: https://gitlab.freedesktop.org/wayland/wayland-protocols/-/merge_requests/75
Diffstat (limited to 'render/egl.c')
-rw-r--r-- | render/egl.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/render/egl.c b/render/egl.c index ec23ce8d..a398d586 100644 --- a/render/egl.c +++ b/render/egl.c @@ -119,12 +119,11 @@ static void init_dmabuf_formats(struct wlr_egl *egl) { has_modifiers = has_modifiers || modifiers_len > 0; - if (modifiers_len == 0) { - wlr_drm_format_set_add(&egl->dmabuf_texture_formats, fmt, - DRM_FORMAT_MOD_INVALID); - wlr_drm_format_set_add(&egl->dmabuf_render_formats, fmt, - DRM_FORMAT_MOD_INVALID); - } + // EGL always supports implicit modifiers + wlr_drm_format_set_add(&egl->dmabuf_texture_formats, fmt, + DRM_FORMAT_MOD_INVALID); + wlr_drm_format_set_add(&egl->dmabuf_render_formats, fmt, + DRM_FORMAT_MOD_INVALID); for (int j = 0; j < modifiers_len; j++) { wlr_drm_format_set_add(&egl->dmabuf_texture_formats, fmt, |