diff options
author | Brad Payne (Vir Linden) <vir@lindenlab.com> | 2019-08-15 15:08:38 +0100 |
---|---|---|
committer | Brad Payne (Vir Linden) <vir@lindenlab.com> | 2019-08-15 15:08:38 +0100 |
commit | bd01474e23a578ca06eb98debbaa0e9ce3866a17 (patch) | |
tree | 83c0c3ad61811b839e01be960334ab840fd550ac /indra/newview/llvovolume.cpp | |
parent | 15db923caed8e02af40e18a08354f28841fd3e00 (diff) |
SL-11662 - apparently a race condition between image loading and material property setting
Diffstat (limited to 'indra/newview/llvovolume.cpp')
-rw-r--r-- | indra/newview/llvovolume.cpp | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/indra/newview/llvovolume.cpp b/indra/newview/llvovolume.cpp index 73d2aa6a5c..33a9c771ea 100644 --- a/indra/newview/llvovolume.cpp +++ b/indra/newview/llvovolume.cpp @@ -85,6 +85,7 @@ #include "llviewerinventory.h" #include "llcallstack.h" #include "llsculptidsize.h" +#include "llavatarappearancedefines.h" const F32 FORCE_SIMPLE_RENDER_AREA = 512.f; const F32 FORCE_CULL_AREA = 8.f; @@ -2445,7 +2446,13 @@ S32 LLVOVolume::setTEMaterialParams(const U8 te, const LLMaterialPtr pMaterialPa case LLMaterial::DIFFUSE_ALPHA_MODE_EMISSIVE: case LLMaterial::DIFFUSE_ALPHA_MODE_MASK: { //all of them modes available only for 32 bit textures - if(GL_RGBA != img_diffuse->getPrimaryFormat()) + LLTextureEntry* tex_entry = getTE(te); + bool bIsBakedImageId = false; + if (tex_entry && LLAvatarAppearanceDefines::LLAvatarAppearanceDictionary::isBakedImageId(tex_entry->getID())) + { + bIsBakedImageId = true; + } + if (GL_RGBA != img_diffuse->getPrimaryFormat() && !bIsBakedImageId) { bSetDiffuseNone = true; } |