Anonymous avatar Anonymous 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.

Comments (0)

Files changed (3)

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)

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)

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)
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.