summaryrefslogtreecommitdiff
path: root/indra/newview/lldrawable.cpp
diff options
context:
space:
mode:
authorPtolemy <ptolemy@lindenlab.com>2021-09-20 09:43:38 -0700
committerPtolemy <ptolemy@lindenlab.com>2021-09-22 14:38:43 -0700
commit6c53fbfb4700b40893cd69377999d29c7ba96099 (patch)
tree77b7a9302234d2912efdb90024ecf29e78c46aaf /indra/newview/lldrawable.cpp
parentb9ad51981eb992ebe77b8ffbde48b2797ff55cef (diff)
SL-16014: Add Tracy markup for lldrawable
Diffstat (limited to 'indra/newview/lldrawable.cpp')
-rw-r--r--indra/newview/lldrawable.cpp45
1 files changed, 45 insertions, 0 deletions
diff --git a/indra/newview/lldrawable.cpp b/indra/newview/lldrawable.cpp
index 507af56cb0..30c4a21e1c 100644
--- a/indra/newview/lldrawable.cpp
+++ b/indra/newview/lldrawable.cpp
@@ -101,6 +101,8 @@ LLDrawable::LLDrawable(LLViewerObject *vobj, bool new_entry)
void LLDrawable::init(bool new_entry)
{
+ LL_PROFILE_ZONE_SCOPED
+
// mXform
mParent = NULL;
mRenderType = 0;
@@ -232,6 +234,8 @@ void LLDrawable::markDead()
LLVOVolume* LLDrawable::getVOVolume() const
{
+ LL_PROFILE_ZONE_SCOPED
+
LLViewerObject* objectp = mVObjp;
if ( !isDead() && objectp && (objectp->getPCode() == LL_PCODE_VOLUME))
{
@@ -335,6 +339,7 @@ static LLTrace::BlockTimerStatHandle FTM_ALLOCATE_FACE("Allocate Face");
LLFace* LLDrawable::addFace(LLFacePool *poolp, LLViewerTexture *texturep)
{
+ LL_PROFILE_ZONE_SCOPED
LLFace *face;
{
@@ -363,6 +368,8 @@ LLFace* LLDrawable::addFace(LLFacePool *poolp, LLViewerTexture *texturep)
LLFace* LLDrawable::addFace(const LLTextureEntry *te, LLViewerTexture *texturep)
{
+ LL_PROFILE_ZONE_SCOPED
+
LLFace *face;
{
@@ -387,6 +394,8 @@ LLFace* LLDrawable::addFace(const LLTextureEntry *te, LLViewerTexture *texturep)
LLFace* LLDrawable::addFace(const LLTextureEntry *te, LLViewerTexture *texturep, LLViewerTexture *normalp)
{
+ LL_PROFILE_ZONE_SCOPED
+
LLFace *face;
face = new LLFace(this, mVObjp);
@@ -408,6 +417,8 @@ LLFace* LLDrawable::addFace(const LLTextureEntry *te, LLViewerTexture *texturep,
LLFace* LLDrawable::addFace(const LLTextureEntry *te, LLViewerTexture *texturep, LLViewerTexture *normalp, LLViewerTexture *specularp)
{
+ LL_PROFILE_ZONE_SCOPED
+
LLFace *face;
face = new LLFace(this, mVObjp);
@@ -430,6 +441,8 @@ LLFace* LLDrawable::addFace(const LLTextureEntry *te, LLViewerTexture *texturep,
void LLDrawable::setNumFaces(const S32 newFaces, LLFacePool *poolp, LLViewerTexture *texturep)
{
+ LL_PROFILE_ZONE_SCOPED
+
if (newFaces == (S32)mFaces.size())
{
return;
@@ -453,6 +466,8 @@ void LLDrawable::setNumFaces(const S32 newFaces, LLFacePool *poolp, LLViewerText
void LLDrawable::setNumFacesFast(const S32 newFaces, LLFacePool *poolp, LLViewerTexture *texturep)
{
+ LL_PROFILE_ZONE_SCOPED
+
if (newFaces <= (S32)mFaces.size() && newFaces >= (S32)mFaces.size()/2)
{
return;
@@ -476,6 +491,8 @@ void LLDrawable::setNumFacesFast(const S32 newFaces, LLFacePool *poolp, LLViewer
void LLDrawable::mergeFaces(LLDrawable* src)
{
+ LL_PROFILE_ZONE_SCOPED
+
U32 face_count = mFaces.size() + src->mFaces.size();
mFaces.reserve(face_count);
@@ -509,6 +526,8 @@ void LLDrawable::updateMaterial()
void LLDrawable::makeActive()
{
+ LL_PROFILE_ZONE_SCOPED
+
#if !LL_RELEASE_FOR_DOWNLOAD
if (mVObjp.notNull())
{
@@ -572,6 +591,8 @@ void LLDrawable::makeActive()
void LLDrawable::makeStatic(BOOL warning_enabled)
{
+ LL_PROFILE_ZONE_SCOPED
+
if (isState(ACTIVE) &&
!isState(ACTIVE_CHILD) &&
!mVObjp->isAttachment() &&
@@ -618,6 +639,8 @@ void LLDrawable::makeStatic(BOOL warning_enabled)
// Returns "distance" between target destination and resulting xfrom
F32 LLDrawable::updateXform(BOOL undamped)
{
+ LL_PROFILE_ZONE_SCOPED
+
BOOL damped = !undamped;
// Position
@@ -769,6 +792,8 @@ void LLDrawable::moveUpdatePipeline(BOOL moved)
void LLDrawable::movePartition()
{
+ LL_PROFILE_ZONE_SCOPED
+
LLSpatialPartition* part = getSpatialPartition();
if (part)
{
@@ -813,6 +838,8 @@ BOOL LLDrawable::updateMoveUndamped()
void LLDrawable::updatePartition()
{
+ LL_PROFILE_ZONE_SCOPED
+
if (!getVOVolume())
{
movePartition();
@@ -830,6 +857,8 @@ void LLDrawable::updatePartition()
BOOL LLDrawable::updateMoveDamped()
{
+ LL_PROFILE_ZONE_SCOPED
+
F32 dist_squared = updateXform(FALSE);
mGeneration++;
@@ -853,6 +882,8 @@ BOOL LLDrawable::updateMoveDamped()
void LLDrawable::updateDistance(LLCamera& camera, bool force_update)
{
+ LL_PROFILE_ZONE_SCOPED
+
if (LLViewerCamera::sCurCameraID != LLViewerCamera::CAMERA_WORLD)
{
LL_WARNS() << "Attempted to update distance for non-world camera." << LL_ENDL;
@@ -957,6 +988,8 @@ void LLDrawable::updateTexture()
BOOL LLDrawable::updateGeometry(BOOL priority)
{
+ LL_PROFILE_ZONE_SCOPED
+
llassert(mVObjp.notNull());
BOOL res = mVObjp->updateGeometry(this);
return res;
@@ -1034,6 +1067,8 @@ const LLVector3& LLDrawable::getBounds(LLVector3& min, LLVector3& max) const
void LLDrawable::updateSpatialExtents()
{
+ LL_PROFILE_ZONE_SCOPED
+
if (mVObjp)
{
const LLVector4a* exts = getSpatialExtents();
@@ -1164,6 +1199,8 @@ void LLDrawable::setGroup(LLViewerOctreeGroup *groupp)
LLSpatialPartition* LLDrawable::getSpatialPartition()
{
+ LL_PROFILE_ZONE_SCOPED
+
LLSpatialPartition* retval = NULL;
if (!mVObjp ||
@@ -1247,6 +1284,8 @@ LLSpatialBridge::LLSpatialBridge(LLDrawable* root, BOOL render_by_group, U32 dat
LLDrawable(root->getVObj(), true),
LLSpatialPartition(data_mask, render_by_group, GL_STREAM_DRAW_ARB, regionp)
{
+ LL_PROFILE_ZONE_SCOPED
+
mBridge = this;
mDrawable = root;
root->setSpatialBridge(this);
@@ -1292,6 +1331,8 @@ void LLSpatialBridge::destroyTree()
void LLSpatialBridge::updateSpatialExtents()
{
+ LL_PROFILE_ZONE_SCOPED
+
LLSpatialGroup* root = (LLSpatialGroup*) mOctree->getListener(0);
{
@@ -1455,6 +1496,8 @@ public:
void LLSpatialBridge::setVisible(LLCamera& camera_in, std::vector<LLDrawable*>* results, BOOL for_select)
{
+ LL_PROFILE_ZONE_SCOPED
+
if (!gPipeline.hasRenderType(mDrawableType))
{
return;
@@ -1552,6 +1595,8 @@ void LLSpatialBridge::setVisible(LLCamera& camera_in, std::vector<LLDrawable*>*
void LLSpatialBridge::updateDistance(LLCamera& camera_in, bool force_update)
{
+ LL_PROFILE_ZONE_SCOPED
+
if (mDrawable == NULL)
{
markDead();