Skip to content

Commit

Permalink
#5912: When the last winding leaves the house, we run a cleanup round…
Browse files Browse the repository at this point in the history
… to release allocated storage (it's likely the last chance to do this since the associated shader might not be used for rendering after this point).
  • Loading branch information
codereader committed Mar 6, 2022
1 parent fabe5e3 commit fc0fc7b
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion radiantcore/rendersystem/backend/WindingRenderer.h
Expand Up @@ -448,7 +448,14 @@ class WindingRenderer final :
_freeSlotMappingHint = slot;
}

--_windingCount;
if (--_windingCount == 0)
{
// This was the last winding in the entire renderer, run a cleanup round
for (auto& bucket : _buckets)
{
ensureBucketIsReady(bucket);
}
}
}

void updateWinding(Slot slot, const std::vector<MeshVertex>& vertices) override
Expand Down

0 comments on commit fc0fc7b

Please sign in to comment.