linux-dmabuf-v1: fix implicit check

The implicit check to filter out LINEAR for dmabuf checked for INVALID
twice instead of checking for INVALID & LINEAR. Fix this.

Fixes: d37eb5c2ea ("linux-dmabuf-v1: filter out LINEAR if implicit")
Reported-by: Dawid Czeluśniak <czelusniakdawid@gmail.com>
This commit is contained in:
Rouven Czerwinski 2021-11-29 09:40:02 +01:00
parent fbaefd90fc
commit 6bfb930aa7
1 changed files with 1 additions and 1 deletions

View File

@ -437,7 +437,7 @@ static void linux_dmabuf_send_modifiers(struct wl_resource *resource,
// In case only INVALID and LINEAR are advertised, send INVALID only due to XWayland:
// https://gitlab.freedesktop.org/xorg/xserver/-/issues/1166
if (fmt->len == 2 && wlr_drm_format_has(fmt, DRM_FORMAT_MOD_INVALID)
&& wlr_drm_format_has(fmt, DRM_FORMAT_MOD_INVALID)) {
&& wlr_drm_format_has(fmt, DRM_FORMAT_MOD_LINEAR)) {
uint64_t mod = DRM_FORMAT_MOD_INVALID;
zwp_linux_dmabuf_v1_send_modifier(resource, fmt->format,
mod >> 32, mod & 0xFFFFFFFF);