diff options
author | Andrey Lihatskiy <alihatskiy@productengine.com> | 2024-06-14 21:38:00 +0300 |
---|---|---|
committer | Andrey Lihatskiy <alihatskiy@productengine.com> | 2024-06-14 21:38:00 +0300 |
commit | ba6ac70596d9f866e15983a4e2fc1d4f3d82b2ec (patch) | |
tree | be9eb80e356af346c17852c116ed481a7d911277 /indra/newview/llfeaturemanager.cpp | |
parent | f5e2708a0fc4e08d3d0a5dc393bbd4bac09e1c55 (diff) | |
parent | c4fc76efefd12c7cb1224dc8a748da2958f4a7f0 (diff) |
Merge branch 'release/maint-b' into marchcat/b-merge
# Conflicts:
# .github/workflows/build.yaml
# indra/newview/app_settings/shaders/class2/deferred/alphaF.glsl
# indra/newview/app_settings/shaders/class3/deferred/reflectionProbeF.glsl
# indra/newview/app_settings/shaders/class3/deferred/softenLightF.glsl
# indra/newview/llfilepicker.cpp
Diffstat (limited to 'indra/newview/llfeaturemanager.cpp')
-rw-r--r-- | indra/newview/llfeaturemanager.cpp | 36 |
1 files changed, 4 insertions, 32 deletions
diff --git a/indra/newview/llfeaturemanager.cpp b/indra/newview/llfeaturemanager.cpp index 9f12648470..f1e2d45bfb 100644 --- a/indra/newview/llfeaturemanager.cpp +++ b/indra/newview/llfeaturemanager.cpp @@ -40,6 +40,7 @@ #include "llappviewer.h" #include "llbufferstream.h" +#include "llexception.h" #include "llnotificationsutil.h" #include "llviewercontrol.h" #include "llworld.h" @@ -377,33 +378,6 @@ bool LLFeatureManager::parseFeatureTable(std::string filename) F32 gpu_benchmark(); -#if LL_WINDOWS - -F32 logExceptionBenchmark() -{ - // FIXME: gpu_benchmark uses many C++ classes on the stack to control state. - // SEH exceptions with our current exception handling options do not call - // destructors for these classes, resulting in an undefined state should - // this handler be invoked. - F32 gbps = -1; - __try - { - gbps = gpu_benchmark(); - } - __except (msc_exception_filter(GetExceptionCode(), GetExceptionInformation())) - { - // HACK - ensure that profiling is disabled - LLGLSLShader::finishProfile(false); - - // 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")) @@ -413,14 +387,12 @@ bool LLFeatureManager::loadGPUClass() F32 gbps; try { -#if LL_WINDOWS - gbps = logExceptionBenchmark(); -#else - gbps = gpu_benchmark(); -#endif + gbps = LL::seh::catcher(gpu_benchmark); } catch (const std::exception& e) { + // HACK - ensure that profiling is disabled + LLGLSLShader::finishProfile(false); gbps = -1.f; LL_WARNS("RenderInit") << "GPU benchmark failed: " << e.what() << LL_ENDL; } |