Fast Timers brought up to linden equiv
This commit is contained in:
@@ -193,21 +193,30 @@ void LLCharacter::requestStopMotion( LLMotion* motion)
|
|||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
// updateMotions()
|
// updateMotions()
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
|
static LLFastTimer::DeclareTimer FTM_UPDATE_ANIMATION("Update Animation");
|
||||||
|
static LLFastTimer::DeclareTimer FTM_UPDATE_HIDDEN_ANIMATION("Update Hidden Anim");
|
||||||
|
static LLFastTimer::DeclareTimer FTM_UPDATE_MOTIONS("Update Motions");
|
||||||
|
|
||||||
void LLCharacter::updateMotions(e_update_t update_type)
|
void LLCharacter::updateMotions(e_update_t update_type)
|
||||||
{
|
{
|
||||||
if (update_type == HIDDEN_UPDATE)
|
if (update_type == HIDDEN_UPDATE)
|
||||||
{
|
{
|
||||||
|
LLFastTimer t(FTM_UPDATE_HIDDEN_ANIMATION);
|
||||||
mMotionController.updateMotionsMinimal();
|
mMotionController.updateMotionsMinimal();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
LLFastTimer t(FTM_UPDATE_ANIMATION);
|
||||||
// unpause if the number of outstanding pause requests has dropped to the initial one
|
// unpause if the number of outstanding pause requests has dropped to the initial one
|
||||||
if (mMotionController.isPaused() && mPauseRequest->getNumRefs() == 1)
|
if (mMotionController.isPaused() && mPauseRequest->getNumRefs() == 1)
|
||||||
{
|
{
|
||||||
mMotionController.unpauseAllMotions();
|
mMotionController.unpauseAllMotions();
|
||||||
}
|
}
|
||||||
bool force_update = (update_type == FORCE_UPDATE);
|
bool force_update = (update_type == FORCE_UPDATE);
|
||||||
mMotionController.updateMotions(force_update);
|
{
|
||||||
|
LLFastTimer t(FTM_UPDATE_MOTIONS);
|
||||||
|
mMotionController.updateMotions(force_update);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -547,6 +547,8 @@ void LLMotionController::updateIdleActiveMotions()
|
|||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
// updateMotionsByType()
|
// updateMotionsByType()
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
|
static LLFastTimer::DeclareTimer FTM_MOTION_ON_UPDATE("Motion onUpdate");
|
||||||
|
|
||||||
void LLMotionController::updateMotionsByType(LLMotion::LLMotionBlendType anim_type)
|
void LLMotionController::updateMotionsByType(LLMotion::LLMotionBlendType anim_type)
|
||||||
{
|
{
|
||||||
BOOL update_result = TRUE;
|
BOOL update_result = TRUE;
|
||||||
@@ -704,7 +706,10 @@ void LLMotionController::updateMotionsByType(LLMotion::LLMotionBlendType anim_ty
|
|||||||
}
|
}
|
||||||
|
|
||||||
// perform motion update
|
// perform motion update
|
||||||
update_result = motionp->onUpdate(mAnimTime - motionp->mActivationTimestamp, last_joint_signature);
|
{
|
||||||
|
LLFastTimer t(FTM_MOTION_ON_UPDATE);
|
||||||
|
update_result = motionp->onUpdate(mAnimTime - motionp->mActivationTimestamp, last_joint_signature);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//**********************
|
//**********************
|
||||||
|
|||||||
@@ -253,6 +253,8 @@ LLIOPipe::EStatus LLURLRequest::handleError(
|
|||||||
}
|
}
|
||||||
|
|
||||||
static LLFastTimer::DeclareTimer FTM_PROCESS_URL_REQUEST("URL Request");
|
static LLFastTimer::DeclareTimer FTM_PROCESS_URL_REQUEST("URL Request");
|
||||||
|
static LLFastTimer::DeclareTimer FTM_PROCESS_URL_REQUEST_GET_RESULT("Get Result");
|
||||||
|
static LLFastTimer::DeclareTimer FTM_URL_PERFORM("Perform");
|
||||||
|
|
||||||
// virtual
|
// virtual
|
||||||
LLIOPipe::EStatus LLURLRequest::process_impl(
|
LLIOPipe::EStatus LLURLRequest::process_impl(
|
||||||
@@ -323,7 +325,6 @@ LLIOPipe::EStatus LLURLRequest::process_impl(
|
|||||||
{
|
{
|
||||||
PUMP_DEBUG;
|
PUMP_DEBUG;
|
||||||
LLIOPipe::EStatus status = STATUS_BREAK;
|
LLIOPipe::EStatus status = STATUS_BREAK;
|
||||||
static LLFastTimer::DeclareTimer FTM_URL_PERFORM("Perform");
|
|
||||||
{
|
{
|
||||||
LLFastTimer t(FTM_URL_PERFORM);
|
LLFastTimer t(FTM_URL_PERFORM);
|
||||||
mDetail->mCurlRequest->perform();
|
mDetail->mCurlRequest->perform();
|
||||||
@@ -333,8 +334,6 @@ LLIOPipe::EStatus LLURLRequest::process_impl(
|
|||||||
{
|
{
|
||||||
CURLcode result;
|
CURLcode result;
|
||||||
|
|
||||||
static LLFastTimer::DeclareTimer FTM_PROCESS_URL_REQUEST_GET_RESULT("Get Result");
|
|
||||||
|
|
||||||
bool newmsg = false;
|
bool newmsg = false;
|
||||||
{
|
{
|
||||||
LLFastTimer t(FTM_PROCESS_URL_REQUEST_GET_RESULT);
|
LLFastTimer t(FTM_PROCESS_URL_REQUEST_GET_RESULT);
|
||||||
|
|||||||
@@ -290,9 +290,11 @@ S32 LLImageGL::dataFormatComponents(S32 dataformat)
|
|||||||
|
|
||||||
//----------------------------------------------------------------------------
|
//----------------------------------------------------------------------------
|
||||||
|
|
||||||
|
static LLFastTimer::DeclareTimer FTM_IMAGE_UPDATE_STATS("Image Stats");
|
||||||
// static
|
// static
|
||||||
void LLImageGL::updateStats(F32 current_time)
|
void LLImageGL::updateStats(F32 current_time)
|
||||||
{
|
{
|
||||||
|
LLFastTimer t(FTM_IMAGE_UPDATE_STATS);
|
||||||
sLastFrameTime = current_time;
|
sLastFrameTime = current_time;
|
||||||
sBoundTextureMemoryInBytes = sCurBoundTextureMemory;
|
sBoundTextureMemoryInBytes = sCurBoundTextureMemory;
|
||||||
sCurBoundTextureMemory = 0;
|
sCurBoundTextureMemory = 0;
|
||||||
|
|||||||
@@ -92,9 +92,15 @@ bool LLTrans::parseStrings(const std::string& xml_filename, const std::set<std::
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static LLFastTimer::DeclareTimer FTM_GET_TRANS("Translate string");
|
||||||
|
|
||||||
//static
|
//static
|
||||||
std::string LLTrans::getString(const std::string &xml_desc, const LLStringUtil::format_map_t& msg_args)
|
std::string LLTrans::getString(const std::string &xml_desc, const LLStringUtil::format_map_t& msg_args)
|
||||||
{
|
{
|
||||||
|
// Don't care about time as much as call count. Make sure we're not
|
||||||
|
// calling LLTrans::getString() in an inner loop. JC
|
||||||
|
LLFastTimer timer(FTM_GET_TRANS);
|
||||||
|
|
||||||
template_map_t::iterator iter = sStringTemplates.find(xml_desc);
|
template_map_t::iterator iter = sStringTemplates.find(xml_desc);
|
||||||
|
|
||||||
if (iter != sStringTemplates.end())
|
if (iter != sStringTemplates.end())
|
||||||
@@ -122,7 +128,7 @@ std::string LLTrans::getString(const std::string &xml_desc, const LLSD& msg_args
|
|||||||
{
|
{
|
||||||
// Don't care about time as much as call count. Make sure we're not
|
// Don't care about time as much as call count. Make sure we're not
|
||||||
// calling LLTrans::getString() in an inner loop. JC
|
// calling LLTrans::getString() in an inner loop. JC
|
||||||
//V3: LLFastTimer timer(FTM_GET_TRANS);
|
LLFastTimer timer(FTM_GET_TRANS);
|
||||||
|
|
||||||
template_map_t::iterator iter = sStringTemplates.find(xml_desc);
|
template_map_t::iterator iter = sStringTemplates.find(xml_desc);
|
||||||
if (iter != sStringTemplates.end())
|
if (iter != sStringTemplates.end())
|
||||||
@@ -141,7 +147,7 @@ std::string LLTrans::getString(const std::string &xml_desc, const LLSD& msg_args
|
|||||||
//static
|
//static
|
||||||
bool LLTrans::findString(std::string &result, const std::string &xml_desc, const LLStringUtil::format_map_t& msg_args)
|
bool LLTrans::findString(std::string &result, const std::string &xml_desc, const LLStringUtil::format_map_t& msg_args)
|
||||||
{
|
{
|
||||||
//V3: LLFastTimer timer(FTM_GET_TRANS);
|
LLFastTimer timer(FTM_GET_TRANS);
|
||||||
|
|
||||||
template_map_t::iterator iter = sStringTemplates.find(xml_desc);
|
template_map_t::iterator iter = sStringTemplates.find(xml_desc);
|
||||||
if (iter != sStringTemplates.end())
|
if (iter != sStringTemplates.end())
|
||||||
|
|||||||
@@ -293,8 +293,11 @@ public:
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
LLFastTimer::DeclareTimer FTM_FOCUS_FIRST_ITEM("Focus First Item");
|
||||||
|
|
||||||
BOOL LLUICtrl::focusFirstItem(BOOL prefer_text_fields, BOOL focus_flash)
|
BOOL LLUICtrl::focusFirstItem(BOOL prefer_text_fields, BOOL focus_flash)
|
||||||
{
|
{
|
||||||
|
LLFastTimer _(FTM_FOCUS_FIRST_ITEM);
|
||||||
// try to select default tab group child
|
// try to select default tab group child
|
||||||
LLCtrlQuery query = getTabOrderQuery();
|
LLCtrlQuery query = getTabOrderQuery();
|
||||||
// sort things such that the default tab group is at the front
|
// sort things such that the default tab group is at the front
|
||||||
|
|||||||
@@ -1507,7 +1507,7 @@ BOOL LLView::hasChild(const std::string& childname, BOOL recurse) const
|
|||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
// getChildView()
|
// getChildView()
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
static LLFastTimer::DeclareTimer FTM_FIND_VIEWS("Find Views");
|
static LLFastTimer::DeclareTimer FTM_FIND_VIEWS("Find Widgets");
|
||||||
|
|
||||||
LLView* LLView::getChildView(const std::string& name, BOOL recurse, BOOL create_if_missing) const
|
LLView* LLView::getChildView(const std::string& name, BOOL recurse, BOOL create_if_missing) const
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1017,6 +1017,8 @@ void LLAppViewer::checkMemory()
|
|||||||
|
|
||||||
static LLFastTimer::DeclareTimer FTM_MESSAGES("System Messages");
|
static LLFastTimer::DeclareTimer FTM_MESSAGES("System Messages");
|
||||||
static LLFastTimer::DeclareTimer FTM_SLEEP("Sleep");
|
static LLFastTimer::DeclareTimer FTM_SLEEP("Sleep");
|
||||||
|
static LLFastTimer::DeclareTimer FTM_YIELD("Yield");
|
||||||
|
|
||||||
static LLFastTimer::DeclareTimer FTM_TEXTURE_CACHE("Texture Cache");
|
static LLFastTimer::DeclareTimer FTM_TEXTURE_CACHE("Texture Cache");
|
||||||
static LLFastTimer::DeclareTimer FTM_DECODE("Image Decode");
|
static LLFastTimer::DeclareTimer FTM_DECODE("Image Decode");
|
||||||
static LLFastTimer::DeclareTimer FTM_VFS("VFS Thread");
|
static LLFastTimer::DeclareTimer FTM_VFS("VFS Thread");
|
||||||
@@ -1207,6 +1209,7 @@ bool LLAppViewer::mainLoop()
|
|||||||
// yield some time to the os based on command line option
|
// yield some time to the os based on command line option
|
||||||
if(mYieldTime >= 0)
|
if(mYieldTime >= 0)
|
||||||
{
|
{
|
||||||
|
LLFastTimer t(FTM_YIELD);
|
||||||
ms_sleep(mYieldTime);
|
ms_sleep(mYieldTime);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -99,7 +99,6 @@ S32 AVATAR_OFFSET_TEX0 = 32;
|
|||||||
S32 AVATAR_OFFSET_TEX1 = 40;
|
S32 AVATAR_OFFSET_TEX1 = 40;
|
||||||
S32 AVATAR_VERTEX_BYTES = 48;
|
S32 AVATAR_VERTEX_BYTES = 48;
|
||||||
|
|
||||||
|
|
||||||
BOOL gAvatarEmbossBumpMap = FALSE;
|
BOOL gAvatarEmbossBumpMap = FALSE;
|
||||||
static BOOL sRenderingSkinned = FALSE;
|
static BOOL sRenderingSkinned = FALSE;
|
||||||
S32 normal_channel = -1;
|
S32 normal_channel = -1;
|
||||||
@@ -1040,9 +1039,12 @@ void LLDrawPoolAvatar::endDeferredSkinned()
|
|||||||
gGL.getTexUnit(0)->activate();
|
gGL.getTexUnit(0)->activate();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static LLFastTimer::DeclareTimer FTM_RENDER_AVATARS("renderAvatars");
|
||||||
|
|
||||||
void LLDrawPoolAvatar::renderAvatars(LLVOAvatar* single_avatar, S32 pass)
|
void LLDrawPoolAvatar::renderAvatars(LLVOAvatar* single_avatar, S32 pass)
|
||||||
{
|
{
|
||||||
|
LLFastTimer t(FTM_RENDER_AVATARS);
|
||||||
|
|
||||||
if (pass == -1)
|
if (pass == -1)
|
||||||
{
|
{
|
||||||
for (S32 i = 1; i < getNumPasses(); i++)
|
for (S32 i = 1; i < getNumPasses(); i++)
|
||||||
@@ -1546,8 +1548,12 @@ void LLDrawPoolAvatar::renderDeferredRiggedBump(LLVOAvatar* avatar)
|
|||||||
renderRigged(avatar, RIGGED_DEFERRED_BUMP);
|
renderRigged(avatar, RIGGED_DEFERRED_BUMP);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static LLFastTimer::DeclareTimer FTM_RIGGED_VBO("Rigged VBO");
|
||||||
|
|
||||||
void LLDrawPoolAvatar::updateRiggedVertexBuffers(LLVOAvatar* avatar)
|
void LLDrawPoolAvatar::updateRiggedVertexBuffers(LLVOAvatar* avatar)
|
||||||
{
|
{
|
||||||
|
LLFastTimer t(FTM_RIGGED_VBO);
|
||||||
|
|
||||||
//update rigged vertex buffers
|
//update rigged vertex buffers
|
||||||
for (U32 type = 0; type < NUM_RIGGED_PASSES; ++type)
|
for (U32 type = 0; type < NUM_RIGGED_PASSES; ++type)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1912,8 +1912,12 @@ BOOL LLPolySkeletalDistortion::setInfo(LLPolySkeletalDistortionInfo *info)
|
|||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
// apply()
|
// apply()
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
|
static LLFastTimer::DeclareTimer FTM_POLYSKELETAL_DISTORTION_APPLY("Skeletal Distortion");
|
||||||
|
|
||||||
void LLPolySkeletalDistortion::apply( ESex avatar_sex )
|
void LLPolySkeletalDistortion::apply( ESex avatar_sex )
|
||||||
{
|
{
|
||||||
|
LLFastTimer t(FTM_POLYSKELETAL_DISTORTION_APPLY);
|
||||||
|
|
||||||
F32 effective_weight = ( getSex() & avatar_sex ) ? mCurWeight : getDefaultWeight();
|
F32 effective_weight = ( getSex() & avatar_sex ) ? mCurWeight : getDefaultWeight();
|
||||||
|
|
||||||
LLJoint* joint;
|
LLJoint* joint;
|
||||||
|
|||||||
@@ -781,6 +781,8 @@ F32 LLPolyMorphTarget::getMaxDistortion()
|
|||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
// apply()
|
// apply()
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
|
static LLFastTimer::DeclareTimer FTM_APPLY_MORPH_TARGET("Apply Morph");
|
||||||
|
|
||||||
void LLPolyMorphTarget::apply( ESex avatar_sex )
|
void LLPolyMorphTarget::apply( ESex avatar_sex )
|
||||||
{
|
{
|
||||||
if (!mMorphData || mNumMorphMasksPending > 0)
|
if (!mMorphData || mNumMorphMasksPending > 0)
|
||||||
@@ -788,6 +790,8 @@ void LLPolyMorphTarget::apply( ESex avatar_sex )
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
LLFastTimer t(FTM_APPLY_MORPH_TARGET);
|
||||||
|
|
||||||
mLastSex = avatar_sex;
|
mLastSex = avatar_sex;
|
||||||
|
|
||||||
// Check for NaN condition (NaN is detected if a variable doesn't equal itself.
|
// Check for NaN condition (NaN is detected if a variable doesn't equal itself.
|
||||||
|
|||||||
@@ -1499,6 +1499,10 @@ void LLViewerObjectList::onPhysicsFlagsFetchFailure(const LLUUID& object_id)
|
|||||||
mPendingPhysicsFlags.erase(object_id);
|
mPendingPhysicsFlags.erase(object_id);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static LLFastTimer::DeclareTimer FTM_SHIFT_OBJECTS("Shift Objects");
|
||||||
|
static LLFastTimer::DeclareTimer FTM_PIPELINE_SHIFT("Pipeline Shift");
|
||||||
|
static LLFastTimer::DeclareTimer FTM_REGION_SHIFT("Region Shift");
|
||||||
|
|
||||||
void LLViewerObjectList::shiftObjects(const LLVector3 &offset)
|
void LLViewerObjectList::shiftObjects(const LLVector3 &offset)
|
||||||
{
|
{
|
||||||
// This is called when we shift our origin when we cross region boundaries...
|
// This is called when we shift our origin when we cross region boundaries...
|
||||||
@@ -1510,6 +1514,8 @@ void LLViewerObjectList::shiftObjects(const LLVector3 &offset)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
LLFastTimer t(FTM_SHIFT_OBJECTS);
|
||||||
|
|
||||||
LLViewerObject *objectp;
|
LLViewerObject *objectp;
|
||||||
for (vobj_list_t::iterator iter = mObjects.begin(); iter != mObjects.end(); ++iter)
|
for (vobj_list_t::iterator iter = mObjects.begin(); iter != mObjects.end(); ++iter)
|
||||||
{
|
{
|
||||||
@@ -1526,8 +1532,15 @@ void LLViewerObjectList::shiftObjects(const LLVector3 &offset)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
gPipeline.shiftObjects(offset);
|
{
|
||||||
LLWorld::getInstance()->shiftRegions(offset);
|
LLFastTimer t(FTM_PIPELINE_SHIFT);
|
||||||
|
gPipeline.shiftObjects(offset);
|
||||||
|
}
|
||||||
|
|
||||||
|
{
|
||||||
|
LLFastTimer t(FTM_REGION_SHIFT);
|
||||||
|
LLWorld::getInstance()->shiftRegions(offset);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void LLViewerObjectList::repartitionObjects()
|
void LLViewerObjectList::repartitionObjects()
|
||||||
@@ -2062,8 +2075,8 @@ void LLViewerObjectList::findOrphans(LLViewerObject* objectp, U32 ip, U32 port)
|
|||||||
llinfos << "Agent: " << objectp->getPositionAgent() << llendl;
|
llinfos << "Agent: " << objectp->getPositionAgent() << llendl;
|
||||||
addDebugBeacon(objectp->getPositionAgent(),"");
|
addDebugBeacon(objectp->getPositionAgent(),"");
|
||||||
#endif
|
#endif
|
||||||
gPipeline.markMoved(objectp->mDrawable);
|
gPipeline.markMoved(objectp->mDrawable);
|
||||||
objectp->setChanged(LLXform::MOVED | LLXform::SILHOUETTE);
|
objectp->setChanged(LLXform::MOVED | LLXform::SILHOUETTE);
|
||||||
|
|
||||||
// Flag the object as no longer orphaned
|
// Flag the object as no longer orphaned
|
||||||
childp->mOrphaned = FALSE;
|
childp->mOrphaned = FALSE;
|
||||||
|
|||||||
@@ -330,6 +330,7 @@ BOOL LLVOGrass::idleUpdate(LLAgent &agent, LLWorld &world, const F64 &time)
|
|||||||
|
|
||||||
return TRUE ;
|
return TRUE ;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (mPatch && (mLastPatchUpdateTime != mPatch->getLastUpdateTime()))
|
if (mPatch && (mLastPatchUpdateTime != mPatch->getLastUpdateTime()))
|
||||||
{
|
{
|
||||||
gPipeline.markRebuild(mDrawable, LLDrawable::REBUILD_VOLUME, TRUE);
|
gPipeline.markRebuild(mDrawable, LLDrawable::REBUILD_VOLUME, TRUE);
|
||||||
|
|||||||
@@ -167,6 +167,7 @@ void LLVOPartGroup::freeVBSlot(S32 idx)
|
|||||||
*sVBSlotCursor = idx;
|
*sVBSlotCursor = idx;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
LLVOPartGroup::LLVOPartGroup(const LLUUID &id, const LLPCode pcode, LLViewerRegion *regionp)
|
LLVOPartGroup::LLVOPartGroup(const LLUUID &id, const LLPCode pcode, LLViewerRegion *regionp)
|
||||||
: LLAlphaObject(id, pcode, regionp),
|
: LLAlphaObject(id, pcode, regionp),
|
||||||
mViewerPartGroupp(NULL)
|
mViewerPartGroupp(NULL)
|
||||||
@@ -181,7 +182,6 @@ LLVOPartGroup::~LLVOPartGroup()
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
BOOL LLVOPartGroup::isActive() const
|
BOOL LLVOPartGroup::isActive() const
|
||||||
{
|
{
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|||||||
@@ -352,7 +352,6 @@ LLVOSky::LLVOSky(const LLUUID &id, const LLPCode pcode, LLViewerRegion *regionp)
|
|||||||
cloud_pos_density1 = LLColor3();
|
cloud_pos_density1 = LLColor3();
|
||||||
cloud_pos_density2 = LLColor3();
|
cloud_pos_density2 = LLColor3();
|
||||||
|
|
||||||
|
|
||||||
mInitialized = FALSE;
|
mInitialized = FALSE;
|
||||||
mbCanSelect = FALSE;
|
mbCanSelect = FALSE;
|
||||||
mUpdateTimer.reset();
|
mUpdateTimer.reset();
|
||||||
@@ -409,7 +408,6 @@ LLVOSky::~LLVOSky()
|
|||||||
mCubeMap = NULL;
|
mCubeMap = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void LLVOSky::init()
|
void LLVOSky::init()
|
||||||
{
|
{
|
||||||
const F32 haze_int = color_intens(mHaze.calcSigSca(0));
|
const F32 haze_int = color_intens(mHaze.calcSigSca(0));
|
||||||
@@ -1250,6 +1248,7 @@ void LLVOSky::createDummyVertexBuffer()
|
|||||||
}
|
}
|
||||||
|
|
||||||
static LLFastTimer::DeclareTimer FTM_RENDER_FAKE_VBO_UPDATE("Fake VBO Update");
|
static LLFastTimer::DeclareTimer FTM_RENDER_FAKE_VBO_UPDATE("Fake VBO Update");
|
||||||
|
|
||||||
void LLVOSky::updateDummyVertexBuffer()
|
void LLVOSky::updateDummyVertexBuffer()
|
||||||
{
|
{
|
||||||
if(!LLVertexBuffer::sEnableVBOs)
|
if(!LLVertexBuffer::sEnableVBOs)
|
||||||
@@ -1491,6 +1490,7 @@ BOOL LLVOSky::updateHeavenlyBodyGeometry(LLDrawable *drawable, const S32 f, cons
|
|||||||
}
|
}
|
||||||
|
|
||||||
llassert(facep->getVertexBuffer()->getNumIndices() == 6);
|
llassert(facep->getVertexBuffer()->getNumIndices() == 6);
|
||||||
|
|
||||||
index_offset = facep->getGeometry(verticesp,normalsp,texCoordsp, indicesp);
|
index_offset = facep->getGeometry(verticesp,normalsp,texCoordsp, indicesp);
|
||||||
|
|
||||||
if (-1 == index_offset)
|
if (-1 == index_offset)
|
||||||
|
|||||||
@@ -894,7 +894,6 @@ void LLVOTree::updateMesh()
|
|||||||
S32 stop_depth = 0;
|
S32 stop_depth = 0;
|
||||||
F32 alpha = 1.0;
|
F32 alpha = 1.0;
|
||||||
|
|
||||||
|
|
||||||
U32 vert_count = 0;
|
U32 vert_count = 0;
|
||||||
U32 index_count = 0;
|
U32 index_count = 0;
|
||||||
|
|
||||||
|
|||||||
@@ -140,6 +140,7 @@ LLDrawable *LLVOWater::createDrawable(LLPipeline *pipeline)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static LLFastTimer::DeclareTimer FTM_UPDATE_WATER("Update Water");
|
static LLFastTimer::DeclareTimer FTM_UPDATE_WATER("Update Water");
|
||||||
|
|
||||||
BOOL LLVOWater::updateGeometry(LLDrawable *drawable)
|
BOOL LLVOWater::updateGeometry(LLDrawable *drawable)
|
||||||
{
|
{
|
||||||
LLFastTimer ftm(FTM_UPDATE_WATER);
|
LLFastTimer ftm(FTM_UPDATE_WATER);
|
||||||
@@ -213,6 +214,7 @@ BOOL LLVOWater::updateGeometry(LLDrawable *drawable)
|
|||||||
{ //bump edge patches down 10 cm to prevent aliasing along edges
|
{ //bump edge patches down 10 cm to prevent aliasing along edges
|
||||||
z_fudge = -0.1f;
|
z_fudge = -0.1f;
|
||||||
}
|
}
|
||||||
|
|
||||||
for (y = 0; y < size; y++)
|
for (y = 0; y < size; y++)
|
||||||
{
|
{
|
||||||
for (x = 0; x < size; x++)
|
for (x = 0; x < size; x++)
|
||||||
|
|||||||
@@ -354,6 +354,7 @@ BOOL LLVOWLSky::updateGeometry(LLDrawable * drawable)
|
|||||||
llinfos << "WL Skydome strips in " << strips_segments << " batches." << llendl;
|
llinfos << "WL Skydome strips in " << strips_segments << " batches." << llendl;
|
||||||
|
|
||||||
mStripsVerts.resize(strips_segments, NULL);
|
mStripsVerts.resize(strips_segments, NULL);
|
||||||
|
|
||||||
LLTimer timer;
|
LLTimer timer;
|
||||||
timer.start();
|
timer.start();
|
||||||
|
|
||||||
|
|||||||
@@ -1253,9 +1253,11 @@ void LLWorld::disconnectRegions()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static LLFastTimer::DeclareTimer FTM_ENABLE_SIMULATOR("Enable Sim");
|
||||||
|
|
||||||
void process_enable_simulator(LLMessageSystem *msg, void **user_data)
|
void process_enable_simulator(LLMessageSystem *msg, void **user_data)
|
||||||
{
|
{
|
||||||
|
LLFastTimer t(FTM_ENABLE_SIMULATOR);
|
||||||
// enable the appropriate circuit for this simulator and
|
// enable the appropriate circuit for this simulator and
|
||||||
// add its values into the gSimulator structure
|
// add its values into the gSimulator structure
|
||||||
U64 handle;
|
U64 handle;
|
||||||
|
|||||||
@@ -110,7 +110,7 @@
|
|||||||
#include "llspatialpartition.h"
|
#include "llspatialpartition.h"
|
||||||
#include "llmutelist.h"
|
#include "llmutelist.h"
|
||||||
|
|
||||||
// [RLVa:KB]
|
// [RLVa:KB] - Checked: 2011-05-22 (RLVa-1.3.1a)
|
||||||
#include "rlvhandler.h"
|
#include "rlvhandler.h"
|
||||||
#include "rlvlocks.h"
|
#include "rlvlocks.h"
|
||||||
// [/RLVa:KB]
|
// [/RLVa:KB]
|
||||||
@@ -185,8 +185,13 @@ LLFastTimer::DeclareTimer FTM_RENDER_BUMP("Bump");
|
|||||||
LLFastTimer::DeclareTimer FTM_RENDER_FULLBRIGHT("Fullbright");
|
LLFastTimer::DeclareTimer FTM_RENDER_FULLBRIGHT("Fullbright");
|
||||||
LLFastTimer::DeclareTimer FTM_RENDER_GLOW("Glow");
|
LLFastTimer::DeclareTimer FTM_RENDER_GLOW("Glow");
|
||||||
LLFastTimer::DeclareTimer FTM_GEO_UPDATE("Geo Update");
|
LLFastTimer::DeclareTimer FTM_GEO_UPDATE("Geo Update");
|
||||||
|
LLFastTimer::DeclareTimer FTM_PIPELINE_CREATE("Pipeline Create");
|
||||||
LLFastTimer::DeclareTimer FTM_POOLRENDER("RenderPool");
|
LLFastTimer::DeclareTimer FTM_POOLRENDER("RenderPool");
|
||||||
LLFastTimer::DeclareTimer FTM_POOLS("Pools");
|
LLFastTimer::DeclareTimer FTM_POOLS("Pools");
|
||||||
|
LLFastTimer::DeclareTimer FTM_DEFERRED_POOLRENDER("RenderPool (Deferred)");
|
||||||
|
LLFastTimer::DeclareTimer FTM_DEFERRED_POOLS("Pools (Deferred)");
|
||||||
|
LLFastTimer::DeclareTimer FTM_POST_DEFERRED_POOLRENDER("RenderPool (Post)");
|
||||||
|
LLFastTimer::DeclareTimer FTM_POST_DEFERRED_POOLS("Pools (Post)");
|
||||||
LLFastTimer::DeclareTimer FTM_RENDER_BLOOM_FBO("First FBO");
|
LLFastTimer::DeclareTimer FTM_RENDER_BLOOM_FBO("First FBO");
|
||||||
LLFastTimer::DeclareTimer FTM_STATESORT("Sort Draw State");
|
LLFastTimer::DeclareTimer FTM_STATESORT("Sort Draw State");
|
||||||
LLFastTimer::DeclareTimer FTM_PIPELINE("Pipeline");
|
LLFastTimer::DeclareTimer FTM_PIPELINE("Pipeline");
|
||||||
@@ -1474,7 +1479,7 @@ U32 LLPipeline::addObject(LLViewerObject *vobj)
|
|||||||
|
|
||||||
void LLPipeline::createObjects(F32 max_dtime)
|
void LLPipeline::createObjects(F32 max_dtime)
|
||||||
{
|
{
|
||||||
LLFastTimer ftm(FTM_GEO_UPDATE);
|
LLFastTimer ftm(FTM_PIPELINE_CREATE);
|
||||||
LLMemType mt(LLMemType::MTYPE_PIPELINE_CREATE_OBJECTS);
|
LLMemType mt(LLMemType::MTYPE_PIPELINE_CREATE_OBJECTS);
|
||||||
|
|
||||||
LLTimer update_timer;
|
LLTimer update_timer;
|
||||||
@@ -2311,14 +2316,19 @@ BOOL LLPipeline::updateDrawableGeom(LLDrawable* drawablep, BOOL priority)
|
|||||||
|
|
||||||
static LLFastTimer::DeclareTimer FTM_SEED_VBO_POOLS("Seed VBO Pool");
|
static LLFastTimer::DeclareTimer FTM_SEED_VBO_POOLS("Seed VBO Pool");
|
||||||
|
|
||||||
|
static LLFastTimer::DeclareTimer FTM_UPDATE_GL("Update GL");
|
||||||
|
|
||||||
void LLPipeline::updateGL()
|
void LLPipeline::updateGL()
|
||||||
{
|
{
|
||||||
while (!LLGLUpdate::sGLQ.empty())
|
|
||||||
{
|
{
|
||||||
LLGLUpdate* glu = LLGLUpdate::sGLQ.front();
|
LLFastTimer t(FTM_UPDATE_GL);
|
||||||
glu->updateGL();
|
while (!LLGLUpdate::sGLQ.empty())
|
||||||
glu->mInQ = FALSE;
|
{
|
||||||
LLGLUpdate::sGLQ.pop_front();
|
LLGLUpdate* glu = LLGLUpdate::sGLQ.front();
|
||||||
|
glu->updateGL();
|
||||||
|
glu->mInQ = FALSE;
|
||||||
|
LLGLUpdate::sGLQ.pop_front();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/*{ //seed VBO Pools
|
/*{ //seed VBO Pools
|
||||||
@@ -2327,8 +2337,11 @@ void LLPipeline::updateGL()
|
|||||||
}*/
|
}*/
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static LLFastTimer::DeclareTimer FTM_REBUILD_PRIORITY_GROUPS("Rebuild Priority Groups");
|
||||||
|
|
||||||
void LLPipeline::rebuildPriorityGroups()
|
void LLPipeline::rebuildPriorityGroups()
|
||||||
{
|
{
|
||||||
|
LLFastTimer t(FTM_REBUILD_PRIORITY_GROUPS);
|
||||||
LLTimer update_timer;
|
LLTimer update_timer;
|
||||||
LLMemType mt(LLMemType::MTYPE_PIPELINE);
|
LLMemType mt(LLMemType::MTYPE_PIPELINE);
|
||||||
|
|
||||||
@@ -2351,6 +2364,8 @@ void LLPipeline::rebuildPriorityGroups()
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static LLFastTimer::DeclareTimer FTM_REBUILD_GROUPS("Rebuild Groups");
|
||||||
|
|
||||||
void LLPipeline::rebuildGroups()
|
void LLPipeline::rebuildGroups()
|
||||||
{
|
{
|
||||||
if (mGroupQ2.empty())
|
if (mGroupQ2.empty())
|
||||||
@@ -2358,6 +2373,7 @@ void LLPipeline::rebuildGroups()
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
LLFastTimer t(FTM_REBUILD_GROUPS);
|
||||||
mGroupQ2Locked = true;
|
mGroupQ2Locked = true;
|
||||||
// Iterate through some drawables on the non-priority build queue
|
// Iterate through some drawables on the non-priority build queue
|
||||||
S32 size = (S32) mGroupQ2.size();
|
S32 size = (S32) mGroupQ2.size();
|
||||||
@@ -2614,6 +2630,10 @@ void LLPipeline::markShift(LLDrawable *drawablep)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static LLFastTimer::DeclareTimer FTM_SHIFT_DRAWABLE("Shift Drawable");
|
||||||
|
static LLFastTimer::DeclareTimer FTM_SHIFT_OCTREE("Shift Octree");
|
||||||
|
static LLFastTimer::DeclareTimer FTM_SHIFT_HUD("Shift HUD");
|
||||||
|
|
||||||
void LLPipeline::shiftObjects(const LLVector3 &offset)
|
void LLPipeline::shiftObjects(const LLVector3 &offset)
|
||||||
{
|
{
|
||||||
LLMemType mt(LLMemType::MTYPE_PIPELINE_SHIFT_OBJECTS);
|
LLMemType mt(LLMemType::MTYPE_PIPELINE_SHIFT_OBJECTS);
|
||||||
@@ -2626,35 +2646,44 @@ void LLPipeline::shiftObjects(const LLVector3 &offset)
|
|||||||
LLVector4a offseta;
|
LLVector4a offseta;
|
||||||
offseta.load3(offset.mV);
|
offseta.load3(offset.mV);
|
||||||
|
|
||||||
for (LLDrawable::drawable_vector_t::iterator iter = mShiftList.begin();
|
|
||||||
iter != mShiftList.end(); iter++)
|
|
||||||
{
|
{
|
||||||
LLDrawable *drawablep = *iter;
|
LLFastTimer t(FTM_SHIFT_DRAWABLE);
|
||||||
if (drawablep->isDead())
|
for (LLDrawable::drawable_vector_t::iterator iter = mShiftList.begin();
|
||||||
|
iter != mShiftList.end(); iter++)
|
||||||
{
|
{
|
||||||
continue;
|
LLDrawable *drawablep = *iter;
|
||||||
}
|
if (drawablep->isDead())
|
||||||
drawablep->shiftPos(offseta);
|
|
||||||
drawablep->clearState(LLDrawable::ON_SHIFT_LIST);
|
|
||||||
}
|
|
||||||
mShiftList.resize(0);
|
|
||||||
|
|
||||||
for (LLWorld::region_list_t::const_iterator iter = LLWorld::getInstance()->getRegionList().begin();
|
|
||||||
iter != LLWorld::getInstance()->getRegionList().end(); ++iter)
|
|
||||||
{
|
|
||||||
LLViewerRegion* region = *iter;
|
|
||||||
for (U32 i = 0; i < LLViewerRegion::NUM_PARTITIONS; i++)
|
|
||||||
{
|
|
||||||
LLSpatialPartition* part = region->getSpatialPartition(i);
|
|
||||||
if (part)
|
|
||||||
{
|
{
|
||||||
part->shift(offseta);
|
continue;
|
||||||
|
}
|
||||||
|
drawablep->shiftPos(offseta);
|
||||||
|
drawablep->clearState(LLDrawable::ON_SHIFT_LIST);
|
||||||
|
}
|
||||||
|
mShiftList.resize(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
{
|
||||||
|
LLFastTimer t(FTM_SHIFT_OCTREE);
|
||||||
|
for (LLWorld::region_list_t::const_iterator iter = LLWorld::getInstance()->getRegionList().begin();
|
||||||
|
iter != LLWorld::getInstance()->getRegionList().end(); ++iter)
|
||||||
|
{
|
||||||
|
LLViewerRegion* region = *iter;
|
||||||
|
for (U32 i = 0; i < LLViewerRegion::NUM_PARTITIONS; i++)
|
||||||
|
{
|
||||||
|
LLSpatialPartition* part = region->getSpatialPartition(i);
|
||||||
|
if (part)
|
||||||
|
{
|
||||||
|
part->shift(offseta);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
LLHUDText::shiftAll(offset);
|
{
|
||||||
LLHUDNameTag::shiftAll(offset);
|
LLFastTimer t(FTM_SHIFT_HUD);
|
||||||
|
LLHUDText::shiftAll(offset);
|
||||||
|
LLHUDNameTag::shiftAll(offset);
|
||||||
|
}
|
||||||
display_update_camera();
|
display_update_camera();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -2687,8 +2716,10 @@ void LLPipeline::markPartitionMove(LLDrawable* drawable)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static LLFastTimer::DeclareTimer FTM_PROCESS_PARTITIONQ("PartitionQ");
|
||||||
void LLPipeline::processPartitionQ()
|
void LLPipeline::processPartitionQ()
|
||||||
{
|
{
|
||||||
|
LLFastTimer t(FTM_PROCESS_PARTITIONQ);
|
||||||
for (LLDrawable::drawable_list_t::iterator iter = mPartitionQ.begin(); iter != mPartitionQ.end(); ++iter)
|
for (LLDrawable::drawable_list_t::iterator iter = mPartitionQ.begin(); iter != mPartitionQ.end(); ++iter)
|
||||||
{
|
{
|
||||||
LLDrawable* drawable = *iter;
|
LLDrawable* drawable = *iter;
|
||||||
@@ -3849,7 +3880,7 @@ void LLPipeline::renderGeomDeferred(LLCamera& camera)
|
|||||||
LLMemType mt_rgd(LLMemType::MTYPE_PIPELINE_RENDER_GEOM_DEFFERRED);
|
LLMemType mt_rgd(LLMemType::MTYPE_PIPELINE_RENDER_GEOM_DEFFERRED);
|
||||||
LLFastTimer t(FTM_RENDER_GEOMETRY);
|
LLFastTimer t(FTM_RENDER_GEOMETRY);
|
||||||
|
|
||||||
LLFastTimer t2(FTM_POOLS);
|
LLFastTimer t2(FTM_DEFERRED_POOLS);
|
||||||
|
|
||||||
LLGLEnable cull(GL_CULL_FACE);
|
LLGLEnable cull(GL_CULL_FACE);
|
||||||
|
|
||||||
@@ -3892,7 +3923,7 @@ void LLPipeline::renderGeomDeferred(LLCamera& camera)
|
|||||||
pool_set_t::iterator iter2 = iter1;
|
pool_set_t::iterator iter2 = iter1;
|
||||||
if (hasRenderType(poolp->getType()) && poolp->getNumDeferredPasses() > 0)
|
if (hasRenderType(poolp->getType()) && poolp->getNumDeferredPasses() > 0)
|
||||||
{
|
{
|
||||||
LLFastTimer t(FTM_POOLRENDER);
|
LLFastTimer t(FTM_DEFERRED_POOLRENDER);
|
||||||
|
|
||||||
gGLLastMatrix = NULL;
|
gGLLastMatrix = NULL;
|
||||||
gGL.loadMatrix(gGLModelView);
|
gGL.loadMatrix(gGLModelView);
|
||||||
@@ -3947,7 +3978,7 @@ void LLPipeline::renderGeomDeferred(LLCamera& camera)
|
|||||||
void LLPipeline::renderGeomPostDeferred(LLCamera& camera)
|
void LLPipeline::renderGeomPostDeferred(LLCamera& camera)
|
||||||
{
|
{
|
||||||
LLMemType mt_rgpd(LLMemType::MTYPE_PIPELINE_RENDER_GEOM_POST_DEF);
|
LLMemType mt_rgpd(LLMemType::MTYPE_PIPELINE_RENDER_GEOM_POST_DEF);
|
||||||
LLFastTimer t(FTM_POOLS);
|
LLFastTimer t(FTM_POST_DEFERRED_POOLS);
|
||||||
U32 cur_type = 0;
|
U32 cur_type = 0;
|
||||||
|
|
||||||
LLGLEnable cull(GL_CULL_FACE);
|
LLGLEnable cull(GL_CULL_FACE);
|
||||||
@@ -3982,7 +4013,7 @@ void LLPipeline::renderGeomPostDeferred(LLCamera& camera)
|
|||||||
pool_set_t::iterator iter2 = iter1;
|
pool_set_t::iterator iter2 = iter1;
|
||||||
if (hasRenderType(poolp->getType()) && poolp->getNumPostDeferredPasses() > 0)
|
if (hasRenderType(poolp->getType()) && poolp->getNumPostDeferredPasses() > 0)
|
||||||
{
|
{
|
||||||
LLFastTimer t(FTM_POOLRENDER);
|
LLFastTimer t(FTM_POST_DEFERRED_POOLRENDER);
|
||||||
|
|
||||||
gGLLastMatrix = NULL;
|
gGLLastMatrix = NULL;
|
||||||
gGL.loadMatrix(gGLModelView);
|
gGL.loadMatrix(gGLModelView);
|
||||||
@@ -4398,8 +4429,7 @@ void LLPipeline::renderDebug()
|
|||||||
gGL.vertex3fv(frust[2].mV); gGL.vertex3fv(frust[6].mV);
|
gGL.vertex3fv(frust[2].mV); gGL.vertex3fv(frust[6].mV);
|
||||||
gGL.vertex3fv(frust[3].mV); gGL.vertex3fv(frust[7].mV);
|
gGL.vertex3fv(frust[3].mV); gGL.vertex3fv(frust[7].mV);
|
||||||
gGL.end();
|
gGL.end();
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*gGL.flush();
|
/*gGL.flush();
|
||||||
@@ -4527,8 +4557,11 @@ void LLPipeline::renderDebug()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static LLFastTimer::DeclareTimer FTM_REBUILD_POOLS("Rebuild Pools");
|
||||||
|
|
||||||
void LLPipeline::rebuildPools()
|
void LLPipeline::rebuildPools()
|
||||||
{
|
{
|
||||||
|
LLFastTimer t(FTM_REBUILD_POOLS);
|
||||||
LLMemType mt(LLMemType::MTYPE_PIPELINE_REBUILD_POOLS);
|
LLMemType mt(LLMemType::MTYPE_PIPELINE_REBUILD_POOLS);
|
||||||
|
|
||||||
assertInitialized();
|
assertInitialized();
|
||||||
@@ -6126,6 +6159,8 @@ void LLPipeline::resetVertexBuffers()
|
|||||||
{ mResetVertexBuffers = true;
|
{ mResetVertexBuffers = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static LLFastTimer::DeclareTimer FTM_RESET_VB("Reset VB");
|
||||||
|
|
||||||
void LLPipeline::doResetVertexBuffers()
|
void LLPipeline::doResetVertexBuffers()
|
||||||
{
|
{
|
||||||
if (!mResetVertexBuffers)
|
if (!mResetVertexBuffers)
|
||||||
@@ -6133,6 +6168,7 @@ void LLPipeline::doResetVertexBuffers()
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
LLFastTimer t(FTM_RESET_VB);
|
||||||
mResetVertexBuffers = false;
|
mResetVertexBuffers = false;
|
||||||
|
|
||||||
mCubeVB = NULL;
|
mCubeVB = NULL;
|
||||||
@@ -8100,10 +8136,10 @@ void LLPipeline::generateWaterReflection(LLCamera& camera_in)
|
|||||||
#endif
|
#endif
|
||||||
if (detail < 3)
|
if (detail < 3)
|
||||||
{
|
{
|
||||||
clearRenderTypeMask(LLPipeline::RENDER_TYPE_AVATAR, END_RENDER_TYPES);
|
clearRenderTypeMask(LLPipeline::RENDER_TYPE_AVATAR, END_RENDER_TYPES);
|
||||||
if (detail < 2)
|
if (detail < 2)
|
||||||
{
|
{
|
||||||
clearRenderTypeMask(LLPipeline::RENDER_TYPE_VOLUME, END_RENDER_TYPES);
|
clearRenderTypeMask(LLPipeline::RENDER_TYPE_VOLUME, END_RENDER_TYPES);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -8593,6 +8629,7 @@ BOOL LLPipeline::getVisiblePointCloud(LLCamera& camera, LLVector3& min, LLVector
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
static LLFastTimer::DeclareTimer FTM_GEN_SUN_SHADOW("Gen Sun Shadow");
|
||||||
|
|
||||||
void LLPipeline::generateSunShadow(LLCamera& camera)
|
void LLPipeline::generateSunShadow(LLCamera& camera)
|
||||||
{
|
{
|
||||||
@@ -8611,6 +8648,8 @@ void LLPipeline::generateSunShadow(LLCamera& camera)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
LLFastTimer t(FTM_GEN_SUN_SHADOW);
|
||||||
|
|
||||||
BOOL skip_avatar_update = FALSE;
|
BOOL skip_avatar_update = FALSE;
|
||||||
if (!isAgentAvatarValid() || gAgentCamera.getCameraAnimating() || gAgentCamera.getCameraMode() != CAMERA_MODE_MOUSELOOK || !LLVOAvatar::sVisibleInFirstPerson)
|
if (!isAgentAvatarValid() || gAgentCamera.getCameraAnimating() || gAgentCamera.getCameraMode() != CAMERA_MODE_MOUSELOOK || !LLVOAvatar::sVisibleInFirstPerson)
|
||||||
{
|
{
|
||||||
@@ -9372,6 +9411,12 @@ void LLPipeline::renderGroups(LLRenderPass* pass, U32 type, U32 mask, BOOL textu
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static LLFastTimer::DeclareTimer FTM_IMPOSTOR_MARK_VISIBLE("Impostor Mark Visible");
|
||||||
|
static LLFastTimer::DeclareTimer FTM_IMPOSTOR_SETUP("Impostor Setup");
|
||||||
|
static LLFastTimer::DeclareTimer FTM_IMPOSTOR_BACKGROUND("Impostor Background");
|
||||||
|
static LLFastTimer::DeclareTimer FTM_IMPOSTOR_ALLOCATE("Impostor Allocate");
|
||||||
|
static LLFastTimer::DeclareTimer FTM_IMPOSTOR_RESIZE("Impostor Resize");
|
||||||
|
|
||||||
void LLPipeline::generateImpostor(LLVOAvatar* avatar)
|
void LLPipeline::generateImpostor(LLVOAvatar* avatar)
|
||||||
{
|
{
|
||||||
LLMemType mt_gi(LLMemType::MTYPE_PIPELINE_GENERATE_IMPOSTOR);
|
LLMemType mt_gi(LLMemType::MTYPE_PIPELINE_GENERATE_IMPOSTOR);
|
||||||
@@ -9427,22 +9472,26 @@ void LLPipeline::generateImpostor(LLVOAvatar* avatar)
|
|||||||
sImpostorRender = TRUE;
|
sImpostorRender = TRUE;
|
||||||
|
|
||||||
LLViewerCamera* viewer_camera = LLViewerCamera::getInstance();
|
LLViewerCamera* viewer_camera = LLViewerCamera::getInstance();
|
||||||
markVisible(avatar->mDrawable, *viewer_camera);
|
|
||||||
LLVOAvatar::sUseImpostors = FALSE;
|
|
||||||
|
|
||||||
LLVOAvatar::attachment_map_t::iterator iter;
|
|
||||||
for (iter = avatar->mAttachmentPoints.begin();
|
|
||||||
iter != avatar->mAttachmentPoints.end();
|
|
||||||
++iter)
|
|
||||||
{
|
{
|
||||||
LLViewerJointAttachment *attachment = iter->second;
|
LLFastTimer t(FTM_IMPOSTOR_MARK_VISIBLE);
|
||||||
for (LLViewerJointAttachment::attachedobjs_vec_t::iterator attachment_iter = attachment->mAttachedObjects.begin();
|
markVisible(avatar->mDrawable, *viewer_camera);
|
||||||
attachment_iter != attachment->mAttachedObjects.end();
|
LLVOAvatar::sUseImpostors = FALSE;
|
||||||
++attachment_iter)
|
|
||||||
|
LLVOAvatar::attachment_map_t::iterator iter;
|
||||||
|
for (iter = avatar->mAttachmentPoints.begin();
|
||||||
|
iter != avatar->mAttachmentPoints.end();
|
||||||
|
++iter)
|
||||||
{
|
{
|
||||||
if (LLViewerObject* attached_object = (*attachment_iter))
|
LLViewerJointAttachment *attachment = iter->second;
|
||||||
|
for (LLViewerJointAttachment::attachedobjs_vec_t::iterator attachment_iter = attachment->mAttachedObjects.begin();
|
||||||
|
attachment_iter != attachment->mAttachedObjects.end();
|
||||||
|
++attachment_iter)
|
||||||
{
|
{
|
||||||
markVisible(attached_object->mDrawable->getSpatialBridge(), *viewer_camera);
|
if (LLViewerObject* attached_object = (*attachment_iter))
|
||||||
|
{
|
||||||
|
markVisible(attached_object->mDrawable->getSpatialBridge(), *viewer_camera);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -9455,6 +9504,7 @@ void LLPipeline::generateImpostor(LLVOAvatar* avatar)
|
|||||||
U32 resX = 0;
|
U32 resX = 0;
|
||||||
|
|
||||||
{
|
{
|
||||||
|
LLFastTimer t(FTM_IMPOSTOR_SETUP);
|
||||||
const LLVector4a* ext = avatar->mDrawable->getSpatialExtents();
|
const LLVector4a* ext = avatar->mDrawable->getSpatialExtents();
|
||||||
LLVector3 pos(avatar->getRenderPosition()+avatar->getImpostorOffset());
|
LLVector3 pos(avatar->getRenderPosition()+avatar->getImpostorOffset());
|
||||||
|
|
||||||
@@ -9509,6 +9559,7 @@ void LLPipeline::generateImpostor(LLVOAvatar* avatar)
|
|||||||
|
|
||||||
if (!avatar->mImpostor.isComplete())
|
if (!avatar->mImpostor.isComplete())
|
||||||
{
|
{
|
||||||
|
LLFastTimer t(FTM_IMPOSTOR_ALLOCATE);
|
||||||
avatar->mImpostor.allocate(resX,resY,GL_RGBA,TRUE,FALSE);
|
avatar->mImpostor.allocate(resX,resY,GL_RGBA,TRUE,FALSE);
|
||||||
|
|
||||||
if (LLPipeline::sRenderDeferred)
|
if (LLPipeline::sRenderDeferred)
|
||||||
@@ -9523,6 +9574,7 @@ void LLPipeline::generateImpostor(LLVOAvatar* avatar)
|
|||||||
else if(resX != avatar->mImpostor.getWidth() ||
|
else if(resX != avatar->mImpostor.getWidth() ||
|
||||||
resY != avatar->mImpostor.getHeight())
|
resY != avatar->mImpostor.getHeight())
|
||||||
{
|
{
|
||||||
|
LLFastTimer t(FTM_IMPOSTOR_RESIZE);
|
||||||
avatar->mImpostor.resize(resX,resY,GL_RGBA);
|
avatar->mImpostor.resize(resX,resY,GL_RGBA);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -9544,6 +9596,7 @@ void LLPipeline::generateImpostor(LLVOAvatar* avatar)
|
|||||||
}
|
}
|
||||||
|
|
||||||
{ //create alpha mask based on depth buffer (grey out if muted)
|
{ //create alpha mask based on depth buffer (grey out if muted)
|
||||||
|
LLFastTimer t(FTM_IMPOSTOR_BACKGROUND);
|
||||||
if (LLPipeline::sRenderDeferred)
|
if (LLPipeline::sRenderDeferred)
|
||||||
{
|
{
|
||||||
GLuint buff = GL_COLOR_ATTACHMENT0;
|
GLuint buff = GL_COLOR_ATTACHMENT0;
|
||||||
|
|||||||
Reference in New Issue
Block a user