summaryrefslogtreecommitdiff
path: root/indra/newview/llglsandbox.cpp
diff options
context:
space:
mode:
authorDave Parks <davep@lindenlab.com>2014-03-21 14:30:14 -0500
committerDave Parks <davep@lindenlab.com>2014-03-21 14:30:14 -0500
commit7defa95f6778778d850aa1aba3ea8cb16396d0dd (patch)
tree7ee26c188bcee0d40b4bc2199950662d25ced8b7 /indra/newview/llglsandbox.cpp
parent24f8745914f7cec320d707f36895ac393575b861 (diff)
MAINT-3131 fallback to CPU timers for return value of benchmark if ARB_timer_query is unavailable.
Diffstat (limited to 'indra/newview/llglsandbox.cpp')
-rwxr-xr-xindra/newview/llglsandbox.cpp18
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