Commits

Anonymous committed 2e4d027

SH-280 FIXED Anti-aliasing broken
SH-287 FIXED Anti-aliasing setting does not take effect until relog

Added logic to control RenderUseFBO setting based on graphics quality. RenderUseFBO controls whether anti-aliasing is enabled.

  • Participants
  • Parent commits 6251438

Comments (0)

Files changed (8)

indra/newview/featuretable.txt

 RenderShadowDetail			1	0
 WatchdogDisabled				1	1
 RenderUseStreamVBO			1	1
+RenderUseFBO				1	1
 
 //
 // Low Graphics Settings
 RenderDeferred				1	0
 RenderDeferredSSAO			1	0
 RenderShadowDetail			1	0
-
+RenderUseFBO				1	0
 
 //
 // Mid Graphics Settings
 RenderDeferred				1	0
 RenderDeferredSSAO			1	0
 RenderShadowDetail			1	0
-
+RenderUseFBO				1	0
 
 //
 // High Graphics Settings (purty)
 RenderDeferred				1	0
 RenderDeferredSSAO			1	0
 RenderShadowDetail			1	0
-
+RenderUseFBO				1	1
 
 //
 // Ultra graphics (REALLY PURTY!)
 RenderDeferred				1	0
 RenderDeferredSSAO			1	0
 RenderShadowDetail			1	0
+RenderUseFBO				1	1
 
 //
 // Class Unknown Hardware (unknown)
 RenderDeferred				0	0
 RenderDeferredSSAO			0	0
 RenderShadowDetail			0	0
-
+RenderUseFBO				1	0
+		
 //
 // CPU based feature masks
 //

indra/newview/featuretable_linux.txt

 RenderDeferredSSAO			1	0
 RenderShadowDetail			1	0
 WatchdogDisabled				1	1
+RenderUseFBO				1	1
 
 //
 // Low Graphics Settings
 RenderDeferred				1	0
 RenderDeferredSSAO			1	0
 RenderShadowDetail			1	0
-
+RenderUseFBO				1	0
 
 //
 // Mid Graphics Settings
 RenderDeferred				1	0
 RenderDeferredSSAO			1	0
 RenderShadowDetail			1	0
-
+RenderUseFBO				1	0
 
 //
 // High Graphics Settings (purty)
 RenderDeferred				1	0
 RenderDeferredSSAO			1	0
 RenderShadowDetail			1	0
-
+RenderUseFBO				1	1
 
 //
 // Ultra graphics (REALLY PURTY!)
 RenderDeferred				1	0
 RenderDeferredSSAO			1	0
 RenderShadowDetail			1	0
-
+RenderUseFBO				1	1
 
 //
 // Class Unknown Hardware (unknown)
 RenderDeferred				0	0
 RenderDeferredSSAO			0	0
 RenderShadowDetail			0	0
+RenderUseFBO				1	0
 
 
 //

indra/newview/featuretable_mac.txt

 Disregard96DefaultDrawDistance	1	1
 SkyUseClassicClouds			1	1
 WatchdogDisabled				1	1
+RenderUseFBO				1	1
 
 //
 // Low Graphics Settings
 WindLightUseAtmosShaders	1	0
 WLSkyDetail					1	48
 SkyUseClassicClouds			1	0
+RenderUseFBO				1	0
 
 //
 // Mid Graphics Settings
 VertexShaderEnable			1	1
 WindLightUseAtmosShaders	1	0
 WLSkyDetail					1	48
+RenderUseFBO				1	0
 
 //
 // High Graphics Settings (purty)
 VertexShaderEnable			1	1
 WindLightUseAtmosShaders	1	1
 WLSkyDetail					1	48
+RenderUseFBO				1	1
 
 //
 // Ultra graphics (REALLY PURTY!)
 VertexShaderEnable			1	1
 WindLightUseAtmosShaders	1	1
 WLSkyDetail					1	128
+RenderUseFBO				1	1
 
 //
 // Class Unknown Hardware (unknown)
 RenderVBOEnable				1	0
 RenderWaterReflections		0	0
 WindLightUseAtmosShaders	0	0
