diff options
| author | Andrey Kleshchev <117672381+akleshchev@users.noreply.github.com> | 2026-08-06 22:36:32 +0300 |
|---|---|---|
| committer | Andrey Kleshchev <117672381+akleshchev@users.noreply.github.com> | 2026-08-08 13:31:04 +0300 |
| commit | 68b08e47e98337c48705bfbd9b1f675ec3045bf3 (patch) | |
| tree | 664993b1ec2658a1b86f1572e8a9f4d4d89f51af | |
| parent | de0a0dc276eacb4a724b58644ddf0e3eeeb0335c (diff) | |
#6071 Exra logging and guards for LLVisualParamHint
| -rw-r--r-- | indra/newview/lldrawpoolavatar.cpp | 2 | ||||
| -rw-r--r-- | indra/newview/lltoolmorph.cpp | 29 | ||||
| -rw-r--r-- | indra/newview/llviewerjoint.cpp | 1 | ||||
| -rw-r--r-- | indra/newview/llvoavatar.h | 1 |
4 files changed, 32 insertions, 1 deletions
diff --git a/indra/newview/lldrawpoolavatar.cpp b/indra/newview/lldrawpoolavatar.cpp index 61f0e3e365..9386206e76 100644 --- a/indra/newview/lldrawpoolavatar.cpp +++ b/indra/newview/lldrawpoolavatar.cpp @@ -611,6 +611,7 @@ void LLDrawPoolAvatar::beginSkinned() sVertexProgram->bind(); sVertexProgram->setMinimumAlpha(LLDrawPoolAvatar::sMinimumAlpha); + sDiffuseChannel = sVertexProgram->enableTexture(LLViewerShaderMgr::DIFFUSE_MAP); } void LLDrawPoolAvatar::endSkinned() @@ -624,6 +625,7 @@ void LLDrawPoolAvatar::endSkinned() // if we're in software-blending, remember to set the fence _after_ we draw so we wait till this rendering is done sRenderingSkinned = false; + sVertexProgram->disableTexture(LLViewerShaderMgr::DIFFUSE_MAP); sVertexProgram->disableTexture(LLViewerShaderMgr::BUMP_MAP); gGL.getTexUnit(0)->activate(); sVertexProgram->unbind(); 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); diff --git a/indra/newview/llviewerjoint.cpp b/indra/newview/llviewerjoint.cpp index 3c5c4752df..125465f326 100644 --- a/indra/newview/llviewerjoint.cpp +++ b/indra/newview/llviewerjoint.cpp @@ -145,6 +145,7 @@ U32 LLViewerJoint::render( F32 pixelArea, bool first_pass, bool is_dummy ) { // LLViewerJoint is derived from LLAvatarJoint, // all children of LLAvatarJoint are assumed to be LLAvatarJoint + // LLJoint is not used directly and is always LLAvatarJoint LLAvatarJoint* joint = static_cast<LLAvatarJoint*>(j); F32 jointLOD = joint->getLOD(); if (pixelArea >= jointLOD || sDisableLOD) diff --git a/indra/newview/llvoavatar.h b/indra/newview/llvoavatar.h index 3457e7bb6a..0ac4db8fcf 100644 --- a/indra/newview/llvoavatar.h +++ b/indra/newview/llvoavatar.h @@ -95,6 +95,7 @@ class LLVOAvatar : public: friend class LLVOAvatarSelf; friend class LLAvatarCheckImpostorMode; + friend class LLVisualParamHint; /******************************************************************************** ** ** |
