From 3e9dcba813a8263635e06b8e49c4aa5c54742139 Mon Sep 17 00:00:00 2001 From: Dave Parks <davep@lindenlab.com> Date: Tue, 24 May 2022 17:03:11 -0500 Subject: [PATCH] SL-17486 Fix for many texture types failing to load. --- indra/newview/llviewertexture.cpp | 12 +++++++++--- indra/newview/llviewertexture.h | 4 ++-- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/indra/newview/llviewertexture.cpp b/indra/newview/llviewertexture.cpp index 0f2af77f9d9..b8de5d34ebc 100644 --- a/indra/newview/llviewertexture.cpp +++ b/indra/newview/llviewertexture.cpp @@ -714,6 +714,12 @@ void LLViewerTexture::setBoostLevel(S32 level) } } + // strongly encourage anything boosted to load at full res + if (mBoostLevel >= LLViewerTexture::BOOST_HIGH) + { + mMaxVirtualSize = 2048.f * 2048.f; + } + if (mBoostLevel == LLViewerTexture::BOOST_SELECTED) { mSelectedTime = gFrameTimeSeconds; @@ -1963,11 +1969,11 @@ bool LLViewerFetchedTexture::updateFetch() { mFetchState = LLAppViewer::getTextureFetch()->getFetchState(mID, mDownloadProgress, mRequestedDownloadPriority, mFetchPriority, mFetchDeltaTime, mRequestDeltaTime, mCanUseHTTP); - if (mFetchState != mLastFetchState) + /*if (mFetchState != mLastFetchState) { setDebugText(LLTextureFetch::getStateString(mFetchState)); mLastFetchState = mFetchState; - } + }*/ } // We may have data ready regardless of whether or not we are finished (e.g. waiting on write) @@ -2031,7 +2037,7 @@ bool LLViewerFetchedTexture::updateFetch() if (!mIsFetching) { - if ((decode_priority > 0) && (mRawDiscardLevel < 0 || mRawDiscardLevel == INVALID_DISCARD_LEVEL)) + if ((decode_priority > 0) && (mRawDiscardLevel < 0)) { // We finished but received no data if (getDiscardLevel() < 0) diff --git a/indra/newview/llviewertexture.h b/indra/newview/llviewertexture.h index ece67945922..49d030bcb84 100644 --- a/indra/newview/llviewertexture.h +++ b/indra/newview/llviewertexture.h @@ -199,7 +199,7 @@ class LLViewerTexture : public LLGLTexture S32 mTextureListType; // along with mID identifies where to search for this texture in TextureList F32 mSelectedTime; // time texture was last selected - mutable F32 mMaxVirtualSize; // The largest virtual size of the image, in pixels - how much data to we need? + mutable F32 mMaxVirtualSize = 0.f; // The largest virtual size of the image, in pixels - how much data to we need? mutable S32 mMaxVirtualSizeResetCounter; mutable S32 mMaxVirtualSizeResetInterval; LLFrameTimer mLastReferencedTimer; @@ -490,7 +490,7 @@ class LLViewerFetchedTexture : public LLViewerTexture F32 mLastCallBackActiveTime; LLPointer<LLImageRaw> mRawImage; - S32 mRawDiscardLevel; + S32 mRawDiscardLevel = -1; // Used ONLY for cloth meshes right now. Make SURE you know what you're // doing if you use it for anything else! - djs -- GitLab