[Mesa-dev] GLX extension for vendor name lookup in libglvnd
kbrenneman at nvidia.com
Wed Mar 9 18:15:39 UTC 2016
The current implementation of libglvnd uses a new X extension called
x11glvnd to look up a vendor name for each screen and to find a screen
number for a GLXDrawable.
But, Adam Jackson pointed out that a GLX extension could do the same job
more cleanly: Looking up a vendor name is just querying a per-screen
string, which GLXQueryServerString does. Looking up a screen number for
a drawable could work by adding a GLX_SCREEN attribute to the
Based on that idea, I've written up a rough draft of a GLX extension
spec. Any comments, questions, or suggestions are welcome, of course.
Kyle Brenneman, NVIDIA, kbrenneman at nvidia.com
XXX - Not complete yet
Last Modified Date: March 8, 2016
GLX version 1.3 is required.
This specification is written against the wording of the GLX 1.4
This extension allows the vendor-neutral GLX client library,
determine which vendor-specific driver is needed to support a given GLX
drawable or X11 screen.
This GLX extension is not intended to be used directly by applications.
Instead, it is intended to be used by the GLX client library.
No known IP claims.
New Procedures and Functions
Accepted by the <name> parameter of glXQueryServerString:
Additions to Chapter 3 of the GLX 1.4 Specification
(Functions and Errors)
[Modify Section 3.3.2, GLX Versioning]
[Replace the 2nd sentence of the 5th paragraph with the following]
"The possible values for <name> and the format of the strings is
as for glXGetClientString. <name> may also be GLX_VENDOR_NAMES_EXT."
[Add the following paragraph to the end of the section]
"If <name> is GLX_VENDOR_NAMES_EXT, then the returned string is a
space-separated sequence of vendor names. The names are in order of
preference, with the most preferred vendor first."
[Modify Section 3.3.6, Querying Attributes]
[Replace the 2nd sentence of the 1st paragraph with the following]
"<attribute> must be set to one of GLX_WIDTH, GLX_HEIGHT,
GLX_PRESERVED_CONTENTS, GLX_LARGEST_PBUFFER, GLX_FBCONFIG_ID, or
[Add the following paragraph just before the last of the section]
"If <attribute> is GLX_SCREEN, then <value> will be the screen
the drawable was created on."
This extension does not add any new requests. The
is used with the existing glXQueryServerString request, and
added to the attributes in the glXGetDrawableAttributes reply.
1) Should GLX_VENDOR_NAMES_EXT contain a single vendor name or a
Allowing multiple names would allow for multiple client-side
that work with a single server-side driver. With only a single
selecting between multiple client drivers would require some
2) How are vendor names defined and interpreted?
The vendor names for a screen are defined based on the server's GLX
implementation. Typically, a server will simply send the name
driver that controls the screen.
The GLX client library is responsible for translating the
to a vendor library name. The details of the translation are
the interface between the vendor library and the GLX client
and so is not defined in this specification.
3) What order should the vendor names be returned in?
The GLX client library will try to load and use each vendor
the order that the server lists them. It will stop when it
first vendor that works.
1. 8 March 2016
- Initial draft.
More information about the mesa-dev