From 9ec688ae4d9da0b6b743f7766ff73659eef29129 Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev Date: Tue, 29 Sep 2020 23:39:00 +0300 Subject: SL-13500 loadShaderFile crash --- indra/newview/llviewershadermgr.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'indra/newview/llviewershadermgr.cpp') 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 max_texture_index(gSavedSettings, "RenderMaxTextureIndex", 16); LLGLSLShader::sIndexedTextureChannels = llmax(llmin(gGLManager.mNumTextureImageUnits, (S32) max_texture_index), 1); -- cgit v1.2.3