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

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