summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDave Parks <davep@lindenlab.com>2010-10-29 14:44:33 -0500
committerDave Parks <davep@lindenlab.com>2010-10-29 14:44:33 -0500
commit9c5de604cc0bd262be4f73cdc21625b0061a4734 (patch)
treec1d534098785d500a873a1ba2d3a9f069a0637e8
parent90c2c4a9bc3a604c58c3c82e458391cb9c533555 (diff)
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.
-rw-r--r--indra/newview/featuretable_linux.txt4
-rw-r--r--indra/newview/featuretable_mac.txt4
-rw-r--r--indra/newview/pipeline.cpp7
3 files changed, 7 insertions, 8 deletions
diff --git a/indra/newview/featuretable_linux.txt b/indra/newview/featuretable_linux.txt
index 4a99280b06..efe29005f2 100644
--- a/indra/newview/featuretable_linux.txt
+++ b/indra/newview/featuretable_linux.txt
@@ -143,7 +143,7 @@ WLSkyDetail 1 48
RenderDeferred 1 0
RenderDeferredSSAO 1 0
RenderShadowDetail 1 0
-RenderUseFBO 1 1
+RenderUseFBO 1 0
//
// Ultra graphics (REALLY PURTY!)
@@ -170,7 +170,7 @@ WLSkyDetail 1 128
RenderDeferred 1 0
RenderDeferredSSAO 1 0
RenderShadowDetail 1 0
-RenderUseFBO 1 1
+RenderUseFBO 1 0
//
// Class Unknown Hardware (unknown)
diff --git a/indra/newview/featuretable_mac.txt b/indra/newview/featuretable_mac.txt
index 67cace7268..f030c9f8e5 100644
--- a/indra/newview/featuretable_mac.txt
+++ b/indra/newview/featuretable_mac.txt
@@ -140,7 +140,7 @@ RenderWaterReflections 1 0
VertexShaderEnable 1 1
WindLightUseAtmosShaders 1 1
WLSkyDetail 1 48
-RenderUseFBO 1 1
+RenderUseFBO 1 0
//
// Ultra graphics (REALLY PURTY!)
@@ -166,7 +166,7 @@ RenderWaterReflections 1 1
VertexShaderEnable 1 1
WindLightUseAtmosShaders 1 1
WLSkyDetail 1 128
-RenderUseFBO 1 1
+RenderUseFBO 1 0
//
// Class Unknown Hardware (unknown)
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)