Fix ATI OpenGL bug

Roderick Colenbrander thunderbird2k at gmx.net
Wed Aug 23 18:11:52 CDT 2006


Hi,

This patch fixes a bug in opengl32 for ATI users. Wine's opengl code requires 
GLX FBConfig support. This functionality is available when the GLX version is 
set to 1.3 and it is also supported when the SGIX fbconfig extension is 
present.

The problem is that both MESA/DRI-drivers and ATI's drivers advertise a GLX 
server version of 1.2, so no fbconfig from GLX. In this case we would need to 
fallback to the SGIX extension. In case of both driver sets the fbconfig 
extension is in the list of extensions exported by the server but only the 
Mesa drivers export it as a client extension.  Further the client GLX version 
as reported by both driver sets is 1.3 or even 1.4 which means that the 
client library supports FBConfig.

One other comment which is needed to understand the problem. In case of direct 
rendering you could say that the client library is the 'boss' and decides 
what GLX functionality is available. In case of indirect rendering (rendering 
through the Xserver) the server GLX version / extension string decide what is 
supported.

Now what does this all  mean? The MESA/DRI-drivers export a server GLX version 
of 1.2 and because we want to have atleast 1.3, we fall back to the SGIX 
extension which exists in all cases (both client and server export it). In 
case of the ATI drivers this fallback doesn't work because the client library 
doesn't export the SGIX extension. Any calls to the SGIX functions in the 
client library will fail.

The patch changes our GLX detection. In case of direct rendering the client 
GLX version is used to detect the presence of FBConfig support else the 
server version is used. When the version number isn't high enough we check 
either the client or server extension string depending on the use of direct 
rendering to see what is supported.

Regards,
Roderick Colenbrander
-------------- next part --------------
A non-text attachment was scrubbed...
Name: opengl.patch
Type: text/x-diff
Size: 4321 bytes
Desc: not available
Url : http://www.winehq.org/pipermail/wine-patches/attachments/20060823/b1691172/opengl.bin


More information about the wine-patches mailing list