SL-18745 Fix for LLVertexBuffer assertion on shutdown.

meow-7.2.2
Dave Parks 2022-11-30 14:22:10 -06:00
parent 0186707937
commit dc4f65a2ec
3 changed files with 28 additions and 0 deletions

View File

@ -918,3 +918,26 @@ void LLReflectionMapManager::initReflectionMaps()
mVertexBuffer = buff;
}
}
void LLReflectionMapManager::cleanup()
{
mVertexBuffer = nullptr;
mRenderTarget.release();
mMipChain.clear();
mTexture = nullptr;
mIrradianceMaps = nullptr;
mProbes.clear();
mKillList.clear();
mCreateList.clear();
mReflectionMaps.clear();
mUpdatingFace = 0;
mDefaultProbe = nullptr;
glDeleteBuffers(1, &mUBO);
mUBO = 0;
}

View File

@ -58,6 +58,9 @@ public:
// allocate an environment map of the given resolution
LLReflectionMapManager();
// release any GL state
void cleanup();
// maintain reflection probes
void update();

View File

@ -659,6 +659,8 @@ void LLPipeline::cleanup()
mDeferredVB = NULL;
mCubeVB = NULL;
mReflectionMapManager.cleanup();
}
//============================================================================