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
e236da41
Commit
e236da41
authored
6 years ago
by
andreykproductengine
Browse files
Options
Downloads
Patches
Plain Diff
MAINT-8197 Compliment benchmark crash processing with SEH handling
parent
07f8c156
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
indra/newview/llfeaturemanager.cpp
+43
-2
43 additions, 2 deletions
indra/newview/llfeaturemanager.cpp
with
43 additions
and
2 deletions
indra/newview/llfeaturemanager.cpp
+
43
−
2
View file @
e236da41
...
...
@@ -377,6 +377,43 @@ bool LLFeatureManager::parseFeatureTable(std::string filename)
F32
gpu_benchmark
();
#if LL_WINDOWS
static
const
U32
STATUS_MSC_EXCEPTION
=
0xE06D7363
;
// compiler specific
U32
exception_benchmark_filter
(
U32
code
,
struct
_EXCEPTION_POINTERS
*
exception_infop
)
{
if
(
code
==
STATUS_MSC_EXCEPTION
)
{
// C++ exception, go on
return
EXCEPTION_CONTINUE_SEARCH
;
}
else
{
// handle it
return
EXCEPTION_EXECUTE_HANDLER
;
}
}
F32
logExceptionBenchmark
()
{
// Todo: make a wrapper/class for SEH exceptions
F32
gbps
=
-
1
;
__try
{
gbps
=
gpu_benchmark
();
}
__except
(
exception_benchmark_filter
(
GetExceptionCode
(),
GetExceptionInformation
()))
{
// convert to C++ styled exception
char
integer_string
[
32
];
sprintf
(
integer_string
,
"SEH, code: %lu
\n
"
,
GetExceptionCode
());
throw
std
::
exception
(
integer_string
);
}
return
gbps
;
}
#endif
bool
LLFeatureManager
::
loadGPUClass
()
{
if
(
!
gSavedSettings
.
getBOOL
(
"SkipBenchmark"
))
...
...
@@ -385,7 +422,11 @@ bool LLFeatureManager::loadGPUClass()
F32
gbps
;
try
{
#if LL_WINDOWS
gbps
=
logExceptionBenchmark
();
#else
gbps
=
gpu_benchmark
();
#endif
}
catch
(
const
std
::
exception
&
e
)
{
...
...
@@ -400,11 +441,11 @@ bool LLFeatureManager::loadGPUClass()
LL_WARNS
(
"RenderInit"
)
<<
"Unable to get an accurate benchmark; defaulting to class 3"
<<
LL_ENDL
;
mGPUClass
=
GPU_CLASS_3
;
#else
if
(
gGLManager
.
mGLVersion
<
2.
f
)
if
(
gGLManager
.
mGLVersion
<
=
2.
f
)
{
mGPUClass
=
GPU_CLASS_0
;
}
else
if
(
gGLManager
.
mGLVersion
<
3.
f
)
else
if
(
gGLManager
.
mGLVersion
<
=
3.
f
)
{
mGPUClass
=
GPU_CLASS_1
;
}
...
...
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