Roderick Colenbrander wrote:
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.
You certainly do have a point. I will redo the patch a bit later, but before that, I have a couple of questions.
- Checking real capabilities surely can be a good way to approximate
the level of used hardware. But could these D3DX_CAPABLE() macros be considered reliable enough to use just them alone (and not the DRI module names) for conceiving the card model? If this is so, then checking of the Mesa renderer string could remain only for detection that the card is from ATI (because it does not give any precise info anyway).
I have done a lot of tests to come to this list of extensions and it is quite good. So the purpose of the macros is to get an impression of what roughly the d3d capabilities of a card are and using GL info (vendor / renderer string) a more exact match is found. But this is not needed. Also note that thanks to this mechanism even if the card isn't known it is at least reported as a card with the same minimum requirements. (A geforce10 or whatever would default to some basic d3d9 card but that is better than nothing)
- Are there any plans to add D3D9B_CAPABLE and D3D9C_CAPABLE (and maybe
D3D10_CAPABLE too)? These would immensely help to identify the newer cards. Currently, without such macros, the detection code can't safely report that a card is anything more than the ATI's Direct3D 9 lowest-common denominator, Radeon 9500. (See http://en.wikipedia.org/wiki/Radeon for a table of models and their DirectX versions).
D3d10 support is relatively easy to add (check for the geometry shader extension) but only nvidia exports that yet. Checking for d3d9b/d3d9c is more complicated as the differences lie in the number of shader constants and things like that. Perhaps I will extend it with that but I need to dive back into the numbers (some drivers aren't clear about their specifications and that makes it hard)
Note that d3d10 doesn't export the gpu capabilities and device name anymore, so it is only needed for <=d3d9.
Roderick