summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorXiaohong Bao <bao@lindenlab.com>2011-12-07 15:48:57 -0700
committerXiaohong Bao <bao@lindenlab.com>2011-12-07 15:48:57 -0700
commite0a994d1f298b109dfac4cfd592e631d453f3045 (patch)
tree2e86be7677a73ce1adbcf233da5d7fc8c8a59e39
parent04bee016c8f33ff98b40c2b3d237f5ded1453284 (diff)
fix for SH-2516: Full Bright Geometry Rendering Increases Rapidly, Destroying Frame Rate.
-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() ;