|
|
823e4a |
From bdc00ba749ac6cde35c025f5f6b1a5b49c1f4960 Mon Sep 17 00:00:00 2001
|
|
|
823e4a |
From: Olivier Fourdan <ofourdan@redhat.com>
|
|
|
823e4a |
Date: Wed, 17 Nov 2021 09:56:52 +0100
|
|
|
823e4a |
Subject: [PATCH xserver 4/4] xwayland/eglstream: Prefer EGLstream if available
|
|
|
823e4a |
MIME-Version: 1.0
|
|
|
823e4a |
Content-Type: text/plain; charset=UTF-8
|
|
|
823e4a |
Content-Transfer-Encoding: 8bit
|
|
|
823e4a |
|
|
|
823e4a |
Currently, when given the choice, Xwayland will pick the GBM backend
|
|
|
823e4a |
over the EGLstream backend if both are available, unless the command
|
|
|
823e4a |
line option “-eglstream” is specified.
|
|
|
823e4a |
|
|
|
823e4a |
The NVIDIA proprietary driver had no support for GBM until driver series
|
|
|
823e4a |
495, but starting with the driver series 495, both can be used.
|
|
|
823e4a |
|
|
|
823e4a |
But there are other requirements with the rest of the stack, typically
|
|
|
823e4a |
Mesa, egl-wayland, libglvnd as documented in the NVIDIA driver.
|
|
|
823e4a |
|
|
|
823e4a |
So if the NVIDIA driver series 495 gets installed, Xwayland will pick
|
|
|
823e4a |
the GBM backend even if EGLstream is available and may fail to render
|
|
|
823e4a |
properly.
|
|
|
823e4a |
|
|
|
823e4a |
To avoid that issue, prefer EGLstream if EGLstream and all the Wayland
|
|
|
823e4a |
interfaces are available, and fallback to GBM automatically unless
|
|
|
823e4a |
“-eglstream” was specified.
|
|
|
823e4a |
|
|
|
823e4a |
With this, the compositor, given the choice, can decide which actual
|
|
|
823e4a |
backend Xwayland would use by advertising (or not) the Wayland
|
|
|
823e4a |
"wl_eglstream_controller" interface.
|
|
|
823e4a |
|
|
|
823e4a |
This change has no impact on compositors which do not have support for
|
|
|
823e4a |
EGLstream in the first place.
|
|
|
823e4a |
|
|
|
823e4a |
Signed-off-by: Olivier Fourdan <ofourdan@redhat.com>
|
|
|
823e4a |
Acked-by: Michel Dänzer <mdaenzer@redhat.com>
|
|
|
823e4a |
(cherry picked from commit 6dd9709bd85cf5de4067887818c864220b951355)
|
|
|
823e4a |
---
|
|
|
823e4a |
hw/xwayland/xwayland-glamor.c | 8 ++------
|
|
|
823e4a |
1 file changed, 2 insertions(+), 6 deletions(-)
|
|
|
823e4a |
|
|
|
823e4a |
diff --git a/hw/xwayland/xwayland-glamor.c b/hw/xwayland/xwayland-glamor.c
|
|
|
823e4a |
index b34eafabb..f46b677f5 100644
|
|
|
823e4a |
--- a/hw/xwayland/xwayland-glamor.c
|
|
|
823e4a |
+++ b/hw/xwayland/xwayland-glamor.c
|
|
|
823e4a |
@@ -441,14 +441,10 @@ xwl_glamor_select_eglstream_backend(struct xwl_screen *xwl_screen)
|
|
|
823e4a |
void
|
|
|
823e4a |
xwl_glamor_select_backend(struct xwl_screen *xwl_screen, Bool use_eglstream)
|
|
|
823e4a |
{
|
|
|
823e4a |
- if (use_eglstream) {
|
|
|
823e4a |
- if (!xwl_glamor_select_eglstream_backend(xwl_screen))
|
|
|
823e4a |
+ if (!xwl_glamor_select_eglstream_backend(xwl_screen)) {
|
|
|
823e4a |
+ if (!use_eglstream)
|
|
|
823e4a |
xwl_glamor_select_gbm_backend(xwl_screen);
|
|
|
823e4a |
}
|
|
|
823e4a |
- else {
|
|
|
823e4a |
- if (!xwl_glamor_select_gbm_backend(xwl_screen))
|
|
|
823e4a |
- xwl_glamor_select_eglstream_backend(xwl_screen);
|
|
|
823e4a |
- }
|
|
|
823e4a |
}
|
|
|
823e4a |
|
|
|
823e4a |
Bool
|
|
|
823e4a |
--
|
|
|
823e4a |
2.33.1
|
|
|
823e4a |
|