From 93df4ff2fea7378ab5b5ac069c2fec808ec5027b Mon Sep 17 00:00:00 2001 From: Graham Linden Date: Mon, 9 Sep 2013 09:24:46 -0700 Subject: NORSPEC-362 address video mem leak on windows on maximize --- indra/newview/pipeline.cpp | 29 +++++++++++++++++++---------- 1 file 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(); } } -- cgit v1.2.3