mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 16:08:04 +02:00
mesa: if a buffer object is mapped when glDeleteBuffers() is called, unmap it
(cherry picked from master, commit a7f434b486)
This commit is contained in:
parent
c79079895f
commit
c39e6917ac
1 changed files with 5 additions and 0 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue