summaryrefslogtreecommitdiff
path: root/indra/llrender/llvertexbuffer.cpp
diff options
context:
space:
mode:
authorBrad Linden <46733234+brad-linden@users.noreply.github.com>2024-09-12 15:25:56 -0700
committerGitHub <noreply@github.com>2024-09-12 15:25:56 -0700
commit7dd04dea9fb6882f4a7c8a5a5b79ace84838ae0e (patch)
tree14b5fcdd1e0e7089a90faa4f45e7b203bdc7a702 /indra/llrender/llvertexbuffer.cpp
parentccbd69bf6b287861b41fdb00e9d372746dfc2702 (diff)
parent3c5e8ded9399dc1419b8596c99f2a1ef9656b7bb (diff)
Merge pull request #2557 from secondlife/davep-fix-mac-vb
OS X - Fix black screen and Tracy build
Diffstat (limited to 'indra/llrender/llvertexbuffer.cpp')
-rw-r--r--indra/llrender/llvertexbuffer.cpp9
1 files changed, 3 insertions, 6 deletions
diff --git a/indra/llrender/llvertexbuffer.cpp b/indra/llrender/llvertexbuffer.cpp
index 8524b470de..3a18c28a62 100644
--- a/indra/llrender/llvertexbuffer.cpp
+++ b/indra/llrender/llvertexbuffer.cpp
@@ -1302,6 +1302,9 @@ U8* LLVertexBuffer::mapIndexBuffer(U32 index, S32 count)
void LLVertexBuffer::flush_vbo(GLenum target, U32 start, U32 end, void* data, U8* dst)
{
#if LL_DARWIN
+ // on OS X, flush_vbo doesn't actually write to the GL buffer, so be sure to call
+ // _mapBuffer to tag the buffer for flushing to GL
+ _mapBuffer();
LL_PROFILE_ZONE_NAMED_CATEGORY_VERTEX("vb memcpy");
STOP_GLERROR;
// copy into mapped buffer
@@ -1592,12 +1595,6 @@ bool LLVertexBuffer::getClothWeightStrider(LLStrider<LLVector4>& strider, U32 in
void LLVertexBuffer::setBuffer()
{
STOP_GLERROR;
-#if LL_DARWIN
- if (!mGLBuffer)
- { // OS X doesn't allocate a buffer until we call unmapBuffer
- return;
- }
-#endif
if (mMapped)
{