Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
Alchemy Viewer
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Deploy
Releases
Package registry
Operate
Terraform modules
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Silent mode is enabled
All outbound communications are blocked.
Learn more
.
Show more breadcrumbs
Alchemy Viewer
Alchemy Viewer
Commits
7defa95f
Commit
7defa95f
authored
11 years ago
by
David Parks
Browse files
Options
Downloads
Patches
Plain Diff
MAINT-3131 fallback to CPU timers for return value of benchmark if ARB_timer_query is unavailable.
parent
24f87459
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
indra/newview/llglsandbox.cpp
+9
-9
9 additions, 9 deletions
indra/newview/llglsandbox.cpp
with
9 additions
and
9 deletions
indra/newview/llglsandbox.cpp
+
9
−
9
View file @
7defa95f
...
@@ -880,8 +880,8 @@ void LLViewerObjectList::renderObjectBeacons()
...
@@ -880,8 +880,8 @@ void LLViewerObjectList::renderObjectBeacons()
F32
gpu_benchmark
()
F32
gpu_benchmark
()
{
{
if
(
!
gGLManager
.
mHasShaderObjects
||
!
gGLManager
.
mHasTimerQuery
)
if
(
!
gGLManager
.
mHasShaderObjects
)
{
//don't bother benchmarking the fixed function
or using CPU timers
{
//don't bother benchmarking the fixed function
return
-
1.
f
;
return
-
1.
f
;
}
}
...
@@ -1011,6 +1011,8 @@ F32 gpu_benchmark()
...
@@ -1011,6 +1011,8 @@ F32 gpu_benchmark()
llinfos
<<
"Memory bandwidth is "
<<
llformat
(
"%.3f"
,
gbps
)
<<
"GB/sec according to CPU timers"
<<
llendl
;
llinfos
<<
"Memory bandwidth is "
<<
llformat
(
"%.3f"
,
gbps
)
<<
"GB/sec according to CPU timers"
<<
llendl
;
if
(
gGLManager
.
mHasTimerQuery
)
{
F32
ms
=
gBenchmarkProgram
.
mTimeElapsed
/
1000000.
f
;
F32
ms
=
gBenchmarkProgram
.
mTimeElapsed
/
1000000.
f
;
F32
seconds
=
ms
/
1000.
f
;
F32
seconds
=
ms
/
1000.
f
;
...
@@ -1018,8 +1020,6 @@ F32 gpu_benchmark()
...
@@ -1018,8 +1020,6 @@ F32 gpu_benchmark()
F32
samples_sec
=
(
samples_drawn
/
1000000000.0
)
/
seconds
;
F32
samples_sec
=
(
samples_drawn
/
1000000000.0
)
/
seconds
;
gbps
=
samples_sec
*
8
;
gbps
=
samples_sec
*
8
;
if
(
gGLManager
.
mHasTimerQuery
)
{
llinfos
<<
"Memory bandwidth is "
<<
llformat
(
"%.3f"
,
gbps
)
<<
"GB/sec according to ARB_timer_query"
<<
llendl
;
llinfos
<<
"Memory bandwidth is "
<<
llformat
(
"%.3f"
,
gbps
)
<<
"GB/sec according to ARB_timer_query"
<<
llendl
;
}
}
else
else
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment