summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
authorRuslan Teliuk <ruslantproductengine@lindenlab.com>2016-03-14 18:23:44 +0200
committerRuslan Teliuk <ruslantproductengine@lindenlab.com>2016-03-14 18:23:44 +0200
commitbcf2686d39f5048a6be1823735eb0c5d2084fd8e (patch)
treef205afc77db3376354ebea6f26eed6f6e05a4c16 /indra/newview
parent230fc28d8a72e75a8f2af2ab5fa5ee0e3ccca4a1 (diff)
parent173886fec32f2f5a8b63e81997f5929b02ddc8c9 (diff)
Merged in ruslantproductengine/viewer-lion-ruslan-teliuk-4-code-review (pull request #26)
MAINT-1109 FIXED Toggling graphics options causes viewer memory to increase, eventually causing the rendering pipeline to fall over and crashing the viewer
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;
}