From b17023e3b071f5e49b3a18c28fc8e1bc73c15b73 Mon Sep 17 00:00:00 2001 From: Dave Parks Date: Wed, 19 Oct 2011 14:18:49 -0500 Subject: SH-2593 Fix for crash when jumping from "Low" to "Ultra" with Debug GL on. --- indra/newview/llviewerdisplay.cpp | 19 +++++-------------- indra/newview/pipeline.cpp | 12 ++++++++++++ 2 files changed, 17 insertions(+), 14 deletions(-) diff --git a/indra/newview/llviewerdisplay.cpp b/indra/newview/llviewerdisplay.cpp index 3889c895aa..894c409ad6 100644 --- a/indra/newview/llviewerdisplay.cpp +++ b/indra/newview/llviewerdisplay.cpp @@ -229,6 +229,8 @@ void display(BOOL rebuild, F32 zoom_factor, int subfield, BOOL for_snapshot) gGL.flush(); glClear(GL_COLOR_BUFFER_BIT); gViewerWindow->mWindow->swapBuffers(); + LLPipeline::refreshCachedSettings(); + LLPipeline::refreshRenderDeferred(); gPipeline.resizeScreenTexture(); gResizeScreenTexture = FALSE; gWindowResized = FALSE; @@ -615,12 +617,10 @@ void display(BOOL rebuild, F32 zoom_factor, int subfield, BOOL for_snapshot) //Increment drawable frame counter LLDrawable::incrementVisible(); + LLPipeline::refreshCachedSettings(); + LLPipeline::refreshRenderDeferred(); + LLSpatialGroup::sNoDelete = TRUE; - LLPipeline::sUseOcclusion = - (!gUseWireframe - && LLFeatureManager::getInstance()->isFeatureAvailable("UseOcclusion") - && gSavedSettings.getBOOL("UseOcclusion") - && gGLManager.mHasOcclusionQuery) ? 2 : 0; LLTexUnit::sWhiteTexture = LLViewerFetchedTexture::sWhiteImagep->getTexName(); /*if (LLPipeline::sUseOcclusion && LLPipeline::sRenderDeferred) @@ -628,15 +628,6 @@ void display(BOOL rebuild, F32 zoom_factor, int subfield, BOOL for_snapshot) LLPipeline::sUseOcclusion = 3; }*/ - LLPipeline::refreshCachedSettings(); - LLPipeline::refreshRenderDeferred(); - - LLPipeline::sAutoMaskAlphaDeferred = gSavedSettings.getBOOL("RenderAutoMaskAlphaDeferred"); - LLPipeline::sAutoMaskAlphaNonDeferred = gSavedSettings.getBOOL("RenderAutoMaskAlphaNonDeferred"); - LLPipeline::sUseFarClip = gSavedSettings.getBOOL("RenderUseFarClip"); - LLVOAvatar::sMaxVisible = (U32)gSavedSettings.getS32("RenderAvatarMaxVisible"); - LLPipeline::sDelayVBUpdate = gSavedSettings.getBOOL("RenderDelayVBUpdate"); - S32 occlusion = LLPipeline::sUseOcclusion; if (gDepthDirty) { //depth buffer is invalid, don't overwrite occlusion state diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp index 5035e0197d..3246ec648e 100644 --- a/indra/newview/pipeline.cpp +++ b/indra/newview/pipeline.cpp @@ -840,6 +840,18 @@ void LLPipeline::refreshRenderDeferred() //static void LLPipeline::refreshCachedSettings() { + LLPipeline::sAutoMaskAlphaDeferred = gSavedSettings.getBOOL("RenderAutoMaskAlphaDeferred"); + LLPipeline::sAutoMaskAlphaNonDeferred = gSavedSettings.getBOOL("RenderAutoMaskAlphaNonDeferred"); + LLPipeline::sUseFarClip = gSavedSettings.getBOOL("RenderUseFarClip"); + LLVOAvatar::sMaxVisible = (U32)gSavedSettings.getS32("RenderAvatarMaxVisible"); + LLPipeline::sDelayVBUpdate = gSavedSettings.getBOOL("RenderDelayVBUpdate"); + + LLPipeline::sUseOcclusion = + (!gUseWireframe + && LLFeatureManager::getInstance()->isFeatureAvailable("UseOcclusion") + && gSavedSettings.getBOOL("UseOcclusion") + && gGLManager.mHasOcclusionQuery) ? 2 : 0; + VertexShaderEnable = gSavedSettings.getBOOL("VertexShaderEnable"); RenderAvatarVP = gSavedSettings.getBOOL("RenderAvatarVP"); WindLightUseAtmosShaders = gSavedSettings.getBOOL("WindLightUseAtmosShaders"); -- cgit v1.2.3