summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDave Parks <davep@lindenlab.com>2014-07-07 10:28:54 -0500
committerDave Parks <davep@lindenlab.com>2014-07-07 10:28:54 -0500
commit770a0a2dea0bd503f88b35d3d440208bcd303e54 (patch)
tree6279751315704d4fdea5a821b2582d9bcb22968d
parentb51f81e7fedb8e5a94ccc4a911a7b0f75b9290ae (diff)
MAINT-2980 Back out most changes related to upping the 512MB texture cap to unblock RC.
-rwxr-xr-xindra/newview/app_settings/settings.xml2
-rwxr-xr-xindra/newview/llviewertexture.cpp2
-rwxr-xr-xindra/newview/llviewertexturelist.cpp35
-rwxr-xr-xindra/newview/skins/default/xui/en/floater_hardware_settings.xml4
4 files changed, 29 insertions, 14 deletions
diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml
index 3c39c021ca..12db188620 100755
--- a/indra/newview/app_settings/settings.xml
+++ b/indra/newview/app_settings/settings.xml
@@ -11873,7 +11873,7 @@
<key>TextureMemory</key>
<map>
<key>Comment</key>
- <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>
+ <string>Amount of memory to use for textures in MB (0 = autodetect)</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
diff --git a/indra/newview/llviewertexture.cpp b/indra/newview/llviewertexture.cpp
index e16caf167d..ba89aafc84 100755
--- a/indra/newview/llviewertexture.cpp
+++ b/indra/newview/llviewertexture.cpp
@@ -64,7 +64,7 @@
// extern
const S32Megabytes gMinVideoRam(32);
-const S32Megabytes gMaxVideoRam(4096);
+const S32Megabytes gMaxVideoRam(512);
// statics
diff --git a/indra/newview/llviewertexturelist.cpp b/indra/newview/llviewertexturelist.cpp
index 9f862b4f97..b98726900f 100755
--- a/indra/newview/llviewertexturelist.cpp
+++ b/indra/newview/llviewertexturelist.cpp
@@ -1275,37 +1275,52 @@ S32Megabytes LLViewerTextureList::getMaxVideoRamSetting(bool get_recommended, fl
{
S32Megabytes max_texmem;
if (gGLManager.mVRAM != 0)
- { //use detected amount of vram as maximum
+ {
+ // Treat any card with < 32 MB (shudder) as having 32 MB
+ // - it's going to be swapping constantly regardless
S32Megabytes max_vram(gGLManager.mVRAM);
- max_texmem = max_vram;
-
- if (get_recommended)
- { //recommend 1/3rd of total video memory for textures
- max_texmem /= 3;
+ if(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;
}
else
{
if (!get_recommended)
{
- max_texmem = (S32Megabytes) 2048;
+ max_texmem = (S32Megabytes)512;
}
else if (gSavedSettings.getBOOL("NoHardwareProbe")) //did not do hardware detection at startup
{
- max_texmem = (S32Megabytes) 2048;
+ max_texmem = (S32Megabytes)512;
}
else
{
- max_texmem = (S32Megabytes) 512;
+ max_texmem = (S32Megabytes)128;
}
LL_WARNS() << "VRAM amount not detected, defaulting to " << max_texmem << " MB" << LL_ENDL;
}
- // limit the texture memory to a multiple of the default if we've found some cards to behave poorly otherwise
+ S32Megabytes system_ram = gSysMemory.getPhysicalMemoryClamped(); // In MB
+ //LL_INFOS() << "*** DETECTED " << system_ram << " MB of system memory." << LL_ENDL;
+ if (get_recommended)
+ max_texmem = llmin(max_texmem, system_ram/2);
+ else
+ max_texmem = llmin(max_texmem, system_ram);
+
+ // 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;
}
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 40d54233e8..9deb0d2030 100755
--- a/indra/newview/skins/default/xui/en/floater_hardware_settings.xml
+++ b/indra/newview/skins/default/xui/en/floater_hardware_settings.xml
@@ -155,9 +155,9 @@
tool_tip="Compresses textures in video memory, allowing for higher resolution textures to be loaded at the cost of some color quality."
width="315" />
<slider
+ control_name="TextureMemory"
decimal_digits="0"
follows="left|top"
- control_name="TextureMemory"
height="20"
increment="16"
initial_value="32"
@@ -167,7 +167,7 @@
left="10"
max_val="4096"
name="GraphicsCardTextureMemory"
- 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."
+ 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."
top_pad="10"
width="360" />
<spinner