summaryrefslogtreecommitdiff
path: root/indra/newview/llfloaterhardwaresettings.cpp
diff options
context:
space:
mode:
authorsimon <none@none>2014-03-19 11:41:42 -0700
committersimon <none@none>2014-03-19 11:41:42 -0700
commit00a325ccb90b1c6800ec78e1211b5097d9c27a58 (patch)
tree8b58fbd99d5bce117cf8dad5181b5690af4bd34f /indra/newview/llfloaterhardwaresettings.cpp
parent09d1c27d4f78c78d949b6a3d896d6f58df2dfc06 (diff)
parent1ab9f19f82a84a109cf429998f423986268801f6 (diff)
Pull in viewer-lion to lock down next release
Diffstat (limited to 'indra/newview/llfloaterhardwaresettings.cpp')
-rwxr-xr-xindra/newview/llfloaterhardwaresettings.cpp17
1 files changed, 16 insertions, 1 deletions
diff --git a/indra/newview/llfloaterhardwaresettings.cpp b/indra/newview/llfloaterhardwaresettings.cpp
index 792a2a5d25..6923308ce9 100755
--- a/indra/newview/llfloaterhardwaresettings.cpp
+++ b/indra/newview/llfloaterhardwaresettings.cpp
@@ -87,15 +87,30 @@ 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");
S32 min_tex_mem = LLViewerTextureList::getMinVideoRamSetting();
- S32 max_tex_mem = LLViewerTextureList::getMaxVideoRamSetting(false, mem_multiplier);
+ S32 max_tex_mem = LLViewerTextureList::getMaxVideoRamSetting(true, mem_multiplier);
getChild<LLSliderCtrl>("GraphicsCardTextureMemory")->setMinValue(min_tex_mem);
getChild<LLSliderCtrl>("GraphicsCardTextureMemory")->setMaxValue(max_tex_mem);
+ 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)
{