[Mesa-dev] [PATCH] mesa: don't error check the default buffer object in glBindBufferOffsetEXT()
Timothy Arceri
tarceri at itsqueeze.com
Fri Aug 25 00:15:54 UTC 2017
Reviewed-by: Timothy Arceri <tarceri at itsqueeze.com>
On 24/08/17 21:44, Samuel Pitoiset wrote:
> An allocation check is already done when the buffer is created at
> context creation.
>
> Signed-off-by: Samuel Pitoiset <samuel.pitoiset at gmail.com>
> ---
> src/mesa/main/transformfeedback.c | 11 +++++------
> 1 file changed, 5 insertions(+), 6 deletions(-)
>
> diff --git a/src/mesa/main/transformfeedback.c b/src/mesa/main/transformfeedback.c
> index 07a9f9e940..a075d0875a 100644
> --- a/src/mesa/main/transformfeedback.c
> +++ b/src/mesa/main/transformfeedback.c
> @@ -778,12 +778,11 @@ _mesa_BindBufferOffsetEXT(GLenum target, GLuint index, GLuint buffer,
> bufObj = ctx->Shared->NullBufferObj;
> } else {
> bufObj = _mesa_lookup_bufferobj(ctx, buffer);
> - }
> -
> - if (!bufObj) {
> - _mesa_error(ctx, GL_INVALID_OPERATION,
> - "glBindBufferOffsetEXT(invalid buffer=%u)", buffer);
> - return;
> + if (!bufObj) {
> + _mesa_error(ctx, GL_INVALID_OPERATION,
> + "glBindBufferOffsetEXT(invalid buffer=%u)", buffer);
> + return;
> + }
> }
>
> _mesa_bind_buffer_range_xfb(ctx, obj, index, bufObj, offset, 0);
>
More information about the mesa-dev
mailing list