From 40e9566d98452d9a48f6bdb01c407fb2b231a816 Mon Sep 17 00:00:00 2001 From: Dave Parks Date: Fri, 22 Oct 2010 16:49:32 -0500 Subject: Non-FBO driven fix for anti-aliasing (make applying of FSAA require restart when FBO is disabled). --- indra/newview/pipeline.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/newview/pipeline.cpp') diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp index 0c5735cdfc..0782f072dd 100644 --- a/indra/newview/pipeline.cpp +++ b/indra/newview/pipeline.cpp @@ -874,7 +874,7 @@ BOOL LLPipeline::canUseWindLightShadersOnObjects() const BOOL LLPipeline::canUseAntiAliasing() const { - return (gSavedSettings.getBOOL("RenderUseFBO")); + return TRUE; //(gSavedSettings.getBOOL("RenderUseFBO")); } void LLPipeline::unloadShaders() -- cgit v1.2.3 From 9c5de604cc0bd262be4f73cdc21625b0061a4734 Mon Sep 17 00:00:00 2001 From: Dave Parks Date: Fri, 29 Oct 2010 14:44:33 -0500 Subject: VWR-21349 Don't enable FBO by default on mac or linux when using high/ultra graphics. Cap samples in LLMultiSampleBuffer to 4 samples to avoid using tons of memory when RenderUseFBO is set to TRUE and RenderFSAASamples is > 4. Don't allocate multisample buffers at all when RenderUseFBO is FALSE. --- indra/newview/pipeline.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'indra/newview/pipeline.cpp') diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp index b467df1308..e6c6c74fce 100644 --- a/indra/newview/pipeline.cpp +++ b/indra/newview/pipeline.cpp @@ -533,7 +533,8 @@ void LLPipeline::allocateScreenBuffer(U32 resX, U32 resY) mScreenWidth = resX; mScreenHeight = resY; - U32 samples = gSavedSettings.getU32("RenderFSAASamples"); + //never use more than 4 samples for render targets + U32 samples = llmin(gSavedSettings.getU32("RenderFSAASamples"), (U32) 4); U32 res_mod = gSavedSettings.getU32("RenderResolutionDivisor"); if (res_mod > 1 && res_mod < resX && res_mod < resY) @@ -554,8 +555,6 @@ void LLPipeline::allocateScreenBuffer(U32 resX, U32 resY) mDeferredDepth.allocate(resX, resY, 0, TRUE, FALSE, LLTexUnit::TT_RECT_TEXTURE, FALSE); addDeferredAttachments(mDeferredScreen); - // always set viewport to desired size, since allocate resets the viewport - mScreen.allocate(resX, resY, GL_RGBA, FALSE, FALSE, LLTexUnit::TT_RECT_TEXTURE, FALSE); mEdgeMap.allocate(resX, resY, GL_ALPHA, FALSE, FALSE, LLTexUnit::TT_RECT_TEXTURE, FALSE); @@ -598,7 +597,7 @@ void LLPipeline::allocateScreenBuffer(U32 resX, U32 resY) } - if (gGLManager.mHasFramebufferMultisample && samples > 1) + if (LLRenderTarget::sUseFBO && gGLManager.mHasFramebufferMultisample && samples > 1) { mSampleBuffer.allocate(resX,resY,GL_RGBA,TRUE,TRUE,LLTexUnit::TT_RECT_TEXTURE,FALSE,samples); if (LLPipeline::sRenderDeferred) -- cgit v1.2.3