summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorErik Kurzinger <ekurzinger@nvidia.com>2021-05-14 08:26:49 -0400
committerOlivier Fourdan <ofourdan@redhat.com>2021-06-21 11:16:58 +0200
commitb2963fccc186b384af22891a7f73892c93a7ba39 (patch)
tree82c91e52accc89d7076a03ab3781aacedf68df71
parentbdb4712da34c743fae3d971590761d6fe3859e3c (diff)
xwayland/eglstream: allow commits to dma-buf backed pixmaps
As of commit 098e0f52 xwl_glamor_eglstream_allow_commits will not allow commits if the xwl_pixmap does not have an EGLSurface. This is valid for pixmaps backed by an EGLStream, however pixmaps backed by a dma-buf for OpenGL or Vulkan rendering will never have an EGLSurface. Unlike EGLStream backed pixmaps, though, glamor will render directly to the buffer that Xwayland passes to the compositor. Hence, they don't require the intermediate copy in xwl_glamor_eglstream_post_damage that EGLStream backed pixmaps do, so there is no need for an EGLSurface. Signed-off-by: Erik Kurzinger <ekurzinger@nvidia.com> Acked-by: Olivier Fourdan <ofourdan@redhat.com> Reviewed-by: Michel Dänzer <mdaenzer@redhat.com> (cherry picked from commit 3d33d885fcd1215a74c1819278cf6f9557c9860b)
-rw-r--r--hw/xwayland/xwayland-glamor-eglstream.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/hw/xwayland/xwayland-glamor-eglstream.c b/hw/xwayland/xwayland-glamor-eglstream.c
index 2094d293a..2d0827709 100644
--- a/hw/xwayland/xwayland-glamor-eglstream.c
+++ b/hw/xwayland/xwayland-glamor-eglstream.c
@@ -681,7 +681,8 @@ xwl_glamor_eglstream_allow_commits(struct xwl_window *xwl_window)
return FALSE;
} else {
- if (xwl_pixmap->surface != EGL_NO_SURFACE)
+ if (xwl_pixmap->surface != EGL_NO_SURFACE ||
+ xwl_pixmap->type == XWL_PIXMAP_DMA_BUF)
return TRUE;
/* The pending stream got removed, we have a xwl_pixmap and