summaryrefslogtreecommitdiff
path: root/indra/newview/llviewershadermgr.cpp
diff options
context:
space:
mode:
authorGraham Linden <graham@lindenlab.com>2019-05-08 09:30:39 -0700
committerGraham Linden <graham@lindenlab.com>2019-05-08 09:30:39 -0700
commit470d1595cc1c1c7c7ec3ab192e68622751423354 (patch)
tree079cd01cc1b247973f2e5fd589389cc8e0013b13 /indra/newview/llviewershadermgr.cpp
parent06097302f4ad8786913e77514d5d60678da3160d (diff)
parent34322f8f37380df868703051230f2a4109602b3f (diff)
Merge viewer-release
Diffstat (limited to 'indra/newview/llviewershadermgr.cpp')
-rw-r--r--indra/newview/llviewershadermgr.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/indra/newview/llviewershadermgr.cpp b/indra/newview/llviewershadermgr.cpp
index ff7ba6b284..406d147792 100644
--- a/indra/newview/llviewershadermgr.cpp
+++ b/indra/newview/llviewershadermgr.cpp
@@ -399,7 +399,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);