Misc changes via v3 merge. Nothing big.

This commit is contained in:
Shyotl
2012-12-03 15:03:52 -06:00
parent a8e1bd1538
commit ce3511f7ea
5 changed files with 53 additions and 22 deletions

View File

@@ -1861,8 +1861,6 @@ void LLVOAvatar::onShift(const LLVector4a& shift_vector)
const LLVector3& shift = reinterpret_cast<const LLVector3&>(shift_vector);
mLastAnimExtents[0] += shift;
mLastAnimExtents[1] += shift;
mNeedsImpostorUpdate = TRUE;
mNeedsAnimUpdate = TRUE;
}
void LLVOAvatar::updateSpatialExtents(LLVector4a& newMin, LLVector4a &newMax)
@@ -5243,7 +5241,20 @@ void LLVOAvatar::updateTextures()
LLWearableType::EType wearable_type = LLVOAvatarDictionary::getTEWearableType((ETextureIndex)texture_index);
U32 num_wearables = gAgentWearables.getWearableCount(wearable_type);
const LLTextureEntry *te = getTE(texture_index);
const F32 texel_area_ratio = fabs(te->mScaleS * te->mScaleT);
// getTE can return 0.
// Not sure yet why it does, but of course it crashes when te->mScale? gets used.
// Put safeguard in place so this corner case get better handling and does not result in a crash.
F32 texel_area_ratio = 1.0f;
if( te )
{
texel_area_ratio = fabs(te->mScaleS * te->mScaleT);
}
else
{
llwarns << "getTE( " << texture_index << " ) returned 0" <<llendl;
}
LLViewerFetchedTexture *imagep = NULL;
for (U32 wearable_index = 0; wearable_index < num_wearables; wearable_index++)
{
@@ -9744,17 +9755,14 @@ BOOL LLVOAvatar::isTextureDefined(LLVOAvatarDefines::ETextureIndex te, U32 index
return FALSE;
}
LLViewerTexture* img = getImage(te, index);
if(img)
if( !getImage( te, index ) )
{
return (img->getID() != IMG_DEFAULT_AVATAR &&
img->getID() != IMG_DEFAULT);
}
else
{
llwarns << "Image doesn't exist" << llendl;
llwarns << "getImage( " << te << ", " << index << " ) returned 0" << llendl;
return FALSE;
}
return (getImage(te, index)->getID() != IMG_DEFAULT_AVATAR &&
getImage(te, index)->getID() != IMG_DEFAULT);
}
//virtual

View File

