gallium: Teach GALLIUM_REFCNT_LOG about array textures
authorKenneth Graunke <kenneth@whitecape.org>
Thu, 27 Jun 2019 21:35:13 +0000 (14:35 -0700)
committerKenneth Graunke <kenneth@whitecape.org>
Thu, 27 Jun 2019 23:56:15 +0000 (16:56 -0700)
Otherwise they are classified as pipe_martian_resource, and don't
contain any helpful information about the texture.

Reviewed-by: Eric Anholt <eric@anholt.net>
src/gallium/auxiliary/util/u_debug_describe.c

index 4bcd562..621cdbe 100644 (file)
@@ -58,6 +58,15 @@ debug_describe_resource(char* buf, const struct pipe_resource *ptr)
    case PIPE_TEXTURE_3D:
       util_sprintf(buf, "pipe_texture3d<%u,%u,%u,%s,%u>", ptr->width0, ptr->height0, ptr->depth0, util_format_short_name(ptr->format), ptr->last_level);
       break;
+   case PIPE_TEXTURE_1D_ARRAY:
+      util_sprintf(buf, "pipe_texture_1darray<%u,%u,%s,%u>", ptr->width0, ptr->array_size, util_format_short_name(ptr->format), ptr->last_level);
+      break;
+   case PIPE_TEXTURE_2D_ARRAY:
+      util_sprintf(buf, "pipe_texture_2darray<%u,%u,%u,%s,%u>", ptr->width0, ptr->height0, ptr->array_size, util_format_short_name(ptr->format), ptr->last_level);
+      break;
+   case PIPE_TEXTURE_CUBE_ARRAY:
+      util_sprintf(buf, "pipe_texture_cubearray<%u,%u,%u,%s,%u>", ptr->width0, ptr->height0, ptr->array_size, util_format_short_name(ptr->format), ptr->last_level);
+      break;
    default:
       util_sprintf(buf, "pipe_martian_resource<%u>", ptr->target);
       break;