summaryrefslogtreecommitdiff
path: root/indra/llrender/llimagegl.cpp
diff options
context:
space:
mode:
authorDave Parks <davep@lindenlab.com>2022-02-23 17:55:44 -0600
committerDave Parks <davep@lindenlab.com>2022-02-23 17:55:44 -0600
commitfc0b238654091c6090d5d85ceda51fbc6cb71eaa (patch)
tree1f12b135e73d088b4dd0606e6a80ba3895468c35 /indra/llrender/llimagegl.cpp
parentd9a68339d5aa18af349e347d6ed74bc01824cec7 (diff)
Fix for media textures failing to update (and eating lots of memory) on Mac/Intel
Diffstat (limited to 'indra/llrender/llimagegl.cpp')
-rw-r--r--indra/llrender/llimagegl.cpp23
1 files changed, 14 insertions, 9 deletions
diff --git a/indra/llrender/llimagegl.cpp b/indra/llrender/llimagegl.cpp
index 5cf3a2a15f..63f9a67e2c 100644
--- a/indra/llrender/llimagegl.cpp
+++ b/indra/llrender/llimagegl.cpp
@@ -1685,18 +1685,23 @@ void LLImageGL::syncToMainThread(LLGLuint new_tex_name)
[=]()
{
LL_PROFILE_ZONE_NAMED("cglt - delete callback");
- if (new_tex_name != 0)
- {
- if (mTexName != 0 && mTexName != new_tex_name)
- {
- LLImageGL::deleteTextures(1, &mTexName);
- }
- mTexName = new_tex_name;
- unref();
- }
+ syncTexName(new_tex_name);
+ unref();
});
}
+void LLImageGL::syncTexName(LLGLuint texname)
+{
+ if (texname != 0)
+ {
+ if (mTexName != 0 && mTexName != texname)
+ {
+ LLImageGL::deleteTextures(1, &mTexName);
+ }
+ mTexName = texname;
+ }
+}
+
BOOL LLImageGL::readBackRaw(S32 discard_level, LLImageRaw* imageraw, bool compressed_ok) const
{
llassert_always(sAllowReadBackRaw) ;