summaryrefslogtreecommitdiff
path: root/indra/newview/lldrawpoolavatar.h
diff options
context:
space:
mode:
authorDave Parks <davep@lindenlab.com>2021-09-20 18:58:09 +0000
committerDave Parks <davep@lindenlab.com>2021-09-20 18:58:09 +0000
commitf79890669dcf8e44b5ec3ce1abbd1d1fdd34eb3b (patch)
tree749f11a7763fbe38a2ecfc51479db23faecaaf0d /indra/newview/lldrawpoolavatar.h
parentc09532ac13a3ca2f1ca0854cf00594a26ddcb593 (diff)
SL-16006 and SL-16009 Rigged mesh rendering optimization pass
Diffstat (limited to 'indra/newview/lldrawpoolavatar.h')
-rw-r--r--indra/newview/lldrawpoolavatar.h27
1 files changed, 26 insertions, 1 deletions
diff --git a/indra/newview/lldrawpoolavatar.h b/indra/newview/lldrawpoolavatar.h
index 9b26266ced..0c1ee2cced 100644
--- a/indra/newview/lldrawpoolavatar.h
+++ b/indra/newview/lldrawpoolavatar.h
@@ -28,15 +28,18 @@
#define LL_LLDRAWPOOLAVATAR_H
#include "lldrawpool.h"
+#include "llmodel.h"
+
+#include <unordered_map>
class LLVOAvatar;
class LLVOVolume;
class LLGLSLShader;
class LLFace;
-class LLMeshSkinInfo;
class LLVolume;
class LLVolumeFace;
+extern U32 gFrameCount;
class LLDrawPoolAvatar : public LLFacePool
{
@@ -259,6 +262,8 @@ typedef enum
LLVolumeFace& vol_face);
void updateRiggedVertexBuffers(LLVOAvatar* avatar);
+ void updateSkinInfoMatrixPalettes(LLVOAvatar* avatarp);
+
void renderRigged(LLVOAvatar* avatar, U32 type, bool glow = false);
void renderRiggedSimple(LLVOAvatar* avatar);
void renderRiggedAlpha(LLVOAvatar* avatar);
@@ -278,6 +283,26 @@ typedef enum
std::vector<LLFace*> mRiggedFace[NUM_RIGGED_PASSES];
+ class MatrixPaletteCache
+ {
+ public:
+ U32 mFrame;
+ LLMeshSkinInfo::matrix_list_t mMatrixPalette;
+
+ // Float array ready to be sent to GL
+ std::vector<F32> mGLMp;
+
+ MatrixPaletteCache() :
+ mFrame(gFrameCount-1)
+ {
+ }
+ };
+
+ const MatrixPaletteCache& updateSkinInfoMatrixPalette(LLVOAvatar* avatarp, const LLMeshSkinInfo* skin);
+
+ typedef std::unordered_map<const LLMeshSkinInfo*, MatrixPaletteCache> matrix_palette_cache_t;
+ matrix_palette_cache_t mMatrixPaletteCache;
+
/*virtual*/ LLViewerTexture *getDebugTexture();
/*virtual*/ LLColor3 getDebugColor() const; // For AGP debug display