mesa: Unbind ARB_copy_buffer and transform feedback buffers on delete.
authorKenneth Graunke <kenneth@whitecape.org>
Mon, 4 Jun 2012 05:34:32 +0000 (22:34 -0700)
committerKenneth Graunke <kenneth@whitecape.org>
Tue, 5 Jun 2012 21:41:33 +0000 (14:41 -0700)
commitcb8ed93dd0faf958493d35a4729c4a00a201af8d
tree371290b6ae633d3232c637907b3fa1d80397f226
parent25edfbfccfb8af9eecd949c3fc4f2680c5b963b6
mesa: Unbind ARB_copy_buffer and transform feedback buffers on delete.

According to the GL 3.1 spec, section 2.9 ("Buffer Objects"):
"If a buffer object is deleted while it is bound, all bindings to that
 object in the current context (i.e. in the thread that called
 DeleteBuffers) are reset to zero."

The code already checked for a number of cases, but neglected these
newer binding points.

+21 oglconforms.

NOTE: This is a candidate for stable release branches.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Brian Paul <brianp@vmware.com>
src/mesa/main/bufferobj.c