Video memory size detection in D3D
Hello all, It seems Wine doesn't use any way to reliably detect video memory size, and for many video cards needs it to be specified as HKCU\Software\Wine\Direct3D\VideoMemorySize key in registry. But there exist at least three (vendor-specific) GL/GLX extensions which seem to address exactly this. Namely, for Mesa it's GLX_MESA_query_renderer [1], for nVidia it's GL_NVX_gpu_memory_info [2], and for ATI/AMD it's GL_ATI_meminfo [3]. Mesa extension is shipping starting from Mesa 10.0, nVidia ships their extension in 195.XX drivers (said in specification; I have it exposed with my 313.09 driver), don't know status of ATI extension though (marked as "???" in spec). It'd be good if Wine could utilize these. Is there any work towards this already? Regards, Ruslan [1]: http://www.opengl.org/registry/specs/MESA/glx_query_renderer.txt [2]: https://www.opengl.org/registry/specs/NVX/gpu_memory_info.txt [3]: http://www.opengl.org/registry/specs/ATI/meminfo.txt
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Am 2014-05-30 08:01, schrieb Ruslan Kabatsayev:
It'd be good if Wine could utilize these. Is there any work towards this already? See the discussion between Andrei Slăvoiu and myself on this list. I don't know if Andrei will decide to have a look at the extension, it's his choice. Other than that I don't know of any efforts in this area. You're welcome to chime in :-) .
-----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.22 (GNU/Linux) Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQIcBAEBAgAGBQJTiEMWAAoJEN0/YqbEcdMwUjUQAI2pHgX1xxkgFk3PYPHKKKrd PSyjvMs52IXECXYn2/Ka9hIZuFX43hkAgU+SIOrWQIQtmFqV4NgM+wd9kSX4UJAE 47D1dZtaEdGNLIjhQZFXqv/UeMdcF+yczPKVrQEtFV9+4a44v8kOZ9WoTIvljXG4 dx3k5eat5s00p93Jzq2VFfgpo+upL2xyYZ4C3mba4LRzoWdpLWd5m0nCXvT2OTtR JDa/cm7YCE9EUVvj9ig3vGQEEQRB6K8yrALw78/sO9CJMxBzgwNZ7NWqf+mOPkMP HQSBWk2VobnNgl5GdBZoBbsWmUktAu7v4nxRueK4rxae+UoONDf69xq+UknAMMZQ TdYaE4qYhWosbL3c6z+yfr/B0HqdMHDhRLINNVi5k4W5U6ZnFGkDoAunL3iDuwj/ jqvZTmcLUaLN91Qt1jeqC4lDB3JogUg8RAxfWtPOCczt6Kwi3lyuERGVD5LcI033 haTzl/UawOi301kqdpU/i2JECG/awEnHOJf9VavNMlIHISMrztX/ycoR9XzQbSvC tWq1BvBlgh9RRAUhyVUTN+wDjcD1PVqOcUCKyq7YX5epldRLvz9cVTaU7fsR/LQx Rik792h/yZfQ0jGrbZjxp6PjQW8pP/kyLSy68yiGQcCe33flF4qS1SrEnq6hKxsY gZ+s5KZhERNVcqJvBLp8 =X1PL -----END PGP SIGNATURE-----
On Fri, May 30, 2014 at 5:36 AM, Stefan Dösinger <stefandoesinger(a)gmail.com> wrote:
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
Am 2014-05-30 08:01, schrieb Ruslan Kabatsayev:
It'd be good if Wine could utilize these. Is there any work towards this already? See the discussion between Andrei Slăvoiu and myself on this list. I don't know if Andrei will decide to have a look at the extension, it's his choice. Other than that I don't know of any efforts in this area. You're welcome to chime in :-) .
Reminds me of some old discussions like: http://www.winehq.org/pipermail/wine-devel/2012-April/094994.html (last question/answer).
On Fri, May 30, 2014 at 5:06 PM, Bruno Jesus <00cpxxx(a)gmail.com> wrote:
On Fri, May 30, 2014 at 5:36 AM, Stefan Dösinger <stefandoesinger(a)gmail.com> wrote:
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
Am 2014-05-30 08:01, schrieb Ruslan Kabatsayev:
It'd be good if Wine could utilize these. Is there any work towards this already? See the discussion between Andrei Slăvoiu and myself on this list. I don't know if Andrei will decide to have a look at the extension, it's his choice. Other than that I don't know of any efforts in this area. You're welcome to chime in :-) .
Reminds me of some old discussions like: http://www.winehq.org/pipermail/wine-devel/2012-April/094994.html (last question/answer). Hmm, this is an interesting point. But, for GLX_MESA_query_renderer, which appeared relatively recently, one can't say it's experimental or cannot return the total memory. Can its use be accepted by Wine? Maybe at some point Nvidia/AMD will implement it too (looks unlikely though), but at least for Mesa-powered drivers it would work.
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Am 2014-05-30 15:25, schrieb Ruslan Kabatsayev:
Hmm, this is an interesting point. But, for GLX_MESA_query_renderer, which appeared relatively recently, one can't say it's experimental or cannot return the total memory. Can its use be accepted by Wine? Maybe at some point Nvidia/AMD will implement it too (looks unlikely though), but at least for Mesa-powered drivers it would work. Yes, I see no reason why we can't use GLX_MESA_query_renderer. We still need the fallback path for drivers that do not support it though.
It's important to note that wined3d itself cannot use it. Wined3d uses WGL, not GLX. winex11.drv has to use GLX_MESA_query_renderer, and it can export its functionality to wined3d in the form of a WGL extension that is similar or equal to GLX_MESA_query_renderer. winemac.drv can export the same extension. There are OSX functions to query the PCI IDs and video memory size. (I forgot the name though). As far as I know the NV-CONTROL X11 (not GLX) extension exposes the same information, but doesn't have the issue that it's specification isn't finalized. Winex11.drv could in theory use it if GLX_MESA_query_renderer is not available. -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.22 (GNU/Linux) Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQIcBAEBAgAGBQJTiIk6AAoJEN0/YqbEcdMw+GwP/2ia45TTEJPLthGMoReA13iX 8M2NplPwR+SHaPSSR6U9jUre80Q5p8amFh8gM896Rw8uoq0qB6Y5c8VtMlkPdYgp WzfKqjxJJC4Jt8csTT/m245f82lf78qLsWRfZTMYwiX5921NmCqC4SEbs7FnYGp9 FpIdDEmTQ1NLS9C5bdCBUtQbY9jBMekyM9x8+5acLyhDgjw+GwDIRHPgbKokNix3 c0RdYoXFcRl3aUKGTR7zM7CHjS9e56Oi6HApfaxBr0ElMh7uM40pjug/pHMz6hqE dBWUuViOwnt6vJqUBGcSTc6nmEAFVvW+Gnpxo3wKxjsByUQ9BiviGGOkf1QOm7HI /RCRAD2UL888ujFOglRyA7/Ss72qFKXTEy6utuX1qne2gJrjbnfSLD/Hb2UZV7f7 WrDJ9Mmma3xh+xMtuqL/3HHRUyEc3z+4TamOwFwlYeNMoUH8DJ2dWPRcjD5VfuG8 sb+MTtkONNnWjH5R28TVhJFKqNjN9CL2rwfShw15CbG2I/HJ+OWxK1lSREbne2Er WNjtPOh03e7I+KTm6bB5H6xr+aLO+DjLvKmmaqek+Ap+8ebqfLBGh9EtoHBxRfAs wtl8ImBXxo/M0O6sIo9N2OG6CefQ5bcpsHABjj0noKEF2Zqv8L+2kPwadr2DasLf 9rLNpWS58G3lN3BjtxXQ =ifL5 -----END PGP SIGNATURE-----
On 30 May 2014 15:25, Ruslan Kabatsayev <b7.10110111(a)gmail.com> wrote:
Hmm, this is an interesting point. But, for GLX_MESA_query_renderer, which appeared relatively recently, one can't say it's experimental or cannot return the total memory. Can its use be accepted by Wine? Maybe at some point Nvidia/AMD will implement it too (looks unlikely though), but at least for Mesa-powered drivers it would work.
Yes, we'd like to use GLX_MESA_query_renderer for this. Do you happen to know if it's supported by the r600g driver yet? The last time I looked into it there were some patches on the mailing list, but nothing committed yet.
2014-06-02 17:45 GMT+02:00 Henri Verbeet <hverbeet(a)gmail.com>:
On 30 May 2014 15:25, Ruslan Kabatsayev <b7.10110111(a)gmail.com> wrote:
Hmm, this is an interesting point. But, for GLX_MESA_query_renderer, which appeared relatively recently, one can't say it's experimental or cannot return the total memory. Can its use be accepted by Wine? Maybe at some point Nvidia/AMD will implement it too (looks unlikely though), but at least for Mesa-powered drivers it would work.
Yes, we'd like to use GLX_MESA_query_renderer for this. Do you happen to know if it's supported by the r600g driver yet? The last time I looked into it there were some patches on the mailing list, but nothing committed yet.
It's advertised on r600g (REDWOOD, although I doubt it matters), Mesa 10.1.3, I haven't tried to actually use it though.
participants (5)
-
Bruno Jesus -
Henri Verbeet -
Matteo Bruni -
Ruslan Kabatsayev -
Stefan Dösinger