summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
authorsimon <none@none>2014-12-08 11:52:17 -0800
committersimon <none@none>2014-12-08 11:52:17 -0800
commitc3e18bc5378411089bbf76905febd73573a1891f (patch)
tree02cbb60258c9b95cab55b1f9a0743fdade877ebf /indra/newview
parente8ea1a19afb4a33c33fff6ea7fb822433b179ae6 (diff)
parentffb510a4522d91e387d26a674b0cc9ff732c44b8 (diff)
Merge downstream code and become version 3.7.23
Diffstat (limited to 'indra/newview')
-rw-r--r--indra/newview/VIEWER_VERSION.txt2
-rwxr-xr-xindra/newview/llfeaturemanager.cpp221
-rwxr-xr-xindra/newview/llfeaturemanager.h3
-rw-r--r--indra/newview/llflickrconnect.cpp2
-rw-r--r--indra/newview/llfloatergroupbulkban.cpp2
-rwxr-xr-xindra/newview/llglsandbox.cpp52
-rwxr-xr-xindra/newview/lllogchat.cpp2
-rw-r--r--indra/newview/llpanelgroupbulk.cpp2
-rwxr-xr-xindra/newview/llpanelgroupinvite.cpp2
-rw-r--r--indra/newview/lltwitterconnect.cpp2
10 files changed, 49 insertions, 241 deletions
diff --git a/indra/newview/VIEWER_VERSION.txt b/indra/newview/VIEWER_VERSION.txt
index b49c354524..a4de059bbc 100644
--- a/indra/newview/VIEWER_VERSION.txt
+++ b/indra/newview/VIEWER_VERSION.txt
@@ -1 +1 @@
-3.7.22
+3.7.23
diff --git a/indra/newview/llfeaturemanager.cpp b/indra/newview/llfeaturemanager.cpp
index 4db0422634..d89599cb45 100755
--- a/indra/newview/llfeaturemanager.cpp
+++ b/indra/newview/llfeaturemanager.cpp
@@ -76,9 +76,6 @@ const char FEATURE_TABLE_FILENAME[] = "featuretable%s.txt";
const char FEATURE_TABLE_VER_FILENAME[] = "featuretable%s.%s.txt";
#endif
-const char GPU_TABLE_FILENAME[] = "gpu_table.txt";
-const char GPU_TABLE_VER_FILENAME[] = "gpu_table.%s.txt";
-
LLFeatureInfo::LLFeatureInfo(const std::string& name, const BOOL available, const F32 level)
: mValid(TRUE), mName(name), mAvailable(available), mRecommendedLevel(level)
{
@@ -428,6 +425,7 @@ bool LLFeatureManager::loadGPUClass()
{ //couldn't bench, use GLVersion
#if LL_DARWIN
//GLVersion is misleading on OSX, just default to class 3 if we can't bench
+ LL_WARNS() << "Unable to get an accurate benchmark; defaulting to class 3" << LL_ENDL;
mGPUClass = GPU_CLASS_3;
#else
if (gGLManager.mGLVersion < 2.f)
@@ -452,23 +450,31 @@ bool LLFeatureManager::loadGPUClass()
}
#endif
}
- else if (gbps < 5.f)
+ else if (gGLManager.mGLVersion <= 2.f)
+ {
+ mGPUClass = GPU_CLASS_0;
+ }
+ else if (gGLManager.mGLVersion <= 3.f)
+ {
+ mGPUClass = GPU_CLASS_1;
+ }
+ else if (gbps <= 5.f)
{
mGPUClass = GPU_CLASS_0;
}
- else if (gbps < 10.f)
+ else if (gbps <= 8.f)
{
mGPUClass = GPU_CLASS_1;
}
- else if (gbps < 20.f)
+ else if (gbps <= 16.f)
{
mGPUClass = GPU_CLASS_2;
}
- else if (gbps < 40.f)
+ else if (gbps <= 40.f)
{
mGPUClass = GPU_CLASS_3;
}
- else if (gbps < 80.f)
+ else if (gbps <= 80.f)
{
mGPUClass = GPU_CLASS_4;
}
@@ -476,195 +482,15 @@ bool LLFeatureManager::loadGPUClass()
{
mGPUClass = GPU_CLASS_5;
}
-
+
// defaults
mGPUString = gGLManager.getRawGLString();
mGPUSupported = TRUE;
-#if 0
- // first table is in the app dir
- std::string app_path = gDirUtilp->getAppRODataDir();
- app_path += gDirUtilp->getDirDelimiter();
- app_path += GPU_TABLE_FILENAME;
-
- // second table is downloaded with HTTP
- std::string http_filename = llformat(GPU_TABLE_VER_FILENAME, LLVersionInfo::getVersion().c_str());
- std::string http_path = gDirUtilp->getExpandedFilename(LL_PATH_USER_SETTINGS, http_filename);
-
- // use HTTP table if it exists
- std::string path;
- bool parse_ok = false;
- if (gDirUtilp->fileExists(http_path))
- {
- parse_ok = parseGPUTable(http_path);
- if (!parse_ok)
- {
- // the HTTP table failed to parse, so delete it
- LLFile::remove(http_path);
- LL_WARNS("RenderInit") << "Removed invalid gpu table '" << http_path << "'" << LL_ENDL;
- }
- }
-
- if (!parse_ok)
- {
- parse_ok = parseGPUTable(app_path);
- }
-#endif
- return true; // indicates that the file parsed correctly, not that the gpu was recognized
+ return true; // indicates that a gpu value was established
}
-bool LLFeatureManager::parseGPUTable(std::string filename)
-{
- llifstream file;
-
- LL_INFOS("RenderInit") << "Attempting to parse GPU table from " << filename << LL_ENDL;
- file.open(filename);
-
- if (file)
- {
- const char recognizer[] = "//GPU_TABLE";
- char first_line[MAX_STRING];
- file.getline(first_line, MAX_STRING);
- if (0 != strncmp(first_line, recognizer, strlen(recognizer)))
- {
- LL_WARNS("RenderInit") << "Invalid GPU table: " << filename << "!" << LL_ENDL;
- return false;
- }
- }
- else
- {
- LL_WARNS("RenderInit") << "Unable to open GPU table: " << filename << "!" << LL_ENDL;
- return false;
- }
-
- std::string rawRenderer = gGLManager.getRawGLString();
- std::string renderer = rawRenderer;
- for (std::string::iterator i = renderer.begin(); i != renderer.end(); ++i)
- {
- *i = tolower(*i);
- }
-
-#if LL_EXPORT_GPU_TABLE
- llofstream json;
- json.open("gpu_table.json");
-
- json << "var gpu_table = [" << std::endl;
-#endif
-
- bool gpuFound;
- U32 lineNumber;
- for (gpuFound = false, lineNumber = 0; !gpuFound && !file.eof(); lineNumber++)
- {
- char buffer[MAX_STRING]; /*Flawfinder: ignore*/
- buffer[0] = 0;
-
- file.getline(buffer, MAX_STRING);
-
- if (strlen(buffer) >= 2 && /*Flawfinder: ignore*/
- buffer[0] == '/' &&
- buffer[1] == '/')
- {
- // This is a comment.
- continue;
- }
-
- if (strlen(buffer) == 0) /*Flawfinder: ignore*/
- {
- // This is a blank line
- continue;
- }
-
- // setup the tokenizer
- std::string buf(buffer);
- 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();
-
- // grab the label, pseudo regular expression, and class
- if(token_iter != tokens.end())
- {
- label = *token_iter++;
- }
- if(token_iter != tokens.end())
- {
- expr = *token_iter++;
- }
- if(token_iter != tokens.end())
- {
- cls = *token_iter++;
- }
- if(token_iter != tokens.end())
- {
- 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())
- {
- LL_WARNS("RenderInit") << "invald gpu_table.txt:" << lineNumber << ": '" << buffer << "'" << LL_ENDL;
- continue;
- }
-#if LL_EXPORT_GPU_TABLE
- json << "{'label' : '" << label << "',\n" <<
- "'regexp' : '" << expr << "',\n" <<
- "'class' : '" << cls << "',\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*/
- {
- expr[i] = tolower(expr[i]);
- }
-
- // run the regular expression against the renderer
- boost::regex re(expr.c_str());
- if(boost::regex_search(renderer, re))
- {
- // if we found it, stop!
-#if !LL_EXPORT_GPU_TABLE
- gpuFound = true;
-#endif
- mGPUString = label;
- mGPUClass = (EGPUClass) strtol(cls.c_str(), NULL, 10);
- mGPUSupported = (BOOL) strtol(supported.c_str(), NULL, 10);
- sscanf(expected_gl_version.c_str(), "%f", &mExpectedGLVersion);
- }
- }
-#if LL_EXPORT_GPU_TABLE
- json << "];\n\n";
- json.close();
-#endif
- file.close();
-
- 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;
- }
-
-#if LL_DARWIN // never go over "Mid" settings by default on OS X
- mGPUClass = llmin(mGPUClass, GPU_CLASS_2);
-#endif
- return true;
-}
-
// responder saves table into file
class LLHTTPFeatureTableResponder : public LLHTTPClient::Responder
{
@@ -745,26 +571,11 @@ void fetch_feature_table(std::string table)
LLHTTPClient::get(url, new LLHTTPFeatureTableResponder(path));
}
-void fetch_gpu_table(std::string table)
-{
- const std::string base = gSavedSettings.getString("FeatureManagerHTTPTable");
-
- const std::string filename = llformat(table.c_str(), LLVersionInfo::getVersion().c_str());
-
- const std::string url = base + "/" + filename;
-
- const std::string path = gDirUtilp->getExpandedFilename(LL_PATH_USER_SETTINGS, filename);
-
- LL_INFOS() << "LLFeatureManager fetching " << url << " into " << path << LL_ENDL;
-
- LLHTTPClient::get(url, new LLHTTPFeatureTableResponder(path));
-}
// fetch table(s) from a website (S3)
void LLFeatureManager::fetchHTTPTables()
{
fetch_feature_table(FEATURE_TABLE_VER_FILENAME);
- fetch_gpu_table(GPU_TABLE_VER_FILENAME);
}
diff --git a/indra/newview/llfeaturemanager.h b/indra/newview/llfeaturemanager.h
index 95141b241d..69078ccc21 100755
--- a/indra/newview/llfeaturemanager.h
+++ b/indra/newview/llfeaturemanager.h
@@ -162,9 +162,6 @@ protected:
bool parseFeatureTable(std::string filename);
///< @returns TRUE is file parsed correctly, FALSE if not
- bool parseGPUTable(std::string filename);
- ///< @returns true if file parsed correctly, false if not - does not reflect whether or not the gpu was recognized
-
void initBaseMask();
diff --git a/indra/newview/llflickrconnect.cpp b/indra/newview/llflickrconnect.cpp
index b715896264..b75660ea00 100644
--- a/indra/newview/llflickrconnect.cpp
+++ b/indra/newview/llflickrconnect.cpp
@@ -400,7 +400,7 @@ void LLFlickrConnect::uploadPhoto(LLPointer<LLImageFormatted> image, const std::
}
else
{
- llwarns << "Image to upload is not a PNG or JPEG" << llendl;
+ LL_WARNS() << "Image to upload is not a PNG or JPEG" << LL_ENDL;
return;
}
diff --git a/indra/newview/llfloatergroupbulkban.cpp b/indra/newview/llfloatergroupbulkban.cpp
index 54a2283b13..44074047a7 100644
--- a/indra/newview/llfloatergroupbulkban.cpp
+++ b/indra/newview/llfloatergroupbulkban.cpp
@@ -101,7 +101,7 @@ void LLFloaterGroupBulkBan::showForGroup(const LLUUID& group_id, uuid_vec_t* age
// Make sure group_id isn't null
if (group_id.isNull())
{
- llwarns << "LLFloaterGroupInvite::showForGroup with null group_id!" << llendl;
+ LL_WARNS() << "LLFloaterGroupInvite::showForGroup with null group_id!" << LL_ENDL;
return;
}
diff --git a/indra/newview/llglsandbox.cpp b/indra/newview/llglsandbox.cpp
index 4b8ac2b3cf..64f796e1fd 100755
--- a/indra/newview/llglsandbox.cpp
+++ b/indra/newview/llglsandbox.cpp
@@ -881,13 +881,14 @@ void LLViewerObjectList::renderObjectBeacons()
F32 gpu_benchmark()
{
- if (!gGLManager.mHasShaderObjects)
- { //don't bother benchmarking the fixed function
+ if (!gGLManager.mHasShaderObjects || !gGLManager.mHasTimerQuery)
+ { // don't bother benchmarking the fixed function
+ // or venerable drivers which don't support accurate timing anyway
+ // and are likely to be correctly identified by the GPU table already.
return -1.f;
}
-
- if (gBenchmarkProgram.mProgramObject == 0)
+ if (gBenchmarkProgram.mProgramObject == 0)
{
LLViewerShaderMgr::instance()->initAttribsAndUniforms();
@@ -920,7 +921,10 @@ F32 gpu_benchmark()
//number of samples to take
const S32 samples = 64;
- LLGLSLShader::initProfile();
+ if (gGLManager.mHasTimerQuery)
+ {
+ LLGLSLShader::initProfile();
+ }
LLRenderTarget dest[count];
U32 source[count];
@@ -964,16 +968,16 @@ F32 gpu_benchmark()
v[0].set(-1,1,0);
v[1].set(-1,-3,0);
v[2].set(3,1,0);
+
buff->flush();
gBenchmarkProgram.bind();
- buff->setBuffer(LLVertexBuffer::MAP_VERTEX);
-
- //wait for any previoius GL commands to finish
- glFinish();
bool busted_finish = false;
+ buff->setBuffer(LLVertexBuffer::MAP_VERTEX);
+ glFinish();
+
for (S32 c = -1; c < samples; ++c)
{
LLTimer timer;
@@ -1013,6 +1017,7 @@ F32 gpu_benchmark()
if (!gGLManager.mHasTimerQuery && !busted_finish && gbps > 128.f)
{ //unrealistically high bandwidth for a card without timer queries, glFinish is probably ignored
busted_finish = true;
+ LL_WARNS() << "GPU Benchmark detected GL driver with broken glFinish implementation." << LL_ENDL;
}
else
{
@@ -1023,10 +1028,12 @@ F32 gpu_benchmark()
gBenchmarkProgram.unbind();
- LLGLSLShader::finishProfile(false);
-
- LLImageGL::deleteTextures(count, source);
+ if (gGLManager.mHasTimerQuery)
+ {
+ LLGLSLShader::finishProfile(false);
+ }
+ LLImageGL::deleteTextures(count, source);
std::sort(results.begin(), results.end());
@@ -1037,27 +1044,20 @@ F32 gpu_benchmark()
#if LL_DARWIN
if (gbps > 512.f)
{
- LL_INFOS() << "Memory bandwidth is improbably high and likely incorrect." << LL_ENDL;
+ LL_WARNS() << "Memory bandwidth is improbably high and likely incorrect; discarding result." << LL_ENDL;
//OSX is probably lying, discard result
gbps = -1.f;
}
#endif
- if (gGLManager.mHasTimerQuery)
- {
- F32 ms = gBenchmarkProgram.mTimeElapsed/1000000.f;
- F32 seconds = ms/1000.f;
+ F32 ms = gBenchmarkProgram.mTimeElapsed/1000000.f;
+ F32 seconds = ms/1000.f;
- F64 samples_drawn = res*res*count*samples;
- F32 samples_sec = (samples_drawn/1000000000.0)/seconds;
- gbps = samples_sec*8;
+ F64 samples_drawn = res*res*count*samples;
+ F32 samples_sec = (samples_drawn/1000000000.0)/seconds;
+ gbps = samples_sec*8;
- LL_INFOS() << "Memory bandwidth is " << llformat("%.3f", gbps) << "GB/sec according to ARB_timer_query" << LL_ENDL;
- }
- else
- {
- LL_INFOS() << "ARB_timer_query unavailable." << LL_ENDL;
- }
+ LL_INFOS() << "Memory bandwidth is " << llformat("%.3f", gbps) << "GB/sec according to ARB_timer_query" << LL_ENDL;
return gbps;
}
diff --git a/indra/newview/lllogchat.cpp b/indra/newview/lllogchat.cpp
index 06e517a861..cadbc16f1e 100755
--- a/indra/newview/lllogchat.cpp
+++ b/indra/newview/lllogchat.cpp
@@ -1022,7 +1022,7 @@ void LLLoadHistoryThread::run()
{
loadHistory(mFileName, mMessages, mLoadParams);
int count = mMessages->size();
- llinfos << "mMessages->size(): " << count << llendl;
+ LL_INFOS() << "mMessages->size(): " << count << LL_ENDL;
setFinished();
}
}
diff --git a/indra/newview/llpanelgroupbulk.cpp b/indra/newview/llpanelgroupbulk.cpp
index 1eafc5bd64..76792cc6fd 100644
--- a/indra/newview/llpanelgroupbulk.cpp
+++ b/indra/newview/llpanelgroupbulk.cpp
@@ -387,7 +387,7 @@ void LLPanelGroupBulk::addUsers(uuid_vec_t& agent_ids)
}
else
{
- llwarns << "llPanelGroupBulk: Selected avatar has no name: " << dest->getID() << llendl;
+ LL_WARNS() << "llPanelGroupBulk: Selected avatar has no name: " << dest->getID() << LL_ENDL;
names.push_back("(Unknown)");
}
}
diff --git a/indra/newview/llpanelgroupinvite.cpp b/indra/newview/llpanelgroupinvite.cpp
index 236ad861a5..e662a05dfc 100755
--- a/indra/newview/llpanelgroupinvite.cpp
+++ b/indra/newview/llpanelgroupinvite.cpp
@@ -492,7 +492,7 @@ void LLPanelGroupInvite::addUsers(uuid_vec_t& agent_ids)
}
else
{
- llwarns << "llPanelGroupInvite: Selected avatar has no name: " << dest->getID() << llendl;
+ LL_WARNS() << "llPanelGroupInvite: Selected avatar has no name: " << dest->getID() << LL_ENDL;
names.push_back("(Unknown)");
}
}
diff --git a/indra/newview/lltwitterconnect.cpp b/indra/newview/lltwitterconnect.cpp
index 7088558b83..e983bc883f 100644
--- a/indra/newview/lltwitterconnect.cpp
+++ b/indra/newview/lltwitterconnect.cpp
@@ -397,7 +397,7 @@ void LLTwitterConnect::uploadPhoto(LLPointer<LLImageFormatted> image, const std:
}
else
{
- llwarns << "Image to upload is not a PNG or JPEG" << llendl;
+ LL_WARNS() << "Image to upload is not a PNG or JPEG" << LL_ENDL;
return;
}