summaryrefslogtreecommitdiff
path: root/indra/newview/llviewertexture.cpp
diff options
context:
space:
mode:
authorDave Parks <davep@lindenlab.com>2022-02-23 16:51:33 -0600
committerDave Parks <davep@lindenlab.com>2022-02-23 16:51:33 -0600
commitd9a68339d5aa18af349e347d6ed74bc01824cec7 (patch)
treecb8dd1c146499d57daa6798495a7540c691bdddb /indra/newview/llviewertexture.cpp
parent65a28c5d7dc54dc9e263da4b19229fb5f86a1c62 (diff)
SL-16815 and SL-16906 Avoid redundant bumpmap generation, add some assertions around ref counting and (hack) fix crash on shutdown from dangling texture reference (reduced to 1 dangling texture from several hundred, can't find the remaining reference).
Diffstat (limited to 'indra/newview/llviewertexture.cpp')
-rw-r--r--indra/newview/llviewertexture.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/indra/newview/llviewertexture.cpp b/indra/newview/llviewertexture.cpp
index fa2c070ea0..e3ac56d0d3 100644
--- a/indra/newview/llviewertexture.cpp
+++ b/indra/newview/llviewertexture.cpp
@@ -1619,7 +1619,6 @@ void LLViewerFetchedTexture::scheduleCreateTexture()
mNeedsCreateTexture = TRUE;
if (preCreateTexture())
{
- ref();
#if LL_IMAGEGL_THREAD_CHECK
//grab a copy of the raw image data to make sure it isn't modified pending texture creation
U8* data = mRawImage->getData();
@@ -1635,6 +1634,7 @@ void LLViewerFetchedTexture::scheduleCreateTexture()
auto mainq = LLImageGLThread::sEnabled ? mMainQueue.lock() : nullptr;
if (mainq)
{
+ ref();
mainq->postTo(
mImageQueue,
// work to be done on LLImageGL worker thread
@@ -1681,7 +1681,6 @@ void LLViewerFetchedTexture::scheduleCreateTexture()
else
{
gTextureList.mCreateTextureList.insert(this);
- unref();
}
}
}