summaryrefslogtreecommitdiff
path: root/indra/newview/lldrawpoolbump.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/lldrawpoolbump.cpp')
-rw-r--r--indra/newview/lldrawpoolbump.cpp29
1 files changed, 10 insertions, 19 deletions
diff --git a/indra/newview/lldrawpoolbump.cpp b/indra/newview/lldrawpoolbump.cpp
index 7289e95b6e..bf593bff07 100644
--- a/indra/newview/lldrawpoolbump.cpp
+++ b/indra/newview/lldrawpoolbump.cpp
@@ -558,8 +558,9 @@ void LLDrawPoolBump::renderDeferred(S32 pass)
LLCullResult::drawinfo_iterator begin = gPipeline.beginRenderMap(type);
LLCullResult::drawinfo_iterator end = gPipeline.endRenderMap(type);
- LLVOAvatar* avatar = nullptr;
- U64 skin = 0;
+ const LLVOAvatar* lastAvatar = nullptr;
+ U64 lastMeshId = 0;
+ bool skipLastSkin = false;
for (LLCullResult::drawinfo_iterator i = begin; i != end; )
{
@@ -572,13 +573,10 @@ void LLDrawPoolBump::renderDeferred(S32 pass)
if (rigged)
{
- if (avatar != params.mAvatar || skin != params.mSkinInfo->mHash)
+ if (uploadMatrixPalette(params.mAvatar, params.mSkinInfo, lastAvatar, lastMeshId, skipLastSkin))
{
- uploadMatrixPalette(params);
- avatar = params.mAvatar;
- skin = params.mSkinInfo->mHash;
+ pushBumpBatch(params, true, false);
}
- pushBumpBatch(params, true, false);
}
else
{
@@ -974,8 +972,9 @@ void LLBumpImageList::onSourceUpdated(LLViewerTexture* src, EBumpEffect bump_cod
void LLDrawPoolBump::pushBumpBatches(U32 type)
{
- LLVOAvatar* avatar = nullptr;
- U64 skin = 0;
+ const LLVOAvatar* lastAvatar = nullptr;
+ U64 lastMeshId = 0;
+ bool skipLastSkin = false;
if (mRigged)
{ // nudge type enum and include skinweights for rigged pass
@@ -993,17 +992,9 @@ void LLDrawPoolBump::pushBumpBatches(U32 type)
{
if (mRigged)
{
- if (avatar != params.mAvatar || skin != params.mSkinInfo->mHash)
+ if (!uploadMatrixPalette(params.mAvatar, params.mSkinInfo, lastAvatar, lastMeshId, skipLastSkin))
{
- if (uploadMatrixPalette(params))
- {
- avatar = params.mAvatar;
- skin = params.mSkinInfo->mHash;
- }
- else
- {
- continue;
- }
+ continue;
}
}
pushBumpBatch(params, false);