summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDave Parks <davep@lindenlab.com>2011-10-19 14:18:49 -0500
committerDave Parks <davep@lindenlab.com>2011-10-19 14:18:49 -0500
commitb17023e3b071f5e49b3a18c28fc8e1bc73c15b73 (patch)
treeceefac067f534d000136106b3c16118b70c5d04c
parent37993bbba1f7e245ba1b10c2c2752cb62faa02ef (diff)
SH-2593 Fix for crash when jumping from "Low" to "Ultra" with Debug GL on.
-rw-r--r--indra/newview/llviewerdisplay.cpp19
-rw-r--r--indra/newview/pipeline.cpp12
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");