From 348caf34b3fa21abd8d7c8c8b5e54fe5a028a682 Mon Sep 17 00:00:00 2001 From: Rain Date: Thu, 11 Jun 2026 16:47:35 +0300 Subject: [PATCH 1/2] Revert commit 84a63ed This reverts commit 84a63ed (Add dev excludes on shadowleaf limits) --- src/game/client/clientleafsystem.cpp | 25 +------------------------ 1 file changed, 1 insertion(+), 24 deletions(-) diff --git a/src/game/client/clientleafsystem.cpp b/src/game/client/clientleafsystem.cpp index 0de1de11df..9059eeb0fa 100644 --- a/src/game/client/clientleafsystem.cpp +++ b/src/game/client/clientleafsystem.cpp @@ -1004,20 +1004,6 @@ void CClientLeafSystem::RemoveShadowFromRenderables( ClientLeafShadowHandle_t ha //----------------------------------------------------------------------------- void CClientLeafSystem::AddShadowToLeaf( int leaf, ClientLeafShadowHandle_t shadow ) { -#if defined(DEBUG) && defined(NEO) - static constexpr const char *ASSERT_MAPS_TO_IGNORE[] = { - "ntre_engage_ctg", "ntre_skyline_ctg", "ntre_rise_ctg" - }; - bool bIgnoreAssert = false; - for (const char *pszMapCmp : ASSERT_MAPS_TO_IGNORE) - { - if (FStrEq(MapName(), pszMapCmp)) - { - bIgnoreAssert = true; - break; - } - } -#endif // defined(DEBUG) && defined(NEO) m_ShadowsInLeaf.AddElementToBucket( leaf, shadow ); // Add the shadow exactly once to all renderables in the leaf @@ -1034,16 +1020,7 @@ void CClientLeafSystem::AddShadowToLeaf( int leaf, ClientLeafShadowHandle_t shad info.m_EnumCount = m_ShadowEnum; } -#ifdef DEBUG -#ifdef NEO - // Few maps will happily blows past this limit, but it seems to be fine. - // Just ignoring this specific case in debug. - if (!bIgnoreAssert) -#endif - { - Assert(m_ShadowsInLeaf.NumAllocated() < 2000); - } -#endif + Assert(m_ShadowsInLeaf.NumAllocated() < 2000); i = m_RenderablesInLeaf.NextElement(i); } From 9ebe42391096719db3e679072267dd28fc448dcf Mon Sep 17 00:00:00 2001 From: Rain Date: Thu, 11 Jun 2026 16:57:03 +0300 Subject: [PATCH 2/2] Only assert once for the legacy shadowleafs alloc warning --- src/game/client/clientleafsystem.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/game/client/clientleafsystem.cpp b/src/game/client/clientleafsystem.cpp index 9059eeb0fa..638500d22f 100644 --- a/src/game/client/clientleafsystem.cpp +++ b/src/game/client/clientleafsystem.cpp @@ -1020,7 +1020,12 @@ void CClientLeafSystem::AddShadowToLeaf( int leaf, ClientLeafShadowHandle_t shad info.m_EnumCount = m_ShadowEnum; } +#ifdef NEO + // don't nuke dev build perf by spamming the assert every frame + AssertOnce(m_ShadowsInLeaf.NumAllocated() < 2000); +#else Assert(m_ShadowsInLeaf.NumAllocated() < 2000); +#endif i = m_RenderablesInLeaf.NextElement(i); }