diff options
| author | Dave Parks <davep@lindenlab.com> | 2012-05-15 16:42:04 -0500 |
|---|---|---|
| committer | Dave Parks <davep@lindenlab.com> | 2012-05-15 16:42:04 -0500 |
| commit | 89b0b6ac7198653d989dea78ee1c3d3f4f61161f (patch) | |
| tree | 03184fb7c5723a766182a2fcfa0b86340e3761e1 /indra/llrender/llvertexbuffer.h | |
| parent | f1f9b1c3b73b245fef3c976a9a1d71009bdbf3e0 (diff) | |
MAINT-616 Different VBO Pooling scheme -- populate VBO pool with buffers that are likely to be requested, but never reuse a previously used buffer.
Diffstat (limited to 'indra/llrender/llvertexbuffer.h')
| -rw-r--r-- | indra/llrender/llvertexbuffer.h | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/indra/llrender/llvertexbuffer.h b/indra/llrender/llvertexbuffer.h index 7477dec3ad..a64daa1a90 100644 --- a/indra/llrender/llvertexbuffer.h +++ b/indra/llrender/llvertexbuffer.h @@ -57,20 +57,20 @@ public: static U32 sBytesPooled; static U32 sIndexBytesPooled; - LLVBOPool(U32 vboUsage, U32 vboType) - : mUsage(vboUsage) - , mType(vboType) - {} - + LLVBOPool(U32 vboUsage, U32 vboType); + const U32 mUsage; const U32 mType; //size MUST be a power of 2 - volatile U8* allocate(U32& name, U32 size); + volatile U8* allocate(U32& name, U32 size, bool for_seed = false); //size MUST be the size provided to allocate that returned the given name void release(U32 name, volatile U8* buffer, U32 size); + //batch allocate buffers to be provided to the application on demand + void seedPool(); + //destroy all records in mFreeList void cleanup(); @@ -83,6 +83,8 @@ public: typedef std::list<Record> record_list_t; std::vector<record_list_t> mFreeList; + std::vector<U32> mMissCount; + }; class LLGLFence @@ -129,6 +131,8 @@ public: static bool sUseVAO; static bool sPreferStreamDraw; + static void seedPools(); + static void initClass(bool use_vbo, bool no_vbo_mapping); static void cleanupClass(); static void setupClientArrays(U32 data_mask); |
