diff options
author | AndreyL ProductEngine <alihatskiy@productengine.com> | 2019-05-08 00:09:53 +0300 |
---|---|---|
committer | AndreyL ProductEngine <alihatskiy@productengine.com> | 2019-05-08 00:09:53 +0300 |
commit | aefb0503aa199c6dfd383fe7b23cd129960dc1be (patch) | |
tree | b47e51ddb4d20799897377345334bb3f925ac4d6 /indra/newview/llviewershadermgr.cpp | |
parent | 964afabae667c55ccb2d7051e6a6793773b025e0 (diff) | |
parent | 34322f8f37380df868703051230f2a4109602b3f (diff) |
Merged in lindenlab/viewer-release
Diffstat (limited to 'indra/newview/llviewershadermgr.cpp')
-rw-r--r-- | indra/newview/llviewershadermgr.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/indra/newview/llviewershadermgr.cpp b/indra/newview/llviewershadermgr.cpp index b3d561edd5..6d8b27ff2d 100644 --- a/indra/newview/llviewershadermgr.cpp +++ b/indra/newview/llviewershadermgr.cpp @@ -407,7 +407,8 @@ void LLViewerShaderMgr::setShaders() return; } - LLGLSLShader::sIndexedTextureChannels = llmax(llmin(gGLManager.mNumTextureImageUnits, (S32) gSavedSettings.getU32("RenderMaxTextureIndex")), 1); + static LLCachedControl<U32> max_texture_index(gSavedSettings, "RenderMaxTextureIndex", 16); + LLGLSLShader::sIndexedTextureChannels = llmax(llmin(gGLManager.mNumTextureImageUnits, (S32) max_texture_index), 1); //NEVER use more than 16 texture channels (work around for prevalent driver bug) LLGLSLShader::sIndexedTextureChannels = llmin(LLGLSLShader::sIndexedTextureChannels, 16); |