[Mesa-dev] GLX extension for vendor name lookup in libglvnd

Adam Jackson ajax at redhat.com
Wed Mar 9 19:21:43 UTC 2016


On Wed, 2016-03-09 at 11:15 -0700, Kyle Brenneman wrote:
> 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 
> GLXGetDrawableAttributes reply.
> 
> 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.

Argh, you beat me to it, I'd written almost exactly the same thing. I
just an update to my serverstring branch on github implementing what
I'd spec'd, details below...

> New Tokens
> 
>      Accepted by the  parameter of glXQueryServerString:
> 
>          GLX_VENDOR_NAMES_EXT    0x????

Perhaps easier than getting an enum allocated here, I'd appended this
string to the end of the response for GLX_VERSION, in the form

    glvnd:<list>

where list is comma-separated, since that part of the string is already
"vendor-specific info".

Agreed with your rationale in the Issues section. I'd also had:

    1) Do we need to define the interaction with GLX_SGIX_pbuffer?

       UNRESOLVED.  Xorg uses the same code paths for the 1.3 and
       pbuffer versions of GetDrawableAttributes, but extra attributes
       are probably harmless.

    2) Do we want to add GLX_SCREEN to the list of fbconfig attributes
       as well?

       UNRESOLVED.  glvnd does not need that information, but it would
       be a natural orthogonality, and GLX_SGIX_fbconfig mentions it
       though GLX 1.3 does not.

- ajax


More information about the mesa-dev mailing list