diff options
author | Eric Anholt <[email protected]> | 2012-07-31 12:46:25 -0700 |
---|---|---|
committer | Eric Anholt <[email protected]> | 2012-08-07 13:54:51 -0700 |
commit | bfa046b5f2e50a0297ecb7e325395367362c4c39 (patch) | |
tree | e74a734698034abf5b7012aaeda43ad92b2b40a3 /src/mesa/main/bufferobj.c | |
parent | 1eb3c06ae82cc962c5d867238acd089f833c2337 (diff) |
mesa: Unbind uniform buffer bindings on glDeleteBuffers().
Fixes piglit GL_ARB_uniform_buffer_object/deletebuffers.
Reviewed-by: Kenneth Graunke <[email protected]>
Diffstat (limited to 'src/mesa/main/bufferobj.c')
-rw-r--r-- | src/mesa/main/bufferobj.c | 7 |
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 ); } |