summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview')
-rwxr-xr-xindra/newview/app_settings/settings.xml2
-rwxr-xr-xindra/newview/llfloaterhardwaresettings.cpp15
-rwxr-xr-xindra/newview/llfloaterhardwaresettings.h2
-rwxr-xr-xindra/newview/llviewertexture.cpp2
-rwxr-xr-xindra/newview/llviewertexturelist.cpp28
-rwxr-xr-xindra/newview/skins/default/xui/en/floater_hardware_settings.xml5
6 files changed, 13 insertions, 41 deletions
diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml
index 6081729687..a2a8cf989d 100755
--- a/indra/newview/app_settings/settings.xml
+++ b/indra/newview/app_settings/settings.xml
@@ -11862,7 +11862,7 @@
<key>TextureMemory</key>
<map>
<key>Comment</key>
- <string>Amount of memory to use for textures in MB (0 = autodetect)</string>
+ <string>Amount of memory to use for textures in MB (0 = autodetect). Defaults to 1/3 of video memory to allow room for render targets, vertex buffers, 3D accelerated desktops, and over allocation.</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
diff --git a/indra/newview/llfloaterhardwaresettings.cpp b/indra/newview/llfloaterhardwaresettings.cpp
index f267a2e7b3..035eb307c2 100755
--- a/indra/newview/llfloaterhardwaresettings.cpp
+++ b/indra/newview/llfloaterhardwaresettings.cpp
@@ -87,16 +87,6 @@ void LLFloaterHardwareSettings::refresh()
refreshEnabledState();
}
-void LLFloaterHardwareSettings::onSetVRAM()
-{
- S32 vram = childGetValue("GraphicsCardTextureMemory").asInteger();
-
- //give the texture system plenty of leeway to avoid swapping
- vram /= 3;
-
- gSavedSettings.setS32("TextureMemory", vram);
-}
-
void LLFloaterHardwareSettings::refreshEnabledState()
{
F32 mem_multiplier = gSavedSettings.getF32("RenderTextureMemoryMultiple");
@@ -105,11 +95,6 @@ void LLFloaterHardwareSettings::refreshEnabledState()
getChild<LLSliderCtrl>("GraphicsCardTextureMemory")->setMinValue(min_tex_mem.value());
getChild<LLSliderCtrl>("GraphicsCardTextureMemory")->setMaxValue(max_tex_mem.value());
- S32 vram = gSavedSettings.getS32("TextureMemory");
- vram = vram*3;
-
- getChild<LLSliderCtrl>("GraphicsCardTextureMemory")->setValue(vram);
- getChild<LLSliderCtrl>("GraphicsCardTextureMemory")->setCommitCallback(boost::bind(&LLFloaterHardwareSettings::onSetVRAM, this));
if (!LLFeatureManager::getInstance()->isFeatureAvailable("RenderVBOEnable") ||
!gGLManager.mHasVertexBufferObject)
{
diff --git a/indra/newview/llfloaterhardwaresettings.h b/indra/newview/llfloaterhardwaresettings.h
index 63d86d5667..626771b1d2 100755
--- a/indra/newview/llfloaterhardwaresettings.h
+++ b/indra/newview/llfloaterhardwaresettings.h
@@ -64,8 +64,6 @@ public:
/// don't apply the changed values
void cancel();
- void onSetVRAM();
-
/// refresh the enabled values
void refreshEnabledState();
diff --git a/indra/newview/llviewertexture.cpp b/indra/newview/llviewertexture.cpp
index ba89aafc84..e16caf167d 100755
--- a/indra/newview/llviewertexture.cpp
+++ b/indra/newview/llviewertexture.cpp
@@ -64,7 +64,7 @@
// extern
const S32Megabytes gMinVideoRam(32);
-const S32Megabytes gMaxVideoRam(512);
+const S32Megabytes gMaxVideoRam(4096);
// statics
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
}
diff --git a/indra/newview/skins/default/xui/en/floater_hardware_settings.xml b/indra/newview/skins/default/xui/en/floater_hardware_settings.xml
index 05594c2d86..40d54233e8 100755
--- a/indra/newview/skins/default/xui/en/floater_hardware_settings.xml
+++ b/indra/newview/skins/default/xui/en/floater_hardware_settings.xml
@@ -157,16 +157,17 @@
<slider
decimal_digits="0"
follows="left|top"
+ control_name="TextureMemory"
height="20"
increment="16"
initial_value="32"
- label="Video Memory (MB):"
+ label="Texture Memory (MB):"
label_width="195"
layout="topleft"
left="10"
max_val="4096"
name="GraphicsCardTextureMemory"
- tool_tip="Amount of memory to allocate for textures. Defaults to video card memory. Reducing this may improve performance but may also make textures blurry."
+ tool_tip="Amount of memory to allocate for textures. Defaults to one third of total graphics memory. Reducing this may improve performance but may also make textures blurry. Increasing may make textures sharper, but may also cause frame stalls and instability."
top_pad="10"
width="360" />
<spinner