Skip to content
Snippets Groups Projects
Commit 592e7ce0 authored by Rye Mutt's avatar Rye Mutt :bread:
Browse files

Optimize two vectors in alpha draw pool by making them static and clearing at...

Optimize two vectors in alpha draw pool by making them static and clearing at end of draw, this avoids thousands of mallocs
parent 5c88e724
No related branches found
No related tags found
No related merge requests found
......@@ -628,8 +628,8 @@ void LLDrawPoolAlpha::renderAlpha(U32 mask, S32 pass)
if (group->getSpatialPartition()->mRenderByGroup &&
!group->isDead())
{
std::vector<LLDrawInfo*> emissives;
std::vector<LLDrawInfo*> fullbrights;
static std::vector<LLDrawInfo*> emissives;
static std::vector<LLDrawInfo*> fullbrights;
bool is_particle_or_hud_particle = group->getSpatialPartition()->mPartitionType == LLViewerRegion::PARTITION_PARTICLE
|| group->getSpatialPartition()->mPartitionType == LLViewerRegion::PARTITION_HUD_PARTICLE;
......@@ -849,6 +849,9 @@ void LLDrawPoolAlpha::renderAlpha(U32 mask, S32 pass)
{
current_shader->bind();
}
emissives.clear();
fullbrights.clear();
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment