projects
/
mesa.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
395bcad
)
mesa: if a buffer object is mapped when glDeleteBuffers() is called, unmap it
author
Brian Paul
<brianp@vmware.com>
Fri, 27 Feb 2009 20:04:38 +0000
(13:04 -0700)
committer
Brian Paul
<brianp@vmware.com>
Fri, 27 Feb 2009 20:04:38 +0000
(13:04 -0700)
src/mesa/main/bufferobj.c
patch
|
blob
|
history
diff --git
a/src/mesa/main/bufferobj.c
b/src/mesa/main/bufferobj.c
index 1f41565fe2e1dc9cc3a04f848b4d2e01bcaf4c9d..8df0a5b1a1e6d29158accafad6763de458e0108b 100644
(file)
--- a/
src/mesa/main/bufferobj.c
+++ b/
src/mesa/main/bufferobj.c
@@
-793,6
+793,11
@@
_mesa_DeleteBuffersARB(GLsizei n, const GLuint *ids)
ASSERT(bufObj->Name == ids[i]);
+ if (bufObj->Pointer) {
+ /* if mapped, unmap it now */
+ ctx->Driver.UnmapBuffer(ctx, 0, bufObj);
+ }
+
/* unbind any vertex pointers bound to this buffer */
unbind(ctx, &ctx->Array.ArrayObj->Vertex.BufferObj, bufObj);
unbind(ctx, &ctx->Array.ArrayObj->Normal.BufferObj, bufObj);