From 50007bbc62b1ecf6fb59263e4f448d22c264d360 Mon Sep 17 00:00:00 2001 From: Shyotl Date: Sun, 10 Mar 2019 03:48:07 -0500 Subject: [PATCH] Matrix mul is expensive. Affine transform is not. Do the latter instead. --- indra/newview/llvoavatar.cpp | 5 +++-- indra/newview/llvovolume.cpp | 5 +++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp index 53e34f3bb..0b1fb67ec 100644 --- a/indra/newview/llvoavatar.cpp +++ b/indra/newview/llvoavatar.cpp @@ -9773,8 +9773,9 @@ void LLVOAvatar::updateSoftwareSkinnedVertices(const LLMeshSkinInfo* skin, const LLVector4a& v = vol_face.mPositions[j]; - final_mat.mul(bind_shape_matrix); - final_mat.affineTransform(v, pos[j]); + LLVector4a t; + bind_shape_matrix.affineTransform(v, t); + final_mat.affineTransform(t, pos[j]); pos[j].add(av_pos); diff --git a/indra/newview/llvovolume.cpp b/indra/newview/llvovolume.cpp index 880e4bb9e..359d963c4 100644 --- a/indra/newview/llvovolume.cpp +++ b/indra/newview/llvovolume.cpp @@ -4145,8 +4145,9 @@ void LLRiggedVolume::update(const LLMeshSkinInfo* skin, LLVOAvatar* avatar, cons LLVector4a& v = vol_face.mPositions[j]; - final_mat.mul(bind_shape_matrix); - final_mat.affineTransform(v, pos[j]); + LLVector4a t; + bind_shape_matrix.affineTransform(v, t); + final_mat.affineTransform(t, pos[j]); pos[j].add(av_pos); }