summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
authorruslantproductengine <ruslantproductengine@lindenlab.com>2016-03-10 19:50:12 +0200
committerruslantproductengine <ruslantproductengine@lindenlab.com>2016-03-10 19:50:12 +0200
commit173886fec32f2f5a8b63e81997f5929b02ddc8c9 (patch)
tree72f633b0b754eca77da524b0e8ffbe46bab8c311 /indra/newview
parentdebc51af6b6a35f7f635be9483a3bc4d0846a90d (diff)
MAINT-1109 FIXED Toggling graphics options causes viewer memory to increase, eventually causing the rendering pipeline to fall over and crashing the viewer
Patchset #2
Diffstat (limited to 'indra/newview')
-rwxr-xr-xindra/newview/llviewerwindow.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp
index f96c4b7bf0..d3416ec5fc 100755
--- a/indra/newview/llviewerwindow.cpp
+++ b/indra/newview/llviewerwindow.cpp
@@ -4951,6 +4951,13 @@ void LLViewerWindow::stopGL(BOOL save_state)
gGLManager.mIsDisabled = TRUE;
stop_glerror();
+
+ //unload shader's
+ while (LLGLSLShader::sInstances.size())
+ {
+ LLGLSLShader* shader = *(LLGLSLShader::sInstances.begin());
+ shader->unload();
+ }
LL_INFOS() << "Remaining allocated texture memory: " << LLImageGL::sGlobalTextureMemory.value() << " bytes" << LL_ENDL;
}