diff options
Diffstat (limited to 'indra/newview/llfeaturemanager.cpp')
-rw-r--r-- | indra/newview/llfeaturemanager.cpp | 24 |
1 files changed, 16 insertions, 8 deletions
diff --git a/indra/newview/llfeaturemanager.cpp b/indra/newview/llfeaturemanager.cpp index 4e16cc4217..bd8549635d 100644 --- a/indra/newview/llfeaturemanager.cpp +++ b/indra/newview/llfeaturemanager.cpp @@ -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,22 @@ 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; + } + else + { + LL_WARNS("RenderInit") << "GPU '" << rawRenderer << "' not recognized" << LL_ENDL; + } } // responder saves table into file |