Commit 21e3dc3b authored by Olivier Fourdan's avatar Olivier Fourdan 🛠
Browse files

xwayland: Set GLVND driver based on GBM backend name

With the GBM backend becoming usable with different drivers such as
NVIDIA, set the GLVND vendor to the same value as the GBM backend name.

Mesa implementation however returns "drm" so we need to special case
this value - Basically, for anything other than "drm" we simply assume
that the GBM backend name is the same as the vendor.
Signed-off-by: Olivier Fourdan's avatarOlivier Fourdan <>
Reviewed-by: Michel Dänzer's avatarMichel Dänzer <>
Reviewed-by: James Jones's avatarJames Jones <>
Tested-by: James Jones's avatarJames Jones <>
(cherry picked from commit 5daf42b4)
parent ab1c873f
Pipeline #426260 passed with stages
in 2 minutes and 3 seconds
......@@ -938,6 +938,7 @@ xwl_glamor_gbm_init_egl(struct xwl_screen *xwl_screen)
struct xwl_gbm_private *xwl_gbm = xwl_gbm_get(xwl_screen);
EGLint major, minor;
const GLubyte *renderer;
const char *gbm_backend_name;
if (!xwl_gbm->fd_render_node && !xwl_gbm->drm_authenticated) {
ErrorF("Failed to get wl_drm, disabling Glamor and DRI3\n");
......@@ -989,6 +990,11 @@ xwl_glamor_gbm_init_egl(struct xwl_screen *xwl_screen)
xwl_gbm->dmabuf_capable = TRUE;
gbm_backend_name = gbm_device_get_backend_name(xwl_gbm->gbm);
/* Mesa uses "drm" as backend name, in that case, just do nothing */
if (gbm_backend_name && strcmp(gbm_backend_name, "drm") != 0)
xwl_screen->glvnd_vendor = gbm_backend_name;
return TRUE;
if (xwl_screen->egl_display != EGL_NO_DISPLAY) {
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment