diff options
author | Kenneth Graunke <[email protected]> | 2012-06-09 21:44:58 -0700 |
---|---|---|
committer | Kenneth Graunke <[email protected]> | 2012-06-11 13:30:32 -0700 |
commit | 45c21f852ec88fb4e784b53a1828d9a52d9dc67f (patch) | |
tree | fec96ab7c476d42feefd3207d17bbac69523aa7d /src/mesa/main | |
parent | bbb67c3efcf0ba76ee0cb891206284ad84b9cb61 (diff) |
mesa: Unbind GL_TEXTURE_BUFFER on DeleteBuffers.
Fixes oglconform's tbo/basic.buffer.delete test.
Signed-off-by: Kenneth Graunke <[email protected]>
Reviewed-by: Brian Paul <[email protected]>
Reviewed-by: Eric Anholt <[email protected]>
Diffstat (limited to 'src/mesa/main')
-rw-r--r-- | src/mesa/main/bufferobj.c | 4 |
1 files changed, 4 insertions, 0 deletions
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. |