From: Kenneth Graunke Date: Sun, 10 Jun 2012 04:44:58 +0000 (-0700) Subject: mesa: Unbind GL_TEXTURE_BUFFER on DeleteBuffers. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=45c21f852ec88fb4e784b53a1828d9a52d9dc67f;p=mesa.git mesa: Unbind GL_TEXTURE_BUFFER on DeleteBuffers. Fixes oglconform's tbo/basic.buffer.delete test. Signed-off-by: Kenneth Graunke Reviewed-by: Brian Paul Reviewed-by: Eric Anholt --- diff --git a/src/mesa/main/bufferobj.c b/src/mesa/main/bufferobj.c index 846260d80fe..332af3d36d7 100644 --- a/src/mesa/main/bufferobj.c +++ b/src/mesa/main/bufferobj.c @@ -848,6 +848,10 @@ _mesa_DeleteBuffersARB(GLsizei n, const GLuint *ids) _mesa_BindBufferARB( GL_PIXEL_UNPACK_BUFFER_EXT, 0 ); } + if (ctx->Texture.BufferObject == bufObj) { + _mesa_BindBufferARB( GL_TEXTURE_BUFFER, 0 ); + } + /* The ID is immediately freed for re-use */ _mesa_HashRemove(ctx->Shared->BufferObjects, ids[i]); /* Make sure we do not run into the classic ABA problem on bind.