[PATCH] wined3d: Fix some videocards property detection

Stefan Dösinger stefandoesinger at gmail.com
Sat Mar 28 05:21:51 CDT 2015


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

Hi,

This patch has a few unrelated changes. The core change is that it
re-introduces a hack we once had in Wine and removed because it broke
newer mac GPUs. The CrossOver version of the hack works a bit better
than the unconditional Wine version, but it's still ugly.

Am 2015-03-28 um 06:15 schrieb Sergey Isakov:
> +  /* Non-Apple GL vendors report uniforms correctly */
> +  if (!match_apple(gl_info, gl_renderer, gl_vendor, card_vendor, device)) return FALSE;
> +  /* All dx9 cards are overreported on OSX */
> +  if (!match_dx10_capable(gl_info, gl_renderer, gl_vendor, card_vendor, device)) return TRUE;
> +  /* Nvidia and Intel DX10 cards support > 256 uniforms */
> +  if (card_vendor != HW_VENDOR_AMD) return FALSE;
It is terrible that OSX lies about the GPU capability and then forces
applications to have a crystal ball that tells them what the GPU can
actually do.

- From a pragmatic point of view I don't think OSX will ever change in
this regard. It was a design decision by Apple to do this, and they
stopped updating drivers for the old hardware a long time ago.

I am open to re-introducing the hack if we can find a way to detect the
bug more directly. E.g. try to declare a shader with 257 uniforms, read
them with indirect addressing so the driver can't optimize the access
and then check for software fallbacks. There's a CGL function for
checking that, but I don't remember from the top of my head how it works.

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2

iQIcBAEBAgAGBQJVFoC/AAoJEN0/YqbEcdMwcUIP/Rw24kSROYMK2Xvfe9vyEZ9S
NQd9RPHRQRNiXuXRfAmAUKm/PF17O7SUMKLAwjg90HGZySdDOH4MCb7rwaXryKYU
qV1ba75KR/JOi7db0r/WrZjf+mQ2+z1hES0SEg9jSYHxIcSNRhWvjB3H3rId7Och
TAEvsiT897rE7U/2GQmnw9popFPOPRm0Y2YY4f1XecF1XSdmBokpdmpcDzoRTxbX
8q11cWlPyqi3u6xiyX7SwEwoh7v/zpNd4c1yuL6kytSfV1w+sD4fMC4BitIvfd2X
OltqvQz5MfexglNlLJaeE1yplhrEKE2NHHdoIXhOhg7TdOeHYJfvrzgpjLWlUVnC
6BWsSkgge3OO3Pk7Fhi7Lht0EPhds+iq+7NCLwDV051Qi89kBlyJOY33bMMjryez
wHo+YEZEvk0IkkVQGkAjJfZzLFtxjMzIxcixijkJc3/aYwuF0ZyDVqFe3hj4gPTw
Ei1IThyWC4hdVqIuduD4t+5VH3GwU6JiYE6a16uHVTfoTSboN9te1WzV+lnhRFMf
P54xaJ+98sJrpq+670WU68jHzM/BmXXojyF+lxv8t0noXmHLJy7S4yskzDhowMMG
myjbDbeb/fB2O/oSdeOEXkskl2+XkotROM9qwF7a/yyaGe1/f47Y16gmrPyeCFD5
0Z68wLM5//XliOz91+hs
=1uP/
-----END PGP SIGNATURE-----



More information about the wine-devel mailing list