From 38e875904b039ec1889e7c81eb1d577a4f69b26d Mon Sep 17 00:00:00 2001 From: Erik Kurzinger Date: Thu, 3 Dec 2020 14:57:51 -0800 Subject: xwayland: implement pixmap_from_buffers for the eglstream backend MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Acked-by: Olivier Fourdan Signed-off-by: Erik Kurzinger --- hw/xwayland/xwayland-glamor-gbm.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'hw/xwayland/xwayland-glamor-gbm.c') 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; } -- cgit v1.2.1