summaryrefslogtreecommitdiff
path: root/indra/newview/llskinningutil.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llskinningutil.cpp')
-rw-r--r--indra/newview/llskinningutil.cpp12
1 files changed, 9 insertions, 3 deletions
diff --git a/indra/newview/llskinningutil.cpp b/indra/newview/llskinningutil.cpp
index 438b04ff39..9b4ed4c946 100644
--- a/indra/newview/llskinningutil.cpp
+++ b/indra/newview/llskinningutil.cpp
@@ -97,6 +97,12 @@ U32 LLSkinningUtil::getMeshJointCount(const LLMeshSkinInfo *skin)
return llmin((U32)getMaxJointCount(), (U32)skin->mJointNames.size());
}
+S32 LLSkinningUtil::getMaxGLTFJointCount()
+{
+ // this is the maximum number of 3x4 matrices than can fit in a UBO
+ return gGLManager.mMaxUniformBlockSize / 48;
+}
+
void LLSkinningUtil::scrubInvalidJoints(LLVOAvatar *avatar, LLMeshSkinInfo* skin)
{
if (skin->mInvalidJointsScrubbed)
@@ -131,7 +137,7 @@ void LLSkinningUtil::initSkinningMatrixPalette(
LLMatrix4a world[LL_CHARACTER_MAX_ANIMATED_JOINTS];
- for (U32 j = 0; j < count; ++j)
+ for (S32 j = 0; j < count; ++j)
{
S32 joint_num = skin->mJointNums[j];
LLJoint *joint = avatar->getJoint(joint_num);
@@ -194,7 +200,7 @@ void LLSkinningUtil::checkSkinWeights(LLVector4a* weights, U32 num_vertices, con
void LLSkinningUtil::scrubSkinWeights(LLVector4a* weights, U32 num_vertices, const LLMeshSkinInfo* skin)
{
- const S32 max_joints = skin->mJointNames.size();
+ const S32 max_joints = static_cast<S32>(skin->mJointNames.size());
for (U32 j=0; j<num_vertices; j++)
{
F32 *w = weights[j].getF32ptr();
@@ -318,7 +324,7 @@ void LLSkinningUtil::updateRiggingInfo(const LLMeshSkinInfo* skin, LLVOAvatar *a
if (vol_face.mJointRiggingInfoTab.needsUpdate())
{
S32 num_verts = vol_face.mNumVertices;
- S32 num_joints = skin->mJointNames.size();
+ S32 num_joints = static_cast<S32>(skin->mJointNames.size());
if (num_verts > 0 && vol_face.mWeights && num_joints > 0)
{
initJointNums(const_cast<LLMeshSkinInfo*>(skin), avatar);