xwayland: Check for implicit scanout availability
With implicit modifiers, DRM_FORMAT_MOD_INVALID is an allowed modifier, to indicate that the server can support the format. When looking for a scanout capable tranche with implicit modifiers, we ought to check for the availability of a tranche with an invalid modifier for the given format. Signed-off-by: Olivier Fourdan <ofourdan@redhat.com> Reviewed-by: Michel Dänzer <mdaenzer@redhat.com>
This commit is contained in:
parent
79ab129fdf
commit
a4c700231d
|
@ -747,8 +747,16 @@ xwl_window_dmabuf_feedback_done(void *data,
|
||||||
struct zwp_linux_dmabuf_feedback_v1 *dmabuf_feedback)
|
struct zwp_linux_dmabuf_feedback_v1 *dmabuf_feedback)
|
||||||
{
|
{
|
||||||
struct xwl_window *xwl_window = data;
|
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_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
|
static void
|
||||||
|
|
|
@ -119,6 +119,8 @@ struct xwl_window {
|
||||||
#endif
|
#endif
|
||||||
struct xwayland_surface_v1 *xwayland_surface;
|
struct xwayland_surface_v1 *xwayland_surface;
|
||||||
struct xwl_dmabuf_feedback feedback;
|
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);
|
struct xwl_window *xwl_window_get(WindowPtr window);
|
||||||
|
|
Loading…
Reference in New Issue