MAINT-2980 Back out most changes related to upping the 512MB texture cap to unblock RC.

master
Dave Parks 2014-07-07 10:28:54 -05:00
parent b51f81e7fe
commit 770a0a2dea
4 changed files with 29 additions and 14 deletions

View File

@ -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>

View File

@ -64,7 +64,7 @@
// extern
const S32Megabytes gMinVideoRam(32);
const S32Megabytes gMaxVideoRam(4096);
const S32Megabytes gMaxVideoRam(512);
// statics

View File

@ -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;
}

View File

@ -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