OSDN Git Service

mesa/xlib: call XQueryExtension() in glXQueryExtension()
authorBrian Paul <brianp@vmware.com>
Wed, 7 Oct 2009 20:42:14 +0000 (14:42 -0600)
committerBrian Paul <brianp@vmware.com>
Wed, 7 Oct 2009 20:42:16 +0000 (14:42 -0600)
See bug 24321.

src/mesa/drivers/x11/fakeglx.c

index 525db3b..5c0084f 100644 (file)
@@ -1639,13 +1639,15 @@ Fake_glXCopyContext( Display *dpy, GLXContext src, GLXContext dst,
 static Bool
 Fake_glXQueryExtension( Display *dpy, int *errorBase, int *eventBase )
 {
+   int op, ev, err;
    /* Mesa's GLX isn't really an X extension but we try to act like one. */
-   (void) dpy;
+   if (!XQueryExtension(dpy, GLX_EXTENSION_NAME, &op, &ev, &err))
+      ev = err = 0;
    if (errorBase)
-      *errorBase = 0;
+      *errorBase = err;
    if (eventBase)
-      *eventBase = 0;
-   return True;
+      *eventBase = ev;
+   return True; /* we're faking GLX so always return success */
 }