diff options
author | Graham Linden <graham@lindenlab.com> | 2019-07-01 17:23:59 -0700 |
---|---|---|
committer | Graham Linden <graham@lindenlab.com> | 2019-07-01 17:23:59 -0700 |
commit | 576f1cdd7e16e44c43b39618f715753160045468 (patch) | |
tree | 379be882f05a3890d9d7b813b7bd4e98ad53437f /indra/newview | |
parent | f770e55ac6fb76f1ea5e24a4dd91f2a4b4131d6d (diff) |
SL-11521, SL-10625
Try aligning data used for glReadPixels to see if we can coax the Intel driver stack into being a less souciant pile of detritus.
Replace face color based test replaced with other logic in error.
Diffstat (limited to 'indra/newview')
-rw-r--r-- | indra/newview/llvovolume.cpp | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/indra/newview/llvovolume.cpp b/indra/newview/llvovolume.cpp index 8aaf678aba..3740caa53f 100644 --- a/indra/newview/llvovolume.cpp +++ b/indra/newview/llvovolume.cpp @@ -6453,7 +6453,8 @@ U32 LLVolumeGeometryManager::genDrawInfo(LLSpatialGroup* group, U32 mask, LLFace bool use_legacy_bump = te->getBumpmap() && (te->getBumpmap() < 18) && (!mat || mat->getNormalID().isNull()); bool opaque = te_alpha >= 0.999f; bool transparent = te_alpha < 0.999f; - bool invisible = te_alpha <= 0.0f; + + is_alpha = (is_alpha || transparent) ? TRUE : FALSE; if (mat && LLPipeline::sRenderDeferred && !hud_group) { @@ -6551,7 +6552,10 @@ U32 LLVolumeGeometryManager::genDrawInfo(LLSpatialGroup* group, U32 mask, LLFace else if (mat) { U8 mode = mat->getDiffuseAlphaMode(); - if (transparent) + + is_alpha = (is_alpha || (mode == LLMaterial::DIFFUSE_ALPHA_MODE_BLEND)); + + if (is_alpha) { mode = LLMaterial::DIFFUSE_ALPHA_MODE_BLEND; } @@ -6560,7 +6564,7 @@ U32 LLVolumeGeometryManager::genDrawInfo(LLSpatialGroup* group, U32 mask, LLFace { registerFace(group, facep, fullbright ? LLRenderPass::PASS_FULLBRIGHT_ALPHA_MASK : LLRenderPass::PASS_ALPHA_MASK); } - else if (is_alpha || transparent) + else if (is_alpha ) { registerFace(group, facep, LLRenderPass::PASS_ALPHA); } @@ -6579,7 +6583,7 @@ U32 LLVolumeGeometryManager::genDrawInfo(LLSpatialGroup* group, U32 mask, LLFace else if (is_alpha) { // can we safely treat this as an alpha mask? - if (invisible) + if (facep->getFaceColor().mV[3] <= 0.f) { //100% transparent, don't render unless we're highlighting transparent registerFace(group, facep, LLRenderPass::PASS_ALPHA_INVISIBLE); } |