summaryrefslogtreecommitdiff
path: root/hw/xwayland/xwayland-glamor-gbm.c
diff options
context:
space:
mode:
authorErik Kurzinger <ekurzinger@nvidia.com>2020-12-03 14:57:51 -0800
committerMichel Dänzer <michel@daenzer.net>2021-04-09 14:00:01 +0000
commit38e875904b039ec1889e7c81eb1d577a4f69b26d (patch)
tree59573b80a73055427a5f066d339bdf94fdae1b7f /hw/xwayland/xwayland-glamor-gbm.c
parentbc99dd2127f12f1aae55971c09a2792eeaa98444 (diff)
xwayland: implement pixmap_from_buffers for the eglstream backend
Provides an implementation for the pixmap_from_buffers DRI3 function for xwayland's eglstream backend. This will be used by the NVIDIA GLX driver to pass buffers from client applications to the server. These can then be presented using the PRESENT extension. To hopefully make this less error-prone, we also introduce a "type" field for this struct to distinguish between xwl_pixmaps for the new DRI3-created pixmaps and those for the existing glamor-created pixmaps. Additionally, the patch enables wnmd present mode with the eglstream backend. This involves creating a wl_buffer for the provided dma-buf before importing it into EGL and passing this to the compositor so it can be scanned out directly if possible. Since both backends now support this present mode, the HAS_PRESENT_FLIP flag is no longer needed, so it can be removed. Reviewed-by: Michel Dänzer <mdaenzer@redhat.com> Acked-by: Olivier Fourdan <ofourdan@redhat.com> Signed-off-by: Erik Kurzinger <ekurzinger@nvidia.com>
Diffstat (limited to 'hw/xwayland/xwayland-glamor-gbm.c')
-rw-r--r--hw/xwayland/xwayland-glamor-gbm.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/hw/xwayland/xwayland-glamor-gbm.c b/hw/xwayland/xwayland-glamor-gbm.c
index 1b1d517da..12d820e44 100644
--- a/hw/xwayland/xwayland-glamor-gbm.c
+++ b/hw/xwayland/xwayland-glamor-gbm.c
@@ -969,7 +969,6 @@ xwl_glamor_init_gbm(struct xwl_screen *xwl_screen)
xwl_screen->gbm_backend.get_wl_buffer_for_pixmap = xwl_glamor_gbm_get_wl_buffer_for_pixmap;
xwl_screen->gbm_backend.check_flip = NULL;
xwl_screen->gbm_backend.is_available = TRUE;
- xwl_screen->gbm_backend.backend_flags = XWL_EGL_BACKEND_HAS_PRESENT_FLIP |
- XWL_EGL_BACKEND_NEEDS_BUFFER_FLUSH |
+ xwl_screen->gbm_backend.backend_flags = XWL_EGL_BACKEND_NEEDS_BUFFER_FLUSH |
XWL_EGL_BACKEND_NEEDS_N_BUFFERING;
}