summaryrefslogtreecommitdiff
path: root/indra/newview/lltoolmorph.cpp
diff options
context:
space:
mode:
authorAndrey Kleshchev <117672381+akleshchev@users.noreply.github.com>2026-08-06 22:36:32 +0300
committerAndrey Kleshchev <117672381+akleshchev@users.noreply.github.com>2026-08-08 13:31:04 +0300
commit68b08e47e98337c48705bfbd9b1f675ec3045bf3 (patch)
tree664993b1ec2658a1b86f1572e8a9f4d4d89f51af /indra/newview/lltoolmorph.cpp
parentde0a0dc276eacb4a724b58644ddf0e3eeeb0335c (diff)
#6071 Exra logging and guards for LLVisualParamHint
Diffstat (limited to 'indra/newview/lltoolmorph.cpp')
-rw-r--r--indra/newview/lltoolmorph.cpp29
1 files changed, 28 insertions, 1 deletions
diff --git a/indra/newview/lltoolmorph.cpp b/indra/newview/lltoolmorph.cpp
index 1f3115ef29..a545d32d12 100644
--- a/indra/newview/lltoolmorph.cpp
+++ b/indra/newview/lltoolmorph.cpp
@@ -165,6 +165,13 @@ bool LLVisualParamHint::needsRender()
void LLVisualParamHint::preRender(bool clear_depth)
{
+ LL_DEBUGS("ParamHint") << "preRender: param=" << mVisualParam->getName()
+ << " id=" << mVisualParam->getID()
+ << " weight=" << mVisualParamWeight
+ << " dirtyMesh=" << gAgentAvatarp->mDirtyMesh
+ << " pixelArea=" << gAgentAvatarp->mAdjustedPixelArea
+ << " appearanceAnimating=" << gAgentAvatarp->getIsAppearanceAnimating()
+ << LL_ENDL;
LLViewerWearable* wearable = dynamic_cast<LLViewerWearable*>(mWearablePtr);
if (wearable)
{
@@ -184,6 +191,19 @@ void LLVisualParamHint::preRender(bool clear_depth)
{
gAgentAvatarp->updateGeometry(gAgentAvatarp->mDrawable);
gAgentAvatarp->updateLOD();
+
+ if (gAgentAvatarp->mDrawable->isState(LLDrawable::REBUILD_GEOMETRY))
+ {
+ LL_WARNS_ONCE("ParamHint") << "preRender: clearing REBUILD_GEOMETRY after updateGeometry/updateLOD"
+ << " param=" << mVisualParam->getName()
+ << " dirtyMesh=" << gAgentAvatarp->mDirtyMesh
+ << LL_ENDL;
+ // Clear REBUILD_GEOMETRY so that renderSkinned inside generateImpostor
+ // does not re-run updateMeshData() with a partially consistent mesh state,
+ // which would reassign mFace pointers on some meshes while others are
+ // mid-draw with stale vertex offsets.
+ gAgentAvatarp->mDrawable->clearState(LLDrawable::REBUILD_GEOMETRY);
+ }
}
else
{
@@ -263,8 +283,15 @@ bool LLVisualParamHint::render()
LLViewerCamera::getInstance()->setPerspective(false, mOrigin.mX, mOrigin.mY, mFullWidth, mFullHeight, false);
- if (gAgentAvatarp->mDrawable.notNull())
+ llassert(!LLPipeline::sImpostorRender); // We are rendering this from UI, shouldn't be set
+ if (gAgentAvatarp->mDrawable.notNull() && !LLPipeline::sImpostorRender)
{
+ LL_DEBUGS("ParamHint") << "render: generating impostor"
+ << " param=" << mVisualParam->getName()
+ << " drawableState=0x" << std::hex << gAgentAvatarp->mDrawable->getState() << std::dec
+ << " dirtyMesh=" << gAgentAvatarp->mDirtyMesh
+ << " mMeshValid=" << gAgentAvatarp->mMeshValid
+ << LL_ENDL;
LLGLDepthTest gls_depth(GL_TRUE, GL_TRUE);
gGL.flush();
gGL.setSceneBlendType(LLRender::BT_REPLACE);