[patch] Use dlsym instead of glXGetProcAddress in xdriinfo
Ian Romanick
idr at us.ibm.com
Wed Nov 23 08:30:11 PST 2005
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Brian Paul wrote:
> Ian Romanick wrote:
>
>> Actually, this code is totally bogus. In X.org's default libGL,
>> glXGetProcAddress *NEVER* returns NULL. Ever. Replace
>> "glXGetScreenDriver" above with "glXLikesToSegfault" and you'll see what
>> I mean. :)
>
> At one time, querying "gl*" functions always returned non-null, but
> querying "glX*" functions would return NULL for invalid functions. Has
> that changed?
Ah yes, that is still the case. I guess that's what I get for reviewing
patches after getting up at 5AM take someone to the airport. :)
I've added a wiki page for glXGetProcAddress FAQs:
http://dri.freedesktop.org/wiki/glXGetProcAddressNeverReturnsNULL
> In any case, it's kind of against the rules to create new glX functions
> like glXGetScreenDriver without defining an extension and putting the
> proper suffix on the function name.
I was thinking the same thing, but I think we've already shipped a
version with these names. :( I think these functions initially didn't
even begin with glX. That was added later so that glXGetProcAddress
could be used. I might be misremembering, though (see previous 5AM
comment).
In this particular case, what should the suffix be? MESA? XORG?
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.6 (GNU/Linux)
iD8DBQFDhJkTX1gOwKyEAw8RAq16AJ4xfQ1tbwOd4wSynRfQ0bKbrlj/2wCfdMZI
hBqGr7x/Pq1+cXoO4+HSfOo=
=X8i4
-----END PGP SIGNATURE-----
More information about the xorg
mailing list