From: Brian Paul Date: Wed, 7 Oct 2009 20:42:14 +0000 (-0600) Subject: mesa/xlib: call XQueryExtension() in glXQueryExtension() X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=9f002e4aaa2d7ea085cd0a3c66ff0fa533905382;p=mesa.git mesa/xlib: call XQueryExtension() in glXQueryExtension() See bug 24321. --- diff --git a/src/mesa/drivers/x11/fakeglx.c b/src/mesa/drivers/x11/fakeglx.c index 525db3b7cb7..5c0084f37aa 100644 --- a/src/mesa/drivers/x11/fakeglx.c +++ b/src/mesa/drivers/x11/fakeglx.c @@ -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 */ }