diff options
author | Andrey Kleshchev <andreykproductengine@lindenlab.com> | 2020-09-29 23:39:00 +0300 |
---|---|---|
committer | Andrey Kleshchev <andreykproductengine@lindenlab.com> | 2020-09-29 23:39:35 +0300 |
commit | 9ec688ae4d9da0b6b743f7766ff73659eef29129 (patch) | |
tree | 8214f0c645093334f7c6d91c9825eea097fe7b61 /indra/newview/llviewershadermgr.cpp | |
parent | fbd36e5bf04d0702c467028a2ce746e603ecad25 (diff) |
SL-13500 loadShaderFile crash
Diffstat (limited to 'indra/newview/llviewershadermgr.cpp')
-rw-r--r-- | indra/newview/llviewershadermgr.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
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); |