#6071 Exra logging and guards for LLVisualParamHint (FS:TJ- Cherry-pick to fix FIRE-36891)
parent
64e663c578
commit
2764b133db
|
|
@ -619,6 +619,7 @@ void LLDrawPoolAvatar::beginSkinned()
|
|||
|
||||
sVertexProgram->bind();
|
||||
sVertexProgram->setMinimumAlpha(LLDrawPoolAvatar::sMinimumAlpha);
|
||||
sDiffuseChannel = sVertexProgram->enableTexture(LLViewerShaderMgr::DIFFUSE_MAP);
|
||||
}
|
||||
|
||||
void LLDrawPoolAvatar::endSkinned()
|
||||
|
|
@ -632,6 +633,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();
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
{
|
||||
|
|
@ -188,6 +195,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
|
||||
{
|
||||
|
|
@ -267,8 +287,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);
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -95,6 +95,7 @@ class LLVOAvatar :
|
|||
public:
|
||||
friend class LLVOAvatarSelf;
|
||||
friend class LLAvatarCheckImpostorMode;
|
||||
friend class LLVisualParamHint;
|
||||
|
||||
/********************************************************************************
|
||||
** **
|
||||
|
|
|
|||
Loading…
Reference in New Issue