summaryrefslogtreecommitdiff
path: root/indra/llrender/llgl.cpp
diff options
context:
space:
mode:
authorDave Parks <davep@lindenlab.com>2011-10-05 01:03:42 -0500
committerDave Parks <davep@lindenlab.com>2011-10-05 01:03:42 -0500
commiteb809e373d2f12fd1a282401eb2ac4fbaf209f85 (patch)
tree3d97a67cf4ad7a7cd4ed93724d703bd51e5b58c7 /indra/llrender/llgl.cpp
parent210120f9068e8f5696abab55f9fced307e021d22 (diff)
SH-2481 Potential fix for viewer detecting incorrect amount of vram available when using certain video cards.
Diffstat (limited to 'indra/llrender/llgl.cpp')
-rw-r--r--indra/llrender/llgl.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/indra/llrender/llgl.cpp b/indra/llrender/llgl.cpp
index 8ad75384f2..c0d15fe6f3 100644
--- a/indra/llrender/llgl.cpp
+++ b/indra/llrender/llgl.cpp
@@ -630,6 +630,8 @@ bool LLGLManager::initGL()
initExtensions();
stop_glerror();
+ S32 old_vram = mVRAM;
+
if (mHasATIMemInfo)
{ //ask the gl how much vram is free at startup and attempt to use no more than half of that
S32 meminfo[4];
@@ -644,6 +646,11 @@ bool LLGLManager::initGL()
mVRAM = dedicated_memory/1024;
}
+ if (mVRAM < 256)
+ { //something likely went wrong using the above extensions, fall back to old method
+ mVRAM = old_vram;
+ }
+
stop_glerror();
stop_glerror();