summaryrefslogtreecommitdiff
path: root/indra/llrender/llvertexbuffer.cpp
diff options
context:
space:
mode:
authorMike <contact@mikelittman.me>2026-10-14 00:03:37 -0500
committerGitHub <noreply@github.com>2026-10-14 13:03:37 +0800
commit9cc783022a202a1d00b5dc8eaf01ffddbc9fa39f (patch)
tree9a5b23fb63c2e09d1815d913272f7a17f96750e4 /indra/llrender/llvertexbuffer.cpp
parent1b7d456077ba61c987fc06561e30127a1cc18968 (diff)
Stop Apple OpenGL from waiting on a null fence (#34)
glFinish and glWaitSync both crash in GLDFenceRec::getStatus when the fence record is null. On Apple, flush texture uploads instead and do not call glFinish before deleting buffers.
Diffstat (limited to 'indra/llrender/llvertexbuffer.cpp')
-rw-r--r--indra/llrender/llvertexbuffer.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/indra/llrender/llvertexbuffer.cpp b/indra/llrender/llvertexbuffer.cpp
index a827927809..6a885d2a09 100644
--- a/indra/llrender/llvertexbuffer.cpp
+++ b/indra/llrender/llvertexbuffer.cpp
@@ -317,14 +317,13 @@ static void delete_buffers(S32 count, GLuint* buffers)
{
if (gGLManager.mIsApple)
{
- // Apple's GL/Metal translator crashes in GLDFenceRec::getStatus
- // (null fence, fault at +0x24) when glDeleteBuffers waits on a
- // sync that was never created. Unbind and finish first.
+ // Unbind, then delete one name at a time. Do not glFinish():
+ // that drains a queued glWaitSync and faults in
+ // GLDFenceRec::getStatus when Apple's fence record is null.
glBindBuffer(GL_ARRAY_BUFFER, 0);
glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, 0);
LLVertexBuffer::sGLRenderBuffer = 0;
LLVertexBuffer::sGLRenderIndices = 0;
- glFinish();
for (GLuint name : sFreeList[idx])
{
if (name)