From: Brian Paul Date: Tue, 9 Nov 2010 19:24:49 +0000 (-0700) Subject: mesa: no-op glBufferSubData() on size==0 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=6e2e136428b97d2424ebe626a30d7237015f7ea3;p=mesa.git mesa: no-op glBufferSubData() on size==0 Fixes http://bugs.freedesktop.org/show_bug.cgi?id=31439 NOTE: this is a candidate for the 7.9 branch --- diff --git a/src/mesa/main/bufferobj.c b/src/mesa/main/bufferobj.c index 0a68008a100..76f8259a283 100644 --- a/src/mesa/main/bufferobj.c +++ b/src/mesa/main/bufferobj.c @@ -1189,6 +1189,9 @@ _mesa_BufferSubDataARB(GLenum target, GLintptrARB offset, return; } + if (size == 0) + return; + bufObj->Written = GL_TRUE; ASSERT(ctx->Driver.BufferSubData);