diff options
author | Graham Linden <graham@lindenlab.com> | 2013-09-16 12:23:46 -0700 |
---|---|---|
committer | Graham Linden <graham@lindenlab.com> | 2013-09-16 12:23:46 -0700 |
commit | 6184ad34e44968e27c987e16247b5d4663eb06fa (patch) | |
tree | c1cfaf4f4078fcc2c578c780ff5e7bf9852e4508 /indra/newview | |
parent | e3963666fd54f5cb1b43bc70b77660079bad5ab5 (diff) |
MAINT-3107 speculative changes to try to ameliorate rigged crasher on Intel HD with crappy default driver
Diffstat (limited to 'indra/newview')
-rwxr-xr-x | indra/newview/app_settings/shaders/class1/avatar/avatarSkinV.glsl | 8 | ||||
-rwxr-xr-x | indra/newview/app_settings/shaders/class1/avatar/objectSkinV.glsl | 15 | ||||
-rwxr-xr-x | indra/newview/llvoavatar.cpp | 26 |
3 files changed, 37 insertions, 12 deletions
diff --git a/indra/newview/app_settings/shaders/class1/avatar/avatarSkinV.glsl b/indra/newview/app_settings/shaders/class1/avatar/avatarSkinV.glsl index bc63d07d72..3df4d333ce 100755 --- a/indra/newview/app_settings/shaders/class1/avatar/avatarSkinV.glsl +++ b/indra/newview/app_settings/shaders/class1/avatar/avatarSkinV.glsl @@ -31,10 +31,12 @@ uniform vec4 matrixPalette[45]; mat4 getSkinnedTransform() { mat4 ret; - int i = int(floor(weight.x)); + float x = fract(weight.x); - - ret[0] = mix(matrixPalette[i+0], matrixPalette[i+1], x); + int i = int(floor(weight.x)); + i = min(i, 15); + i = max(i, 0); + ret[0] = mix(matrixPalette[i+0], matrixPalette[i+1], x); ret[1] = mix(matrixPalette[i+15],matrixPalette[i+16], x); ret[2] = mix(matrixPalette[i+30],matrixPalette[i+31], x); ret[3] = vec4(0,0,0,1); diff --git a/indra/newview/app_settings/shaders/class1/avatar/objectSkinV.glsl b/indra/newview/app_settings/shaders/class1/avatar/objectSkinV.glsl index efd0d03965..12996cf0d6 100755 --- a/indra/newview/app_settings/shaders/class1/avatar/objectSkinV.glsl +++ b/indra/newview/app_settings/shaders/class1/avatar/objectSkinV.glsl @@ -34,14 +34,17 @@ mat4 getObjectSkinnedTransform() vec4 w = fract(weight4); vec4 index = floor(weight4); - + + index = min(index, vec4(31.0)); + index = max(index, vec4( 0.0)); + float scale = 1.0/(w.x+w.y+w.z+w.w); w *= scale; - - mat4 mat = matrixPalette[int(index.x)]*w.x; - mat += matrixPalette[int(index.y)]*w.y; - mat += matrixPalette[int(index.z)]*w.z; - mat += matrixPalette[int(index.w)]*w.w; + + mat4 mat = matrixPalette[int(index.x)]*w.x; + mat += matrixPalette[int(index.y)]*w.y; + mat += matrixPalette[int(index.z)]*w.z; + mat += matrixPalette[int(index.w)]*w.w; return mat; } diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp index 6a504e10c4..076b2524bf 100755 --- a/indra/newview/llvoavatar.cpp +++ b/indra/newview/llvoavatar.cpp @@ -5512,7 +5512,10 @@ void LLVOAvatar::addChild(LLViewerObject *childp) LLViewerObject::addChild(childp); if (childp->mDrawable) { - attachObject(childp); + if (!attachObject(childp)) + { + mPendingAttachment.push_back(childp); + } } else { @@ -5546,7 +5549,21 @@ LLViewerJointAttachment* LLVOAvatar::getTargetAttachmentPoint(LLViewerObject* vi if (!attachment) { llwarns << "Object attachment point invalid: " << attachmentID << llendl; - attachment = get_if_there(mAttachmentPoints, 1, (LLViewerJointAttachment*)NULL); // Arbitrary using 1 (chest) + + for (int i = 0; i < 15 && !attachment; i++) + { + attachment = get_if_there(mAttachmentPoints, i, (LLViewerJointAttachment*)NULL); // Arbitrary using 1 (chest) + + if (attachment) + { + llwarns << "Object attachment point falling back to : " << i << llendl; + } + } + + if (!attachment) + { + llerrs << "Could not find any object attachment point for: " << attachmentID << llendl; + } } return attachment; @@ -5619,7 +5636,10 @@ void LLVOAvatar::lazyAttach() { if (mPendingAttachment[i]->mDrawable) { - attachObject(mPendingAttachment[i]); + if (!attachObject(mPendingAttachment[i])) + { + still_pending.push_back(mPendingAttachment[i]); + } } else { |