mesa: use _mesa_lookup_enum_by_nr() in print_array()
authorBrian Paul <brianp@vmware.com>
Mon, 22 Jun 2015 14:29:49 +0000 (08:29 -0600)
committerBrian Paul <brianp@vmware.com>
Mon, 22 Jun 2015 14:46:56 +0000 (08:46 -0600)
Print GL_FLOAT, etc. instead of hex value.

Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
src/mesa/main/varray.c

index 7389037ae853133ed60d5449a8cbbc656086999c..ebdd9eaf02e2def570c6d878a2ddd08946498067 100644 (file)
@@ -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);
 }