X11DRV: fix fbconfig regression

Roderick Colenbrander thunderbird2k at gmx.net
Sat Sep 16 03:46:33 CDT 2006


> Roderick Colenbrander wrote:
> > There's this check:
> >      if ((!WineGLInfo.glxDirect && !strcmp("1.2",
> WineGLInfo.glxServerVersion)) ||
> >          (WineGLInfo.glxDirect && !strcmp("1.2",
> WineGLInfo.glxClientVersion)))
> 
> 
> This is not the correct way of loading opengl functions or deciding 
> whether they are available or not. According to the 
> GLX_ARB_get_proc_address spec, we need to check _only_ 
> glXQueryExtensionsString() and glXQueryVersion() and it's not correct to 
> make assumptions based on server/client versions or extension strings.
> 
> This patch removes all the client/server code and replaces it with the 
> correct checks. The patch fixes the code in has_opengl() (and also 
> replaces one wine_dlsym() with pglXGetProcAddressARB()) as well as the 
> helper function glxRequireExtension() and fixes the code that decices 
> whether pbuffers are available. Pbuffers are part of GLX 1.3, so if the 
> GLX version is 1.3 we _have_ pbuffers, no need to check for the 
> GLX_SGIX_pbuffers extension anymore (&& -> ||)
> 
> If this patch works with ATI drivers, I don't know, but that's certainly 
> the correct way of querying functions.

I'm aware of the GLX version / extension issues. The check is more or less a workaround for buggy drivers like ATI's :( I'm against workarounds but in this case without it, there won't be any OpenGL support on ATI's drivers as GLX_SGIX_fbconfig is a requirement for wine. (I have submitted a bugreport) BTW I had the same stuff in opengl32.

The issue is that ATI's drivers don't advertise GLX_SGIX_fbconfig (which really all opengl drivers do) but on the other hand they advertise GLX client version 1.3 which promoted GLX_SGIX_fbconfig to core functionality. So ATI doesn't advertise GLX_SGIX_fbconfig but it is available because their libs are 1.3. They only ship the 1.3 functions so not the SGIX ones.

When direct rendering is enabled we look at the GLX client version :( This only works for fbconfig stuff and not for other things like pbuffers (it does work on ATI cards but not on Mesa).

I hope this clears it up,
Roderick


-- 
"Feel free" - 10 GB Mailbox, 100 FreeSMS/Monat ...
Jetzt GMX TopMail testen: http://www.gmx.net/de/go/topmail



More information about the wine-devel mailing list