diff options
author | Nyx (Neal Orman) <nyx@lindenlab.com> | 2010-03-05 10:25:30 -0500 |
---|---|---|
committer | Nyx (Neal Orman) <nyx@lindenlab.com> | 2010-03-05 10:25:30 -0500 |
commit | 40230fa605302f7328b6de387bdd95f5453f6f0b (patch) | |
tree | 6917a1a0196d1f90765d5eca62b82d15c681e932 /indra/newview | |
parent | 0a8cef974701685fa6e36c4e35d8509193b0f556 (diff) |
EXT-5847 failure to bake when standard wearables are generated
Standard wearables have no textures associated with them. No textures means no texture callbacks.
Fixed the issue by requesting a texture upload on baked textures that we don't get a cahced baked
texture response for. This clears up the repro
Code reviewed by prep, vir
Diffstat (limited to 'indra/newview')
-rw-r--r-- | indra/newview/llagent.cpp | 21 | ||||
-rw-r--r-- | indra/newview/llvoavatarself.cpp | 18 | ||||
-rw-r--r-- | indra/newview/llvoavatarself.h | 1 |
3 files changed, 26 insertions, 14 deletions
diff --git a/indra/newview/llagent.cpp b/indra/newview/llagent.cpp index 1da7d450c9..c5d7f6f118 100644 --- a/indra/newview/llagent.cpp +++ b/indra/newview/llagent.cpp @@ -5845,15 +5845,22 @@ void LLAgent::processAgentCachedTextureResponse(LLMessageSystem *mesgsys, void * mesgsys->getUUIDFast(_PREHASH_WearableData, _PREHASH_TextureID, texture_id, texture_block); mesgsys->getU8Fast(_PREHASH_WearableData, _PREHASH_TextureIndex, texture_index, texture_block); - if (texture_id.notNull() - && (S32)texture_index < BAKED_NUM_INDICES + if ((S32)texture_index < BAKED_NUM_INDICES && gAgentQueryManager.mActiveCacheQueries[texture_index] == query_id) { - //llinfos << "Received cached texture " << (U32)texture_index << ": " << texture_id << llendl; - avatarp->setCachedBakedTexture(LLVOAvatarDictionary::bakedToLocalTextureIndex((EBakedTextureIndex)texture_index), texture_id); - //avatarp->setTETexture( LLVOAvatar::sBakedTextureIndices[texture_index], texture_id ); - gAgentQueryManager.mActiveCacheQueries[texture_index] = 0; - num_results++; + if (texture_id.notNull()) + { + //llinfos << "Received cached texture " << (U32)texture_index << ": " << texture_id << llendl; + avatarp->setCachedBakedTexture(LLVOAvatarDictionary::bakedToLocalTextureIndex((EBakedTextureIndex)texture_index), texture_id); + //avatarp->setTETexture( LLVOAvatar::sBakedTextureIndices[texture_index], texture_id ); + gAgentQueryManager.mActiveCacheQueries[texture_index] = 0; + num_results++; + } + else + { + // no cache of this bake. request upload. + avatarp->requestLayerSetUpload((EBakedTextureIndex)texture_index); + } } } diff --git a/indra/newview/llvoavatarself.cpp b/indra/newview/llvoavatarself.cpp index 131c6ac1a1..90d4837d14 100644 --- a/indra/newview/llvoavatarself.cpp +++ b/indra/newview/llvoavatarself.cpp @@ -1292,19 +1292,23 @@ BOOL LLVOAvatarSelf::isTextureDefined(LLVOAvatarDefines::ETextureIndex type, U32 } //----------------------------------------------------------------------------- -// virtual // requestLayerSetUploads() //----------------------------------------------------------------------------- void LLVOAvatarSelf::requestLayerSetUploads() { for (U32 i = 0; i < mBakedTextureDatas.size(); i++) { - ETextureIndex tex_index = mBakedTextureDatas[i].mTextureIndex; - BOOL layer_baked = isTextureDefined(tex_index, gAgentWearables.getWearableCount(tex_index)); - if (!layer_baked && mBakedTextureDatas[i].mTexLayerSet) - { - mBakedTextureDatas[i].mTexLayerSet->requestUpload(); - } + requestLayerSetUpload((EBakedTextureIndex)i); + } +} + +void LLVOAvatarSelf::requestLayerSetUpload(LLVOAvatarDefines::EBakedTextureIndex i) +{ + ETextureIndex tex_index = mBakedTextureDatas[i].mTextureIndex; + bool layer_baked = isTextureDefined(tex_index, gAgentWearables.getWearableCount(tex_index)); + if (!layer_baked && mBakedTextureDatas[i].mTexLayerSet) + { + mBakedTextureDatas[i].mTexLayerSet->requestUpload(); } } diff --git a/indra/newview/llvoavatarself.h b/indra/newview/llvoavatarself.h index dc70996f0b..df3493c434 100644 --- a/indra/newview/llvoavatarself.h +++ b/indra/newview/llvoavatarself.h @@ -222,6 +222,7 @@ protected: //-------------------------------------------------------------------- public: void requestLayerSetUploads(); + void requestLayerSetUpload(LLVOAvatarDefines::EBakedTextureIndex i); void requestLayerSetUpdate(LLVOAvatarDefines::ETextureIndex i); LLTexLayerSet* getLayerSet(LLVOAvatarDefines::ETextureIndex index) const; |