On 23 May 2014 00:23, Andrei Slăvoiu andrei.slavoiu@gmail.com wrote:
already part of OpenGL 3.0. This causes all cards that are not explicitly recognized by wine (for example all GCN cards) to be treated as DX9 cards and presented to Windows apps as Radeon 9500.
TAHITI, PITCAIRN and CAPE VERDE should be recognized, newer cards aren't.
On 27 May 2014 17:35, Stefan Dösinger stefandoesinger@gmail.com wrote:
No, I'd say use something like if (EXT_gpu_shader4 || ( ARB_shader_texture_lod && glsl_version >= 1.30).
That's just wrong, GLSL 1.30 + ARB_shader_texture_lod doesn't imply SM4, only SM3.
On 28 May 2014 21:48, Andrei Slăvoiu andrei.slavoiu@gmail.com wrote:
Actually, d3d_level_from_gl_info is misleading (broken even), as it will check for SM3 capability and then return that the card is capable of directx 10
EXT_gpu_shader4 adds (among others) support for "native" integers and bitwise operations. It can't be supported (in hardware) on a SM3 GPU. The specific extensions used in d3d_level_from_gl_info() are somewhat arbitrary, we could have used e.g. ARB_geometry_shader4 instead of EXT_gpu_shader4 here as well.
Note that the intention of the code this function is a part of is to come up with a somewhat reasonable card to report to the application in case of unrecognized GL implementations, while e.g. shader_glsl_get_caps() is meant to report actual capabilities. It would perhaps be nice to use the actual shader backend etc. caps for d3d_level_from_gl_info(), but note that that wouldn't necessarily be easy, or make the situation much better. For the Mesa case you mention in the original patch it would arguably make the situation worse, since we can't currently properly do shader model 4 on Mesa.