summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
authorAndrey Kleshchev <andreykproductengine@lindenlab.com>2020-09-29 23:39:00 +0300
committerAndrey Kleshchev <andreykproductengine@lindenlab.com>2020-09-29 23:39:35 +0300
commit9ec688ae4d9da0b6b743f7766ff73659eef29129 (patch)
tree8214f0c645093334f7c6d91c9825eea097fe7b61 /indra
parentfbd36e5bf04d0702c467028a2ce746e603ecad25 (diff)
SL-13500 loadShaderFile crash
Diffstat (limited to 'indra')
-rw-r--r--indra/newview/llappviewer.cpp16
-rw-r--r--indra/newview/llviewershadermgr.cpp9
-rw-r--r--indra/newview/skins/default/xui/en/notifications.xml6
3 files changed, 30 insertions, 1 deletions
diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp
index a9bdb05cfc..515d6ffc14 100644
--- a/indra/newview/llappviewer.cpp
+++ b/indra/newview/llappviewer.cpp
@@ -1026,13 +1026,27 @@ bool LLAppViewer::init()
{
// can't use an alert here since we're exiting and
// all hell breaks lose.
+ LLUIString details = LLNotifications::instance().getGlobalString("UnsupportedGLRequirements");
OSMessageBox(
- LLNotifications::instance().getGlobalString("UnsupportedGLRequirements"),
+ details.getString(),
LLStringUtil::null,
OSMB_OK);
return 0;
}
+ // If we don't have the right shader requirements.
+ if (!gGLManager.mHasShaderObjects
+ || !gGLManager.mHasVertexShader
+ || !gGLManager.mHasFragmentShader)
+ {
+ LLUIString details = LLNotifications::instance().getGlobalString("UnsupportedShaderRequirements");
+ OSMessageBox(
+ details.getString(),
+ LLStringUtil::null,
+ OSMB_OK);
+ return 0;
+ }
+
// Without SSE2 support we will crash almost immediately, warn here.
if (!gSysCPU.hasSSE2())
{
diff --git a/indra/newview/llviewershadermgr.cpp b/indra/newview/llviewershadermgr.cpp
index f108d96320..be5c22e7c3 100644
--- a/indra/newview/llviewershadermgr.cpp
+++ b/indra/newview/llviewershadermgr.cpp
@@ -400,6 +400,15 @@ void LLViewerShaderMgr::setShaders()
return;
}
+ if (!gGLManager.mHasShaderObjects
+ || !gGLManager.mHasVertexShader
+ || !gGLManager.mHasFragmentShader)
+ {
+ // Viewer will show 'hardware requirements' warning later
+ LL_INFOS("ShaderLoading") << "Shaders not supported" << 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/skins/default/xui/en/notifications.xml b/indra/newview/skins/default/xui/en/notifications.xml
index 4f353921df..29d570de64 100644
--- a/indra/newview/skins/default/xui/en/notifications.xml
+++ b/indra/newview/skins/default/xui/en/notifications.xml
@@ -9568,6 +9568,12 @@ 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.