WineD3D: Implement detection of ATI cards with Mesa DRI drivers [try 3]

Roderick Colenbrander thunderbird2k at gmx.net
Thu Nov 22 02:42:48 CST 2007


> Presently, if an ATI card uses open-source DRI drivers from the Mesa
> project ( http://dri.freedesktop.org/wiki/ATI ), Wine will report it to
> Windows applications as being some generic nVIDIA model, based on D3D
> capabilities of the card.
> 
> This patch adds detection of the used ATI video card, based on Mesa DRI
> module name, which is returned by drivers in GL Renderer string. In my
> opinion, returning even an approximate ATI card model should be better,
> than the present condition, disguising the ATI card as some equally
> generic model from nVIDIA. Also, the patch adds detection of VENDOR_MESA
> >from GL Renderer string, as Mesa DRI drivers may have various things as
> GL Vendor, but the GL Renderer name always contains the string "Mesa".
> This patch resolves the bug #7267, "Lineage 2 complains about outdated
> NVIDIA drivers using ATI card with Mesa drivers" -
> http://bugs.winehq.org/show_bug.cgi?id=7267 .

The idea behind the whole code is that we detect a 'compatible' card based on the OpenGL capabilites. That stuff is done using the D3DX_CAPABLE() macros. The extension I check directly correspond to D3D functionality. In the end the result is further refind by checking the opengl renderer string.

The reason why it is all done this way is because we need to detect the card based on OpenGL / GLX information and they don't export the pci id (which is good) but bad for D3D. Retrieving the real card name and so on from /proc or whatever isn't guaranteed to get good results and it also doesn't scale with remote X and if the system uses multiple videocards. It is very tricky.

I would really ask you to use the D3DX_CAPABLE() macros as not using them can result in bad problems. E.g. a game assuming a certain d3d functionality is there while it isn't backed by any GL extension.

The reason we default to Nvidia cards is that they are very generic and have quite solid drivers, so from an application point of view that is nice. Second games don't really need the exact GPU but they just use the info to get an impression of the features / performance. You can debate whether reporting Nvidia or ATI on totally different drivers matters (I would say no).

So at least use the D3DX_CAPABLE macros as those are correct.

Roderick 
-- 
Der GMX SmartSurfer hilft bis zu 70% Ihrer Onlinekosten zu sparen! 
Ideal für Modem und ISDN: http://www.gmx.net/de/go/smartsurfer



More information about the wine-devel mailing list