[Mesa-dev] [PATCH 09/23] main: Cosmetic changes to BufferSubData infrastructure.

Martin Peres martin.peres at free.fr
Fri Feb 20 02:32:50 PST 2015


Be more precise in the commit message. I propose:
report more explicit error messages in the BufferSubData infrastructure

Other than that:
Reviewed-by: Martin Peres <martin.peres at linux.intel.com>

On 12/02/2015 04:05, Laura Ekstrand wrote:
> ---
>   src/mesa/main/bufferobj.c | 10 +++++++---
>   src/mesa/main/bufferobj.h |  4 ++--
>   2 files changed, 9 insertions(+), 5 deletions(-)
>
> diff --git a/src/mesa/main/bufferobj.c b/src/mesa/main/bufferobj.c
> index 4f89748..fc01d02 100644
> --- a/src/mesa/main/bufferobj.c
> +++ b/src/mesa/main/bufferobj.c
> @@ -267,13 +267,17 @@ buffer_object_subdata_range_good(struct gl_context *ctx,
>   
>      if (mappedRange) {
>         if (bufferobj_range_mapped(bufObj, offset, size)) {
> -         _mesa_error(ctx, GL_INVALID_OPERATION, "%s", caller);
> +         _mesa_error(ctx, GL_INVALID_OPERATION,
> +                     "%s(range is mapped without persistent bit)",
> +                     caller);
>            return false;
>         }
>      }
>      else {
>         if (_mesa_bufferobj_mapped(bufObj, MAP_USER)) {
> -         _mesa_error(ctx, GL_INVALID_OPERATION, "%s", caller);
> +         _mesa_error(ctx, GL_INVALID_OPERATION,
> +                     "%s(buffer is mapped without persistent bit)",
> +                     caller);
>            return false;
>         }
>      }
> @@ -1613,7 +1617,7 @@ _mesa_buffer_sub_data(struct gl_context *ctx, struct gl_buffer_object *bufObj,
>      bufObj->Written = GL_TRUE;
>   
>      ASSERT(ctx->Driver.BufferSubData);
> -   ctx->Driver.BufferSubData( ctx, offset, size, data, bufObj );
> +   ctx->Driver.BufferSubData(ctx, offset, size, data, bufObj);
>   }
>   
>   void GLAPIENTRY
> diff --git a/src/mesa/main/bufferobj.h b/src/mesa/main/bufferobj.h
> index 889bbb1..d15ad00 100644
> --- a/src/mesa/main/bufferobj.h
> +++ b/src/mesa/main/bufferobj.h
> @@ -190,8 +190,8 @@ _mesa_NamedBufferData(GLuint buffer, GLsizeiptr size,
>                         const GLvoid *data, GLenum usage);
>   
>   void GLAPIENTRY
> -_mesa_BufferSubData(GLenum target, GLintptrARB offset,
> -                    GLsizeiptrARB size, const GLvoid * data);
> +_mesa_BufferSubData(GLenum target, GLintptr offset,
> +                    GLsizeiptr size, const GLvoid *data);
>   
>   void GLAPIENTRY
>   _mesa_NamedBufferSubData(GLuint buffer, GLintptr offset,



More information about the mesa-dev mailing list