diff options
Diffstat (limited to 'src/mesa/main/bufferobj.c')
-rw-r--r-- | src/mesa/main/bufferobj.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/mesa/main/bufferobj.c b/src/mesa/main/bufferobj.c index 016543da01f..e4bdc6f1e79 100644 --- a/src/mesa/main/bufferobj.c +++ b/src/mesa/main/bufferobj.c @@ -951,8 +951,10 @@ _mesa_BufferDataARB(GLenum target, GLsizeiptrARB size, } if (bufObj->Pointer) { - _mesa_error(ctx, GL_INVALID_OPERATION, "glBufferDataARB(buffer is mapped)" ); - return; + /* Unmap the existing buffer. We'll replace it now. Not an error. */ + ctx->Driver.UnmapBuffer(ctx, target, bufObj); + bufObj->Access = DEFAULT_ACCESS; + bufObj->Pointer = NULL; } ASSERT(ctx->Driver.BufferData); |