summaryrefslogtreecommitdiff
path: root/indra/newview/llviewertexture.cpp
diff options
context:
space:
mode:
authorBrad Linden <brad@lindenlab.com>2024-10-01 12:44:13 -0700
committerBrad Linden <brad@lindenlab.com>2024-10-01 12:44:13 -0700
commit002a81ccf5a64fd08e29811a6edea36f2e0408be (patch)
tree1ca8b593778d904d5f280aff94be2288d73567af /indra/newview/llviewertexture.cpp
parent59ed2d55a1d84ecf879ff564aaf02744f2dc7c7a (diff)
parent690f099519e155220535e07539238139b16da99f (diff)
Merge remote-tracking branch 'origin/release/2024.09-ExtraFPS' into develop
Diffstat (limited to 'indra/newview/llviewertexture.cpp')
-rw-r--r--indra/newview/llviewertexture.cpp17
1 files changed, 17 insertions, 0 deletions
diff --git a/indra/newview/llviewertexture.cpp b/indra/newview/llviewertexture.cpp
index 9e1cb84bd1..0f9c65893d 100644
--- a/indra/newview/llviewertexture.cpp
+++ b/indra/newview/llviewertexture.cpp
@@ -2495,6 +2495,11 @@ bool LLViewerFetchedTexture::doLoadedCallbacks()
}
}
+ if (need_readback)
+ {
+ readbackRawImage();
+ }
+
//
// Run raw/auxiliary data callbacks
//
@@ -2744,10 +2749,22 @@ void LLViewerFetchedTexture::readbackRawImage()
if (mGLTexturep.notNull() && mGLTexturep->getTexName() != 0 &&
(mRawImage.isNull() || mRawImage->getWidth() < mGLTexturep->getWidth() || mRawImage->getHeight() < mGLTexturep->getHeight() ))
{
+ if (mRawImage.isNull())
+ {
+ sRawCount++;
+ }
mRawImage = new LLImageRaw();
if (!mGLTexturep->readBackRaw(-1, mRawImage, false))
{
mRawImage = nullptr;
+ mIsRawImageValid = false;
+ mRawDiscardLevel = INVALID_DISCARD_LEVEL;
+ sRawCount--;
+ }
+ else
+ {
+ mIsRawImageValid = true;
+ mRawDiscardLevel = mGLTexturep->getDiscardLevel();
}
}
}