diff options
author | Dave Parks <davep@lindenlab.com> | 2022-06-08 16:24:03 -0500 |
---|---|---|
committer | Dave Parks <davep@lindenlab.com> | 2022-06-08 16:24:03 -0500 |
commit | da069765b1974e60df5ebf9e973c7fd00c52e329 (patch) | |
tree | 418289fee4ccc0f539b3f09026166d08e1a829cf /indra/newview | |
parent | b879c6f3f19c4f2b6791eae67194dcc5f0a020cb (diff) |
SL-17005 Tweak target VRAM usage and add some log spam to help zero in on good targets.
Diffstat (limited to 'indra/newview')
-rw-r--r-- | indra/newview/llviewertexture.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/indra/newview/llviewertexture.cpp b/indra/newview/llviewertexture.cpp index 16b07159ba..e31bc5ec6e 100644 --- a/indra/newview/llviewertexture.cpp +++ b/indra/newview/llviewertexture.cpp @@ -803,14 +803,8 @@ void LLViewerTexture::addTextureStats(F32 virtual_size, BOOL needs_gltexture) co } virtual_size *= sTexelPixelRatio; - /*if (!mMaxVirtualSizeResetCounter) - { - //flag to reset the values because the old values are used. - resetMaxVirtualSizeResetCounter(); - mMaxVirtualSize = virtual_size; - mNeedsGLTexture = needs_gltexture; - } - else*/ if (virtual_size > mMaxVirtualSize) + + if (virtual_size > mMaxVirtualSize) { mMaxVirtualSize = virtual_size; } @@ -1801,6 +1795,12 @@ void LLViewerFetchedTexture::updateVirtualSize() return; } + if (sDesiredDiscardBias > 0.f) + { + // running out of video memory, don't hold onto high res textures in the background + mMaxVirtualSize = 0.f; + } + for (U32 ch = 0; ch < LLRender::NUM_TEXTURE_CHANNELS; ++ch) { llassert(mNumFaces[ch] <= mFaceList[ch].size()); |