diff options
author | Nyx Linden <nyx@lindenlab.com> | 2013-09-20 15:54:26 -0400 |
---|---|---|
committer | Nyx Linden <nyx@lindenlab.com> | 2013-09-20 15:54:26 -0400 |
commit | 7e7965af19960c613b1b4d22806682587a2cdd82 (patch) | |
tree | f838e02163d4558681004e11578dc1ad78101741 /indra | |
parent | dad3090afcd56d1122ca5d6016001bc5226de4da (diff) |
SH-3943 FIX beard morph masks applied inconsistently on login to server bake region
Looks like we were caching bad morph masks that were generated on login. Adjusting
algorithms to always replace the cache when we have invalidated the other channels
of the baked texture.
Diffstat (limited to 'indra')
-rw-r--r-- | indra/llappearance/lltexlayer.cpp | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/indra/llappearance/lltexlayer.cpp b/indra/llappearance/lltexlayer.cpp index f951a982e5..59765b3833 100644 --- a/indra/llappearance/lltexlayer.cpp +++ b/indra/llappearance/lltexlayer.cpp @@ -1550,10 +1550,13 @@ void LLTexLayer::renderMorphMasks(S32 x, S32 y, S32 width, S32 height, const LLC } U32 cache_index = alpha_mask_crc.getCRC(); - U8* alpha_data = get_if_there(mAlphaCache,cache_index,(U8*)NULL); - if (!alpha_data) + U8* alpha_data = NULL; + // We believe we need to generate morph masks, do not assume that the cached version is accurate. + // We can get bad morph masks during login, on minimize, and occasional gl errors. + // We should only be doing this when we believe something has changed with respect to the user's appearance. { - // clear out a slot if we have filled our cache + LL_DEBUGS("Avatar") << "gl alpha cache of morph mask not found, doing readback: " << getName() << llendl; + // clear out a slot if we have filled our cache S32 max_cache_entries = getTexLayerSet()->getAvatarAppearance()->isSelf() ? 4 : 1; while ((S32)mAlphaCache.size() >= max_cache_entries) { |