diff options
| author | Andrey Lihatskiy <alihatskiy@productengine.com> | 2024-01-08 23:16:14 +0200 |
|---|---|---|
| committer | Andrey Lihatskiy <alihatskiy@productengine.com> | 2024-01-08 23:16:14 +0200 |
| commit | fee385247e3d3ce3264df8a9f796c4c91cc31d96 (patch) | |
| tree | d3fca87208b5d8b28d01c13f00f2fec997256c47 /indra/newview/llspatialpartition.cpp | |
| parent | aed6313d7c755ae1b980074fc27dfd98267fca24 (diff) | |
| parent | 77395eddc911e0801e50fd693f7bbaee8046aa95 (diff) | |
Merge branch 'main' into DRTVWR-594-maint-Y
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; |
