The description of glXQueryExtension states: error base is used to return the value of the first error code and event base is used to return the value of the first event code. The constant error codes and event codes should be added to these base values to get the actual value. But this function doesn't set error base and event base value, though function returns True (GLX extension is supported by the display). After executing this code: Display* display = XOpenDisplay(NULL); int errorBase = -10, eventBase = -10; glXQueryExtension(display, &eventBase, &errorBase); errorBase and eventBase remains -10. Mesa 6.2 implements this function correctly.
I'm guessing that you're using the "fake" GLX library and not the real GLX library. When you're using fake GLX we're just emulating the GLX library so the errorbase and eventbase values are meaningless. I guess we could set them to zero. I'll attach a patch.
Created attachment 30111 [details] [review] return 0 for errorBase and eventBase Does this patch help you?
Yes, I use Mesa, configured with --with-driver=xlib. > errorbase and eventbase values are meaningless Is this mean, that GLX errors and events have never arised in this case of GLX? And what about XQueryExtension() for GLX_EXTENSION_NAME? As I undestand, it should return same errorBase and eventBase, as glXQueryExtension. But even in this "fake" GLX case, it returns concrete values(155 for first_error, and 93 for first_event on my system).
You're right, we can always call XQueryExtension(). We'll always return True from glXQueryExtension() since we're trying to fake GLX. But when there really is GLX we can return real errorBase and eventBase values. I don't know who would depend on this but we can do it. I'll attach another patch.
Created attachment 30145 [details] [review] another patch for glXQueryContext()
This was fixed with commit e3fff3daf031a997a1d4316e1a0e5c831573221d
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.