From: Timothy Arceri Date: Tue, 25 Jul 2017 13:06:03 +0000 (+1000) Subject: mesa: don't try to re-generate the default buffer X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=4943353bff3192aabf652e61bb13830a9d576406;p=mesa.git mesa: don't try to re-generate the default buffer It should have been created by this point. Reviewed-by: Samuel Pitoiset --- 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,