diff options
author | Dave Parks <davep@lindenlab.com> | 2021-10-28 18:06:21 +0000 |
---|---|---|
committer | Dave Parks <davep@lindenlab.com> | 2021-10-28 18:06:21 +0000 |
commit | 8d20480c5f77fe1fab8149d3cda79bdd61e77656 (patch) | |
tree | 6ba8844d6e3b29451dc70213f8e7278db4943fa3 /indra/llmath | |
parent | aa7ca0aea134c9c40a0d4d1450cc64b7831d005f (diff) |
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
Diffstat (limited to 'indra/llmath')
-rw-r--r-- | indra/llmath/lloctree.h | 13 | ||||
-rw-r--r-- | indra/llmath/llrigginginfo.h | 29 | ||||
-rw-r--r-- | indra/llmath/llvector4a.h | 6 | ||||
-rw-r--r-- | indra/llmath/llvolumeoctree.h | 27 |
4 files changed, 13 insertions, 62 deletions
diff --git a/indra/llmath/lloctree.h b/indra/llmath/lloctree.h index 0e2f62f9db..8c4a1304b4 100644 --- a/indra/llmath/lloctree.h +++ b/indra/llmath/lloctree.h @@ -74,8 +74,9 @@ public: }; template <class T> -class LLOctreeNode : public LLTreeNode<T> +class alignas(16) LLOctreeNode : public LLTreeNode<T> { + LL_ALIGN_NEW public: typedef LLOctreeTraveler<T> oct_traveler; @@ -91,16 +92,6 @@ public: typedef LLOctreeNode<T> oct_node; typedef LLOctreeListener<T> oct_listener; - void* operator new(size_t size) - { - return ll_aligned_malloc_16(size); - } - - void operator delete(void* ptr) - { - ll_aligned_free_16(ptr); - } - LLOctreeNode( const LLVector4a& center, const LLVector4a& size, BaseType* parent, diff --git a/indra/llmath/llrigginginfo.h b/indra/llmath/llrigginginfo.h index b3d6bc2d19..059c6ae082 100644 --- a/indra/llmath/llrigginginfo.h +++ b/indra/llmath/llrigginginfo.h @@ -34,9 +34,9 @@ // Extents are in joint space // isRiggedTo is based on the state of all currently associated rigged meshes -LL_ALIGN_PREFIX(16) -class LLJointRiggingInfo +class alignas(16) LLJointRiggingInfo { + LL_ALIGN_NEW public: LLJointRiggingInfo(); bool isRiggedTo() const; @@ -45,31 +45,10 @@ public: const LLVector4a *getRiggedExtents() const; void merge(const LLJointRiggingInfo& other); - void* operator new(size_t size) - { - return ll_aligned_malloc_16(size); - } - - void operator delete(void* ptr) - { - ll_aligned_free_16(ptr); - } - - void* operator new[](size_t size) - { - return ll_aligned_malloc_16(size); - } - - void operator delete[](void* ptr) - { - ll_aligned_free_16(ptr); - } - - private: - LL_ALIGN_16(LLVector4a mRiggedExtents[2]); + LLVector4a mRiggedExtents[2]; bool mIsRiggedTo; -} LL_ALIGN_POSTFIX(16); +}; // For storing all the rigging info associated with a given avatar or // object, keyed by joint_num. diff --git a/indra/llmath/llvector4a.h b/indra/llmath/llvector4a.h index 5a02928374..53c8f604f6 100644 --- a/indra/llmath/llvector4a.h +++ b/indra/llmath/llvector4a.h @@ -47,9 +47,9 @@ class LLRotation; // LLVector3/LLVector4. ///////////////////////////////// -LL_ALIGN_PREFIX(16) -class LLVector4a +class alignas(16) LLVector4a { + LL_ALIGN_NEW public: /////////////////////////////////// @@ -323,7 +323,7 @@ public: private: LLQuad mQ; -} LL_ALIGN_POSTFIX(16); +}; inline void update_min_max(LLVector4a& min, LLVector4a& max, const LLVector4a& p) { diff --git a/indra/llmath/llvolumeoctree.h b/indra/llmath/llvolumeoctree.h index 13150028d8..b2bc440368 100644 --- a/indra/llmath/llvolumeoctree.h +++ b/indra/llmath/llvolumeoctree.h @@ -34,19 +34,10 @@ #include "llvolume.h" #include "llvector4a.h" -class LLVolumeTriangle : public LLRefCount +class alignas(16) LLVolumeTriangle : public LLRefCount { + LL_ALIGN_NEW public: - void* operator new(size_t size) - { - return ll_aligned_malloc_16(size); - } - - void operator delete(void* ptr) - { - ll_aligned_free_16(ptr); - } - LLVolumeTriangle() { mBinIndex = -1; @@ -86,20 +77,10 @@ public: }; -class LLVolumeOctreeListener : public LLOctreeListener<LLVolumeTriangle> +class alignas(16) LLVolumeOctreeListener : public LLOctreeListener<LLVolumeTriangle> { + LL_ALIGN_NEW public: - - void* operator new(size_t size) - { - return ll_aligned_malloc_16(size); - } - - void operator delete(void* ptr) - { - ll_aligned_free_16(ptr); - } - LLVolumeOctreeListener(LLOctreeNode<LLVolumeTriangle>* node); ~LLVolumeOctreeListener(); |