summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--indra/llwindow/llwindowsdl.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/indra/llwindow/llwindowsdl.cpp b/indra/llwindow/llwindowsdl.cpp
index e38186ff39..de09003e0e 100644
--- a/indra/llwindow/llwindowsdl.cpp
+++ b/indra/llwindow/llwindowsdl.cpp
@@ -690,11 +690,15 @@ BOOL LLWindowSDL::createContext(int x, int y, int width, int height, int bits, B
"glXQueryCurrentRendererIntegerMESA");
unsigned int vram_megabytes = 0;
queryInteger(GLX_RENDERER_VIDEO_MEMORY_MESA, &vram_megabytes);
- if (!vram_megabytes)
+ if (!vram_megabytes) {
glGetIntegerv(GL_GPU_MEMORY_INFO_DEDICATED_VIDMEM_NVX,
(int *)&vram_megabytes);
- if (!vram_megabytes)
+ vram_megabytes /= 1024;
+ }
+ if (!vram_megabytes) {
glGetIntegerv(GL_VBO_FREE_MEMORY_ATI, (int *)&vram_megabytes);
+ vram_megabytes /= 1024;
+ }
gGLManager.mVRAM = vram_megabytes;
# endif // LL_DARWIN