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@redhat.com>
Reviewed-by: Michel Dänzer <mdaenzer@redhat.com>
(cherry picked from commit 24fc8aea1e)
This commit is contained in:
Olivier Fourdan 2021-05-20 12:11:42 +02:00
parent f4720f1c42
commit 8744ab1b41
2 changed files with 6 additions and 0 deletions

View File

@ -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");

View File

@ -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,