mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-08 02:38:04 +02:00
mesa: Unbind uniform buffer bindings on glDeleteBuffers().
Fixes piglit GL_ARB_uniform_buffer_object/deletebuffers. Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
This commit is contained in:
parent
1eb3c06ae8
commit
bfa046b5f2
1 changed files with 7 additions and 0 deletions
|
|
@ -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 );
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue