[Mesa-dev] RFC - libglvnd and GLXVND vendor enumeration to facilitate GLX multi-vendor PRIME GPU offload
Andy Ritger
aritger at nvidia.com
Mon Feb 11 16:18:44 UTC 2019
On Mon, Feb 11, 2019 at 12:09:26PM +0100, Michel Dänzer wrote:
> On 2019-02-08 11:43 p.m., Kyle Brenneman wrote:
> >
> > Also, is Mesa the only client-side vendor library that works with the
> > Xorg GLX module? I vaguely remember that there was at least one other
> > driver that did, but I don't remember the details anymore.
>
> AFAIK, the amdgpu-pro OpenGL driver can work with the Xorg GLX module
> (or its own forked version of it).
Maybe the amdgpu-pro OpenGL driver uses a fork of the Xorg GLX module
(or sets the "GlxVendorLibrary" X configuration option?), but it doesn't
look to me like the in-tree Xorg GLX module could report anything other
than "mesa" for GLX_VENDOR_NAMES_EXT, without custom user configuration.
GLX_VENDOR_NAMES_EXT, which client-side glvnd uses to pick the
libGLX_${vendor}.so to load, is implemented in the Xorg GLX module
with this:
xserver/glx/glxcmds.c:__glXDisp_QueryServerString():
case GLX_VENDOR_NAMES_EXT:
if (pGlxScreen->glvnd) {
ptr = pGlxScreen->glvnd;
break;
}
pGlxScreen->glvnd appears to be assigned here, defaulting to "mesa",
though allowing an xorg.conf override via the "GlxVendorLibrary" option:
xserver/glx/glxdri2.c:__glXDRIscreenProbe():
xf86ProcessOptions(pScrn->scrnIndex, pScrn->options, options);
glvnd = xf86GetOptValString(options, GLXOPT_VENDOR_LIBRARY);
if (glvnd)
screen->base.glvnd = xnfstrdup(glvnd);
free(options);
if (!screen->base.glvnd)
screen->base.glvnd = strdup("mesa");
And swrast unconditionally sets pGlxScreen->glvnd to "mesa":
xserver/glx/glxdriswrast.c:__glXDRIscreenProbe():
screen->base.glvnd = strdup("mesa");
Is there more to this that I'm missing?
> --
> Earthling Michel Dänzer | http://www.amd.com
> Libre software enthusiast | Mesa and X developer
More information about the mesa-dev
mailing list