summaryrefslogtreecommitdiff
path: root/indra/llrender/llgl.cpp
diff options
context:
space:
mode:
authorprep <prep@lindenlab.com>2011-03-10 13:04:36 -0500
committerprep <prep@lindenlab.com>2011-03-10 13:04:36 -0500
commitfb00d280403b2befd645b8a80c3d9a3183e4c02c (patch)
treecb5b9cdc5c87b913000866a3dbb24d2ddaf46f33 /indra/llrender/llgl.cpp
parent55dbd0c4f3c1cc3598d3d8428dea4a2645b211c4 (diff)
parente3e12bc3df13af25f921d47852edff3254364282 (diff)
merge
Diffstat (limited to 'indra/llrender/llgl.cpp')
-rw-r--r--indra/llrender/llgl.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/indra/llrender/llgl.cpp b/indra/llrender/llgl.cpp
index d1eb4c8be0..d5f0b81830 100644
--- a/indra/llrender/llgl.cpp
+++ b/indra/llrender/llgl.cpp
@@ -314,6 +314,7 @@ LLGLManager::LLGLManager() :
mHasMultitexture(FALSE),
mHasATIMemInfo(FALSE),
+ mHasNVXMemInfo(FALSE),
mNumTextureUnits(1),
mHasMipMapGeneration(FALSE),
mHasCompressedTextures(FALSE),
@@ -505,6 +506,12 @@ bool LLGLManager::initGL()
mVRAM = meminfo[0]/1024;
}
+ else if (mHasNVXMemInfo)
+ {
+ S32 dedicated_memory;
+ glGetIntegerv(GL_GPU_MEMORY_INFO_DEDICATED_VIDMEM_NVX, &dedicated_memory);
+ mVRAM = dedicated_memory/1024;
+ }
if (mHasMultitexture)
{
@@ -669,6 +676,7 @@ void LLGLManager::initExtensions()
#else // LL_MESA_HEADLESS
mHasMultitexture = glh_init_extensions("GL_ARB_multitexture");
mHasATIMemInfo = ExtensionExists("GL_ATI_meminfo", gGLHExts.mSysExts);
+ mHasNVXMemInfo = ExtensionExists("GL_NVX_gpu_memory_info", gGLHExts.mSysExts);
mHasMipMapGeneration = glh_init_extensions("GL_SGIS_generate_mipmap");
mHasSeparateSpecularColor = glh_init_extensions("GL_EXT_separate_specular_color");
mHasAnisotropic = glh_init_extensions("GL_EXT_texture_filter_anisotropic");