summaryrefslogtreecommitdiff
path: root/hw/xwayland
diff options
context:
space:
mode:
Diffstat (limited to 'hw/xwayland')
-rw-r--r--hw/xwayland/xwayland-glamor.c8
-rw-r--r--hw/xwayland/xwayland-window.h2
2 files changed, 10 insertions, 0 deletions
diff --git a/hw/xwayland/xwayland-glamor.c b/hw/xwayland/xwayland-glamor.c
index db1434ffb..af227bb03 100644
--- a/hw/xwayland/xwayland-glamor.c
+++ b/hw/xwayland/xwayland-glamor.c
@@ -747,8 +747,16 @@ xwl_window_dmabuf_feedback_done(void *data,
struct zwp_linux_dmabuf_feedback_v1 *dmabuf_feedback)
{
struct xwl_window *xwl_window = data;
+ uint32_t format = wl_drm_format_for_depth(xwl_window->window->drawable.depth);
xwl_dmabuf_feedback_done(&xwl_window->feedback, dmabuf_feedback);
+
+ xwl_window->has_implicit_scanout_support =
+ xwl_feedback_is_modifier_supported(&xwl_window->feedback, format,
+ DRM_FORMAT_MOD_INVALID, TRUE);
+ DebugF("XWAYLAND: Window 0x%x can%s get implicit scanout support\n",
+ xwl_window->window->drawable.id,
+ xwl_window->has_implicit_scanout_support ? "" : "not");
}
static void
diff --git a/hw/xwayland/xwayland-window.h b/hw/xwayland/xwayland-window.h
index 65dfb69ff..92c700e41 100644
--- a/hw/xwayland/xwayland-window.h
+++ b/hw/xwayland/xwayland-window.h
@@ -119,6 +119,8 @@ struct xwl_window {
#endif
struct xwayland_surface_v1 *xwayland_surface;
struct xwl_dmabuf_feedback feedback;
+ /* If TRUE, the window buffer format supports scanout with implicit modifier */
+ Bool has_implicit_scanout_support;
};
struct xwl_window *xwl_window_get(WindowPtr window);