summaryrefslogtreecommitdiff
path: root/indra/llmath
diff options
context:
space:
mode:
authorPtolemy <ptolemy@lindenlab.com>2022-01-13 21:10:53 -0800
committerPtolemy <ptolemy@lindenlab.com>2022-01-13 21:10:53 -0800
commit259c38600d92b671e962fcf6207cc1ef4106d276 (patch)
treeced6a81b6b55f1f3658ddb53e3cfd70f3399dfa0 /indra/llmath
parent48582ba647d8b151f2472fa778b1cc1840c4f1bb (diff)
SL-16607: Add Tracy capture colors for insert, remove, and balance
Diffstat (limited to 'indra/llmath')
-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)