summaryrefslogtreecommitdiff
path: root/hw/xwayland/xwayland-glamor.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.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.c')
-rw-r--r--hw/xwayland/xwayland-glamor.c12
1 files changed, 0 insertions, 12 deletions
diff --git a/hw/xwayland/xwayland-glamor.c b/hw/xwayland/xwayland-glamor.c
index 060471f01..9e44d5106 100644
--- a/hw/xwayland/xwayland-glamor.c
+++ b/hw/xwayland/xwayland-glamor.c
@@ -363,16 +363,6 @@ glamor_egl_fd_name_from_pixmap(ScreenPtr screen,
}
Bool
-xwl_glamor_has_present_flip(struct xwl_screen *xwl_screen)
-{
- if (!xwl_screen->glamor || !xwl_screen->egl_backend)
- return FALSE;
-
- return (xwl_screen->egl_backend->backend_flags &
- XWL_EGL_BACKEND_HAS_PRESENT_FLIP);
-}
-
-Bool
xwl_glamor_needs_buffer_flush(struct xwl_screen *xwl_screen)
{
if (!xwl_screen->glamor || !xwl_screen->egl_backend)
@@ -430,8 +420,6 @@ xwl_glamor_select_eglstream_backend(struct xwl_screen *xwl_screen)
#ifdef XWL_HAS_EGLSTREAM
if (xwl_screen->eglstream_backend.is_available &&
xwl_glamor_has_wl_interfaces(xwl_screen, &xwl_screen->eglstream_backend)) {
- ErrorF("glamor: Using nvidia's EGLStream interface, direct rendering impossible.\n");
- ErrorF("glamor: Performance may be affected. Ask your vendor to support GBM!\n");
xwl_screen->egl_backend = &xwl_screen->eglstream_backend;
return TRUE;
}