summaryrefslogtreecommitdiff
path: root/indra/newview/llfeaturemanager.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llfeaturemanager.cpp')
-rw-r--r--indra/newview/llfeaturemanager.cpp17
1 files changed, 13 insertions, 4 deletions
diff --git a/indra/newview/llfeaturemanager.cpp b/indra/newview/llfeaturemanager.cpp
index 0974ae0742..a2aae91ae1 100644
--- a/indra/newview/llfeaturemanager.cpp
+++ b/indra/newview/llfeaturemanager.cpp
@@ -408,6 +408,7 @@ bool LLFeatureManager::loadGPUClass()
{
if (!gSavedSettings.getBOOL("SkipBenchmark"))
{
+ F32 class1_gbps = gSavedSettings.getF32("RenderClass1MemoryBandwidth");
//get memory bandwidth from benchmark
F32 gbps;
try
@@ -424,6 +425,14 @@ bool LLFeatureManager::loadGPUClass()
LL_WARNS("RenderInit") << "GPU benchmark failed: " << e.what() << LL_ENDL;
}
+ mGPUMemoryBandwidth = gbps;
+
+ // bias by CPU speed
+ F32 cpu_basis_mhz = gSavedSettings.getF32("RenderCPUBasis");
+ F32 cpu_mhz = (F32) gSysCPU.getMHz();
+ F32 cpu_bias = llclamp(cpu_mhz / cpu_basis_mhz, 0.5f, 1.f);
+ gbps *= cpu_bias;
+
if (gbps < 0.f)
{ //couldn't bench, default to Low
#if LL_DARWIN
@@ -434,19 +443,19 @@ bool LLFeatureManager::loadGPUClass()
mGPUClass = GPU_CLASS_0;
#endif
}
- else if (gbps <= 32.0f)
+ else if (gbps <= class1_gbps)
{
mGPUClass = GPU_CLASS_1;
}
- else if (gbps <= 64.0f)
+ else if (gbps <= class1_gbps *2.f)
{
mGPUClass = GPU_CLASS_2;
}
- else if (gbps <= 128.0f)
+ else if (gbps <= class1_gbps*4.f)
{
mGPUClass = GPU_CLASS_3;
}
- else if (gbps <= 256.0f)
+ else if (gbps <= class1_gbps*8.f)
{
mGPUClass = GPU_CLASS_4;
}