diff options
author | Brad Payne (Vir Linden) <vir@lindenlab.com> | 2016-08-23 15:08:14 -0400 |
---|---|---|
committer | Brad Payne (Vir Linden) <vir@lindenlab.com> | 2016-08-23 15:08:14 -0400 |
commit | 278825191bdbcc61d398d85c9377c4e921423dde (patch) | |
tree | e2a3901689103d62869cabb837921dc630672387 /indra | |
parent | d23bb7e05667d722c38208419c137a0bb13ca6c4 (diff) |
TEST - non-SSE code path for matrix ops used in mesh skinning.
Diffstat (limited to 'indra')
-rw-r--r-- | indra/llmath/llmatrix4a.h | 16 | ||||
-rw-r--r-- | indra/newview/lldrawpoolavatar.cpp | 1 |
2 files changed, 16 insertions, 1 deletions
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 diff --git a/indra/newview/lldrawpoolavatar.cpp b/indra/newview/lldrawpoolavatar.cpp index 843cd9b249..e9524189ed 100644 --- a/indra/newview/lldrawpoolavatar.cpp +++ b/indra/newview/lldrawpoolavatar.cpp @@ -1628,6 +1628,7 @@ void LLDrawPoolAvatar::updateRiggedFaceVertexBuffer( LLSkinningUtil::getPerVertexSkinMatrix(weight[j].getF32ptr(), mat, false, final_mat, max_joints); LLVector4a& v = vol_face.mPositions[j]; + LLVector4a t; LLVector4a dst; bind_shape_matrix.affineTransform(v, t); |