On 06/09/2012 10:48 PM, Kenneth Graunke wrote:
Fixes oglconform's tbo/basic.buffer.delete test.

Signed-off-by: Kenneth Graunke<kenn...@whitecape.org>
---
  src/mesa/main/bufferobj.c |    4 ++++
  1 file changed, 4 insertions(+)

diff --git a/src/mesa/main/bufferobj.c b/src/mesa/main/bufferobj.c
index 846260d..332af3d 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.

Reviewed-by: Brian Paul <bri...@vmware.com>
_______________________________________________
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev

Reply via email to