diff options
author | Brad Linden <46733234+brad-linden@users.noreply.github.com> | 2024-08-29 12:57:49 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-08-29 12:57:49 -0700 |
commit | 11afd7f86afd19fde8b577f57736d6d27542484e (patch) | |
tree | 563f78cf13dc296835102e34fbf5cea0be368e3f /indra/newview/llviewermenu.cpp | |
parent | f15228023f3a1094f69891a5f431cff3d895515a (diff) |
Add error handling for intel crashes from GLTF Scene shader (#2456)
fix secondlife/viewer#1856
Diffstat (limited to 'indra/newview/llviewermenu.cpp')
-rw-r--r-- | indra/newview/llviewermenu.cpp | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp index 97d5781566..e1664752e7 100644 --- a/indra/newview/llviewermenu.cpp +++ b/indra/newview/llviewermenu.cpp @@ -3414,7 +3414,9 @@ bool enable_os_exception() bool enable_gltf() { static LLCachedControl<bool> enablegltf(gSavedSettings, "GLTFEnabled", false); - return enablegltf; + static LLCachedControl<bool> can_use(gSavedSettings, "RenderCanUseGLTFPBROpaqueShaders", true); + + return enablegltf && can_use; } bool enable_gltf_save_as() @@ -8207,7 +8209,16 @@ class LLAdvancedClickGLTFOpen: public view_listener_t { bool handleEvent(const LLSD& userdata) { - LL::GLTFSceneManager::instance().load(); + static LLCachedControl<bool> can_use_shaders(gSavedSettings, "RenderCanUseGLTFPBROpaqueShaders", true); + if (can_use_shaders) + { + LL::GLTFSceneManager::instance().load(); + } + else + { + LLNotificationsUtil::add("NoSupportGLTFShader"); + } + return true; } }; |