Require INVALID for implicit format modifiers

See [1] for the motivation.

[1]: https://gitlab.freedesktop.org/wayland/wayland-protocols/-/merge_requests/75
This commit is contained in:
Simon Ser 2021-03-31 17:07:55 +02:00 committed by Simon Zeni
parent 833437d592
commit ea7357b703
6 changed files with 39 additions and 45 deletions

View file

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