diff options
Diffstat (limited to 'indra/newview/llfeaturemanager.cpp')
-rw-r--r-- | indra/newview/llfeaturemanager.cpp | 98 |
1 files changed, 53 insertions, 45 deletions
diff --git a/indra/newview/llfeaturemanager.cpp b/indra/newview/llfeaturemanager.cpp index ad048f6668..9c19bd582c 100644 --- a/indra/newview/llfeaturemanager.cpp +++ b/indra/newview/llfeaturemanager.cpp @@ -403,70 +403,78 @@ 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 + 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() << "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_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 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(); |