@@ -2308,11 +2308,25 @@ void LLVOAvatarSelf::setNewBakedTexture( ETextureIndex te, const LLUUID& uuid )
if (isAllLocalTextureDataFinal())
{
LLNotificationsUtil::add("AvatarRezSelfBakedDoneNotification",args);
LL_DEBUGS("Avatar") << "REZTIME: [ " << (U32)mDebugExistenceTimer.getElapsedTimeF32()
<< "sec ]"
<< avString()
<< "RuthTimer " << (U32)mRuthDebugTimer.getElapsedTimeF32()
<< " SelfLoadTimer " << (U32)mDebugSelfLoadTimer.getElapsedTimeF32()
<< " Notification " << "AvatarRezSelfBakedDoneNotification"
<< llendl;
}
else
{
args["STATUS"] = debugDumpAllLocalTextureDataInfo();
LLNotificationsUtil::add("AvatarRezSelfBakedUpdateNotification",args);
LL_DEBUGS("Avatar") << "REZTIME: [ " << (U32)mDebugExistenceTimer.getElapsedTimeF32()
<< "sec ]"
<< avString()
<< "RuthTimer " << (U32)mRuthDebugTimer.getElapsedTimeF32()
<< " SelfLoadTimer " << (U32)mDebugSelfLoadTimer.getElapsedTimeF32()
<< " Notification " << "AvatarRezSelfBakedUpdateNotification"
<< llendl;
}
}
@@ -2320,6 +2334,7 @@ void LLVOAvatarSelf::setNewBakedTexture( ETextureIndex te, const LLUUID& uuid )
}
}
// FIXME: This is not called consistently. Something may be broken.
void LLVOAvatarSelf::outputRezDiagnostics() const
{
if(!gSavedSettings.getBOOL("DebugAvatarLocalTexLoadedTime"))
@@ -2328,11 +2343,11 @@ void LLVOAvatarSelf::outputRezDiagnostics() const
}
const F32 final_time = mDebugSelfLoadTimer.getElapsedTimeF32();
llinfos << "REZTIME: Myself rez stats:" << llendl;
llinfos << "\t Time from avatar creation to load wearables: " << (S32)mDebugTimeWearablesLoaded << llendl;
llinfos << "\t Time from avatar creation to de-cloud: " << (S32)mDebugTimeAvatarVisible << llendl;
llinfos << "\t Time from avatar creation to de-cloud for others: " << (S32)final_time << llendl;
llinfos << "\t Load time for each texture: " << llendl;
LL_DEBUGS("Avatar") << "REZTIME: Myself rez stats:" << llendl;
LL_DEBUGS("Avatar") << "\t Time from avatar creation to load wearables: " << (S32)mDebugTimeWearablesLoaded << llendl;
LL_DEBUGS("Avatar") << "\t Time from avatar creation to de-cloud: " << (S32)mDebugTimeAvatarVisible << llendl;
LL_DEBUGS("Avatar") << "\t Time from avatar creation to de-cloud for others: " << (S32)final_time << llendl;
LL_DEBUGS("Avatar") << "\t Load time for each texture: " << llendl;
for (U32 i = 0; i < LLVOAvatarDefines::TEX_NUM_INDICES; ++i)
{
std::stringstream out;
@@ -2356,12 +2371,14 @@ void LLVOAvatarSelf::outputRezDiagnostics() const
// Don't print out non-existent textures.
if (j != 0)
llinfos << out.str() << llendl;
{
LL_DEBUGS("Avatar") << out.str() << LL_ENDL;
}
}
llinfos << "\t Time points for each upload (start / finish)" << llendl;
LL_DEBUGS("Avatar") << "\t Time points for each upload (start / finish)" << llendl;
for (U32 i = 0; i < LLVOAvatarDefines::BAKED_NUM_INDICES; ++i)
{
llinfos << "\t\t (" << i << ") \t" << (S32)mDebugBakedTextureTimes[i][0] << " / " << (S32)mDebugBakedTextureTimes[i][1] << llendl;
LL_DEBUGS("Avatar") << "\t\t (" << i << ") \t" << (S32)mDebugBakedTextureTimes[i][0] << " / " << (S32)mDebugBakedTextureTimes[i][1] << llendl;
}
for (LLVOAvatarDefines::LLVOAvatarDictionary::BakedTextures::const_iterator baked_iter = LLVOAvatarDefines::LLVOAvatarDictionary::getInstance()->getBakedTextures().begin();
@@ -2373,15 +2390,16 @@ void LLVOAvatarSelf::outputRezDiagnostics() const
if (!layerset) continue;
const LLTexLayerSetBuffer *layerset_buffer = layerset->getComposite();
if (!layerset_buffer) continue;
llinfos << layerset_buffer->dumpTextureInfo() << llendl;
LL_DEBUGS("Avatar") << layerset_buffer->dumpTextureInfo() << llendl;
}
}
void LLVOAvatarSelf::outputRezTiming(const std::string& msg) const
{
LL_DEBUGS("Avatar Rez")
LL_INFOS("Avatar")
<< avString()
<< llformat("%s. Time from avatar creation: %.2f", msg.c_str(), mDebugSelfLoadTimer.getElapsedTimeF32())
<< llendl;
<< LL_ENDL;
}
void LLVOAvatarSelf::reportAvatarRezTime() const

View File

@@ -3063,6 +3063,7 @@ void LLRiggedVolume::update(const LLMeshSkinInfo* skin, LLVOAvatar* avatar, cons
LLVector4a* pos = dst_face.mPositions;
if( pos && dst_face.mExtents )
{
LLFastTimer t(FTM_SKIN_RIGGED);

View File

@@ -1800,6 +1800,7 @@ void LLPipeline::grabReferences(LLCullResult& result)
void LLPipeline::clearReferences()
{
sCull = NULL;
mGroupSaveQ1.clear();
}
void check_references(LLSpatialGroup* group, LLDrawable* drawable)
@@ -2443,6 +2444,7 @@ void LLPipeline::rebuildPriorityGroups()
group->clearState(LLSpatialGroup::IN_BUILD_Q1);
}
mGroupSaveQ1 = mGroupQ1;
mGroupQ1.clear();
mGroupQ1Locked = false;

View File

@@ -658,6 +658,8 @@ protected:
LLSpatialGroup::sg_vector_t mGroupQ1; //priority
LLSpatialGroup::sg_vector_t mGroupQ2; // non-priority
LLSpatialGroup::sg_vector_t mGroupSaveQ1; // a place to save mGroupQ1 until it is safe to unref
LLSpatialGroup::sg_vector_t mMeshDirtyGroup; //groups that need rebuildMesh called
U32 mMeshDirtyQueryObject;