diff options
author | Xiaohong Bao <bao@lindenlab.com> | 2010-03-09 16:38:27 -0700 |
---|---|---|
committer | Xiaohong Bao <bao@lindenlab.com> | 2010-03-09 16:38:27 -0700 |
commit | 77c594f74fa7f6ee049e389d3ea207e6602aa450 (patch) | |
tree | 2cee171845032eaa915347b0e55d879c188e16db /indra | |
parent | 6f5877e3e549fd42d0a973ccb19ade6a1ee2c392 (diff) |
fix for EXT-5956: texture downloading/decoding to never fully stop.
Diffstat (limited to 'indra')
-rw-r--r-- | indra/newview/llviewertexture.cpp | 11 | ||||
-rw-r--r-- | indra/newview/llviewertexture.h | 2 |
2 files changed, 6 insertions, 7 deletions
diff --git a/indra/newview/llviewertexture.cpp b/indra/newview/llviewertexture.cpp index b21758d3b3..133b6ee8c9 100644 --- a/indra/newview/llviewertexture.cpp +++ b/indra/newview/llviewertexture.cpp @@ -82,7 +82,7 @@ LLTexturePipelineTester* LLViewerTextureManager::sTesterp = NULL ; S32 LLViewerTexture::sImageCount = 0; S32 LLViewerTexture::sRawCount = 0; S32 LLViewerTexture::sAuxCount = 0; -LLTimer LLViewerTexture::sEvaluationTimer; +LLFrameTimer LLViewerTexture::sEvaluationTimer; F32 LLViewerTexture::sDesiredDiscardBias = 0.f; F32 LLViewerTexture::sDesiredDiscardScale = 1.1f; S32 LLViewerTexture::sBoundTextureMemoryInBytes = 0; @@ -102,7 +102,7 @@ F32 LLViewerTexture::sCurrentTime = 0.0f ; BOOL LLViewerTexture::sUseTextureAtlas = FALSE ; const F32 desired_discard_bias_min = -2.0f; // -max number of levels to improve image quality by -const F32 desired_discard_bias_max = 1.5f; // max number of levels to reduce image quality by +const F32 desired_discard_bias_max = (F32)MAX_DISCARD_LEVEL; // max number of levels to reduce image quality by const F64 log_2 = log(2.0); //---------------------------------------------------------------------------------------------- @@ -369,7 +369,7 @@ S32 LLViewerTexture::getCategoryFromIndex(S32 index) } // tuning params -const F32 discard_bias_delta = .05f; +const F32 discard_bias_delta = .25f; const F32 discard_delta_time = 0.5f; const S32 min_non_tex_system_mem = (128<<20); // 128 MB // non-const (used externally @@ -2741,7 +2741,7 @@ void LLViewerLODTexture::processTextureStats() mCalculatedDiscardLevel = discard_level; } } - if (mBoostLevel < LLViewerTexture::BOOST_HIGH) + if (mBoostLevel < LLViewerTexture::BOOST_SCULPTED) { discard_level += sDesiredDiscardBias; discard_level *= sDesiredDiscardScale; // scale @@ -2767,8 +2767,7 @@ void LLViewerLODTexture::processTextureStats() // S32 current_discard = getDiscardLevel(); - if ((sDesiredDiscardBias > 0.0f) && - (current_discard >= 0 && mDesiredDiscardLevel >= current_discard)) + if (sDesiredDiscardBias > 0.0f && mBoostLevel < LLViewerTexture::BOOST_SCULPTED && current_discard >= 0) { // Limit the amount of GL memory bound each frame if ( BYTES_TO_MEGA_BYTES(sBoundTextureMemoryInBytes) > sMaxBoundTextureMemInMegaBytes * texmem_middle_bound_scale && diff --git a/indra/newview/llviewertexture.h b/indra/newview/llviewertexture.h index 6dc18085e0..a09a711cc7 100644 --- a/indra/newview/llviewertexture.h +++ b/indra/newview/llviewertexture.h @@ -300,7 +300,7 @@ public: static S32 sImageCount; static S32 sRawCount; static S32 sAuxCount; - static LLTimer sEvaluationTimer; + static LLFrameTimer sEvaluationTimer; static F32 sDesiredDiscardBias; static F32 sDesiredDiscardScale; static S32 sBoundTextureMemoryInBytes; |