[Mesa-dev] [PATCH] mesa: use _mesa_lookup_enum_by_nr() in print_array()

Ilia Mirkin imirkin at alum.mit.edu
Mon Jun 22 07:43:56 PDT 2015


Reviewed-by: Ilia Mirkin <imirkin at alum.mit.edu>

On Mon, Jun 22, 2015 at 10:33 AM, Brian Paul <brianp at vmware.com> wrote:
> Print GL_FLOAT, etc. instead of hex value.
> ---
>  src/mesa/main/varray.c | 8 ++++----
>  1 file changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/src/mesa/main/varray.c b/src/mesa/main/varray.c
> index 7389037..ebdd9ea 100644
> --- a/src/mesa/main/varray.c
> +++ b/src/mesa/main/varray.c
> @@ -2309,10 +2309,10 @@ print_array(const char *name, GLint index, const struct gl_client_array *array)
>        fprintf(stderr, "  %s[%d]: ", name, index);
>     else
>        fprintf(stderr, "  %s: ", name);
> -   fprintf(stderr, "Ptr=%p, Type=0x%x, Size=%d, ElemSize=%u, Stride=%d, Buffer=%u(Size %lu)\n",
> -         array->Ptr, array->Type, array->Size,
> -         array->_ElementSize, array->StrideB,
> -         array->BufferObj->Name, (unsigned long) array->BufferObj->Size);
> +   fprintf(stderr, "Ptr=%p, Type=%s, Size=%d, ElemSize=%u, Stride=%d, Buffer=%u(Size %lu)\n",
> +           array->Ptr, _mesa_lookup_enum_by_nr(array->Type), array->Size,
> +           array->_ElementSize, array->StrideB, array->BufferObj->Name,
> +           (unsigned long) array->BufferObj->Size);
>  }
>
>
> --
> 1.9.1
>
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/mesa-dev


More information about the mesa-dev mailing list