summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
authorPtolemy <ptolemy@lindenlab.com>2022-01-13 21:10:53 -0800
committerPtolemy <ptolemy@lindenlab.com>2022-01-14 12:24:21 -0800
commit9b5f6c636b16e033059bb47d63a7919aeebb69ac (patch)
tree8bb882f78237a18567ea0aa2f2a981732ff9f3bd /indra
parent1566c01ad16a973f22990653b3dab8e5bd476db8 (diff)
SL-16607: Add Tracy capture colors for insert, remove, and balance
Diffstat (limited to 'indra')
-rw-r--r--indra/llmath/lloctree.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/indra/llmath/lloctree.h b/indra/llmath/lloctree.h
index 80eca781a9..7032c9651b 100644
--- a/indra/llmath/lloctree.h
+++ b/indra/llmath/lloctree.h
@@ -34,6 +34,9 @@
#define OCT_ERRS LL_WARNS("OctreeErrors")
+#define OCTREE_DEBUG_COLOR_REMOVE 0x0000FF // r
+#define OCTREE_DEBUG_COLOR_INSERT 0x00FF00 // g
+#define OCTREE_DEBUG_COLOR_BALANCE 0xFF0000 // b
extern U32 gOctreeMaxCapacity;
extern float gOctreeMinSize;
@@ -308,6 +311,8 @@ public:
virtual bool insert(T* data)
{
+ //LL_PROFILE_ZONE_NAMED_COLOR("Octree::insert()",OCTREE_DEBUG_COLOR_INSERT);
+
if (data == NULL || data->getBinIndex() != -1)
{
OCT_ERRS << "!!! INVALID ELEMENT ADDED TO OCTREE BRANCH !!!" << LL_ENDL;
@@ -454,6 +459,8 @@ public:
bool remove(T* data)
{
+ //LL_PROFILE_ZONE_NAMED_COLOR("Octree::remove()", OCTREE_DEBUG_COLOR_REMOVE);
+
S32 i = data->getBinIndex();
if (i >= 0 && i < mElementCount)
@@ -692,6 +699,8 @@ public:
bool balance()
{
+ //LL_PROFILE_ZONE_NAMED_COLOR("Octree::balance()",OCTREE_DEBUG_COLOR_BALANCE);
+
if (this->getChildCount() == 1 &&
!(this->mChild[0]->isLeaf()) &&
this->mChild[0]->getElementCount() == 0)