summaryrefslogtreecommitdiff
path: root/indra/llrender/llvertexbuffer.h
diff options
context:
space:
mode:
authorRunitaiLinden <davep@lindenlab.com>2024-09-10 18:27:45 -0500
committerRunitaiLinden <davep@lindenlab.com>2024-09-10 18:27:45 -0500
commitcde5d29faf84c5cb7fc1b0d0ff6d03f3b7354c8f (patch)
treea0e1eec0a22e1c818463a0d756796bd001c2cf91 /indra/llrender/llvertexbuffer.h
parent33116ea35ec9a925c1601c8f1833e4d1e9f8390b (diff)
Profile guided optimizations
Diffstat (limited to 'indra/llrender/llvertexbuffer.h')
-rw-r--r--indra/llrender/llvertexbuffer.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/indra/llrender/llvertexbuffer.h b/indra/llrender/llvertexbuffer.h
index 2a4affdc60..9fe468f89e 100644
--- a/indra/llrender/llvertexbuffer.h
+++ b/indra/llrender/llvertexbuffer.h
@@ -120,6 +120,9 @@ public:
// indexed by the following enum
static U32 calcOffsets(const U32& typemask, U32* offsets, U32 num_vertices);
+ // flush any pending mapped buffers
+ static void flushBuffers();
+
//WARNING -- when updating these enums you MUST
// 1 - update LLVertexBuffer::sTypeSize
// 2 - update LLVertexBuffer::vb_type_name
@@ -190,6 +193,8 @@ public:
// map for data access (see also getFooStrider below)
U8* mapVertexBuffer(AttributeType type, U32 index, S32 count = -1);
U8* mapIndexBuffer(U32 index, S32 count = -1);
+
+ // synonym for flushBuffers
void unmapBuffer();
// set for rendering
@@ -312,6 +317,13 @@ private:
bool allocateBuffer(S32 nverts, S32 nindices, bool create) { return allocateBuffer(nverts, nindices); }
+ // actually unmap buffer
+ void _unmapBuffer();
+
+ // add to set of mapped buffers
+ void _mapBuffer();
+ bool mMapped = false;
+
public:
static U64 getBytesAllocated();