From 9eeb8344a6dd8721ebc85463e966b05a9b034381 Mon Sep 17 00:00:00 2001 From: Graham Linden Date: Mon, 17 Nov 2014 11:40:28 -0800 Subject: Avoid using GL_ARB_timer_query functionality when not supported and protect against probably-not-NULL current bound shader pointer --- indra/newview/llglsandbox.cpp | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llglsandbox.cpp b/indra/newview/llglsandbox.cpp index 4b8ac2b3cf..7cf17c90e9 100755 --- a/indra/newview/llglsandbox.cpp +++ b/indra/newview/llglsandbox.cpp @@ -954,7 +954,7 @@ F32 gpu_benchmark() //make a dummy triangle to draw with LLPointer buff = new LLVertexBuffer(LLVertexBuffer::MAP_VERTEX | LLVertexBuffer::MAP_TEXCOORD0, GL_STATIC_DRAW_ARB); - buff->allocateBuffer(3, 0, true); + buff->allocateBuffer(12, 0, true); LLStrider v; LLStrider tc; @@ -964,6 +964,16 @@ F32 gpu_benchmark() v[0].set(-1,1,0); v[1].set(-1,-3,0); v[2].set(3,1,0); + v[3].set(-1,1,0); + v[4].set(-1,-3,0); + v[5].set(3,1,0); + v[6].set(-1,1,0); + v[7].set(-1,-3,0); + v[8].set(3,1,0); + v[9].set(-1,1,0); + v[10].set(-1,-3,0); + v[11].set(3,1,0); + buff->flush(); gBenchmarkProgram.bind(); @@ -983,7 +993,7 @@ F32 gpu_benchmark() { dest[i].bindTarget(); gGL.getTexUnit(0)->bindManual(LLTexUnit::TT_TEXTURE, source[i]); - buff->drawArrays(LLRender::TRIANGLES, 0, 3); + buff->drawArrays(LLRender::TRIANGLES, 0, 12); dest[i].flush(); } -- cgit v1.2.3 From de2fe42a5277d1c9609372ac395767ca976d94e7 Mon Sep 17 00:00:00 2001 From: Graham Linden Date: Mon, 17 Nov 2014 14:54:00 -0800 Subject: Attempt wider disable of using profile API when timer query is not present --- indra/newview/llglsandbox.cpp | 26 ++++++++++++++++++-------- 1 file changed, 18 insertions(+), 8 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llglsandbox.cpp b/indra/newview/llglsandbox.cpp index 7cf17c90e9..687838a344 100755 --- a/indra/newview/llglsandbox.cpp +++ b/indra/newview/llglsandbox.cpp @@ -920,7 +920,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]; @@ -977,15 +980,18 @@ F32 gpu_benchmark() buff->flush(); gBenchmarkProgram.bind(); - buff->setBuffer(LLVertexBuffer::MAP_VERTEX); - - //wait for any previoius GL commands to finish - glFinish(); bool busted_finish = false; + LL_INFOS() << "GPU BENCHMARK START." << LL_ENDL; + for (S32 c = -1; c < samples; ++c) { + buff->setBuffer(LLVertexBuffer::MAP_VERTEX); + glFinish(); + + LL_INFOS() << "GPU BENCHMARK ITERATION." << LL_ENDL; + LLTimer timer; timer.start(); @@ -1023,9 +1029,11 @@ 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_INFOS() << "GPU BENCHMARK DETECTED GL DRIVER WITH NOT SO MUCH WORKING glFinish." << LL_ENDL; } else { + LL_INFOS() << "GPU BENCHMARK ESTIMATE." << gbps << " Gbps" << LL_ENDL; results.push_back(gbps); } } @@ -1033,10 +1041,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()); -- cgit v1.2.3 From a882d7a02b9e8a58cdbfa945682a313718886ab4 Mon Sep 17 00:00:00 2001 From: Graham Linden Date: Tue, 18 Nov 2014 12:54:13 -0800 Subject: Fix for gpu_bench crash without parallels knock-on --- indra/newview/llflickrconnect.cpp | 2 +- indra/newview/llfloatergroupbulkban.cpp | 2 +- indra/newview/llglsandbox.cpp | 35 +++++++++++---------------------- indra/newview/lllogchat.cpp | 2 +- indra/newview/llpanelgroupbulk.cpp | 2 +- indra/newview/llpanelgroupinvite.cpp | 2 +- indra/newview/lltwitterconnect.cpp | 2 +- 7 files changed, 18 insertions(+), 29 deletions(-) (limited to 'indra/newview') 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 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 687838a344..08ec8031e8 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(); @@ -983,15 +984,11 @@ F32 gpu_benchmark() bool busted_finish = false; - LL_INFOS() << "GPU BENCHMARK START." << LL_ENDL; - for (S32 c = -1; c < samples; ++c) { buff->setBuffer(LLVertexBuffer::MAP_VERTEX); glFinish(); - LL_INFOS() << "GPU BENCHMARK ITERATION." << LL_ENDL; - LLTimer timer; timer.start(); @@ -1029,11 +1026,10 @@ 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_INFOS() << "GPU BENCHMARK DETECTED GL DRIVER WITH NOT SO MUCH WORKING glFinish." << LL_ENDL; + LL_INFOS() << "GPU Benchmark detected GL driver with broken glFinish implementation. Neat." << LL_ENDL; } else { - LL_INFOS() << "GPU BENCHMARK ESTIMATE." << gbps << " Gbps" << LL_ENDL; results.push_back(gbps); } } @@ -1063,21 +1059,14 @@ F32 gpu_benchmark() } #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 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; } -- cgit v1.2.3 From a730187a5fb3624bd18327545a9f50f5b26599ba Mon Sep 17 00:00:00 2001 From: Graham Linden Date: Tue, 18 Nov 2014 15:28:29 -0800 Subject: Adjust gpu_bench thresholds and move VB set outside loop again for speed --- indra/newview/llfeaturemanager.cpp | 12 ++++++------ indra/newview/llglsandbox.cpp | 6 +++--- 2 files changed, 9 insertions(+), 9 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llfeaturemanager.cpp b/indra/newview/llfeaturemanager.cpp index 4db0422634..f081d5c36c 100755 --- a/indra/newview/llfeaturemanager.cpp +++ b/indra/newview/llfeaturemanager.cpp @@ -452,23 +452,23 @@ bool LLFeatureManager::loadGPUClass() } #endif } - else if (gbps < 5.f) + else if (gbps < 4.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 < 24.f) { mGPUClass = GPU_CLASS_3; } - else if (gbps < 80.f) + else if (gbps < 30.f) { mGPUClass = GPU_CLASS_4; } @@ -476,7 +476,7 @@ bool LLFeatureManager::loadGPUClass() { mGPUClass = GPU_CLASS_5; } - + // defaults mGPUString = gGLManager.getRawGLString(); mGPUSupported = TRUE; diff --git a/indra/newview/llglsandbox.cpp b/indra/newview/llglsandbox.cpp index 08ec8031e8..04429ddd75 100755 --- a/indra/newview/llglsandbox.cpp +++ b/indra/newview/llglsandbox.cpp @@ -984,11 +984,11 @@ F32 gpu_benchmark() bool busted_finish = false; + buff->setBuffer(LLVertexBuffer::MAP_VERTEX); + glFinish(); + for (S32 c = -1; c < samples; ++c) { - buff->setBuffer(LLVertexBuffer::MAP_VERTEX); - glFinish(); - LLTimer timer; timer.start(); -- cgit v1.2.3 From aa49386c44b1379ee095a6e528b1a392a1c0e8da Mon Sep 17 00:00:00 2001 From: Graham Linden Date: Wed, 19 Nov 2014 11:28:04 -0800 Subject: Roll back changes to geo drawn in gpu_bench to stop punishing cards with low fill rate --- indra/newview/llglsandbox.cpp | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llglsandbox.cpp b/indra/newview/llglsandbox.cpp index 04429ddd75..cc43f787d8 100755 --- a/indra/newview/llglsandbox.cpp +++ b/indra/newview/llglsandbox.cpp @@ -958,7 +958,7 @@ F32 gpu_benchmark() //make a dummy triangle to draw with LLPointer buff = new LLVertexBuffer(LLVertexBuffer::MAP_VERTEX | LLVertexBuffer::MAP_TEXCOORD0, GL_STATIC_DRAW_ARB); - buff->allocateBuffer(12, 0, true); + buff->allocateBuffer(3, 0, true); LLStrider v; LLStrider tc; @@ -968,15 +968,6 @@ F32 gpu_benchmark() v[0].set(-1,1,0); v[1].set(-1,-3,0); v[2].set(3,1,0); - v[3].set(-1,1,0); - v[4].set(-1,-3,0); - v[5].set(3,1,0); - v[6].set(-1,1,0); - v[7].set(-1,-3,0); - v[8].set(3,1,0); - v[9].set(-1,1,0); - v[10].set(-1,-3,0); - v[11].set(3,1,0); buff->flush(); @@ -996,7 +987,7 @@ F32 gpu_benchmark() { dest[i].bindTarget(); gGL.getTexUnit(0)->bindManual(LLTexUnit::TT_TEXTURE, source[i]); - buff->drawArrays(LLRender::TRIANGLES, 0, 12); + buff->drawArrays(LLRender::TRIANGLES, 0, 3); dest[i].flush(); } -- cgit v1.2.3 From d8040ad4340a1b76caa6b31f2d5c8a117d83b692 Mon Sep 17 00:00:00 2001 From: Graham Linden Date: Thu, 20 Nov 2014 12:13:36 -0800 Subject: Put back old thresholds to try to get better match on old/new identification per-card --- indra/newview/llfeaturemanager.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llfeaturemanager.cpp b/indra/newview/llfeaturemanager.cpp index f081d5c36c..bc8fcb54bb 100755 --- a/indra/newview/llfeaturemanager.cpp +++ b/indra/newview/llfeaturemanager.cpp @@ -452,23 +452,23 @@ bool LLFeatureManager::loadGPUClass() } #endif } - else if (gbps < 4.f) + else if (gbps < 5.f) { mGPUClass = GPU_CLASS_0; } - else if (gbps < 8.f) + else if (gbps < 10.f) { mGPUClass = GPU_CLASS_1; } - else if (gbps < 16.f) + else if (gbps < 20.f) { mGPUClass = GPU_CLASS_2; } - else if (gbps < 24.f) + else if (gbps < 40.f) { mGPUClass = GPU_CLASS_3; } - else if (gbps < 30.f) + else if (gbps < 80.f) { mGPUClass = GPU_CLASS_4; } -- cgit v1.2.3 From acd0a5ed00872777e0fd6a3a5bd361232cfa3f6b Mon Sep 17 00:00:00 2001 From: Graham Linden Date: Fri, 21 Nov 2014 11:15:39 -0800 Subject: Tweak conversion from tested bandwidth to get better reads on low-end systems --- indra/newview/llfeaturemanager.cpp | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llfeaturemanager.cpp b/indra/newview/llfeaturemanager.cpp index bc8fcb54bb..4df67fcc88 100755 --- a/indra/newview/llfeaturemanager.cpp +++ b/indra/newview/llfeaturemanager.cpp @@ -452,15 +452,23 @@ bool LLFeatureManager::loadGPUClass() } #endif } + 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 < 16.f) { mGPUClass = GPU_CLASS_1; } - else if (gbps < 20.f) + else if (gbps < 32.f) { mGPUClass = GPU_CLASS_2; } -- cgit v1.2.3 From 4ee98e1fc9aee96bad58370c5e2bd5e2a1af7b4b Mon Sep 17 00:00:00 2001 From: Graham Linden Date: Mon, 24 Nov 2014 15:30:11 -0800 Subject: Attempt to thread needle for guesstimation phase of GPU classification --- indra/newview/llfeaturemanager.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llfeaturemanager.cpp b/indra/newview/llfeaturemanager.cpp index 4df67fcc88..fdd951e720 100755 --- a/indra/newview/llfeaturemanager.cpp +++ b/indra/newview/llfeaturemanager.cpp @@ -452,31 +452,31 @@ bool LLFeatureManager::loadGPUClass() } #endif } - else if (gGLManager.mGLVersion < 2.f) + else if (gGLManager.mGLVersion <= 2.f) { mGPUClass = GPU_CLASS_0; } - else if (gGLManager.mGLVersion < 3.f) + else if (gGLManager.mGLVersion <= 3.f) { mGPUClass = GPU_CLASS_1; } - else if (gbps < 5.f) + else if (gbps <= 5.f) { mGPUClass = GPU_CLASS_0; } - else if (gbps < 16.f) + else if (gbps <= 8.f) { mGPUClass = GPU_CLASS_1; } - else if (gbps < 32.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; } -- cgit v1.2.3 From cd4babf94b8d29efcf1a03a13bde0d44138dde7b Mon Sep 17 00:00:00 2001 From: Oz Linden Date: Mon, 1 Dec 2014 16:58:07 -0500 Subject: remove unused gpu table code, improve logging for gpu benchmarks --- indra/newview/llfeaturemanager.cpp | 201 +------------------------------------ indra/newview/llfeaturemanager.h | 3 - indra/newview/llglsandbox.cpp | 4 +- 3 files changed, 4 insertions(+), 204 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llfeaturemanager.cpp b/indra/newview/llfeaturemanager.cpp index fdd951e720..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) @@ -489,190 +487,10 @@ bool LLFeatureManager::loadGPUClass() 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("\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 { @@ -753,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/llglsandbox.cpp b/indra/newview/llglsandbox.cpp index cc43f787d8..64f796e1fd 100755 --- a/indra/newview/llglsandbox.cpp +++ b/indra/newview/llglsandbox.cpp @@ -1017,7 +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_INFOS() << "GPU Benchmark detected GL driver with broken glFinish implementation. Neat." << LL_ENDL; + LL_WARNS() << "GPU Benchmark detected GL driver with broken glFinish implementation." << LL_ENDL; } else { @@ -1044,7 +1044,7 @@ 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; } -- cgit v1.2.3 From 6d48db868f7459fcf5f0e89d830a844e409d4163 Mon Sep 17 00:00:00 2001 From: Oz Linden Date: Fri, 5 Dec 2014 15:46:08 -0500 Subject: increment viewer version to 3.7.23 --- indra/newview/VIEWER_VERSION.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/newview') 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 -- cgit v1.2.3