Module: Mesa Branch: gallium-mesa-7.4 Commit: c39e6917ac231f244cff51c22478f511736d068e URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=c39e6917ac231f244cff51c22478f511736d068e
Author: Brian Paul <[email protected]> Date: Fri Feb 27 13:05:51 2009 -0700 mesa: if a buffer object is mapped when glDeleteBuffers() is called, unmap it (cherry picked from master, commit a7f434b486187129ae8d5507170c42a9ce750258) --- src/mesa/main/bufferobj.c | 5 +++++ 1 files changed, 5 insertions(+), 0 deletions(-) diff --git a/src/mesa/main/bufferobj.c b/src/mesa/main/bufferobj.c index 7fce9e7..4f1e12f 100644 --- a/src/mesa/main/bufferobj.c +++ b/src/mesa/main/bufferobj.c @@ -794,6 +794,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(ctx, &ctx->Array.ArrayObj->Vertex.BufferObj, bufObj); unbind(ctx, &ctx->Array.ArrayObj->Normal.BufferObj, bufObj); unbind(ctx, &ctx->Array.ArrayObj->Color.BufferObj, bufObj); _______________________________________________ mesa-commit mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/mesa-commit
