diff options
| author | Loren Shih <seraph@lindenlab.com> | 2010-11-04 16:34:02 -0400 | 
|---|---|---|
| committer | Loren Shih <seraph@lindenlab.com> | 2010-11-04 16:34:02 -0400 | 
| commit | c937eb1baed9df8eb99dd8a6bbe7d39075ec08d1 (patch) | |
| tree | be0c533c16b216b9a1640b420c8af5e6fc44ba8b | |
| parent | 09a9e61c348061691f55b40d6d525288d6db27f4 (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.txt | 4 | ||||
| -rw-r--r-- | indra/newview/featuretable_mac.txt | 4 | ||||
| -rw-r--r-- | indra/newview/pipeline.cpp | 7 | 
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 0c5735cdfc..dd69287dbb 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)  | 
