From 6343c769ce402c31ae10944b5fef72fb70e6758a Mon Sep 17 00:00:00 2001
From: Leslie Linden <leslie@lindenlab.com>
Date: Wed, 16 Nov 2011 10:00:41 -0800
Subject: [PATCH] SH-1865 FIX -- removed some old non-deferred rendering code
 that was preventing anti-aliasing from working when
 GL_ARB_texture_multisample is unsupported

---
 indra/llrender/llgl.cpp    | 8 --------
 indra/llrender/llgl.h      | 1 -
 indra/newview/pipeline.cpp | 6 ++----
 3 files changed, 2 insertions(+), 13 deletions(-)

diff --git a/indra/llrender/llgl.cpp b/indra/llrender/llgl.cpp
index 20ca189e7f5..946e602fee6 100644
--- a/indra/llrender/llgl.cpp
+++ b/indra/llrender/llgl.cpp
@@ -835,14 +835,6 @@ std::string LLGLManager::getRawGLString()
 	return gl_string;
 }
 
-U32 LLGLManager::getNumFBOFSAASamples(U32 samples)
-{
-	samples = llmin(samples, (U32) mMaxColorTextureSamples);
-	samples = llmin(samples, (U32) mMaxDepthTextureSamples);
-	samples = llmin(samples, (U32) 4);
-	return samples;
-}
-
 void LLGLManager::shutdownGL()
 {
 	if (mInited)
diff --git a/indra/llrender/llgl.h b/indra/llrender/llgl.h
index dee7ec07395..6a147b8e19a 100644
--- a/indra/llrender/llgl.h
+++ b/indra/llrender/llgl.h
@@ -150,7 +150,6 @@ class LLGLManager
 	void printGLInfoString();
 	void getGLInfo(LLSD& info);
 
-	U32 getNumFBOFSAASamples(U32 desired_samples = 32);
 	// In ALL CAPS
 	std::string mGLVendor;
 	std::string mGLVendorShort;
diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp
index 230bf0e9fdf..5e9f0e3efec 100644
--- a/indra/newview/pipeline.cpp
+++ b/indra/newview/pipeline.cpp
@@ -658,7 +658,7 @@ void LLPipeline::allocatePhysicsBuffer()
 void LLPipeline::allocateScreenBuffer(U32 resX, U32 resY)
 {
 	refreshCachedSettings();
-	U32 samples = gGLManager.getNumFBOFSAASamples(RenderFSAASamples);
+	U32 samples = RenderFSAASamples;
 
 	//try to allocate screen buffers at requested resolution and samples
 	// - on failure, shrink number of samples and try again
@@ -1165,9 +1165,7 @@ BOOL LLPipeline::canUseWindLightShadersOnObjects() const
 
 BOOL LLPipeline::canUseAntiAliasing() const
 {
-	// We can use anti-aliasing if the GL manager can support some multisampling
-	BOOL can_fsaa = (gGLManager.getNumFBOFSAASamples(2) > 1);
-	return can_fsaa;
+	return TRUE;
 }
 
 void LLPipeline::unloadShaders()
-- 
GitLab