summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
authorXiaohong Bao <bao@lindenlab.com>2011-12-07 15:55:45 -0700
committerXiaohong Bao <bao@lindenlab.com>2011-12-07 15:55:45 -0700
commit8d0630f7426ad0d2fc31248a190f0eda932ab21f (patch)
treecdff124d72dfd6d6ebabd692a75e8b65b1241b2b /indra
parent8a51346d6f0d9171263124c203b2194db914b47d (diff)
parente0a994d1f298b109dfac4cfd592e631d453f3045 (diff)
Automated merge with https://bitbucket.org/VirLinden/viewer-development-shining-fixes
Diffstat (limited to 'indra')
-rw-r--r--indra/newview/llviewertexture.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/indra/newview/llviewertexture.cpp b/indra/newview/llviewertexture.cpp
index 126d0f75e8..61236edc86 100644
--- a/indra/newview/llviewertexture.cpp
+++ b/indra/newview/llviewertexture.cpp
@@ -3163,8 +3163,13 @@ void LLViewerLODTexture::processTextureStats()
S32 current_discard = getDiscardLevel();
if (sDesiredDiscardBias > 0.0f && mBoostLevel < LLViewerTexture::BOOST_SCULPTED && current_discard >= 0)
{
+ if(desired_discard_bias_max <= sDesiredDiscardBias && !mForceToSaveRawImage)
+ {
+ //needs to release texture memory urgently
+ scaleDown() ;
+ }
// Limit the amount of GL memory bound each frame
- if ( BYTES_TO_MEGA_BYTES(sBoundTextureMemoryInBytes) > sMaxBoundTextureMemInMegaBytes * texmem_middle_bound_scale &&
+ else if ( BYTES_TO_MEGA_BYTES(sBoundTextureMemoryInBytes) > sMaxBoundTextureMemInMegaBytes * texmem_middle_bound_scale &&
(!getBoundRecently() || mDesiredDiscardLevel >= mCachedRawDiscardLevel))
{
scaleDown() ;