diff options
author | Andrey Kleshchev <andreykproductengine@lindenlab.com> | 2018-03-06 12:59:32 +0000 |
---|---|---|
committer | Andrey Kleshchev <andreykproductengine@lindenlab.com> | 2018-03-06 12:59:32 +0000 |
commit | 4156fb832c02f8ca07620ad9e0b0960320d57806 (patch) | |
tree | 7d8f1ee68cc51f09b4299af4b60c1a4299cf73b0 /indra/newview/llviewertexture.cpp | |
parent | 8617e974272c71c768942e8e25e7e1761c003fb9 (diff) |
MAINT-6363 Normal and specular maps should not be downloaded if ALM is off
Diffstat (limited to 'indra/newview/llviewertexture.cpp')
-rw-r--r-- | indra/newview/llviewertexture.cpp | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/indra/newview/llviewertexture.cpp b/indra/newview/llviewertexture.cpp index 2ad6198abd..39ffbfc989 100644 --- a/indra/newview/llviewertexture.cpp +++ b/indra/newview/llviewertexture.cpp @@ -718,6 +718,7 @@ void LLViewerTexture::setBoostLevel(S32 level) { mBoostLevel = level; if(mBoostLevel != LLViewerTexture::BOOST_NONE && + mBoostLevel != LLViewerTexture::BOOST_ALM && mBoostLevel != LLViewerTexture::BOOST_SELECTED && mBoostLevel != LLViewerTexture::BOOST_ICON) { @@ -1557,6 +1558,10 @@ void LLViewerFetchedTexture::processTextureStats() { mDesiredDiscardLevel = 0; } + else if (!LLPipeline::sRenderDeferred && mBoostLevel == LLGLTexture::BOOST_ALM) + { + mDesiredDiscardLevel = MAX_DISCARD_LEVEL + 1; + } else if (mDontDiscard && mBoostLevel == LLGLTexture::BOOST_ICON) { if (mFullWidth > MAX_IMAGE_SIZE_DEFAULT || mFullHeight > MAX_IMAGE_SIZE_DEFAULT) @@ -1824,8 +1829,9 @@ void LLViewerFetchedTexture::updateVirtualSize() { if(drawable->isRecentlyVisible()) { - if (getBoostLevel() == LLViewerTexture::BOOST_NONE && - drawable->getVObj() && drawable->getVObj()->isSelected()) + if ((getBoostLevel() == LLViewerTexture::BOOST_NONE || getBoostLevel() == LLViewerTexture::BOOST_ALM) + && drawable->getVObj() + && drawable->getVObj()->isSelected()) { setBoostLevel(LLViewerTexture::BOOST_SELECTED); } @@ -1842,6 +1848,7 @@ void LLViewerFetchedTexture::updateVirtualSize() if (getBoostLevel() == LLViewerTexture::BOOST_SELECTED && gFrameTimeSeconds - mSelectedTime > SELECTION_RESET_TIME) { + // Could have been BOOST_ALM, but if user was working with this texture, better keep it as NONE setBoostLevel(LLViewerTexture::BOOST_NONE); } @@ -2115,7 +2122,7 @@ bool LLViewerFetchedTexture::updateFetch() // Load the texture progressively: we try not to rush to the desired discard too fast. // If the camera is not moving, we do not tweak the discard level notch by notch but go to the desired discard with larger boosted steps // This mitigates the "textures stay blurry" problem when loading while not killing the texture memory while moving around - S32 delta_level = (mBoostLevel > LLGLTexture::BOOST_NONE) ? 2 : 1; + S32 delta_level = (mBoostLevel > LLGLTexture::BOOST_ALM) ? 2 : 1; if (current_discard < 0) { desired_discard = llmax(desired_discard, getMaxDiscardLevel() - delta_level); @@ -3127,6 +3134,10 @@ void LLViewerLODTexture::processTextureStats() if (mFullWidth > MAX_IMAGE_SIZE_DEFAULT || mFullHeight > MAX_IMAGE_SIZE_DEFAULT) mDesiredDiscardLevel = 1; // MAX_IMAGE_SIZE_DEFAULT = 1024 and max size ever is 2048 } + else if (!LLPipeline::sRenderDeferred && mBoostLevel == LLGLTexture::BOOST_ALM) + { + mDesiredDiscardLevel = MAX_DISCARD_LEVEL + 1; + } else if (mBoostLevel < LLGLTexture::BOOST_HIGH && mMaxVirtualSize <= 10.f) { // If the image has not been significantly visible in a while, we don't want it |