Blame SOURCES/0024-xwayland-eglstream-Use-nvidia-for-GLVND.patch

5f5628
From 430eb872784c04e825126e0d7454f3a5bbefff70 Mon Sep 17 00:00:00 2001
5f5628
From: Olivier Fourdan <ofourdan@redhat.com>
5f5628
Date: Mon, 17 May 2021 18:20:57 +0200
5f5628
Subject: [PATCH xserver 24/27] xwayland/eglstream: Use "nvidia" for GLVND
5f5628
MIME-Version: 1.0
5f5628
Content-Type: text/plain; charset=UTF-8
5f5628
Content-Transfer-Encoding: 8bit
5f5628
5f5628
If the EGLStream backend is able to use hardware acceleration with the
5f5628
NVIDIA closed source driver, we should use the "nvidia" GLX
5f5628
implementation instead of the one from Mesa to take advantage of the
5f5628
NVIDIA hardware accelerated rendering.
5f5628
5f5628
Signed-off-by: Olivier Fourdan <ofourdan@redhat.com>
5f5628
Reviewed-by: Michel Dänzer <mdaenzer@redhat.com>
5f5628
(cherry picked from commit fae58e9b03696a3890f9c876306c68ffa6f9ff30)
5f5628
---
5f5628
 hw/xwayland/xwayland-glamor-eglstream.c | 8 +++++---
5f5628
 1 file changed, 5 insertions(+), 3 deletions(-)
5f5628
5f5628
diff --git a/hw/xwayland/xwayland-glamor-eglstream.c b/hw/xwayland/xwayland-glamor-eglstream.c
5f5628
index c583a1390..5e89849ff 100644
5f5628
--- a/hw/xwayland/xwayland-glamor-eglstream.c
5f5628
+++ b/hw/xwayland/xwayland-glamor-eglstream.c
5f5628
@@ -1195,9 +1195,11 @@ xwl_glamor_eglstream_init_egl(struct xwl_screen *xwl_screen)
5f5628
 
5f5628
     xwl_eglstream_init_shaders(xwl_screen);
5f5628
 
5f5628
-    if (epoxy_has_gl_extension("GL_OES_EGL_image") &&
5f5628
-        !dri3_screen_init(xwl_screen->screen, &xwl_dri3_info)) {
5f5628
-        ErrorF("DRI3 initialization failed. Performance will be affected.\n");
5f5628
+    if (epoxy_has_gl_extension("GL_OES_EGL_image")) {
5f5628
+        if (dri3_screen_init(xwl_screen->screen, &xwl_dri3_info))
5f5628
+            xwl_screen->glvnd_vendor = "nvidia";
5f5628
+        else
5f5628
+            ErrorF("DRI3 initialization failed. Performance will be affected.\n");
5f5628
     }
5f5628
 
5f5628
     return TRUE;
5f5628
-- 
5f5628
2.31.1
5f5628