summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
authorAndrey Kleshchev <andreykproductengine@lindenlab.com>2020-09-29 23:39:00 +0300
committerAndrey Kleshchev <andreykproductengine@lindenlab.com>2022-04-29 19:41:22 +0300
commit904b16a0a7fddb1cd36de8a33d5475df93d9cabe (patch)
tree58aaa39693df3dee6c2b14d6977205c7cd52d3c5 /indra/newview
parentac0c9a7412334ebda49467c14b3916618b56a8dc (diff)
SL-17124 switchContext and loadShaderFile crashes
- Do not try initializing shaders if requirements are not met or if window does not exist - Warn user before closing window. Situation is unexpected, there is chance of more issues, like a freeze or a crash on close() - mHasMultitexture is a solid requirement, if it is not present, we won't be able to run
Diffstat (limited to 'indra/newview')
-rw-r--r--indra/newview/llappviewer.cpp8
-rw-r--r--indra/newview/llviewershadermgr.cpp7
-rw-r--r--indra/newview/llviewerwindow.cpp12
-rw-r--r--indra/newview/skins/default/xui/en/notifications.xml12
4 files changed, 14 insertions, 25 deletions
diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp
index a63203f3cb..8255eb882c 100644
--- a/indra/newview/llappviewer.cpp
+++ b/indra/newview/llappviewer.cpp
@@ -957,13 +957,7 @@ bool LLAppViewer::init()
// If we don't have the right GL requirements, exit.
if (!gGLManager.mHasRequirements)
{
- // can't use an alert here since we're exiting and
- // all hell breaks lose.
- LLUIString details = LLNotifications::instance().getGlobalString("UnsupportedGLRequirements");
- OSMessageBox(
- details.getString(),
- LLStringUtil::null,
- OSMB_OK);
+ // already handled with a MBVideoDrvErr
return 0;
}
diff --git a/indra/newview/llviewershadermgr.cpp b/indra/newview/llviewershadermgr.cpp
index 1cb2c6b9ee..086b433c72 100644
--- a/indra/newview/llviewershadermgr.cpp
+++ b/indra/newview/llviewershadermgr.cpp
@@ -426,6 +426,13 @@ void LLViewerShaderMgr::setShaders()
return;
}
+ if (!gGLManager.mHasRequirements)
+ {
+ // Viewer will show 'hardware requirements' warning later
+ LL_INFOS("ShaderLoading") << "Not supported hardware/software" << LL_ENDL;
+ return;
+ }
+
static LLCachedControl<U32> max_texture_index(gSavedSettings, "RenderMaxTextureIndex", 16);
LLGLSLShader::sIndexedTextureChannels = llmax(llmin(gGLManager.mNumTextureImageUnits, (S32) max_texture_index), 1);
diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp
index 42e21f7130..8e565bbdca 100644
--- a/indra/newview/llviewerwindow.cpp
+++ b/indra/newview/llviewerwindow.cpp
@@ -1914,12 +1914,6 @@ LLViewerWindow::LLViewerWindow(const Params& p)
p.ignore_pixel_depth,
gSavedSettings.getBOOL("RenderDeferred") ? 0 : gSavedSettings.getU32("RenderFSAASamples")); //don't use window level anti-aliasing if FBOs are enabled
- if (!LLViewerShaderMgr::sInitialized)
- { //immediately initialize shaders
- LLViewerShaderMgr::sInitialized = TRUE;
- LLViewerShaderMgr::instance()->setShaders();
- }
-
if (NULL == mWindow)
{
LLSplashScreen::update(LLTrans::getString("StartupRequireDriverUpdate"));
@@ -1938,6 +1932,12 @@ LLViewerWindow::LLViewerWindow(const Params& p)
#endif
LLAppViewer::instance()->fastQuit(1);
}
+ else if (!LLViewerShaderMgr::sInitialized)
+ {
+ //immediately initialize shaders
+ LLViewerShaderMgr::sInitialized = TRUE;
+ LLViewerShaderMgr::instance()->setShaders();
+ }
if (!LLAppViewer::instance()->restoreErrorTrap())
{
diff --git a/indra/newview/skins/default/xui/en/notifications.xml b/indra/newview/skins/default/xui/en/notifications.xml
index e1f6dde6ff..3add211247 100644
--- a/indra/newview/skins/default/xui/en/notifications.xml
+++ b/indra/newview/skins/default/xui/en/notifications.xml
@@ -9634,18 +9634,6 @@ Do you wish to continue?
yestext="OK"/>
</notification>
- <global name="UnsupportedShaderRequirements">
-You do not appear to meet the hardware requirements for [APP_NAME]. [APP_NAME] requires OpenGL 2.0 or later shader support. If this is the case, you may want to make sure that you have the latest drivers for your graphics card, and service packs and patches for your operating system.
-
-If you continue to have problems, please visit the [SUPPORT_SITE].
- </global>
-
- <global name="UnsupportedGLRequirements">
-You do not appear to have the proper hardware requirements for [APP_NAME]. [APP_NAME] requires an OpenGL graphics card that has multitexture support. If this is the case, you may want to make sure that you have the latest drivers for your graphics card, and service packs and patches for your operating system.
-
-If you continue to have problems, please visit the [SUPPORT_SITE].
- </global>
-
<global name="UnsupportedIntelDriver">
The installed Intel graphics driver for [GPUNAME], version [VERSION], is significantly out of date and is known to cause excessive rates of program crashes. You are strongly advised to update to a current Intel driver