summaryrefslogtreecommitdiff
path: root/indra/llrender/llvertexbuffer.h
diff options
context:
space:
mode:
authormobserveur <mobserveur@gmail.com>2024-07-23 02:57:02 +0200
committermobserveur <mobserveur@gmail.com>2024-07-23 02:57:02 +0200
commit7bb6ea9103228b3bf3b28792d8d73e8616471908 (patch)
treebbfe6b8deb26cf78eec77e4cade9637a8d435689 /indra/llrender/llvertexbuffer.h
parent8f66fcb7e32ce074fda9816efec37b45659c45e3 (diff)
Apple gpu optimisations based on LL work
This commit replaces our former optimisations with LL develop branch work and some tweaks.
Diffstat (limited to 'indra/llrender/llvertexbuffer.h')
-rw-r--r--indra/llrender/llvertexbuffer.h20
1 files changed, 20 insertions, 0 deletions
diff --git a/indra/llrender/llvertexbuffer.h b/indra/llrender/llvertexbuffer.h
index 184b0a4ac9..9d7a0bae2c 100644
--- a/indra/llrender/llvertexbuffer.h
+++ b/indra/llrender/llvertexbuffer.h
@@ -194,10 +194,24 @@ public:
void setTangentData(const LLVector4a* data);
void setWeight4Data(const LLVector4a* data);
void setTexCoordData(const LLVector2* data);
+ void setTexCoord0Data(const LLVector2* data);
+ void setTexCoord1Data(const LLVector2* data);
void setColorData(const LLColor4U* data);
void setIndexData(const U16* data);
void setIndexData(const U32* data);
+ void setPositionData(const LLVector4a* data, U32 offset, U32 count);
+ void setNormalData(const LLVector4a* data, U32 offset, U32 count);
+ void setTangentData(const LLVector4a* data, U32 offset, U32 count);
+ void setWeight4Data(const LLVector4a* data, U32 offset, U32 count);
+ //void setJointData(const U64* data, U32 offset, U32 count);
+ void setTexCoord0Data(const LLVector2* data, U32 offset, U32 count);
+ void setTexCoord1Data(const LLVector2* data, U32 offset, U32 count);
+ void setColorData(const LLColor4U* data, U32 offset, U32 count);
+ void setIndexData(const U16* data, U32 offset, U32 count);
+ void setIndexData(const U32* data, U32 offset, U32 count);
+
+
U32 getNumVerts() const { return mNumVerts; }
U32 getNumIndices() const { return mNumIndices; }
@@ -215,6 +229,10 @@ public:
void drawArrays(U32 mode, U32 offset, U32 count) const;
void drawRange(U32 mode, U32 start, U32 end, U32 count, U32 indices_offset) const;
+ // draw without syncing matrices. If you're positive there have been no matrix
+ // since the last call to syncMatrices, this is much faster than drawRange
+ void drawRangeFast(U32 mode, U32 start, U32 end, U32 count, U32 indices_offset) const;
+
//for debugging, validate data in given range is valid
bool validateRange(U32 start, U32 end, U32 count, U32 offset) const;
@@ -252,6 +270,8 @@ private:
friend class LLNavShapeVBOManager;
friend class LLNavMeshVBOManager;
+ void flush_vbo(GLenum target, U32 start, U32 end, void* data, U8* dst);
+
LLVertexBuffer(U32 typemask, U32 usage)
: LLVertexBuffer(typemask)
{}