From 173886fec32f2f5a8b63e81997f5929b02ddc8c9 Mon Sep 17 00:00:00 2001 From: ruslantproductengine Date: Thu, 10 Mar 2016 19:50:12 +0200 Subject: 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 --- indra/newview/llviewerwindow.cpp | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'indra/newview') 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; } -- cgit v1.2.3