diff options
author | Timothy Arceri <[email protected]> | 2017-07-25 23:16:14 +1000 |
---|---|---|
committer | Timothy Arceri <[email protected]> | 2017-07-26 10:16:20 +1000 |
commit | 6be1c69b97175a0ae71dda584629b91093728c12 (patch) | |
tree | 9715e0ed67d42cf157151df44f7a7ed61026d15f /src | |
parent | 003c8b116717c3bade740d299b3b2e6131a1ae0b (diff) |
mesa: call binding functions directly from glDeleteBuffers
This avoids useless error checking.
Reviewed-by: Samuel Pitoiset <[email protected]>
Diffstat (limited to 'src')
-rw-r--r-- | src/mesa/main/bufferobj.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/src/mesa/main/bufferobj.c b/src/mesa/main/bufferobj.c index 324bbc6ea15..343e6c3ca5c 100644 --- a/src/mesa/main/bufferobj.c +++ b/src/mesa/main/bufferobj.c @@ -1536,14 +1536,18 @@ _mesa_DeleteBuffers(GLsizei n, const GLuint *ids) } for (j = 0; j < MAX_FEEDBACK_BUFFERS; j++) { if (ctx->TransformFeedback.CurrentObject->Buffers[j] == bufObj) { - _mesa_BindBufferBase( GL_TRANSFORM_FEEDBACK_BUFFER, j, 0 ); + _mesa_bind_buffer_base_transform_feedback(ctx, + ctx->TransformFeedback.CurrentObject, + j, ctx->Shared->NullBufferObj, + false); } } /* 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 ); + bind_buffer_base_uniform_buffer(ctx, j, + ctx->Shared->NullBufferObj); } } @@ -1554,7 +1558,8 @@ _mesa_DeleteBuffers(GLsizei n, const GLuint *ids) /* unbind SSBO binding points */ for (j = 0; j < ctx->Const.MaxShaderStorageBufferBindings; j++) { if (ctx->ShaderStorageBufferBindings[j].BufferObject == bufObj) { - _mesa_BindBufferBase(GL_SHADER_STORAGE_BUFFER, j, 0); + bind_buffer_base_shader_storage_buffer(ctx, j, + ctx->Shared->NullBufferObj); } } @@ -1566,6 +1571,7 @@ _mesa_DeleteBuffers(GLsizei n, const GLuint *ids) for (j = 0; j < ctx->Const.MaxAtomicBufferBindings; j++) { if (ctx->AtomicBufferBindings[j].BufferObject == bufObj) { _mesa_BindBufferBase( GL_ATOMIC_COUNTER_BUFFER, j, 0 ); + bind_atomic_buffer(ctx, j, ctx->Shared->NullBufferObj, 0, 0); } } |