diff options
Diffstat (limited to 'indra/llrender/llvertexbuffer.h')
-rw-r--r-- | indra/llrender/llvertexbuffer.h | 28 |
1 files changed, 21 insertions, 7 deletions
diff --git a/indra/llrender/llvertexbuffer.h b/indra/llrender/llvertexbuffer.h index 3b3fe44984..4d73cf07c0 100644 --- a/indra/llrender/llvertexbuffer.h +++ b/indra/llrender/llvertexbuffer.h @@ -88,6 +88,7 @@ public: typedef std::list<Record> record_list_t; std::vector<record_list_t> mFreeList; std::vector<U32> mMissCount; + bool mMissCountDirty; // flag any changes to mFreeList or mMissCount //used to avoid calling glGenBuffers for every VBO creation static U32 sNamePool[1024]; @@ -160,11 +161,12 @@ public: //WARNING -- when updating these enums you MUST // 1 - update LLVertexBuffer::sTypeSize - // 2 - add a strider accessor - // 3 - modify LLVertexBuffer::setupVertexBuffer - // 4 - modify LLVertexBuffer::setupClientArray - // 5 - modify LLViewerShaderMgr::mReservedAttribs - // 6 - update LLVertexBuffer::setupVertexArray + // 2 - update LLVertexBuffer::vb_type_name + // 3 - add a strider accessor + // 4 - modify LLVertexBuffer::setupVertexBuffer + // 5 - modify LLVertexBuffer::setupVertexBufferFast + // 6 - modify LLViewerShaderMgr::mReservedAttribs + // 7 - update LLVertexBuffer::setupVertexArray // clang-format off enum { // Shader attribute name, set in LLShaderMgr::initAttribsAndUniforms() @@ -195,7 +197,6 @@ public: MAP_TEXCOORD3 = (1<<TYPE_TEXCOORD3), MAP_COLOR = (1<<TYPE_COLOR), MAP_EMISSIVE = (1<<TYPE_EMISSIVE), - // These use VertexAttribPointer and should possibly be made generic MAP_TANGENT = (1<<TYPE_TANGENT), MAP_WEIGHT = (1<<TYPE_WEIGHT), MAP_WEIGHT4 = (1<<TYPE_WEIGHT4), @@ -269,6 +270,10 @@ public: bool getWeightStrider(LLStrider<F32>& strider, S32 index=0, S32 count = -1, bool map_range = false); bool getWeight4Strider(LLStrider<LLVector4>& strider, S32 index=0, S32 count = -1, bool map_range = false); bool getClothWeightStrider(LLStrider<LLVector4>& strider, S32 index=0, S32 count = -1, bool map_range = false); + bool getBasecolorTexcoordStrider(LLStrider<LLVector2>& strider, S32 index=0, S32 count = -1, bool map_range = false); + bool getNormalTexcoordStrider(LLStrider<LLVector2>& strider, S32 index=0, S32 count = -1, bool map_range = false); + bool getMetallicRoughnessTexcoordStrider(LLStrider<LLVector2>& strider, S32 index=0, S32 count = -1, bool map_range = false); + bool getEmissiveTexcoordStrider(LLStrider<LLVector2>& strider, S32 index=0, S32 count = -1, bool map_range = false); bool useVBOs() const; @@ -287,7 +292,7 @@ public: U8* getMappedIndices() const { return mMappedIndexData; } S32 getOffset(S32 type) const { return mOffsets[type]; } S32 getUsage() const { return mUsage; } - bool isWriteable() const { return (mMappable || mUsage == GL_STREAM_DRAW_ARB) ? true : false; } + bool isWriteable() const { return (mMappable || mUsage == GL_STREAM_DRAW) ? true : false; } void draw(U32 mode, U32 count, U32 indices_offset) const; void drawArrays(U32 mode, U32 offset, U32 count) const; @@ -299,6 +304,9 @@ public: //for debugging, validate data in given range is valid void validateRange(U32 start, U32 end, U32 count, U32 offset) const; + #ifdef LL_PROFILER_ENABLE_RENDER_DOC + void setLabel(const char* label); + #endif protected: @@ -369,5 +377,11 @@ public: static U32 sSetCount; }; +#ifdef LL_PROFILER_ENABLE_RENDER_DOC +#define LL_LABEL_VERTEX_BUFFER(buf, name) buf->setLabel(name) +#else +#define LL_LABEL_VERTEX_BUFFER(buf, name) +#endif + #endif // LL_LLVERTEXBUFFER_H |