diff options
author | Andrey Kleshchev <andreykproductengine@lindenlab.com> | 2022-05-26 21:25:23 +0300 |
---|---|---|
committer | Andrey Kleshchev <andreykproductengine@lindenlab.com> | 2022-07-15 22:53:59 +0300 |
commit | e9ac774ceb02e166c3cccf07cbc7c28bf4f001d8 (patch) | |
tree | 6b8f3ca7ae6d9bec2f6c23f6011e4c1a3a4f3c31 /indra/newview/pipeline.cpp | |
parent | 2785f1f33d95348853d6c3e08a14f7627407b50c (diff) |
SL-17473 Viewer not clearing all Vertex Buffers in some cases
Image thread doesn't need mBuffer and buffer isn't thread safe so no point allocating it in an image thread.
Diffstat (limited to 'indra/newview/pipeline.cpp')
-rw-r--r-- | indra/newview/pipeline.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp index 5bf62f0524..bc63c3ffe3 100644 --- a/indra/newview/pipeline.cpp +++ b/indra/newview/pipeline.cpp @@ -7243,6 +7243,7 @@ void LLPipeline::doResetVertexBuffers(bool forced) mResetVertexBuffers = false; mCubeVB = NULL; + mDeferredVB = NULL; for (LLWorld::region_list_t::const_iterator iter = LLWorld::getInstance()->getRegionList().begin(); iter != LLWorld::getInstance()->getRegionList().end(); ++iter) @@ -7276,10 +7277,11 @@ void LLPipeline::doResetVertexBuffers(bool forced) LLPathingLib::getInstance()->cleanupVBOManager(); } LLVOPartGroup::destroyGL(); + gGL.resetVertexBuffer(); SUBSYSTEM_CLEANUP(LLVertexBuffer); - if (LLVertexBuffer::sGLCount > 0) + if (LLVertexBuffer::sGLCount != 0) { LL_WARNS() << "VBO wipe failed -- " << LLVertexBuffer::sGLCount << " buffers remaining." << LL_ENDL; } @@ -7300,6 +7302,10 @@ void LLPipeline::doResetVertexBuffers(bool forced) LLPipeline::sTextureBindTest = gSavedSettings.getBOOL("RenderDebugTextureBind"); LLVertexBuffer::initClass(LLVertexBuffer::sEnableVBOs, LLVertexBuffer::sDisableVBOMapping); + gGL.initVertexBuffer(); + + mDeferredVB = new LLVertexBuffer(DEFERRED_VB_MASK, 0); + mDeferredVB->allocateBuffer(8, 0, true); LLVOPartGroup::restoreGL(); } |