xserver: Branch 'master' - 3 commits

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Mon May 31 08:45:42 UTC 2021


 hw/xwayland/xwayland-glamor-eglstream.c |   10 +++++++---
 hw/xwayland/xwayland-glx.c              |    3 +++
 hw/xwayland/xwayland-screen.h           |    3 +++
 3 files changed, 13 insertions(+), 3 deletions(-)

New commits:
commit 34a58d7714025bc1043bf5282358406eb10e4b8e
Author: Olivier Fourdan <ofourdan at redhat.com>
Date:   Thu May 20 16:46:33 2021 +0200

    xwayland/eglstream: Log when GL_OES_EGL_image is missing
    
    That will dramatically affect performance, might as well log when we
    cannot use GL_OES_EGL_image with the NVIDIA closed-source driver.
    
    Signed-off-by: Olivier Fourdan <ofourdan at redhat.com>
    Reviewed-by: Michel Dänzer <mdaenzer at redhat.com>

diff --git a/hw/xwayland/xwayland-glamor-eglstream.c b/hw/xwayland/xwayland-glamor-eglstream.c
index 5e89849ff..0affc954c 100644
--- a/hw/xwayland/xwayland-glamor-eglstream.c
+++ b/hw/xwayland/xwayland-glamor-eglstream.c
@@ -1200,6 +1200,8 @@ xwl_glamor_eglstream_init_egl(struct xwl_screen *xwl_screen)
             xwl_screen->glvnd_vendor = "nvidia";
         else
             ErrorF("DRI3 initialization failed. Performance will be affected.\n");
+    } else {
+        ErrorF("Driver lacks GL_OES_EGL_image, performance will be affected.\n");
     }
 
     return TRUE;
commit fae58e9b03696a3890f9c876306c68ffa6f9ff30
Author: Olivier Fourdan <ofourdan at redhat.com>
Date:   Mon May 17 18:20:57 2021 +0200

    xwayland/eglstream: Use "nvidia" for GLVND
    
    If the EGLStream backend is able to use hardware acceleration with the
    NVIDIA closed source driver, we should use the "nvidia" GLX
    implementation instead of the one from Mesa to take advantage of the
    NVIDIA hardware accelerated rendering.
    
    Signed-off-by: Olivier Fourdan <ofourdan at redhat.com>
    Reviewed-by: Michel Dänzer <mdaenzer at redhat.com>

diff --git a/hw/xwayland/xwayland-glamor-eglstream.c b/hw/xwayland/xwayland-glamor-eglstream.c
index c583a1390..5e89849ff 100644
--- a/hw/xwayland/xwayland-glamor-eglstream.c
+++ b/hw/xwayland/xwayland-glamor-eglstream.c
@@ -1195,9 +1195,11 @@ xwl_glamor_eglstream_init_egl(struct xwl_screen *xwl_screen)
 
     xwl_eglstream_init_shaders(xwl_screen);
 
-    if (epoxy_has_gl_extension("GL_OES_EGL_image") &&
-        !dri3_screen_init(xwl_screen->screen, &xwl_dri3_info)) {
-        ErrorF("DRI3 initialization failed. Performance will be affected.\n");
+    if (epoxy_has_gl_extension("GL_OES_EGL_image")) {
+        if (dri3_screen_init(xwl_screen->screen, &xwl_dri3_info))
+            xwl_screen->glvnd_vendor = "nvidia";
+        else
+            ErrorF("DRI3 initialization failed. Performance will be affected.\n");
     }
 
     return TRUE;
commit 24fc8aea1e4bbaba780f1a316fba797a0198f603
Author: Olivier Fourdan <ofourdan at redhat.com>
Date:   Thu May 20 12:11:42 2021 +0200

    xwayland: Add preferred GLVND vendor to xwl_screen
    
    If Xwayland's EGLstream backend supports hardware acceleration with the
    NVIDIA closed-source driver, the GLX library also needs to be one
    shipped by NVIDIA, that's what GLVND is for.
    
    Add a new member to the xwl_screen that the backend can optionally set
    to the preferred GLVND vendor to use.
    
    If not set, "mesa" is assumed.
    
    Signed-off-by: Olivier Fourdan <ofourdan at redhat.com>
    Reviewed-by: Michel Dänzer <mdaenzer at redhat.com>

diff --git a/hw/xwayland/xwayland-glx.c b/hw/xwayland/xwayland-glx.c
index 7e2a87fc1..eba8946ab 100644
--- a/hw/xwayland/xwayland-glx.c
+++ b/hw/xwayland/xwayland-glx.c
@@ -378,6 +378,9 @@ egl_screen_probe(ScreenPtr pScreen)
         return NULL;
     }
 
+    if (!screen->base.glvnd && xwl_screen->glvnd_vendor)
+        screen->base.glvnd = strdup(xwl_screen->glvnd_vendor);
+
     if (!screen->base.glvnd)
         screen->base.glvnd = strdup("mesa");
 
diff --git a/hw/xwayland/xwayland-screen.h b/hw/xwayland/xwayland-screen.h
index 5fe4712bd..b965dddd7 100644
--- a/hw/xwayland/xwayland-screen.h
+++ b/hw/xwayland/xwayland-screen.h
@@ -107,6 +107,9 @@ struct xwl_screen {
     struct glamor_context *glamor_ctx;
 
     Atom allow_commits_prop;
+
+    /* The preferred GLVND vendor. If NULL, "mesa" is assumed. */
+    const char *glvnd_vendor;
 };
 
 /* Apps which use randr/vidmode to change the mode when going fullscreen,


More information about the xorg-commit mailing list