diff options
author | Timothy Arceri <tarceri@itsqueeze.com> | 2017-07-26 11:11:02 +1000 |
---|---|---|
committer | Timothy Arceri <tarceri@itsqueeze.com> | 2017-08-08 15:56:12 +1000 |
commit | da154786ce3a8f6a18ecfd238f1ade05d011c10c (patch) | |
tree | ff5442bd8672c86bf8f83b1040a9ce478a6c1d77 /src/mesa | |
parent | dae1e6ad1190107da3a75f57d48bd8292a47cbf2 (diff) |
mesa: don't error check the default buffer object
An allocation check is already done when the buffer is created at
context creation.
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Diffstat (limited to 'src/mesa')
-rw-r--r-- | src/mesa/main/bufferobj.c | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/src/mesa/main/bufferobj.c b/src/mesa/main/bufferobj.c index 625fd5f3423..cff1905e162 100644 --- a/src/mesa/main/bufferobj.c +++ b/src/mesa/main/bufferobj.c @@ -4274,6 +4274,12 @@ bind_buffer_range(GLenum target, GLuint index, GLuint buffer, GLintptr offset, if (!_mesa_handle_bind_buffer_gen(ctx, buffer, &bufObj, "glBindBufferRange")) return; + + if (!no_error && !bufObj) { + _mesa_error(ctx, GL_INVALID_OPERATION, + "glBindBufferRange(invalid buffer=%u)", buffer); + return; + } } if (no_error) { @@ -4296,12 +4302,6 @@ bind_buffer_range(GLenum target, GLuint index, GLuint buffer, GLintptr offset, unreachable("invalid BindBufferRange target with KHR_no_error"); } } else { - if (!bufObj) { - _mesa_error(ctx, GL_INVALID_OPERATION, - "glBindBufferRange(invalid buffer=%u)", buffer); - return; - } - if (buffer != 0) { if (size <= 0) { _mesa_error(ctx, GL_INVALID_VALUE, "glBindBufferRange(size=%d)", @@ -4372,12 +4372,12 @@ _mesa_BindBufferBase(GLenum target, GLuint index, GLuint buffer) if (!_mesa_handle_bind_buffer_gen(ctx, buffer, &bufObj, "glBindBufferBase")) return; - } - if (!bufObj) { - _mesa_error(ctx, GL_INVALID_OPERATION, - "glBindBufferBase(invalid buffer=%u)", buffer); - return; + if (!bufObj) { + _mesa_error(ctx, GL_INVALID_OPERATION, + "glBindBufferBase(invalid buffer=%u)", buffer); + return; + } } /* Note that there's some oddness in the GL 3.1-GL 3.3 specifications with |