FIRE-34600 - updateParticles AVX2 bug again

Let's be more strict about the access to the vector.
meow-7.2.2
Beq 2024-10-08 18:45:16 +01:00
parent bb9bea4a56
commit 3873b22218
1 changed files with 2 additions and 4 deletions

View File

@ -399,8 +399,7 @@ void LLViewerPartGroup::updateParticles(const F32 lastdt)
// Kill dead particles (either flagged dead, or too old)
if ((part->mLastUpdateTime > part->mMaxAge) || (LLViewerPart::LL_PART_DEAD_MASK == part->mFlags))
{
mParticles[i] = mParticles.back() ;
mParticles.pop_back() ;
vector_replace_with_last(mParticles, mParticles.begin() + i); // <FS:Beq/> FIRE-34600 - bugsplat AVX2 particle count mismatch
delete part ;
}
else
@ -410,8 +409,7 @@ void LLViewerPartGroup::updateParticles(const F32 lastdt)
{
// Transfer particles between groups
LLViewerPartSim::getInstance()->put(part) ;
mParticles[i] = mParticles.back() ;
mParticles.pop_back() ;
vector_replace_with_last(mParticles, mParticles.begin() + i); // <FS:Beq/> FIRE-34600 - bugsplat AVX2 particle count mismatch
}
else
{