From 4281022dc10762f143989856b9d60bb3db35dd41 Mon Sep 17 00:00:00 2001 From: Joshua Ashton Date: Thu, 13 Jun 2024 00:46:44 +0100 Subject: [PATCH] xwayland: Fix check for explicit sync/syncobjs Previously, `PresentCapabilitySyncobj` was always being exposed when `ANDROID_native_fence_sync` was exposed. It should only be exposed if `ANDROID_native_fence_sync` is exposed AND the Wayland compositor supports `linux-drm-syncobj-v1`. xwl_screen->explicit_sync already gives the guarantee that glamor has syncobjs supported. Fixes: 6f85ce4d ("xwayland: support DRI3 1.4 and Present 1.4") Signed-off-by: Joshua Ashton --- hw/xwayland/xwayland-present.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/xwayland/xwayland-present.c b/hw/xwayland/xwayland-present.c index 4d2410568..6faf40426 100644 --- a/hw/xwayland/xwayland-present.c +++ b/hw/xwayland/xwayland-present.c @@ -1365,7 +1365,7 @@ xwl_present_init(ScreenPtr screen) xwl_screen->present_capabilities = XWL_PRESENT_CAPS; #ifdef XWL_HAS_GLAMOR - if (xwl_glamor_supports_syncobjs(xwl_screen)) + if (xwl_screen->explicit_sync) xwl_screen->present_capabilities |= PresentCapabilitySyncobj; #endif /* XWL_HAS_GLAMOR */