summaryrefslogtreecommitdiff
path: root/indra/newview/llviewerwindow.cpp
diff options
context:
space:
mode:
authorDave Parks <davep@lindenlab.com>2011-03-10 00:41:46 -0600
committerDave Parks <davep@lindenlab.com>2011-03-10 00:41:46 -0600
commit5fd953df8fafb769d31688c47cf3f8634f858de5 (patch)
tree7a0f38e57a4132e78f5e1e61dd316adec7e6355a /indra/newview/llviewerwindow.cpp
parentd46594bf714cd19ebcbf693463c4d39e4c771bb8 (diff)
SH-874 Properly detect available video memory on ATI cards and disable vertex buffer objects when available vram is under 256MB.
Diffstat (limited to 'indra/newview/llviewerwindow.cpp')
-rw-r--r--indra/newview/llviewerwindow.cpp17
1 files changed, 17 insertions, 0 deletions
diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp
index d5008c12b0..1c573eab00 100644
--- a/indra/newview/llviewerwindow.cpp
+++ b/indra/newview/llviewerwindow.cpp
@@ -457,6 +457,23 @@ public:
addText(xpos, ypos, "Shaders Disabled");
ypos += y_inc;
}
+
+ if (gGLManager.mHasATIMemInfo)
+ {
+ S32 meminfo[4];
+ glGetIntegerv(GL_TEXTURE_FREE_MEMORY_ATI, meminfo);
+
+ addText(xpos, ypos, llformat("%.2f MB Texture Memory Free", meminfo[0]/1024.f));
+ ypos += y_inc;
+
+ if (gGLManager.mHasVertexBufferObject)
+ {
+ glGetIntegerv(GL_VBO_FREE_MEMORY_ATI, meminfo);
+ addText(xpos, ypos, llformat("%.2f MB VBO Memory Free", meminfo[0]/1024.f));
+ ypos += y_inc;
+ }
+ }
+
addText(xpos, ypos, llformat("%d MB Vertex Data", LLVertexBuffer::sAllocatedBytes/(1024*1024)));
ypos += y_inc;