Mesa (7.9): mesa: no-op glBufferSubData() on size==0

Ian Romanick idr at kemper.freedesktop.org
Tue Jan 4 01:07:54 UTC 2011


Module: Mesa
Branch: 7.9
Commit: 0ff45dd5d794be59f0eb3afd84a95eca57892d94
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=0ff45dd5d794be59f0eb3afd84a95eca57892d94

Author: Brian Paul <brianp at vmware.com>
Date:   Tue Nov  9 12:24:49 2010 -0700

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
(cherry picked from commit 6e2e136428b97d2424ebe626a30d7237015f7ea3)

---

 src/mesa/main/bufferobj.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/src/mesa/main/bufferobj.c b/src/mesa/main/bufferobj.c
index d9eaada..4fe887f 100644
--- a/src/mesa/main/bufferobj.c
+++ b/src/mesa/main/bufferobj.c
@@ -1199,6 +1199,9 @@ _mesa_BufferSubDataARB(GLenum target, GLintptrARB offset,
       return;
    }
 
+   if (size == 0)
+      return;
+
    bufObj->Written = GL_TRUE;
 
    ASSERT(ctx->Driver.BufferSubData);




More information about the mesa-commit mailing list