+RenderUseFBO				1	0
 
 //
 // CPU based feature masks

indra/newview/featuretable_solaris.txt

 UseOcclusion		1       1
 RenderCubeMap		1       1
 WatchdogDisabled				1	1
+RenderUseFBO				1	1
 
 
 //
 RenderLighting		1	0
 RenderObjectBump	1	0
 RenderRippleWater	1	0
+RenderUseFBO		1	0
 
 //
 // Class 1 Hardware
 RenderLighting		1	0
 RenderObjectBump	1	0
 RenderRippleWater	1	0
+RenderUseFBO		1	0
 
 //
 // Class 2 Hardware (make it purty)
 RenderLighting		1	1
 RenderObjectBump	1	1
 RenderRippleWater	1	1
+RenderUseFBO		1	1
 
 //
 // Class 3 Hardware (make it purty)
 RenderLighting		1	1
 RenderObjectBump	1	1
 RenderRippleWater	1	1
+RenderUseFBO		1	1
 
 //
 // No Pixel Shaders available
 RenderTerrainDetail 1	0
 RenderCubeMap		0	0
 UseOcclusion		0	0
+RenderUseFBO		1	0
 
 
 list low

indra/newview/featuretable_xp.txt

 RenderDeferred				1	0
 RenderDeferredSSAO			1	0
 RenderShadowDetail			1	0
+RenderUseFBO				1	1
 WatchdogDisabled				1	1
 RenderUseStreamVBO			1	1
 
 RenderDeferred				1	0
 RenderDeferredSSAO			1	0
 RenderShadowDetail			1	0
-
+RenderUseFBO				1	0
 
 //
 // Mid Graphics Settings
 RenderDeferred				1	0
 RenderDeferredSSAO			1	0
 RenderShadowDetail			1	0
-
+RenderUseFBO				1	0
 
 //
 // High Graphics Settings (purty)
 RenderDeferred				1	0
 RenderDeferredSSAO			1	0
 RenderShadowDetail			1	0
-
+RenderUseFBO				1	1
 
 //
 // Ultra graphics (REALLY PURTY!)
 RenderDeferred				1	0
 RenderDeferredSSAO			1	0
 RenderShadowDetail			1	0
+RenderUseFBO				1	1
 
 //
 // Class Unknown Hardware (unknown)
 RenderDeferred				0	0
 RenderDeferredSSAO			0	0
 RenderShadowDetail			0	0
+RenderUseFBO				1	0
 
 //
 // CPU based feature masks

indra/newview/llfloaterhardwaresettings.cpp

 	getChildView("gamma")->setEnabled(!gPipeline.canUseWindLightShaders());
 	getChildView("(brightness, lower is brighter)")->setEnabled(!gPipeline.canUseWindLightShaders());
 	getChildView("fog")->setEnabled(!gPipeline.canUseWindLightShaders());
-
+	getChildView("fsaa")->setEnabled(gPipeline.canUseAntiAliasing());
+	/* Enable to reset fsaa value to disabled when feature is not available.
+	if (!gPipeline.canUseAntiAliasing())
+	{
+		getChild<LLUICtrl>("fsaa")->setValue((LLSD::Integer) 0);
+	}
+	*/
 }
 
 //============================================================================

indra/newview/pipeline.cpp

 		&& LLViewerShaderMgr::instance()->getVertexShaderLevel(LLViewerShaderMgr::SHADER_OBJECT) > 0);
 }
 
+BOOL LLPipeline::canUseAntiAliasing() const
+{
+	return (gSavedSettings.getBOOL("RenderUseFBO"));
+}
+
 void LLPipeline::unloadShaders()
 {
 	LLMemType mt_us(LLMemType::MTYPE_PIPELINE_UNLOAD_SHADERS);

indra/newview/pipeline.h

 	BOOL		canUseVertexShaders();
 	BOOL		canUseWindLightShaders() const;
 	BOOL		canUseWindLightShadersOnObjects() const;
+	BOOL		canUseAntiAliasing() const;
 
 	// phases
 	void resetFrameStats();