summaryrefslogtreecommitdiff
path: root/indra/newview/llvovolume.cpp
diff options
context:
space:
mode:
authorBrad Payne (Vir Linden) <vir@lindenlab.com>2017-11-06 14:02:38 +0000
committerBrad Payne (Vir Linden) <vir@lindenlab.com>2017-11-06 14:02:38 +0000
commite8fe39f33266c96797ca976978b24bf9cd778f8c (patch)
tree5b5d97ed672350506edf235905cf16810633731b /indra/newview/llvovolume.cpp
parente00f4d739bb7b4feb0af72ceb0ad9e469beee3c9 (diff)
SL-830 - more diagnostics and possible fixes around corrupted graphics state
Diffstat (limited to 'indra/newview/llvovolume.cpp')
-rw-r--r--indra/newview/llvovolume.cpp48
1 files changed, 43 insertions, 5 deletions
diff --git a/indra/newview/llvovolume.cpp b/indra/newview/llvovolume.cpp
index 0fc95de618..abef312572 100644
--- a/indra/newview/llvovolume.cpp
+++ b/indra/newview/llvovolume.cpp
@@ -1349,6 +1349,15 @@ BOOL LLVOVolume::updateLOD()
if (lod_changed)
{
+#if 1
+ // AXON debugging
+ if (isAnimatedObject() && isRiggedMesh())
+ {
+ std::string vobj_name = llformat("Vol%u", (U32) this);
+ F32 est_tris = getEstTrianglesMax();
+ LL_DEBUGS("AXONLinkset") << vobj_name << " updateLOD to " << getLOD() << ", tris " << est_tris << LL_ENDL;
+ }
+#endif
gPipeline.markRebuild(mDrawable, LLDrawable::REBUILD_VOLUME, FALSE);
mLODChanged = TRUE;
}
@@ -3350,14 +3359,15 @@ U32 LLVOVolume::getExtendedMeshFlags() const
void LLVOVolume::onSetExtendedMeshFlags(U32 flags)
{
- // AXON - the check against mUserSelected is "empirically
+ // AXON - the check against isAnySelected() is "empirically
// derived": doing rebuildGeom() while in selection trashes the
// graphics state of animated objects. Skipping this update is OK
// because we get another one on deselect.
- if (mDrawable.notNull() && !mUserSelected)
+
+ if (!getRootEdit()->isAnySelected() && mDrawable.notNull())
{
// Need to trigger rebuildGeom(), which is where control avatars get created/removed
- markForUpdate(TRUE);
+ getRootEdit()->recursiveMarkForUpdate(TRUE);
}
if (isAttachment() && getAvatarAncestor())
{
@@ -4130,6 +4140,21 @@ const LLMatrix4& LLVOVolume::getWorldMatrix(LLXformMatrix* xform) const
return xform->getWorldMatrix();
}
+void LLVOVolume::markForUpdate(BOOL priority)
+{
+#if 1
+ // AXON debugging
+ if (isAnimatedObject() && isRiggedMesh())
+ {
+ std::string vobj_name = llformat("Vol%u", (U32) this);
+ F32 est_tris = getEstTrianglesMax();
+ LL_DEBUGS("AXONLinkset") << vobj_name << " markForUpdate, tris " << est_tris << LL_ENDL;
+ }
+#endif
+ LLViewerObject::markForUpdate(priority);
+ mVolumeChanged = TRUE;
+}
+
LLVector3 LLVOVolume::agentPositionToVolume(const LLVector3& pos) const
{
LLVector3 ret = pos - getRenderPosition();
@@ -5082,15 +5107,19 @@ void LLVolumeGeometryManager::rebuildGeom(LLSpatialGroup* group)
}
bool is_mesh = vobj->isMesh();
-
- LL_DEBUGS("AXON") << vobj_name << " rebuilding, isAttachment: " << (U32) vobj->isAttachment()
+ F32 est_tris = vobj->getEstTrianglesMax();
+
+#if 1
+ LL_DEBUGS("AXONLinkset") << vobj_name << " rebuilding, isAttachment: " << (U32) vobj->isAttachment()
<< " is_mesh " << is_mesh
+ << " est_tris " << est_tris
<< " is_animated " << vobj->isAnimatedObject()
<< " can_animate " << vobj->canBeAnimatedObject()
<< " cav " << vobj->getControlAvatar()
<< " playing " << (U32) (vobj->getControlAvatar() ? vobj->getControlAvatar()->mPlaying : false)
<< " frame " << LLFrameTimer::getFrameCount()
<< LL_ENDL;
+#endif
llassert_always(vobj);
vobj->updateTextureVirtualSize(true);
@@ -5633,6 +5662,15 @@ void LLVolumeGeometryManager::rebuildMesh(LLSpatialGroup* group)
if (drawablep && !drawablep->isDead() && drawablep->isState(LLDrawable::REBUILD_ALL) && !drawablep->isState(LLDrawable::RIGGED) )
{
LLVOVolume* vobj = drawablep->getVOVolume();
+#if 1
+ // AXON debugging
+ if (vobj->isAnimatedObject() && vobj->isRiggedMesh())
+ {
+ std::string vobj_name = llformat("Vol%u", (U32) vobj);
+ F32 est_tris = vobj->getEstTrianglesMax();
+ LL_DEBUGS("AXONLinkset") << vobj_name << " rebuildMesh, tris " << est_tris << LL_ENDL;
+ }
+#endif
vobj->preRebuild();
if (drawablep->isState(LLDrawable::ANIMATED_CHILD))