diff options
author | Nat Goodspeed <nat@lindenlab.com> | 2024-01-08 21:02:54 -0500 |
---|---|---|
committer | Nat Goodspeed <nat@lindenlab.com> | 2024-01-08 21:02:54 -0500 |
commit | 525a885c7c1de879a1e767a526ff2da44dd132be (patch) | |
tree | ecb142b08f8d46b67d65877407d5275ad6c02183 /indra/newview/llspatialpartition.cpp | |
parent | f31dc5aa78887c48391bc98313d56013411c3167 (diff) | |
parent | 77395eddc911e0801e50fd693f7bbaee8046aa95 (diff) |
DRTVWR-589: Merge branch 'main' into DRTVWR-589.
Diffstat (limited to 'indra/newview/llspatialpartition.cpp')
-rw-r--r-- | indra/newview/llspatialpartition.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/indra/newview/llspatialpartition.cpp b/indra/newview/llspatialpartition.cpp index c650513ab8..931880a475 100644 --- a/indra/newview/llspatialpartition.cpp +++ b/indra/newview/llspatialpartition.cpp @@ -64,6 +64,9 @@ bool LLSpatialGroup::sNoDelete = false; static F32 sLastMaxTexPriority = 1.f; static F32 sCurMaxTexPriority = 1.f; +// enable expensive sanity checks around redundant drawable and group insertion to LLCullResult +#define LL_DEBUG_CULL_RESULT 0 + //static counter for frame to switch LOD on void sg_assert(BOOL expr) @@ -4051,6 +4054,10 @@ void LLCullResult::pushOcclusionGroup(LLSpatialGroup* group) void LLCullResult::pushDrawableGroup(LLSpatialGroup* group) { +#if LL_DEBUG_CULL_RESULT + // group must NOT be in the drawble groups list already + llassert(std::find(&mDrawableGroups[0], mDrawableGroupsEnd, group) == mDrawableGroupsEnd); +#endif if (mDrawableGroupsSize < mDrawableGroupsAllocated) { mDrawableGroups[mDrawableGroupsSize] = group; @@ -4065,6 +4072,10 @@ void LLCullResult::pushDrawableGroup(LLSpatialGroup* group) void LLCullResult::pushDrawable(LLDrawable* drawable) { +#if LL_DEBUG_CULL_RESULT + // drawable must NOT be in the visible list already + llassert(std::find(&mVisibleList[0], mVisibleListEnd, drawable) == mVisibleListEnd); +#endif if (mVisibleListSize < mVisibleListAllocated) { mVisibleList[mVisibleListSize] = drawable; |