wined3d: Recognize cards that expose ARB_shader_texture_lod as DX10 capable even if they don't support EXT_gpu_shader4 (try 3)

Stefan Dösinger stefandoesinger at gmail.com
Thu May 29 03:56:57 CDT 2014


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Am 2014-05-29 01:33, schrieb Andrei Slăvoiu:
> Drop the check for glsl_version. All wine shaders use #version 120
> so it doesn't matter.
That's not quite right. Yes, it is true that we never use GLSL 130, so
the version check isn't representative for what wined3d actually
supports. For shader model 4 support we need much more than just GLSL
130, half of the d3d10 infrastructure is still missing.

GL_ARB_shader_texture_lod doesn't imply shader model 4 support. My
Radeon X1600 supports this extension on OSX, and this is a shader
model 3 card. The X1600 doesn't support EXT_gpu_shader4 or GLSL 130.

The point of this code is to check the capabilities of the card, not
the capabilities of our d3d implementation. Thus to prevent SM 3 cards
from being reported with PCI IDs that suggest SM 4 capabilities you
need to check for all the other functionality that's supported by
EXT_gpu_shader4 / GLSL 130.

Even if we have a SM 4 capable card our d3d9 implementation does not
expose SM 4 support. But neither does Microsoft's d3d9 implementation.

There's also GLX_MESA_query_renderer. It gives us the PCI IDs and
video memory size directly, without all the string parsing guesswork.
We cannot use it wined3d directly. A possible approach would be to
expose a similar WGL_WINE/MESA_query_renderer extension from
winex11.drv and winemac.drv and use that in wined3d. The current
wined3d guesswork code could be moved to winex11.drv and used in cases
where GLX_MESA_query_renderer is not supported. (OSX has similar
functionality that's always available)

User32 also has a function (EnumDisplayDevices) to query the GPU
identification string, and some applications (Company of Heroes demo)
fail if the user32 GPU name differs from the d3d9 GPU name. So maybe a
WGL extension isn't quite the right interface, and it should be
something that does not require a GL context so user32.dll can use it
as well. EnumDisplayDevices does not export all the information
wined3d needs though - the PCI IDs and video memory size are missing I
think.

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.22 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQIcBAEBAgAGBQJThvZZAAoJEN0/YqbEcdMwsY8QAJG1NQVMSqjwaguVR0cwwNXq
IMYCRWL+5cJPxK4Eodt4bF+zZDObqCz9r3hAJVlkA6bJIcflNHJwedT0ddeOAfpe
0Xc8g+NvspN715yNt51PpzcnlSqh2vS18qp1JLb4l00pZuPt8PMNqC0gaePkv+tY
1wY3B/kgbl0TfcIRpxWbwZBcIAM2h4g+FGCHFPFeznhMYWqFaJ67OKW1KAdfpBTT
lPZsaNDXtU8hSaVQYVk7ITulUl0C8tW/MExnh4zclz6b/wQuG+/M0WRg5v/YDlNq
0ZAsVqT60+MbepR87ehYDnLB7RMjZMjZhEZ4/drafFbOQBmqL7YJjgbFsbBBXLTt
COf/1mjiz7TptUvSUyDRc27o1K+YP1UoswsVdXT37sWkP9gtHtQFeLLNx8ZuR4pa
2yQ7xNIBi7KPNBjz9Q0RKYvc11oGVUvFSuD0gLgNuHZxdOmBWwZyHeSce9adHHGU
5t4Oz0FsTZuEiiuJXPTDatp06KQQpUZ/c7FgcO7bxIpn/NNUCZGKZdKT/ZYM1waf
BEtBL2Ov+DzRnvRM3/lVPdaiMD1IY54bqTeU7NOiKCEFhBl0elCAblj155tVaKdR
5WekiCEsvB8S4FE6stDa+GewpBWUZiVLGSL49S0MViPqAbkbgcjcNlRVg6IEH2Zo
tyQIl6/9DwdY1TCllA9W
=Z1W8
-----END PGP SIGNATURE-----



More information about the wine-devel mailing list