[Mesa-dev] [PATCH 1/3] mesa: don't try to re-generate the default buffer

Samuel Pitoiset samuel.pitoiset at gmail.com
Tue Jul 25 15:18:21 UTC 2017


We could also remove that useless assert in 
_mesa_handle_bind_buffer_gen() because NewBufferObj() is called when the 
shared state is allocated. I don't think it can be NULL here. :-)

The same change can be applied to bind_buffer_range() though.

With that fixed, series is:

Reviewed-by: Samuel Pitoiset <samuel.pitoiset at gmail.com>

On 07/25/2017 04:11 PM, Timothy Arceri wrote:
> It should have been created by this point.
> ---
>   src/mesa/main/bufferobj.c | 6 +++---
>   1 file changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/src/mesa/main/bufferobj.c b/src/mesa/main/bufferobj.c
> index 419972e..e9bb492 100644
> --- a/src/mesa/main/bufferobj.c
> +++ b/src/mesa/main/bufferobj.c
> @@ -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,
> 


More information about the mesa-dev mailing list