From 430eb872784c04e825126e0d7454f3a5bbefff70 Mon Sep 17 00:00:00 2001 From: Olivier Fourdan Date: Mon, 17 May 2021 18:20:57 +0200 Subject: [PATCH xserver 24/27] xwayland/eglstream: Use "nvidia" for GLVND MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Reviewed-by: Michel Dänzer (cherry picked from commit fae58e9b03696a3890f9c876306c68ffa6f9ff30) --- hw/xwayland/xwayland-glamor-eglstream.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) 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; -- 2.31.1