From f79890669dcf8e44b5ec3ce1abbd1d1fdd34eb3b Mon Sep 17 00:00:00 2001 From: Dave Parks Date: Mon, 20 Sep 2021 18:58:09 +0000 Subject: SL-16006 and SL-16009 Rigged mesh rendering optimization pass --- indra/newview/llvoavatar.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'indra/newview/llvoavatar.h') diff --git a/indra/newview/llvoavatar.h b/indra/newview/llvoavatar.h index 74ef589ca4..39adaab8ca 100644 --- a/indra/newview/llvoavatar.h +++ b/indra/newview/llvoavatar.h @@ -209,6 +209,11 @@ public: virtual LLJoint* getJoint(const std::string &name); LLJoint* getJoint(S32 num); + //if you KNOW joint_num is a valid animated joint index, use getSkeletonJoint for efficiency + inline LLJoint* getSkeletonJoint(S32 joint_num) { return mSkeleton[joint_num]; } + inline size_t getSkeletonJointCount() const { return mSkeleton.size(); } + + void addAttachmentOverridesForObject(LLViewerObject *vo, std::set* meshes_seen = NULL, bool recursive = true); void removeAttachmentOverridesForObject(const LLUUID& mesh_id); void removeAttachmentOverridesForObject(LLViewerObject *vo); -- cgit v1.2.3 From 8d20480c5f77fe1fab8149d3cda79bdd61e77656 Mon Sep 17 00:00:00 2001 From: Dave Parks Date: Thu, 28 Oct 2021 18:06:21 +0000 Subject: SL-16148 SL-16244 SL-16270 SL-16253 Remove most BlockTimers, remove LLMemTracked, introduce alignas, hook most/all reamining allocs, disable synchronous occlusion, and convert frequently accessed LLSingletons to LLSimpleton --- indra/newview/llvoavatar.h | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) (limited to 'indra/newview/llvoavatar.h') diff --git a/indra/newview/llvoavatar.h b/indra/newview/llvoavatar.h index 39adaab8ca..7042406091 100644 --- a/indra/newview/llvoavatar.h +++ b/indra/newview/llvoavatar.h @@ -87,6 +87,7 @@ class LLVOAvatar : public LLViewerObject, public boost::signals2::trackable { + LL_ALIGN_NEW; LOG_CLASS(LLVOAvatar); public: @@ -99,16 +100,6 @@ public: **/ public: - void* operator new(size_t size) - { - return LLTrace::MemTrackable::aligned_new<16>(size); - } - - void operator delete(void* ptr, size_t size) - { - LLTrace::MemTrackable::aligned_delete<16>(ptr, size); - } - LLVOAvatar(const LLUUID &id, const LLPCode pcode, LLViewerRegion *regionp); virtual void markDead(); static void initClass(); // Initialize data that's only init'd once per class. -- cgit v1.2.3 From 2b543f92fac5df04d1c0dfce0606998a600f947f Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev Date: Fri, 24 Sep 2021 23:35:12 +0300 Subject: SL-16056 Improve 'avatar cloud' behavior Make avatar cloud delay longer proportionally to load time --- indra/newview/llvoavatar.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'indra/newview/llvoavatar.h') diff --git a/indra/newview/llvoavatar.h b/indra/newview/llvoavatar.h index 7042406091..aeac23ad92 100644 --- a/indra/newview/llvoavatar.h +++ b/indra/newview/llvoavatar.h @@ -376,6 +376,9 @@ protected: private: BOOL mFirstFullyVisible; + F32 mFirstUseDelaySeconds; + LLFrameTimer mFirstSeenTimer; + BOOL mFullyLoaded; BOOL mPreviousFullyLoaded; BOOL mFullyLoadedInitialized; -- cgit v1.2.3 From 28f9fb06a9f4cb9edccb2ff8132c7f6a9b27c060 Mon Sep 17 00:00:00 2001 From: Dave Parks Date: Sat, 20 Nov 2021 18:49:19 +0000 Subject: SL-16289 Rigged mesh rendering overhaul --- indra/newview/llvoavatar.h | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) (limited to 'indra/newview/llvoavatar.h') diff --git a/indra/newview/llvoavatar.h b/indra/newview/llvoavatar.h index aeac23ad92..b85400866e 100644 --- a/indra/newview/llvoavatar.h +++ b/indra/newview/llvoavatar.h @@ -53,6 +53,8 @@ #include "llviewerstats.h" #include "llvovolume.h" #include "llavatarrendernotifier.h" +#include "llmodel.h" + extern const LLUUID ANIM_AGENT_BODY_NOISE; extern const LLUUID ANIM_AGENT_BREATHE_ROT; @@ -77,6 +79,7 @@ class LLViewerJointMesh; const F32 MAX_AVATAR_LOD_FACTOR = 1.0f; +extern U32 gFrameCount; //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // LLVOAvatar @@ -746,6 +749,26 @@ public: void updateMeshVisibility(); LLViewerTexture* getBakedTexture(const U8 te); + class alignas(16) MatrixPaletteCache + { + public: + U32 mFrame; + LLMeshSkinInfo::matrix_list_t mMatrixPalette; + + // Float array ready to be sent to GL + std::vector mGLMp; + + MatrixPaletteCache() : + mFrame(gFrameCount - 1) + { + } + }; + + const MatrixPaletteCache& updateSkinInfoMatrixPalette(const LLMeshSkinInfo* skinInfo, LLVOVolume* requesting_obj = nullptr); + + typedef std::unordered_map matrix_palette_cache_t; + matrix_palette_cache_t mMatrixPaletteCache; + protected: void releaseMeshData(); virtual void restoreMeshData(); -- cgit v1.2.3 From 8bf5597db2f10c4a423af5df333ff0f1c7fd9c99 Mon Sep 17 00:00:00 2001 From: Runitai Linden Date: Wed, 15 Dec 2021 13:43:58 -0600 Subject: SL-16487 Fix for rigged attachment bounding boxes being too tight. --- indra/newview/llvoavatar.h | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'indra/newview/llvoavatar.h') diff --git a/indra/newview/llvoavatar.h b/indra/newview/llvoavatar.h index b85400866e..ab2a2daf49 100644 --- a/indra/newview/llvoavatar.h +++ b/indra/newview/llvoavatar.h @@ -55,7 +55,6 @@ #include "llavatarrendernotifier.h" #include "llmodel.h" - extern const LLUUID ANIM_AGENT_BODY_NOISE; extern const LLUUID ANIM_AGENT_BREATHE_ROT; extern const LLUUID ANIM_AGENT_PHYSICS_MOTION; @@ -749,10 +748,14 @@ public: void updateMeshVisibility(); LLViewerTexture* getBakedTexture(const U8 te); + // Matrix palette cache entry class alignas(16) MatrixPaletteCache { public: + // Last frame this entry was updated U32 mFrame; + + // List of Matrix4a's for this entry LLMeshSkinInfo::matrix_list_t mMatrixPalette; // Float array ready to be sent to GL @@ -764,8 +767,12 @@ public: } }; - const MatrixPaletteCache& updateSkinInfoMatrixPalette(const LLMeshSkinInfo* skinInfo, LLVOVolume* requesting_obj = nullptr); + // Accessor for Matrix Palette Cache + // Will do a map lookup for the entry associated with the given MeshSkinInfo + // Will update said entry if it hasn't been updated yet this frame + const MatrixPaletteCache& updateSkinInfoMatrixPalette(const LLMeshSkinInfo* skinInfo); + // Map of LLMeshSkinInfo::mHash to MatrixPaletteCache typedef std::unordered_map matrix_palette_cache_t; matrix_palette_cache_t mMatrixPaletteCache; -- cgit v1.2.3 From 3dd841277e88be5c124605153fef0d13dfcd5767 Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev Date: Thu, 27 Jan 2022 00:11:37 +0200 Subject: SL-16056 Avatar gas cloud adaptive delay #2 Reset avatar 'loaded' timer after getting new mesh data --- indra/newview/llvoavatar.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'indra/newview/llvoavatar.h') diff --git a/indra/newview/llvoavatar.h b/indra/newview/llvoavatar.h index ab2a2daf49..7c2d71802e 100644 --- a/indra/newview/llvoavatar.h +++ b/indra/newview/llvoavatar.h @@ -206,7 +206,7 @@ public: inline LLJoint* getSkeletonJoint(S32 joint_num) { return mSkeleton[joint_num]; } inline size_t getSkeletonJointCount() const { return mSkeleton.size(); } - + void notifyAttachmentMeshLoaded(); void addAttachmentOverridesForObject(LLViewerObject *vo, std::set* meshes_seen = NULL, bool recursive = true); void removeAttachmentOverridesForObject(const LLUUID& mesh_id); void removeAttachmentOverridesForObject(LLViewerObject *vo); @@ -379,7 +379,7 @@ protected: private: BOOL mFirstFullyVisible; F32 mFirstUseDelaySeconds; - LLFrameTimer mFirstSeenTimer; + LLFrameTimer mFirstAppearanceMessageTimer; BOOL mFullyLoaded; BOOL mPreviousFullyLoaded; -- cgit v1.2.3 From 4e31ff1d7e05ff376fc1c66156eb76cccbdd5f38 Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev Date: Mon, 21 Feb 2022 23:11:17 +0200 Subject: SL-16056 Load cloud texture only once --- indra/newview/llvoavatar.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'indra/newview/llvoavatar.h') diff --git a/indra/newview/llvoavatar.h b/indra/newview/llvoavatar.h index 7c2d71802e..ba67007fa9 100644 --- a/indra/newview/llvoavatar.h +++ b/indra/newview/llvoavatar.h @@ -336,7 +336,8 @@ public: static F32 sLODFactor; // user-settable LOD factor static F32 sPhysicsLODFactor; // user-settable physics LOD factor static BOOL sJointDebug; // output total number of joints being touched for each avatar - static BOOL sDebugAvatarRotation; + + static LLPointer sCloudTexture; //-------------------------------------------------------------------- // Region state -- cgit v1.2.3