diff options
Diffstat (limited to 'indra/newview/llfeaturemanager.cpp')
-rw-r--r-- | indra/newview/llfeaturemanager.cpp | 100 |
1 files changed, 54 insertions, 46 deletions
diff --git a/indra/newview/llfeaturemanager.cpp b/indra/newview/llfeaturemanager.cpp index d4ba230feb..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(); @@ -789,7 +797,7 @@ void LLFeatureManager::applyBaseMasks() maskFeatures(gpustr); // now mask cpu type ones - if (gSysMemory.getPhysicalMemoryClamped() <= U32Megabytes(256)) + if (gSysMemory.getPhysicalMemoryKB() <= U32Megabytes(256)) { maskFeatures("RAM256MB"); } |