diff options
| author | Dave Parks <davep@lindenlab.com> | 2011-10-13 01:19:45 -0500 |
|---|---|---|
| committer | Dave Parks <davep@lindenlab.com> | 2011-10-13 01:19:45 -0500 |
| commit | 7b6723d1e0158d5dc326266a0332e87f634f9755 (patch) | |
| tree | 10efed7ccda1a80889bfb65cd64c86b8d33c75ed /indra/newview/pipeline.cpp | |
| parent | 1a499c13c813d4aa9631ffae00b36a053f260747 (diff) | |
SH-1650 Mitigate memory fragmentation by holding onto and reusing VBOs
Diffstat (limited to 'indra/newview/pipeline.cpp')
| -rw-r--r-- | indra/newview/pipeline.cpp | 26 |
1 files changed, 5 insertions, 21 deletions
diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp index e4125c8dc8..5035e0197d 100644 --- a/indra/newview/pipeline.cpp +++ b/indra/newview/pipeline.cpp @@ -264,15 +264,7 @@ std::string gPoolNames[] = void drawBox(const LLVector3& c, const LLVector3& r); void drawBoxOutline(const LLVector3& pos, const LLVector3& size); - -U32 nhpo2(U32 v) -{ - U32 r = 1; - while (r < v) { - r *= 2; - } - return r; -} +U32 nhpo2(U32 v); glh::matrix4f glh_copy_matrix(F32* src) { @@ -2902,11 +2894,7 @@ void LLPipeline::stateSort(LLCamera& camera, LLCullResult &result) } } } - { - LLFastTimer ftm(FTM_CLIENT_COPY); - LLVertexBuffer::clientCopy(); - } - + postSort(camera); } @@ -6122,13 +6110,7 @@ void LLPipeline::resetVertexBuffers() llwarns << "VBO wipe failed." << llendl; } - if (!LLVertexBuffer::sStreamIBOPool.mNameList.empty() || - !LLVertexBuffer::sStreamVBOPool.mNameList.empty() || - !LLVertexBuffer::sDynamicIBOPool.mNameList.empty() || - !LLVertexBuffer::sDynamicVBOPool.mNameList.empty()) - { - llwarns << "VBO name pool cleanup failed." << llendl; - } + llassert(LLVertexBuffer::sGLCount == 0); LLVertexBuffer::unbind(); @@ -6142,6 +6124,8 @@ void LLPipeline::resetVertexBuffers() sBakeSunlight = gSavedSettings.getBOOL("RenderBakeSunlight"); sNoAlpha = gSavedSettings.getBOOL("RenderNoAlpha"); LLPipeline::sTextureBindTest = gSavedSettings.getBOOL("RenderDebugTextureBind"); + + LLVertexBuffer::initClass(LLVertexBuffer::sEnableVBOs, LLVertexBuffer::sDisableVBOMapping); } void LLPipeline::renderObjects(U32 type, U32 mask, BOOL texture) |
