[Mesa-dev] [PATCH] main: Add MESA_VERBOSE=api for several indexed BindBuffer variants

Kenneth Graunke kenneth at whitecape.org
Thu Dec 31 03:50:51 PST 2015


On Wednesday, December 30, 2015 4:06:03 PM PST Jordan Justen wrote:
> Signed-off-by: Jordan Justen <jordan.l.justen at intel.com>
> ---
>  src/mesa/main/bufferobj.c | 17 +++++++++++++++++
>  1 file changed, 17 insertions(+)
> 
> diff --git a/src/mesa/main/bufferobj.c b/src/mesa/main/bufferobj.c
> index e0639c8..8eae72c 100644
> --- a/src/mesa/main/bufferobj.c
> +++ b/src/mesa/main/bufferobj.c
> @@ -3911,6 +3911,10 @@ _mesa_BindBufferRange(GLenum target, GLuint index,
>     GET_CURRENT_CONTEXT(ctx);
>     struct gl_buffer_object *bufObj;
>  
> +   if (MESA_VERBOSE & VERBOSE_API)
> +      _mesa_debug(ctx, "glBindBufferRange(%s, %u, %u, %d, %d)\n",
> +                  _mesa_enum_to_string(target), index, buffer, offset, 
size);
> +

Please use braces when single statements span multiple lines of text.

With that fixed,
Reviewed-by: Kenneth Graunke <kenneth at whitecape.org>

>     if (buffer == 0) {
>        bufObj = ctx->Shared->NullBufferObj;
>     } else {
> @@ -3963,6 +3967,10 @@ _mesa_BindBufferBase(GLenum target, GLuint index, 
GLuint buffer)
>     GET_CURRENT_CONTEXT(ctx);
>     struct gl_buffer_object *bufObj;
>  
> +   if (MESA_VERBOSE & VERBOSE_API)
> +      _mesa_debug(ctx, "glBindBufferBase(%s, %u, %u)\n",
> +                  _mesa_enum_to_string(target), index, buffer);
> +
>     if (buffer == 0) {
>        bufObj = ctx->Shared->NullBufferObj;
>     } else {
> @@ -4033,6 +4041,11 @@ _mesa_BindBuffersRange(GLenum target, GLuint first, 
GLsizei count,
>  {
>     GET_CURRENT_CONTEXT(ctx);
>  
> +   if (MESA_VERBOSE & VERBOSE_API)
> +      _mesa_debug(ctx, "glBindBuffersRange(%s, %u, %d, %p, %p, %p)\n",
> +                  _mesa_enum_to_string(target), first, count,
> +                  buffers, offsets, sizes);
> +
>     switch (target) {
>     case GL_TRANSFORM_FEEDBACK_BUFFER:
>        bind_xfb_buffers_range(ctx, first, count, buffers, offsets, sizes);
> @@ -4061,6 +4074,10 @@ _mesa_BindBuffersBase(GLenum target, GLuint first, 
GLsizei count,
>  {
>     GET_CURRENT_CONTEXT(ctx);
>  
> +   if (MESA_VERBOSE & VERBOSE_API)
> +      _mesa_debug(ctx, "glBindBuffersBase(%s, %u, %d, %p)\n",
> +                  _mesa_enum_to_string(target), first, count, buffers);
> +
>     switch (target) {
>     case GL_TRANSFORM_FEEDBACK_BUFFER:
>        bind_xfb_buffers_base(ctx, first, count, buffers);
> 

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.freedesktop.org/archives/mesa-dev/attachments/20151231/fea92777/attachment.sig>


More information about the mesa-dev mailing list