summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGraham Linden <graham@lindenlab.com>2013-09-09 09:24:46 -0700
committerGraham Linden <graham@lindenlab.com>2013-09-09 09:24:46 -0700
commit93df4ff2fea7378ab5b5ac069c2fec808ec5027b (patch)
treefbf3f1bda06ed02d58c702678c646054695be740
parenta3be9d3467c068f8ed0d4f1c98484d132b1f1a5f (diff)
NORSPEC-362 address video mem leak on windows on maximize
-rwxr-xr-xindra/newview/pipeline.cpp29
1 files changed, 19 insertions, 10 deletions
diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp
index 8be7b2ab53..b4e59909db 100755
--- a/indra/newview/pipeline.cpp
+++ b/indra/newview/pipeline.cpp
@@ -796,14 +796,22 @@ void LLPipeline::resizeScreenTexture()
GLuint resX = gViewerWindow->getWorldViewWidthRaw();
GLuint resY = gViewerWindow->getWorldViewHeightRaw();
- if (!allocateScreenBuffer(resX,resY))
- { //FAILSAFE: screen buffer allocation failed, disable deferred rendering if it's enabled
- //NOTE: if the session closes successfully after this call, deferred rendering will be
- // disabled on future sessions
- if (LLPipeline::sRenderDeferred)
+ if ((resX != mScreen.getWidth()) || (resY != mScreen.getHeight()))
+ {
+ releaseScreenBuffers();
+ if (!allocateScreenBuffer(resX,resY))
{
- gSavedSettings.setBOOL("RenderDeferred", FALSE);
- LLPipeline::refreshCachedSettings();
+#if PROBABLE_FALSE_DISABLES_OF_ALM_HERE
+ //FAILSAFE: screen buffer allocation failed, disable deferred rendering if it's enabled
+ //NOTE: if the session closes successfully after this call, deferred rendering will be
+ // disabled on future sessions
+ if (LLPipeline::sRenderDeferred)
+ {
+ gSavedSettings.setBOOL("RenderDeferred", FALSE);
+ LLPipeline::refreshCachedSettings();
+
+ }
+#endif
}
}
}
@@ -1193,7 +1201,8 @@ void LLPipeline::releaseGLBuffers()
mWaterRef.release();
mWaterDis.release();
-
+ mHighlight.release();
+
for (U32 i = 0; i < 3; i++)
{
mGlow[i].release();
@@ -1223,12 +1232,12 @@ void LLPipeline::releaseScreenBuffers()
mDeferredScreen.release();
mDeferredDepth.release();
mDeferredLight.release();
-
- mHighlight.release();
+ mOcclusionDepth.release();
for (U32 i = 0; i < 6; i++)
{
mShadow[i].release();
+ mShadowOcclusion[i].release();
}
}