summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/mesa/main/bufferobj.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/mesa/main/bufferobj.c b/src/mesa/main/bufferobj.c
index 0e3216009b0..22d7927bbcb 100644
--- a/src/mesa/main/bufferobj.c
+++ b/src/mesa/main/bufferobj.c
@@ -886,6 +886,13 @@ _mesa_DeleteBuffersARB(GLsizei n, const GLuint *ids)
}
}
+ /* unbind UBO binding points */
+ for (j = 0; j < ctx->Const.MaxUniformBufferBindings; j++) {
+ if (ctx->UniformBufferBindings[j].BufferObject == bufObj) {
+ _mesa_BindBufferBase( GL_UNIFORM_BUFFER, j, 0 );
+ }
+ }
+
if (ctx->UniformBuffer == bufObj) {
_mesa_BindBufferARB( GL_UNIFORM_BUFFER, 0 );
}