From bf28c9b287ad3195662927df708134c7e865eda4 Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev Date: Wed, 28 Oct 2020 22:49:18 +0200 Subject: SL-14224 RelWithDebInfo viewer stops with 'assert' when disabling atmospheric shader --- indra/newview/llviewercontrol.cpp | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'indra/newview/llviewercontrol.cpp') diff --git a/indra/newview/llviewercontrol.cpp b/indra/newview/llviewercontrol.cpp index c65431d6f6..625543b814 100644 --- a/indra/newview/llviewercontrol.cpp +++ b/indra/newview/llviewercontrol.cpp @@ -143,6 +143,20 @@ static bool handleSetShaderChanged(const LLSD& newvalue) gBumpImageList.destroyGL(); gBumpImageList.restoreGL(); + if (gPipeline.isInit()) + { + // ALM depends onto atmospheric shaders, state might have changed + bool old_state = LLPipeline::sRenderDeferred; + LLPipeline::refreshCachedSettings(); + gPipeline.updateRenderDeferred(); + if (old_state != LLPipeline::sRenderDeferred) + { + gPipeline.releaseGLBuffers(); + gPipeline.createGLBuffers(); + gPipeline.resetVertexBuffers(); + } + } + // else, leave terrain detail as is LLViewerShaderMgr::instance()->setShaders(); return true; -- cgit v1.2.3