aboutsummaryrefslogtreecommitdiff
path: root/mesalib/src/mesa/main/bufferobj.c
diff options
context:
space:
mode:
Diffstat (limited to 'mesalib/src/mesa/main/bufferobj.c')
-rw-r--r--mesalib/src/mesa/main/bufferobj.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/mesalib/src/mesa/main/bufferobj.c b/mesalib/src/mesa/main/bufferobj.c
index ae7bac14d..36a761986 100644
--- a/mesalib/src/mesa/main/bufferobj.c
+++ b/mesalib/src/mesa/main/bufferobj.c
@@ -42,6 +42,7 @@
#include "mfeatures.h"
#include "mtypes.h"
#include "texobj.h"
+#include "transformfeedback.h"
/* Debug flags */
@@ -821,6 +822,24 @@ _mesa_DeleteBuffersARB(GLsizei n, const GLuint *ids)
_mesa_BindBufferARB( GL_ELEMENT_ARRAY_BUFFER_ARB, 0 );
}
+ /* unbind ARB_copy_buffer binding points */
+ if (ctx->CopyReadBuffer == bufObj) {
+ _mesa_BindBufferARB( GL_COPY_READ_BUFFER, 0 );
+ }
+ if (ctx->CopyWriteBuffer == bufObj) {
+ _mesa_BindBufferARB( GL_COPY_WRITE_BUFFER, 0 );
+ }
+
+ /* unbind transform feedback binding points */
+ if (ctx->TransformFeedback.CurrentBuffer == bufObj) {
+ _mesa_BindBufferARB( GL_TRANSFORM_FEEDBACK_BUFFER, 0 );
+ }
+ for (j = 0; j < MAX_FEEDBACK_ATTRIBS; j++) {
+ if (ctx->TransformFeedback.CurrentObject->Buffers[j] == bufObj) {
+ _mesa_BindBufferBase( GL_TRANSFORM_FEEDBACK_BUFFER, j, 0 );
+ }
+ }
+
/* unbind any pixel pack/unpack pointers bound to this buffer */
if (ctx->Pack.BufferObj == bufObj) {
_mesa_BindBufferARB( GL_PIXEL_PACK_BUFFER_EXT, 0 );