summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--indra/llrender/llvertexbuffer.cpp4
-rw-r--r--indra/newview/llappviewer.cpp3
-rw-r--r--indra/newview/llvopartgroup.cpp18
3 files changed, 22 insertions, 3 deletions
diff --git a/indra/llrender/llvertexbuffer.cpp b/indra/llrender/llvertexbuffer.cpp
index f4bf744e3c..2e7c8a0e8f 100644
--- a/indra/llrender/llvertexbuffer.cpp
+++ b/indra/llrender/llvertexbuffer.cpp
@@ -292,7 +292,7 @@ void LLVBOPool::seedPool()
void LLVBOPool::cleanup()
{
- U32 size = 1;
+ U32 size = LL_VBO_BLOCK_SIZE;
for (U32 i = 0; i < mFreeList.size(); ++i)
{
@@ -323,7 +323,7 @@ void LLVBOPool::cleanup()
}
}
- size *= 2;
+ size += LL_VBO_BLOCK_SIZE;
}
//reset miss counts
diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp
index 4d94c90cc6..89994e505b 100644
--- a/indra/newview/llappviewer.cpp
+++ b/indra/newview/llappviewer.cpp
@@ -1133,6 +1133,8 @@ void LLAppViewer::checkMemory()
static LLFastTimer::DeclareTimer FTM_MESSAGES("System Messages");
static LLFastTimer::DeclareTimer FTM_SLEEP("Sleep");
+static LLFastTimer::DeclareTimer FTM_YIELD("Yield");
+
static LLFastTimer::DeclareTimer FTM_TEXTURE_CACHE("Texture Cache");
static LLFastTimer::DeclareTimer FTM_DECODE("Image Decode");
static LLFastTimer::DeclareTimer FTM_VFS("VFS Thread");
@@ -1318,6 +1320,7 @@ bool LLAppViewer::mainLoop()
// yield some time to the os based on command line option
if(mYieldTime >= 0)
{
+ LLFastTimer t(FTM_YIELD);
ms_sleep(mYieldTime);
}
diff --git a/indra/newview/llvopartgroup.cpp b/indra/newview/llvopartgroup.cpp
index 1ac13cd1ea..e21358b65a 100644
--- a/indra/newview/llvopartgroup.cpp
+++ b/indra/newview/llvopartgroup.cpp
@@ -130,11 +130,27 @@ S32 LLVOPartGroup::findAvailableVBSlot()
return ret;
}
+bool ll_is_part_idx_allocated(S32 idx, S32* start, S32* end)
+{
+ while (start < end)
+ {
+ if (*start == idx)
+ { //not allocated (in free list)
+ return false;
+ }
+ ++start;
+ }
+
+ //allocated (not in free list)
+ return true;
+}
+
//static
void LLVOPartGroup::freeVBSlot(S32 idx)
{
llassert(idx < LL_MAX_PARTICLE_COUNT && idx >= 0);
- //llassert(sVBSlotCursor > sVBSlotFree);
+ llassert(sVBSlotCursor > sVBSlotFree);
+ llassert(ll_is_part_idx_allocated(idx, sVBSlotCursor, sVBSlotFree+LL_MAX_PARTICLE_COUNT));
if (sVBSlotCursor > sVBSlotFree)
{