diff options
author | Dave Parks <davep@lindenlab.com> | 2014-03-21 14:30:14 -0500 |
---|---|---|
committer | Dave Parks <davep@lindenlab.com> | 2014-03-21 14:30:14 -0500 |
commit | 7defa95f6778778d850aa1aba3ea8cb16396d0dd (patch) | |
tree | 7ee26c188bcee0d40b4bc2199950662d25ced8b7 /indra/newview | |
parent | 24f8745914f7cec320d707f36895ac393575b861 (diff) |
MAINT-3131 fallback to CPU timers for return value of benchmark if ARB_timer_query is unavailable.
Diffstat (limited to 'indra/newview')
-rwxr-xr-x | indra/newview/llglsandbox.cpp | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/indra/newview/llglsandbox.cpp b/indra/newview/llglsandbox.cpp index 92553e875d..f620bf19fb 100755 --- a/indra/newview/llglsandbox.cpp +++ b/indra/newview/llglsandbox.cpp @@ -880,8 +880,8 @@ void LLViewerObjectList::renderObjectBeacons() F32 gpu_benchmark() { - if (!gGLManager.mHasShaderObjects || !gGLManager.mHasTimerQuery) - { //don't bother benchmarking the fixed function or using CPU timers + if (!gGLManager.mHasShaderObjects) + { //don't bother benchmarking the fixed function return -1.f; } @@ -1011,15 +1011,15 @@ F32 gpu_benchmark() llinfos << "Memory bandwidth is " << llformat("%.3f", gbps) << "GB/sec according to CPU timers" << llendl; - F32 ms = gBenchmarkProgram.mTimeElapsed/1000000.f; - F32 seconds = ms/1000.f; - - F64 samples_drawn = res*res*count*samples; - F32 samples_sec = (samples_drawn/1000000000.0)/seconds; - gbps = samples_sec*8; - if (gGLManager.mHasTimerQuery) { + F32 ms = gBenchmarkProgram.mTimeElapsed/1000000.f; + F32 seconds = ms/1000.f; + + F64 samples_drawn = res*res*count*samples; + F32 samples_sec = (samples_drawn/1000000000.0)/seconds; + gbps = samples_sec*8; + llinfos << "Memory bandwidth is " << llformat("%.3f", gbps) << "GB/sec according to ARB_timer_query" << llendl; } else |