diff options
author | simon <simon@lindenlab.com> | 2024-01-09 20:22:37 +0000 |
---|---|---|
committer | simon <simon@lindenlab.com> | 2024-01-09 20:22:37 +0000 |
commit | a9ef4d2ee8470e944b09402d0f796cb09cdb728d (patch) | |
tree | 4a5b4299c352e671b7aa76eabbf00d546acbf670 /indra/newview/llspatialpartition.cpp | |
parent | eca0021b7dfd40d5b573ae5530cf44edbe3a0994 (diff) | |
parent | 77395eddc911e0801e50fd693f7bbaee8046aa95 (diff) |
Merge remote-tracking branch 'origin/main' into simon/sl-20635-new-data
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; |