mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-06-06 10:38:17 +02:00
glx: Explicitly reject servers that only support GLX 1.0
__glXInitialize calls AllocAndFetchScreenConfigs. AllocAndFetchScreenConfigs unconditionally sends a glXQuerySeverString request to the server. This request is only supported with GLX 1.1 or later, so we were already implicitly incompatible with GLX 1.0 servers. How many more similar bugs lurk in the code that nobody has noticed in years? Signed-off-by: Ian Romanick <ian.d.romanick@intel.com> Reviewed-by: Adam Jackson <ajax@redhat.com> Reviewed-by: Eric Anholt <eric@anholt.net>
This commit is contained in:
parent
a832aa5ba0
commit
e4be406f09
1 changed files with 6 additions and 4 deletions
|
|
@ -836,9 +836,12 @@ __glXInitialize(Display * dpy)
|
|||
dpyPriv->serverGLXvendor = 0x0;
|
||||
dpyPriv->serverGLXversion = 0x0;
|
||||
|
||||
/* See if the versions are compatible */
|
||||
/* See if the versions are compatible. This GLX implementation does not
|
||||
* work with servers that only support GLX 1.0.
|
||||
*/
|
||||
if (!QueryVersion(dpy, dpyPriv->majorOpcode,
|
||||
&dpyPriv->majorVersion, &dpyPriv->minorVersion)) {
|
||||
&dpyPriv->majorVersion, &dpyPriv->minorVersion)
|
||||
|| (dpyPriv->majorVersion == 1 && dpyPriv->minorVersion < 1)) {
|
||||
Xfree(dpyPriv);
|
||||
_XUnlockMutex(_Xglobal_lock);
|
||||
return NULL;
|
||||
|
|
@ -884,8 +887,7 @@ __glXInitialize(Display * dpy)
|
|||
return NULL;
|
||||
}
|
||||
|
||||
if (dpyPriv->majorVersion == 1 && dpyPriv->minorVersion >= 1)
|
||||
__glXClientInfo(dpy, dpyPriv->majorOpcode);
|
||||
__glXClientInfo(dpy, dpyPriv->majorOpcode);
|
||||
|
||||
/* Grab the lock again and add the dispay private, unless somebody
|
||||
* beat us to initializing on this display in the meantime. */
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue