summaryrefslogtreecommitdiff
path: root/indra/llrender/llimagegl.cpp
diff options
context:
space:
mode:
authorJonathan "Geenz" Goodman <geenz@lindenlab.com>2026-08-25 12:56:22 -0400
committerGitHub <noreply@github.com>2026-08-25 12:56:22 -0400
commit2e9c387fee881022aec13d5c85f901539683c18f (patch)
treed2cc89444771d96871b3126c9462f072dc059e32 /indra/llrender/llimagegl.cpp
parent92289533c1b95bc0fb2cdcc1217ae539485ea244 (diff)
parenta402fd4da91bbce03340e174505c06feede65866 (diff)
Merge branch 'develop' into project/lua_editor
Diffstat (limited to 'indra/llrender/llimagegl.cpp')
-rw-r--r--indra/llrender/llimagegl.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/indra/llrender/llimagegl.cpp b/indra/llrender/llimagegl.cpp
index fafc92b5d0..81743713a1 100644
--- a/indra/llrender/llimagegl.cpp
+++ b/indra/llrender/llimagegl.cpp
@@ -2583,6 +2583,12 @@ bool LLImageGL::scaleDown(S32 desired_discard)
{
glDrawArrays(GL_TRIANGLES, 0, 3);
+#if LL_DARWIN
+ // On mac OS, flush before freeing, otherwise the texture may be
+ // freed before Metal's 'lazy' evaluation/restoration behavior triggers.
+ glFlush();
+#endif
+
free_tex_image(mTexName);
glTexImage2D(mTarget, 0, mFormatInternal, desired_width, desired_height, 0, mFormatPrimary, mFormatType, nullptr);
glCopyTexSubImage2D(mTarget, 0, 0, 0, 0, 0, desired_width, desired_height);