diff options
Diffstat (limited to 'indra/newview/llfeaturemanager.cpp')
-rw-r--r-- | indra/newview/llfeaturemanager.cpp | 112 |
1 files changed, 61 insertions, 51 deletions
diff --git a/indra/newview/llfeaturemanager.cpp b/indra/newview/llfeaturemanager.cpp index ae4ce298a0..ce949fa1bf 100644 --- a/indra/newview/llfeaturemanager.cpp +++ b/indra/newview/llfeaturemanager.cpp @@ -403,70 +403,80 @@ F32 gpu_benchmark(); bool LLFeatureManager::loadGPUClass() { - //get memory bandwidth from benchmark - F32 gbps = gpu_benchmark(); - - if (gbps < 0.f) - { //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) + if (!gSavedSettings.getBOOL("SkipBenchmark")) + { + //get memory bandwidth from benchmark + F32 gbps = gpu_benchmark(); + + if (gbps < 0.f) + { //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("RenderInit") << "Unable to get an accurate benchmark; defaulting to class 3" << LL_ENDL; + mGPUClass = GPU_CLASS_3; + #else + if (gGLManager.mGLVersion < 2.f) + { + mGPUClass = GPU_CLASS_0; + } + else if (gGLManager.mGLVersion < 3.f) + { + mGPUClass = GPU_CLASS_1; + } + else if (gGLManager.mGLVersion < 3.3f) + { + mGPUClass = GPU_CLASS_2; + } + else if (gGLManager.mGLVersion < 4.f) + { + mGPUClass = GPU_CLASS_3; + } + else + { + mGPUClass = GPU_CLASS_4; + } + #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 (gGLManager.mGLVersion < 3.f) + else if (gbps <= 8.f) { mGPUClass = GPU_CLASS_1; } - else if (gGLManager.mGLVersion < 3.3f) + else if (gbps <= 16.f) { mGPUClass = GPU_CLASS_2; } - else if (gGLManager.mGLVersion < 4.f) + else if (gbps <= 40.f) { mGPUClass = GPU_CLASS_3; } - else + else if (gbps <= 80.f) { mGPUClass = GPU_CLASS_4; } -#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 <= 8.f) + else + { + mGPUClass = GPU_CLASS_5; + } + } //end if benchmark + else { + //setting says don't benchmark MAINT-7558 + LL_WARNS("RenderInit") << "Setting 'SkipBenchmark' is true; defaulting to class 1 (may be required for some GPUs)" << LL_ENDL; + mGPUClass = GPU_CLASS_1; } - else if (gbps <= 16.f) - { - mGPUClass = GPU_CLASS_2; - } - else if (gbps <= 40.f) - { - mGPUClass = GPU_CLASS_3; - } - else if (gbps <= 80.f) - { - mGPUClass = GPU_CLASS_4; - } - else - { - mGPUClass = GPU_CLASS_5; - } // defaults mGPUString = gGLManager.getRawGLString(); @@ -610,7 +620,7 @@ void LLFeatureManager::applyFeatures(bool skipFeatures) LLControlVariable* ctrl = gSavedSettings.getControl(mIt->first); if(ctrl == NULL) { - LL_WARNS() << "AHHH! Control setting " << mIt->first << " does not exist!" << LL_ENDL; + LL_WARNS("RenderInit") << "AHHH! Control setting " << mIt->first << " does not exist!" << LL_ENDL; continue; } @@ -633,7 +643,7 @@ void LLFeatureManager::applyFeatures(bool skipFeatures) } else { - LL_WARNS() << "AHHH! Control variable is not a numeric type!" << LL_ENDL; + LL_WARNS("RenderInit") << "AHHH! Control variable is not a numeric type!" << LL_ENDL; } } } @@ -789,7 +799,7 @@ void LLFeatureManager::applyBaseMasks() maskFeatures(gpustr); // now mask cpu type ones - if (gSysMemory.getPhysicalMemoryClamped() <= U32Megabytes(256)) + if (gSysMemory.getPhysicalMemoryKB() <= U32Megabytes(256)) { maskFeatures("RAM256MB"); } @@ -840,7 +850,7 @@ LLSD LLFeatureManager::getRecommendedSettingsMap() LLControlVariable* ctrl = gSavedSettings.getControl(mIt->first); if (ctrl == NULL) { - LL_WARNS() << "AHHH! Control setting " << mIt->first << " does not exist!" << LL_ENDL; + LL_WARNS("RenderInit") << "AHHH! Control setting " << mIt->first << " does not exist!" << LL_ENDL; continue; } @@ -858,7 +868,7 @@ LLSD LLFeatureManager::getRecommendedSettingsMap() } else { - LL_WARNS() << "AHHH! Control variable is not a numeric type!" << LL_ENDL; + LL_WARNS("RenderInit") << "AHHH! Control variable is not a numeric type!" << LL_ENDL; continue; } map[mIt->first]["Comment"] = ctrl->getComment();; |