From 278825191bdbcc61d398d85c9377c4e921423dde Mon Sep 17 00:00:00 2001 From: "Brad Payne (Vir Linden)" Date: Tue, 23 Aug 2016 15:08:14 -0400 Subject: TEST - non-SSE code path for matrix ops used in mesh skinning. --- indra/llmath/llmatrix4a.h | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) (limited to 'indra/llmath') diff --git a/indra/llmath/llmatrix4a.h b/indra/llmath/llmatrix4a.h index d141298f69..72b61e2a74 100644 --- a/indra/llmath/llmatrix4a.h +++ b/indra/llmath/llmatrix4a.h @@ -121,7 +121,7 @@ public: res.add(z); } - inline void affineTransform(const LLVector4a& v, LLVector4a& res) + inline void affineTransformSSE(const LLVector4a& v, LLVector4a& res) { LLVector4a x,y,z; @@ -137,6 +137,20 @@ public: z.add(mMatrix[3]); res.setAdd(x,z); } + + inline void affineTransformNonSSE(const LLVector4a& v, LLVector4a& res) + { + F32 x = v[0] * mMatrix[0][0] + v[1] * mMatrix[1][0] + v[2] * mMatrix[2][0] + mMatrix[3][0]; + F32 y = v[0] * mMatrix[0][1] + v[1] * mMatrix[1][1] + v[2] * mMatrix[2][1] + mMatrix[3][1]; + F32 z = v[0] * mMatrix[0][2] + v[1] * mMatrix[1][2] + v[2] * mMatrix[2][2] + mMatrix[3][2]; + F32 w = 1.0f; + res.set(x,y,z,w); + } + + inline void affineTransform(const LLVector4a& v, LLVector4a& res) + { + affineTransformNonSSE(v,res); + } }; #endif -- cgit v1.3 From f9be47d6695a7aab4bdf273043bcc5129c934c27 Mon Sep 17 00:00:00 2001 From: "Brad Payne (Vir Linden)" Date: Tue, 23 Aug 2016 17:08:57 -0400 Subject: SL-274 - disabled test w/non-SSE matrix ops. MAINT-6672 - fixed Reset Skeleton, no longer crashes. --- indra/llappearance/llavatarappearance.cpp | 6 ++---- indra/llmath/llmatrix4a.h | 2 +- 2 files changed, 3 insertions(+), 5 deletions(-) (limited to 'indra/llmath') diff --git a/indra/llappearance/llavatarappearance.cpp b/indra/llappearance/llavatarappearance.cpp index f9745efb78..e09bf51b93 100644 --- a/indra/llappearance/llavatarappearance.cpp +++ b/indra/llappearance/llavatarappearance.cpp @@ -663,18 +663,16 @@ BOOL LLAvatarAppearance::allocateCharacterJoints( U32 num ) BOOL LLAvatarAppearance::buildSkeleton(const LLAvatarSkeletonInfo *info) { LL_DEBUGS("BVH") << "numBones " << info->mNumBones << " numCollisionVolumes " << info->mNumCollisionVolumes << LL_ENDL; - //------------------------------------------------------------------------- + mNextJointNum = 0; + // allocate joints - //------------------------------------------------------------------------- if (!allocateCharacterJoints(info->mNumBones)) { LL_ERRS() << "Can't allocate " << info->mNumBones << " joints" << LL_ENDL; return FALSE; } - //------------------------------------------------------------------------- // allocate volumes - //------------------------------------------------------------------------- if (info->mNumCollisionVolumes) { if (!allocateCollisionVolumes(info->mNumCollisionVolumes)) diff --git a/indra/llmath/llmatrix4a.h b/indra/llmath/llmatrix4a.h index 72b61e2a74..e11fa1bf72 100644 --- a/indra/llmath/llmatrix4a.h +++ b/indra/llmath/llmatrix4a.h @@ -149,7 +149,7 @@ public: inline void affineTransform(const LLVector4a& v, LLVector4a& res) { - affineTransformNonSSE(v,res); + affineTransformSSE(v,res); } }; -- cgit v1.3