<html><body><div>Sometimes, when I'm playing games on Wine, the game crashes, and then I look in the log and see "Out of adapter memory". Then I run `winetricks videomemorysize=1024`, and it runs fine. My graphics card has 1536 MB of total VRAM. It seems to me that Wine isn't correctly autodetecting the amount of VRAM I have.<br><br>(DISCLAIMER: The following analysis is not based on any log output. It's based on my reading of the code, which may well be incorrect. If so, please correct me.)<br><br>I just had a look at the code. In dlls/wined3d/directx.c, query_gpu_description uses wglQueryCurrentRendererIntegerWINE to obtain the GPU vendor, device, and available VRAM. wglQueryCurrentRendererIntegerWINE is part of the WGL_WINE_QUERY_RENDERER extension, which...is not implemented in winemac.drv. It's only implemented in winex11.drv. I don't use X11 if I can help it. So, with absolutely no information about what the graphics card is, Wine defaults to an Nvidia Riva 128 with WINE_DEFAULT_VIDMEM (64MB) of VRAM. This is not close.<br><br>I would like to write a patch to fix this problem. I'm thinking of adding an implementation of WGL_WINE_QUERY_RENDERER to winemac.drv. There are 12 different things that can be queried about the renderer, but only WGL_RENDERER_VENDOR_ID_WINE, WGL_RENDERER_DEVICE_ID_WINE, and WGL_RENDERER_VIDEO_MEMORY_WINE are used to my knowledge, so I’d only implement those.<br><br>Does this sound correct?<br><br>~Theodore</div></body></html>