summaryrefslogtreecommitdiff
path: root/indra/llrender/llimagegl.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/llrender/llimagegl.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/llrender/llimagegl.cpp')
-rw-r--r--indra/llrender/llimagegl.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/indra/llrender/llimagegl.cpp b/indra/llrender/llimagegl.cpp
index 9e26247e1e..5cf3a2a15f 100644
--- a/indra/llrender/llimagegl.cpp
+++ b/indra/llrender/llimagegl.cpp
@@ -437,7 +437,7 @@ LLImageGL::LLImageGL(
LLImageGL::~LLImageGL()
{
- if (!mExternalTexture)
+ if (!mExternalTexture && gGLManager.mInited)
{
LLImageGL::cleanup();
sImageList.erase(this);
@@ -1629,14 +1629,16 @@ void LLImageGLThread::updateClass()
}
};
+
// post update to background thread if available, otherwise execute immediately
- auto queue = LLImageGLThread::sEnabled ? LL::WorkQueue::getInstance("LLImageGL") : nullptr;
- if (queue)
+ auto queue = LL::WorkQueue::getInstance("LLImageGL");
+ if (sEnabled)
{
queue->post(func);
}
else
{
+ llassert(queue == nullptr);
func();
}
}