aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRouven Czerwinski <rouven@czerwinskis.de>2021-11-29 09:40:02 +0100
committerRouven Czerwinski <rouven@czerwinskis.de>2021-11-29 17:44:34 +0100
commit6bfb930aa70ceb41455b9da2719a10538493a65d (patch)
treedf9c4b4d868beee9c4e944a4c1841a6fb5bcaf26
parentfbaefd90fc24f1c06be0d24cc3c4a01c71671157 (diff)
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: d37eb5c2eaed ("linux-dmabuf-v1: filter out LINEAR if implicit") Reported-by: Dawid Czeluśniak <czelusniakdawid@gmail.com>
-rw-r--r--types/wlr_linux_dmabuf_v1.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/types/wlr_linux_dmabuf_v1.c b/types/wlr_linux_dmabuf_v1.c
index 4b2b965c..b91fb59d 100644
--- a/types/wlr_linux_dmabuf_v1.c
+++ b/types/wlr_linux_dmabuf_v1.c
@@ -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);