summaryrefslogtreecommitdiff
path: root/indra/llprimitive
diff options
context:
space:
mode:
authorDave Parks <davep@lindenlab.com>2024-09-16 18:49:03 -0500
committerGitHub <noreply@github.com>2024-09-16 18:49:03 -0500
commit486613e79bb96b838121f627ef73b1293ee18c12 (patch)
tree0c7cc6b8dcac2f36b0d5f54e374e92a74b746be3 /indra/llprimitive
parent42975dfd8868454172ca0c3fcfa9ae18cb1d4de8 (diff)
Profile guided optimization pass (#2582)
- Tune up LLJointRiggingInfoTab - Visualize joint bounding boxes when visualizing joints - Use LLJointRiggingInfo to caclulate desired resolution of a texture - Throttle calls to calcPixelArea - Fetch MeshSkinInfo immediately when header is received
Diffstat (limited to 'indra/llprimitive')
-rw-r--r--indra/llprimitive/llmodel.cpp7
-rw-r--r--indra/llprimitive/llmodel.h5
2 files changed, 11 insertions, 1 deletions
diff --git a/indra/llprimitive/llmodel.cpp b/indra/llprimitive/llmodel.cpp
index 15087a7255..9908a155f2 100644
--- a/indra/llprimitive/llmodel.cpp
+++ b/indra/llprimitive/llmodel.cpp
@@ -1547,6 +1547,13 @@ void LLMeshSkinInfo::fromLLSD(LLSD& skin)
mLockScaleIfJointPosition = false;
}
+ // combine mBindShapeMatrix and mInvBindMatrix into mBindPoseMatrix
+ mBindPoseMatrix.resize(mInvBindMatrix.size());
+ for (U32 i = 0; i < mInvBindMatrix.size(); ++i)
+ {
+ matMul(mBindShapeMatrix, mInvBindMatrix[i], mBindPoseMatrix[i]);
+ }
+
updateHash();
}
diff --git a/indra/llprimitive/llmodel.h b/indra/llprimitive/llmodel.h
index b0cba2d655..96cfb7151e 100644
--- a/indra/llprimitive/llmodel.h
+++ b/indra/llprimitive/llmodel.h
@@ -56,12 +56,15 @@ public:
LLUUID mMeshID;
std::vector<std::string> mJointNames;
mutable std::vector<S32> mJointNums;
- typedef std::vector<LLMatrix4a, boost::alignment::aligned_allocator<LLMatrix4a, 16>> matrix_list_t;
+ typedef std::vector<LLMatrix4a> matrix_list_t;
matrix_list_t mInvBindMatrix;
// bones/joints position overrides
matrix_list_t mAlternateBindMatrix;
+ // cached multiply of mBindShapeMatrix and mInvBindMatrix
+ matrix_list_t mBindPoseMatrix;
+
LL_ALIGN_16(LLMatrix4a mBindShapeMatrix);
float mPelvisOffset;