summaryrefslogtreecommitdiff
path: root/indra/newview/llviewershadermgr.cpp
diff options
context:
space:
mode:
authorNat Goodspeed <nat@lindenlab.com>2022-05-18 14:08:24 -0400
committerNat Goodspeed <nat@lindenlab.com>2022-05-18 14:08:24 -0400
commitc0aa1a1202678fdde0206c9372fb071c028cfe5b (patch)
tree614a5e0b9e24343c59709a9378050b601dd0f828 /indra/newview/llviewershadermgr.cpp
parent06aa68c2fbcd83cb00465c9f14933bda276b11e8 (diff)
parenta9363222618a879dd7d0d78471f8773af6b61618 (diff)
SL-17219: Merge 'DRTVWR-546' of lindenlab/viewer into SL-17219
Update task branch from main project branch.
Diffstat (limited to 'indra/newview/llviewershadermgr.cpp')
-rw-r--r--indra/newview/llviewershadermgr.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/indra/newview/llviewershadermgr.cpp b/indra/newview/llviewershadermgr.cpp
index a8e0f576ca..086b433c72 100644
--- a/indra/newview/llviewershadermgr.cpp
+++ b/indra/newview/llviewershadermgr.cpp
@@ -426,6 +426,13 @@ void LLViewerShaderMgr::setShaders()
return;
}
+ if (!gGLManager.mHasRequirements)
+ {
+ // Viewer will show 'hardware requirements' warning later
+ LL_INFOS("ShaderLoading") << "Not supported hardware/software" << LL_ENDL;
+ return;
+ }
+
static LLCachedControl<U32> max_texture_index(gSavedSettings, "RenderMaxTextureIndex", 16);
LLGLSLShader::sIndexedTextureChannels = llmax(llmin(gGLManager.mNumTextureImageUnits, (S32) max_texture_index), 1);
@@ -1876,6 +1883,7 @@ BOOL LLViewerShaderMgr::loadShadersDeferred()
shader->clearPermutations();
shader->addPermutation("USE_VERTEX_COLOR", "1");
+ shader->addPermutation("HAS_ALPHA_MASK", "1");
shader->addPermutation("USE_INDEXED_TEX", "1");
if (use_sun_shadow)
{
@@ -1952,6 +1960,7 @@ BOOL LLViewerShaderMgr::loadShadersDeferred()
shader->clearPermutations();
shader->addPermutation("USE_INDEXED_TEX", "1");
shader->addPermutation("FOR_IMPOSTOR", "1");
+ shader->addPermutation("HAS_ALPHA_MASK", "1");
shader->addPermutation("USE_VERTEX_COLOR", "1");
if (rigged)
{
@@ -2023,6 +2032,7 @@ BOOL LLViewerShaderMgr::loadShadersDeferred()
shader[i]->addPermutation("USE_INDEXED_TEX", "1");
shader[i]->addPermutation("WATER_FOG", "1");
shader[i]->addPermutation("USE_VERTEX_COLOR", "1");
+ shader[i]->addPermutation("HAS_ALPHA_MASK", "1");
if (use_sun_shadow)
{
shader[i]->addPermutation("HAS_SHADOW", "1");