diff --git a/dlls/wined3d/directx.c b/dlls/wined3d/directx.c
index 8c744ff..8ec58cc 100644
--- a/dlls/wined3d/directx.c
+++ b/dlls/wined3d/directx.c
@@ -1260,7 +1260,19 @@ static enum wined3d_pci_vendor wined3d_guess_card_vendor(const char *gl_vendor_s
     return HW_VENDOR_NVIDIA;
 }
 
+static unsigned int nvx_gpu_memory_info_check(const struct wined3d_gl_info *gl_info, unsigned int vidmem)
+{
+    GLint tmp;
 
+    if (&gl_info->supported[NVX_GPU_MEMORY_INFO])
+    {
+        glGetIntegerv(GPU_MEMORY_INFO_TOTAL_AVAILABLE_MEMORY_NVX, &tmp);
+        TRACE("NVX_gpu_memory_info supported, reports %u kB.\n", tmp);
+        return tmp/1024;
+    } else {
+        return vidmem;
+    }
+}
 
 static enum wined3d_pci_device select_card_nvidia_binary(const struct wined3d_gl_info *gl_info,
         const char *gl_renderer, unsigned int *vidmem)
@@ -1270,14 +1282,14 @@ static enum wined3d_pci_device select_card_nvidia_binary(const struct wined3d_gl
         /* Geforce 400 - highend */
         if (strstr(gl_renderer, "GTX 480"))
         {
-            *vidmem = 1536;
+            *vidmem = nvx_gpu_memory_info_check(gl_info, 1536);
             return CARD_NVIDIA_GEFORCE_GTX480;
         }
 
         /* Geforce 400 - midend high */
         if (strstr(gl_renderer, "GTX 470"))
         {
-            *vidmem = 1280;
+            *vidmem = nvx_gpu_memory_info_check(gl_info, 1280);
             return CARD_NVIDIA_GEFORCE_GTX470;
         }
 
@@ -1285,7 +1297,7 @@ static enum wined3d_pci_device select_card_nvidia_binary(const struct wined3d_gl
         if (strstr(gl_renderer, "GTS 350M")
                 || strstr(gl_renderer, "GTS 360M"))
         {
-           *vidmem = 1024;
+           *vidmem = nvx_gpu_memory_info_check(gl_info, 1024);
            return CARD_NVIDIA_GEFORCE_GTS350M;
         }
 
@@ -1293,7 +1305,7 @@ static enum wined3d_pci_device select_card_nvidia_binary(const struct wined3d_gl
         if (strstr(gl_renderer, "GT 325M")
                 || strstr(gl_renderer, "GT 330M"))
         {
-           *vidmem = 1024;
+           *vidmem = nvx_gpu_memory_info_check(gl_info, 1024);
            return CARD_NVIDIA_GEFORCE_GT325M;
         }
 
@@ -1302,34 +1314,34 @@ static enum wined3d_pci_device select_card_nvidia_binary(const struct wined3d_gl
                 || strstr(gl_renderer, "GTX 285")
                 || strstr(gl_renderer, "GTX 295"))
         {
-            *vidmem = 1024;
+            *vidmem = nvx_gpu_memory_info_check(gl_info, 1024);
             return CARD_NVIDIA_GEFORCE_GTX280;
         }
 
         /* Geforce 200 - midend high */
         if (strstr(gl_renderer, "GTX 275"))
         {
-            *vidmem = 896;
+            *vidmem = nvx_gpu_memory_info_check(gl_info, 896);
             return CARD_NVIDIA_GEFORCE_GTX275;
         }
 
         /* Geforce 200 - midend */
         if (strstr(gl_renderer, "GTX 260"))
         {
-            *vidmem = 1024;
+            *vidmem = nvx_gpu_memory_info_check(gl_info, 1024);
             return CARD_NVIDIA_GEFORCE_GTX260;
         }
         /* Geforce 200 - midend */
         if (strstr(gl_renderer, "GT 240"))
         {
-           *vidmem = 512;
+           *vidmem = nvx_gpu_memory_info_check(gl_info, 512);
            return CARD_NVIDIA_GEFORCE_GT240;
         }
 
         /* Geforce 200 lowend */
         if (strstr(gl_renderer, "GT 220"))
         {
-           *vidmem = 512; /* The GT 220 has 512-1024MB */
+           *vidmem = nvx_gpu_memory_info_check(gl_info, 512); /* The GT 220 has 512-1024MB */
            return CARD_NVIDIA_GEFORCE_GT220;
         }
         /* Geforce 200 lowend (Geforce 305/310 use the same core) */
@@ -1338,7 +1350,7 @@ static enum wined3d_pci_device select_card_nvidia_binary(const struct wined3d_gl
                 || strstr(gl_renderer, "Geforce 305")
                 || strstr(gl_renderer, "Geforce 310"))
         {
-           *vidmem = 512;
+           *vidmem = nvx_gpu_memory_info_check(gl_info, 512);
            return CARD_NVIDIA_GEFORCE_210;
         }
 
@@ -1347,7 +1359,7 @@ static enum wined3d_pci_device select_card_nvidia_binary(const struct wined3d_gl
                 || strstr(gl_renderer, "GTS 150")
                 || strstr(gl_renderer, "GTS 250"))
         {
-            *vidmem = 512;
+            *vidmem = nvx_gpu_memory_info_check(gl_info, 512);
             return CARD_NVIDIA_GEFORCE_9800GT;
         }
 
@@ -1355,7 +1367,7 @@ static enum wined3d_pci_device select_card_nvidia_binary(const struct wined3d_gl
         if (strstr(gl_renderer, "9600")
                 || strstr(gl_renderer, "GT 140"))
         {
-            *vidmem = 384; /* The 9600GSO has 384MB, the 9600GT has 512-1024MB */
+            *vidmem = nvx_gpu_memory_info_check(gl_info, 384); /* The 9600GSO has 384MB, the 9600GT has 512-1024MB */
             return CARD_NVIDIA_GEFORCE_9600GT;
         }
 
@@ -1364,14 +1376,14 @@ static enum wined3d_pci_device select_card_nvidia_binary(const struct wined3d_gl
                 || strstr(gl_renderer, "GT 120")
                 || strstr(gl_renderer, "GT 130"))
         {
-            *vidmem = 256; /* The 9500GT has 256-1024MB */
+            *vidmem = nvx_gpu_memory_info_check(gl_info, 256); /* The 9500GT has 256-1024MB */
             return CARD_NVIDIA_GEFORCE_9500GT;
         }
 
         /* Geforce9 - lowend */
         if (strstr(gl_renderer, "9400"))
         {
-            *vidmem = 256; /* The 9400GT has 256-1024MB */
+            *vidmem = nvx_gpu_memory_info_check(gl_info, 256); /* The 9400GT has 256-1024MB */
             return CARD_NVIDIA_GEFORCE_9400GT;
         }
 
@@ -1381,21 +1393,21 @@ static enum wined3d_pci_device select_card_nvidia_binary(const struct wined3d_gl
                 || strstr(gl_renderer, "9300")
                 || strstr(gl_renderer, "G 100"))
         {
-            *vidmem = 256; /* The 9100-9300 cards have 256MB */
+            *vidmem = nvx_gpu_memory_info_check(gl_info, 256); /* The 9100-9300 cards have 256MB */
             return CARD_NVIDIA_GEFORCE_9200;
         }
 
         /* Geforce8 - highend */
         if (strstr(gl_renderer, "8800"))
         {
-            *vidmem = 320; /* The 8800GTS uses 320MB, a 8800GTX can have 768MB */
+            *vidmem = nvx_gpu_memory_info_check(gl_info, 320); /* The 8800GTS uses 320MB, a 8800GTX can have 768MB */
             return CARD_NVIDIA_GEFORCE_8800GTS;
         }
 
         /* Geforce8 - midend mobile */
         if (strstr(gl_renderer, "8600 M"))
         {
-            *vidmem = 512;
+            *vidmem = nvx_gpu_memory_info_check(gl_info, 512);
             return CARD_NVIDIA_GEFORCE_8600MGT;
         }
 
@@ -1403,7 +1415,7 @@ static enum wined3d_pci_device select_card_nvidia_binary(const struct wined3d_gl
         if (strstr(gl_renderer, "8600")
                 || strstr(gl_renderer, "8700"))
         {
-            *vidmem = 256;
+            *vidmem = nvx_gpu_memory_info_check(gl_info, 256);
             return CARD_NVIDIA_GEFORCE_8600GT;
         }
 
@@ -1411,7 +1423,7 @@ static enum wined3d_pci_device select_card_nvidia_binary(const struct wined3d_gl
 	if (strstr(gl_renderer, "8400")
 		|| strstr(gl_renderer, "8500"))
 	{
-	    *vidmem = 128; /* 128-256MB for a 8400, 256-512MB for a 8500 */
+	    *vidmem = nvx_gpu_memory_info_check(gl_info, 128); /* 128-256MB for a 8400, 256-512MB for a 8500 */
             return CARD_NVIDIA_GEFORCE_8400GS;
 	}
 
@@ -1420,12 +1432,12 @@ static enum wined3d_pci_device select_card_nvidia_binary(const struct wined3d_gl
                 || strstr(gl_renderer, "8200")
                 || strstr(gl_renderer, "8300"))
         {
-            *vidmem = 128; /* 128-256MB for a 8300 */
+            *vidmem = nvx_gpu_memory_info_check(gl_info, 128); /* 128-256MB for a 8300 */
             return CARD_NVIDIA_GEFORCE_8300GS;
         }
 
         /* Geforce8-compatible fall back if the GPU is not in the list yet */
-        *vidmem = 128;
+        *vidmem = nvx_gpu_memory_info_check(gl_info, 128);
         return CARD_NVIDIA_GEFORCE_8300GS;
     }
 
@@ -1441,7 +1453,7 @@ static enum wined3d_pci_device select_card_nvidia_binary(const struct wined3d_gl
                 || strstr(gl_renderer, "Quadro FX 4")
                 || strstr(gl_renderer, "Quadro FX 5"))
         {
-            *vidmem = 256; /* A 7800GT uses 256MB while highend 7900 cards can use 512MB */
+            *vidmem = nvx_gpu_memory_info_check(gl_info, 256); /* A 7800GT uses 256MB while highend 7900 cards can use 512MB */
             return CARD_NVIDIA_GEFORCE_7800GT;
         }
 
@@ -1449,28 +1461,28 @@ static enum wined3d_pci_device select_card_nvidia_binary(const struct wined3d_gl
         if (strstr(gl_renderer, "7600")
                 || strstr(gl_renderer, "7700"))
         {
-            *vidmem = 256; /* The 7600 uses 256-512MB */
+            *vidmem = nvx_gpu_memory_info_check(gl_info, 256); /* The 7600 uses 256-512MB */
             return CARD_NVIDIA_GEFORCE_7600;
         }
 
         /* Geforce7 lower medium */
         if (strstr(gl_renderer, "7400"))
         {
-            *vidmem = 256; /* The 7400 uses 256-512MB */
+            *vidmem = nvx_gpu_memory_info_check(gl_info, 256); /* The 7400 uses 256-512MB */
             return CARD_NVIDIA_GEFORCE_7400;
         }
 
         /* Geforce7 lowend */
         if (strstr(gl_renderer, "7300"))
         {
-            *vidmem = 256; /* Mac Pros with this card have 256 MB */
+            *vidmem = nvx_gpu_memory_info_check(gl_info, 256); /* Mac Pros with this card have 256 MB */
             return CARD_NVIDIA_GEFORCE_7300;
         }
 
         /* Geforce6 highend */
         if (strstr(gl_renderer, "6800"))
         {
-            *vidmem = 128; /* The 6800 uses 128-256MB, the 7600 uses 256-512MB */
+            *vidmem = nvx_gpu_memory_info_check(gl_info, 128); /* The 6800 uses 128-256MB, the 7600 uses 256-512MB */
             return CARD_NVIDIA_GEFORCE_6800;
         }
 
@@ -1479,12 +1491,12 @@ static enum wined3d_pci_device select_card_nvidia_binary(const struct wined3d_gl
                 || strstr(gl_renderer, "6610")
                 || strstr(gl_renderer, "6700"))
         {
-            *vidmem = 128; /* A 6600GT has 128-256MB */
+            *vidmem = nvx_gpu_memory_info_check(gl_info, 128); /* A 6600GT has 128-256MB */
             return CARD_NVIDIA_GEFORCE_6600GT;
         }
 
         /* Geforce6/7 lowend */
-        *vidmem = 64; /* */
+        *vidmem = nvx_gpu_memory_info_check(gl_info, 64); /* */
         return CARD_NVIDIA_GEFORCE_6200; /* Geforce 6100/6150/6200/7300/7400/7500 */
     }
 
@@ -1496,7 +1508,7 @@ static enum wined3d_pci_device select_card_nvidia_binary(const struct wined3d_gl
                 || strstr(gl_renderer, "5950")
                 || strstr(gl_renderer, "Quadro FX"))
         {
-            *vidmem = 256; /* 5800-5900 cards use 256MB */
+            *vidmem = nvx_gpu_memory_info_check(gl_info, 256); /* 5800-5900 cards use 256MB */
             return CARD_NVIDIA_GEFORCEFX_5800;
         }
 
@@ -1506,12 +1518,12 @@ static enum wined3d_pci_device select_card_nvidia_binary(const struct wined3d_gl
                 || strstr(gl_renderer, "5700")
                 || strstr(gl_renderer, "5750"))
         {
-            *vidmem = 128; /* A 5600 uses 128-256MB */
+            *vidmem = nvx_gpu_memory_info_check(gl_info, 128); /* A 5600 uses 128-256MB */
             return CARD_NVIDIA_GEFORCEFX_5600;
         }
 
         /* GeforceFX - lowend */
-        *vidmem = 64; /* Normal FX5200 cards use 64-256MB; laptop (non-standard) can have less */
+        *vidmem = nvx_gpu_memory_info_check(gl_info, 64); /* Normal FX5200 cards use 64-256MB; laptop (non-standard) can have less */
         return CARD_NVIDIA_GEFORCEFX_5200; /* GeforceFX 5100/5200/5250/5300/5500 */
     }
 
@@ -1519,11 +1531,11 @@ static enum wined3d_pci_device select_card_nvidia_binary(const struct wined3d_gl
     {
         if (strstr(gl_renderer, "GeForce4 Ti") || strstr(gl_renderer, "Quadro4"))
         {
-            *vidmem = 64; /* Geforce4 Ti cards have 64-128MB */
+            *vidmem = nvx_gpu_memory_info_check(gl_info, 64); /* Geforce4 Ti cards have 64-128MB */
             return CARD_NVIDIA_GEFORCE4_TI4200; /* Geforce4 Ti4200/Ti4400/Ti4600/Ti4800, Quadro4 */
         }
 
-        *vidmem = 64; /* Geforce3 cards have 64-128MB */
+        *vidmem = nvx_gpu_memory_info_check(gl_info, 64); /* Geforce3 cards have 64-128MB */
         return CARD_NVIDIA_GEFORCE3; /* Geforce3 standard/Ti200/Ti500, Quadro DCC */
     }
 
@@ -1533,35 +1545,35 @@ static enum wined3d_pci_device select_card_nvidia_binary(const struct wined3d_gl
         {
             /* Most Geforce4MX GPUs have at least 64MB of memory, some
              * early models had 32MB but most have 64MB or even 128MB. */
-            *vidmem = 64;
+            *vidmem = nvx_gpu_memory_info_check(gl_info, 64);
             return CARD_NVIDIA_GEFORCE4_MX; /* MX420/MX440/MX460/MX4000 */
         }
 
         if (strstr(gl_renderer, "GeForce2 MX") || strstr(gl_renderer, "Quadro2 MXR"))
         {
-            *vidmem = 32; /* Geforce2MX GPUs have 32-64MB of video memory */
+            *vidmem = nvx_gpu_memory_info_check(gl_info, 32); /* Geforce2MX GPUs have 32-64MB of video memory */
             return CARD_NVIDIA_GEFORCE2_MX; /* Geforce2 standard/MX100/MX200/MX400, Quadro2 MXR */
         }
 
         if (strstr(gl_renderer, "GeForce2") || strstr(gl_renderer, "Quadro2"))
         {
-            *vidmem = 32; /* Geforce2 GPUs have 32-64MB of video memory */
+            *vidmem = nvx_gpu_memory_info_check(gl_info, 32); /* Geforce2 GPUs have 32-64MB of video memory */
             return CARD_NVIDIA_GEFORCE2; /* Geforce2 GTS/Pro/Ti/Ultra, Quadro2 */
         }
 
         /* Most Geforce1 cards have 32MB, there are also some rare 16
          * and 64MB (Dell) models. */
-        *vidmem = 32;
+        *vidmem = nvx_gpu_memory_info_check(gl_info, 32);
         return CARD_NVIDIA_GEFORCE; /* Geforce 256/DDR, Quadro */
     }
 
     if (strstr(gl_renderer, "TNT2"))
     {
-        *vidmem = 32; /* Most TNT2 boards have 32MB, though there are 16MB boards too */
+        *vidmem = nvx_gpu_memory_info_check(gl_info, 32); /* Most TNT2 boards have 32MB, though there are 16MB boards too */
         return CARD_NVIDIA_RIVA_TNT2; /* Riva TNT2 standard/M64/Pro/Ultra */
     }
 
-    *vidmem = 16; /* Most TNT boards have 16MB, some rare models have 8MB */
+    *vidmem = nvx_gpu_memory_info_check(gl_info, 16); /* Most TNT boards have 16MB, some rare models have 8MB */
     return CARD_NVIDIA_RIVA_TNT; /* Riva TNT, Vanta */
 
 }
diff --git a/dlls/wined3d/wined3d_gl.h b/dlls/wined3d/wined3d_gl.h
index e069ae6..b3d78a9 100644
--- a/dlls/wined3d/wined3d_gl.h
+++ b/dlls/wined3d/wined3d_gl.h
@@ -1830,6 +1830,8 @@ typedef enum wined3d_gl_extension
     NV_VERTEX_PROGRAM2,
     NV_VERTEX_PROGRAM2_OPTION,
     NV_VERTEX_PROGRAM3,
+    /* NVX */
+    NVX_GPU_MEMORY_INFO,
     /* SGI */
     SGIS_GENERATE_MIPMAP,
     SGI_VIDEO_SYNC,
@@ -3691,6 +3693,12 @@ typedef void (WINE_GLAPI *PGLFNGETCOMBINERSTAGEPARAMETERFVNVPROC)(GLenum stage,
 #define GL_MAX_PROGRAM_CALL_DEPTH_NV                        0x88f5
 #endif
 
+/* GL_NVX_gpu_memory_info */
+#ifndef GL_NVX_gpu_memory_info
+#define GL_NVX_gpu_memory_info 1
+#define GPU_MEMORY_INFO_TOTAL_AVAILABLE_MEMORY_NVX          0x9048
+#endif
+
 /* GL_SGIS_generate_mipmap */
 #ifndef GLX_SGIS_generate_mipmap
 #define GLX_SGIS_generate_mipmap 1
