From 4943353bff3192aabf652e61bb13830a9d576406 Mon Sep 17 00:00:00 2001 From: Timothy Arceri Date: Tue, 25 Jul 2017 23:06:03 +1000 Subject: [PATCH] mesa: don't try to re-generate the default buffer It should have been created by this point. Reviewed-by: Samuel Pitoiset --- src/mesa/main/bufferobj.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/mesa/main/bufferobj.c b/src/mesa/main/bufferobj.c index 419972e3712..12fe2d31436 100644 --- a/src/mesa/main/bufferobj.c +++ b/src/mesa/main/bufferobj.c @@ -4041,10 +4041,10 @@ bind_buffer_range(GLenum target, GLuint index, GLuint buffer, GLintptr offset, bufObj = ctx->Shared->NullBufferObj; } else { bufObj = _mesa_lookup_bufferobj(ctx, buffer); + if (!_mesa_handle_bind_buffer_gen(ctx, buffer, + &bufObj, "glBindBufferRange")) + return; } - if (!_mesa_handle_bind_buffer_gen(ctx, buffer, - &bufObj, "glBindBufferRange")) - return; if (no_error) { switch (target) { @@ -4139,10 +4139,10 @@ _mesa_BindBufferBase(GLenum target, GLuint index, GLuint buffer) bufObj = ctx->Shared->NullBufferObj; } else { bufObj = _mesa_lookup_bufferobj(ctx, buffer); + if (!_mesa_handle_bind_buffer_gen(ctx, buffer, + &bufObj, "glBindBufferBase")) + return; } - if (!_mesa_handle_bind_buffer_gen(ctx, buffer, - &bufObj, "glBindBufferBase")) - return; if (!bufObj) { _mesa_error(ctx, GL_INVALID_OPERATION, -- 2.30.2