summaryrefslogtreecommitdiff
path: root/indra/newview/llviewertexturelist.cpp
diff options
context:
space:
mode:
authorDave Parks <davep@lindenlab.com>2014-06-23 23:10:23 -0500
committerDave Parks <davep@lindenlab.com>2014-06-23 23:10:23 -0500
commit90ee53f5a1ac47ec5f8eb84bc543376a089e0d55 (patch)
treeca27c682c2fc6a32998d0b5492ae14221be7648c /indra/newview/llviewertexturelist.cpp
parent592024b5805a116c9d0bef893127427df0741b41 (diff)
MAINT-2980 Up texture memory slider cap to 4096MB. Make "Texture Memory" default to 1/3rd of video memory. Add description on debug setting and tooltip to explain why.
Diffstat (limited to 'indra/newview/llviewertexturelist.cpp')
-rwxr-xr-xindra/newview/llviewertexturelist.cpp28
1 files changed, 8 insertions, 20 deletions
diff --git a/indra/newview/llviewertexturelist.cpp b/indra/newview/llviewertexturelist.cpp
index 2209b24ca7..9f862b4f97 100755
--- a/indra/newview/llviewertexturelist.cpp
+++ b/indra/newview/llviewertexturelist.cpp
@@ -1275,21 +1275,15 @@ S32Megabytes LLViewerTextureList::getMaxVideoRamSetting(bool get_recommended, fl
{
S32Megabytes max_texmem;
if (gGLManager.mVRAM != 0)
- {
- // Treat any card with < 32 MB (shudder) as having 32 MB
- // - it's going to be swapping constantly regardless
+ { //use detected amount of vram as maximum
S32Megabytes max_vram(gGLManager.mVRAM);
- if(!get_recommended && gGLManager.mIsATI)
- {
- //shrink the availabe vram for ATI cards because some of them do not handel texture swapping well.
- max_vram = max_vram * 0.75f;
- }
-
- max_vram = llmax(max_vram, getMinVideoRamSetting());
max_texmem = max_vram;
- if (!get_recommended)
- max_texmem *= 2;
+
+ if (get_recommended)
+ { //recommend 1/3rd of total video memory for textures
+ max_texmem /= 3;
+ }
}
else
{
@@ -1309,15 +1303,9 @@ S32Megabytes LLViewerTextureList::getMaxVideoRamSetting(bool get_recommended, fl
LL_WARNS() << "VRAM amount not detected, defaulting to " << max_texmem << " MB" << LL_ENDL;
}
- S32Megabytes system_ram = gSysMemory.getPhysicalMemoryClamped(); // In MB
- //LL_INFOS() << "*** DETECTED " << system_ram << " MB of system memory." << LL_ENDL;
- max_texmem = llmin(max_texmem, (S32Megabytes)(system_ram));
-
- // limit the texture memory to a multiple of the default if we've found some cards to behave poorly otherwise
+ // limit the texture memory to a multiple of the default if we've found some cards to behave poorly otherwise
max_texmem = llmin(max_texmem, (S32Megabytes) (mem_multiplier * max_texmem));
- max_texmem = llclamp(max_texmem, getMinVideoRamSetting(), gMaxVideoRam);
-
return max_texmem;
}
@@ -1341,7 +1329,7 @@ void LLViewerTextureList::updateMaxResidentTexMem(S32Megabytes mem)
mem = llclamp(mem, getMinVideoRamSetting(), getMaxVideoRamSetting(false, mem_multiplier));
if (mem != cur_mem)
{
- gSavedSettings.setS32("TextureMemory", mem.value()/3);
+ gSavedSettings.setS32("TextureMemory", mem.value());
return; //listener will re-enter this function
}