diff options
author | Kitty Barnett <develop@catznip.com> | 2024-10-02 00:34:51 +0200 |
---|---|---|
committer | Kitty Barnett <develop@catznip.com> | 2024-10-02 00:34:51 +0200 |
commit | 48b34e07ef33965edcc38006082be01ed7ed239d (patch) | |
tree | dc236a74a900921ab1fae039f655f1cb9aca7b6c /indra/newview/llviewertexture.cpp | |
parent | 689f723a5f314ffa0f54c0e50a51cbe464b36ccf (diff) | |
parent | 002a81ccf5a64fd08e29811a6edea36f2e0408be (diff) |
Merge branch 'develop' into rlva/base
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(); } } } |