summaryrefslogtreecommitdiff
path: root/indra/newview/llfeaturemanager.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llfeaturemanager.cpp')
-rw-r--r--indra/newview/llfeaturemanager.cpp42
1 files changed, 33 insertions, 9 deletions
diff --git a/indra/newview/llfeaturemanager.cpp b/indra/newview/llfeaturemanager.cpp
index 4e16cc4217..83844048d1 100644
--- a/indra/newview/llfeaturemanager.cpp
+++ b/indra/newview/llfeaturemanager.cpp
@@ -203,7 +203,7 @@ BOOL LLFeatureManager::maskFeatures(const std::string& name)
LL_DEBUGS("RenderInit") << "Unknown feature mask " << name << LL_ENDL;
return FALSE;
}
- LL_DEBUGS("RenderInit") << "Applying Feature Mask: " << name << LL_ENDL;
+ LL_INFOS("RenderInit") << "Applying GPU Feature list: " << name << LL_ENDL;
return maskList(*maskp);
}
@@ -378,13 +378,16 @@ void LLFeatureManager::parseGPUTable(std::string filename)
return;
}
- std::string renderer = gGLManager.getRawGLString();
+ std::string rawRenderer = gGLManager.getRawGLString();
+ std::string renderer = rawRenderer;
for (std::string::iterator i = renderer.begin(); i != renderer.end(); ++i)
{
*i = tolower(*i);
}
-
- while (!file.eof())
+
+ bool gpuFound;
+ U32 lineNumber;
+ for (gpuFound = false, lineNumber = 0; !gpuFound && !file.eof(); lineNumber++)
{
char buffer[MAX_STRING]; /*Flawfinder: ignore*/
buffer[0] = 0;
@@ -431,6 +434,7 @@ void LLFeatureManager::parseGPUTable(std::string filename)
if (label.empty() || expr.empty() || cls.empty() || supported.empty())
{
+ LL_WARNS("RenderInit") << "invald gpu_table.txt:" << lineNumber << ": '" << buffer << "'" << LL_ENDL;
continue;
}
@@ -444,18 +448,26 @@ void LLFeatureManager::parseGPUTable(std::string filename)
if(boost::regex_search(renderer, re))
{
// if we found it, stop!
- file.close();
- LL_INFOS("RenderInit") << "GPU is " << label << llendl;
+ gpuFound = true;
mGPUString = label;
mGPUClass = (EGPUClass) strtol(cls.c_str(), NULL, 10);
mGPUSupported = (BOOL) strtol(supported.c_str(), NULL, 10);
- file.close();
- return;
}
}
file.close();
- LL_WARNS("RenderInit") << "Couldn't match GPU to a class: " << gGLManager.getRawGLString() << LL_ENDL;
+ if ( gpuFound )
+ {
+ LL_INFOS("RenderInit") << "GPU '" << rawRenderer << "' recognized as '" << mGPUString << "'" << LL_ENDL;
+ if (!mGPUSupported)
+ {
+ LL_INFOS("RenderInit") << "GPU '" << mGPUString << "' is not supported." << LL_ENDL;
+ }
+ }
+ else
+ {
+ LL_WARNS("RenderInit") << "GPU '" << rawRenderer << "' not recognized" << LL_ENDL;
+ }
}
// responder saves table into file
@@ -729,6 +741,10 @@ void LLFeatureManager::applyBaseMasks()
{
maskFeatures("ATI");
}
+ if (gGLManager.mHasATIMemInfo && gGLManager.mVRAM < 256)
+ {
+ maskFeatures("ATIVramLT256");
+ }
if (gGLManager.mATIOldDriver)
{
maskFeatures("ATIOldDriver");
@@ -745,6 +761,14 @@ void LLFeatureManager::applyBaseMasks()
{
maskFeatures("OpenGLPre15");
}
+ if (gGLManager.mGLVersion < 3.f)
+ {
+ maskFeatures("OpenGLPre30");
+ }
+ if (gGLManager.mNumTextureImageUnits <= 8)
+ {
+ maskFeatures("TexUnit8orLess");
+ }
// now mask by gpu string
// Replaces ' ' with '_' in mGPUString to deal with inability for parser to handle spaces