mesa: no-op glBufferSubData() on size==0
authorBrian Paul <brianp@vmware.com>
Tue, 9 Nov 2010 19:24:49 +0000 (12:24 -0700)
committerBrian Paul <brianp@vmware.com>
Tue, 9 Nov 2010 19:24:51 +0000 (12:24 -0700)
Fixes http://bugs.freedesktop.org/show_bug.cgi?id=31439

NOTE: this is a candidate for the 7.9 branch

src/mesa/main/bufferobj.c

index 0a68008a1003fba28671f42a0f83517b54f68d87..76f8259a283912d0e53b1f81995cb660d1d00699 100644 (file)
@@ -1189,6 +1189,9 @@ _mesa_BufferSubDataARB(GLenum target, GLintptrARB offset,
       return;
    }
 
+   if (size == 0)
+      return;
+
    bufObj->Written = GL_TRUE;
 
    ASSERT(ctx->Driver.BufferSubData);