Commits

Loren Shih  committed 77dc883

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.

  • Participants
  • Parent commits d1a7401

Comments (0)

Files changed (3)

File indra/newview/featuretable_linux.txt

 RenderDeferred				1	0
 RenderDeferredSSAO			1	0
 RenderShadowDetail			1	0
-RenderUseFBO				1	1
+RenderUseFBO				1	0
 
 //
 // Ultra graphics (REALLY PURTY!)
 RenderDeferred				1	0
 RenderDeferredSSAO			1	0
 RenderShadowDetail			1	0
-RenderUseFBO				1	1
+RenderUseFBO				1	0
 
 //
 // Class Unknown Hardware (unknown)

File indra/newview/featuretable_mac.txt

 VertexShaderEnable			1	1
 WindLightUseAtmosShaders	1	1
 WLSkyDetail					1	48
-RenderUseFBO				1	1
+RenderUseFBO				1	0
 
 //
 // Ultra graphics (REALLY PURTY!)
 VertexShaderEnable			1	1
 WindLightUseAtmosShaders	1	1
 WLSkyDetail					1	128
-RenderUseFBO				1	1
+RenderUseFBO				1	0
 
 //
 // Class Unknown Hardware (unknown)

File indra/newview/pipeline.cpp

 	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)
 		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);
 
 	}
 	
 
-	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)