diff options
author | Brad Linden <brad@lindenlab.com> | 2024-10-01 12:44:13 -0700 |
---|---|---|
committer | Brad Linden <brad@lindenlab.com> | 2024-10-01 12:44:13 -0700 |
commit | 002a81ccf5a64fd08e29811a6edea36f2e0408be (patch) | |
tree | 1ca8b593778d904d5f280aff94be2288d73567af /indra/newview/llviewertexture.cpp | |
parent | 59ed2d55a1d84ecf879ff564aaf02744f2dc7c7a (diff) | |
parent | 690f099519e155220535e07539238139b16da99f (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.cpp | 17 |
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(); } } } |