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
4caa2746
Commit
4caa2746
authored
10 years ago
by
davep
Browse files
Options
Downloads
Patches
Plain Diff
MAINT-3131 Discard improbably high memory bandwidth measurements on OSX and default to Class 3
parent
8682750e
No related branches found
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
indra/newview/llfeaturemanager.cpp
+5
-1
5 additions, 1 deletion
indra/newview/llfeaturemanager.cpp
indra/newview/llglsandbox.cpp
+13
-2
13 additions, 2 deletions
indra/newview/llglsandbox.cpp
with
18 additions
and
3 deletions
indra/newview/llfeaturemanager.cpp
+
5
−
1
View file @
4caa2746
...
@@ -426,7 +426,10 @@ bool LLFeatureManager::loadGPUClass()
...
@@ -426,7 +426,10 @@ bool LLFeatureManager::loadGPUClass()
if
(
gbps
<
0.
f
)
if
(
gbps
<
0.
f
)
{
//couldn't bench, use GLVersion
{
//couldn't bench, use GLVersion
#if LL_DARWIN
//GLVersion is misleading on OSX, just default to class 3 if we can't bench
mGPUClass
=
GPU_CLASS_3
;
#else
if
(
gGLManager
.
mGLVersion
<
2.
f
)
if
(
gGLManager
.
mGLVersion
<
2.
f
)
{
{
mGPUClass
=
GPU_CLASS_0
;
mGPUClass
=
GPU_CLASS_0
;
...
@@ -447,6 +450,7 @@ bool LLFeatureManager::loadGPUClass()
...
@@ -447,6 +450,7 @@ bool LLFeatureManager::loadGPUClass()
{
{
mGPUClass
=
GPU_CLASS_4
;
mGPUClass
=
GPU_CLASS_4
;
}
}
#endif
}
}
else
if
(
gbps
<
5.
f
)
else
if
(
gbps
<
5.
f
)
{
{
...
...
This diff is collapsed.
Click to expand it.
indra/newview/llglsandbox.cpp
+
13
−
2
View file @
4caa2746
...
@@ -928,7 +928,7 @@ F32 gpu_benchmark()
...
@@ -928,7 +928,7 @@ F32 gpu_benchmark()
std
::
vector
<
F32
>
results
;
std
::
vector
<
F32
>
results
;
//build a random texture
//build a random texture
U8
pixels
[
res
*
res
*
4
];
U8
*
pixels
=
new
U8
[
res
*
res
*
4
];
for
(
U32
i
=
0
;
i
<
res
*
res
*
4
;
++
i
)
for
(
U32
i
=
0
;
i
<
res
*
res
*
4
;
++
i
)
{
{
...
@@ -950,6 +950,8 @@ F32 gpu_benchmark()
...
@@ -950,6 +950,8 @@ F32 gpu_benchmark()
LLImageGL
::
setManualImage
(
GL_TEXTURE_2D
,
0
,
GL_RGBA
,
res
,
res
,
GL_RGBA
,
GL_UNSIGNED_BYTE
,
pixels
);
LLImageGL
::
setManualImage
(
GL_TEXTURE_2D
,
0
,
GL_RGBA
,
res
,
res
,
GL_RGBA
,
GL_UNSIGNED_BYTE
,
pixels
);
}
}
delete
[]
pixels
;
//make a dummy triangle to draw with
//make a dummy triangle to draw with
LLPointer
<
LLVertexBuffer
>
buff
=
new
LLVertexBuffer
(
LLVertexBuffer
::
MAP_VERTEX
|
LLVertexBuffer
::
MAP_TEXCOORD0
,
GL_STATIC_DRAW_ARB
);
LLPointer
<
LLVertexBuffer
>
buff
=
new
LLVertexBuffer
(
LLVertexBuffer
::
MAP_VERTEX
|
LLVertexBuffer
::
MAP_TEXCOORD0
,
GL_STATIC_DRAW_ARB
);
buff
->
allocateBuffer
(
3
,
0
,
true
);
buff
->
allocateBuffer
(
3
,
0
,
true
);
...
@@ -1032,6 +1034,15 @@ F32 gpu_benchmark()
...
@@ -1032,6 +1034,15 @@ F32 gpu_benchmark()
LL_INFOS
()
<<
"Memory bandwidth is "
<<
llformat
(
"%.3f"
,
gbps
)
<<
"GB/sec according to CPU timers"
<<
LL_ENDL
;
LL_INFOS
()
<<
"Memory bandwidth is "
<<
llformat
(
"%.3f"
,
gbps
)
<<
"GB/sec according to CPU timers"
<<
LL_ENDL
;
#if LL_DARWIN
if
(
gbps
>
512.
f
)
{
LL_INFOS
()
<<
"Memory bandwidth is improbably high and likely incorrect."
<<
LL_ENDL
;
//OSX is probably lying, discard result
gbps
=
-
1.
f
;
}
#endif
if
(
gGLManager
.
mHasTimerQuery
)
if
(
gGLManager
.
mHasTimerQuery
)
{
{
F32
ms
=
gBenchmarkProgram
.
mTimeElapsed
/
1000000.
f
;
F32
ms
=
gBenchmarkProgram
.
mTimeElapsed
/
1000000.
f
;
...
...
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