summaryrefslogtreecommitdiff
path: root/indra/newview/llfeaturemanager.cpp
diff options
context:
space:
mode:
authordolphin <dolphin@lindenlab.com>2013-01-02 09:47:17 -0800
committerdolphin <dolphin@lindenlab.com>2013-01-02 09:47:17 -0800
commite018720278af674528f43acc40af40a1d3d64e7d (patch)
tree8f5e789148654315283d9ac5b74f89c15a7fa42d /indra/newview/llfeaturemanager.cpp
parent179e944f45476e03eb7b828e427f9d299529ad12 (diff)
parentcd1871d2e39bfee8a6e5bc61ece40a764ff7cdb4 (diff)
Merge
Diffstat (limited to 'indra/newview/llfeaturemanager.cpp')
-rw-r--r--indra/newview/llfeaturemanager.cpp37
1 files changed, 23 insertions, 14 deletions
diff --git a/indra/newview/llfeaturemanager.cpp b/indra/newview/llfeaturemanager.cpp
index 6f11d4d4ca..2b39b771e7 100644
--- a/indra/newview/llfeaturemanager.cpp
+++ b/indra/newview/llfeaturemanager.cpp
@@ -419,7 +419,7 @@ void LLFeatureManager::parseGPUTable(std::string filename)
// setup the tokenizer
std::string buf(buffer);
- std::string cls, label, expr, supported;
+ std::string cls, label, expr, supported, stats_based, expected_gl_version;
boost_tokenizer tokens(buf, boost::char_separator<char>("\t\n"));
boost_tokenizer::iterator token_iter = tokens.begin();
@@ -440,6 +440,14 @@ void LLFeatureManager::parseGPUTable(std::string filename)
{
supported = *token_iter++;
}
+ if (token_iter != tokens.end())
+ {
+ stats_based = *token_iter++;
+ }
+ if (token_iter != tokens.end())
+ {
+ expected_gl_version = *token_iter++;
+ }
if (label.empty() || expr.empty() || cls.empty() || supported.empty())
{
@@ -450,7 +458,9 @@ void LLFeatureManager::parseGPUTable(std::string filename)
json << "{'label' : '" << label << "',\n" <<
"'regexp' : '" << expr << "',\n" <<
"'class' : '" << cls << "',\n" <<
- "'supported' : '" << supported << "'\n},\n";
+ "'supported' : '" << supported << "',\n" <<
+ "'stats_based' : " << stats_based << ",\n" <<
+ "'gl_version' : " << expected_gl_version << "\n},\n";
#endif
for (U32 i = 0; i < expr.length(); i++) /*Flawfinder: ignore*/
@@ -489,6 +499,10 @@ void LLFeatureManager::parseGPUTable(std::string filename)
{
LL_WARNS("RenderInit") << "GPU '" << rawRenderer << "' not recognized" << LL_ENDL;
}
+
+#if LL_DARWIN // never go over "Mid" settings by default on OS X
+ mGPUClass = llmin(mGPUClass, GPU_CLASS_2);
+#endif
}
// responder saves table into file
@@ -698,32 +712,27 @@ void LLFeatureManager::setGraphicsLevel(S32 level, bool skipFeatures)
{ //same as low, but with "Basic Shaders" enabled
maskFeatures("Low");
}
- maskFeatures("Class0");
break;
case 1:
- maskFeatures("Mid");
- maskFeatures("Class1");
+ maskFeatures("LowMid");
break;
case 2:
- maskFeatures("High");
- maskFeatures("Class2");
+ maskFeatures("Mid");
break;
case 3:
- maskFeatures("High");
- maskFeatures("Class3");
+ maskFeatures("MidHigh");
break;
case 4:
maskFeatures("High");
- maskFeatures("Class4");
break;
case 5:
- maskFeatures("High");
- maskFeatures("Class5");
+ maskFeatures("HighUltra");
+ break;
+ case 6:
+ maskFeatures("Ultra");
break;
-
default:
maskFeatures("Low");
- maskFeatures("Class0");
break;
}