diff options
author | Timothy Arceri <[email protected]> | 2017-07-25 23:06:03 +1000 |
---|---|---|
committer | Timothy Arceri <[email protected]> | 2017-07-26 10:16:20 +1000 |
commit | 4943353bff3192aabf652e61bb13830a9d576406 (patch) | |
tree | 9886034e7118fef67e047a9de62946b073ebc331 /src/mesa/main | |
parent | 4d4872708ef8dc4915f61274c1c795b8e8472357 (diff) |
mesa: don't try to re-generate the default buffer
It should have been created by this point.
Reviewed-by: Samuel Pitoiset <[email protected]>
Diffstat (limited to 'src/mesa/main')
-rw-r--r-- | src/mesa/main/bufferobj.c | 12 |
1 files 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, |