gallium/radeon: print more info about HTILE
authorMarek Olšák <marek.olsak@amd.com>
Sat, 21 Nov 2015 23:02:53 +0000 (00:02 +0100)
committerMarek Olšák <marek.olsak@amd.com>
Thu, 3 Dec 2015 22:41:23 +0000 (23:41 +0100)
Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
src/gallium/drivers/radeon/r600_pipe_common.h
src/gallium/drivers/radeon/r600_texture.c

index e4d292aa48b21280d775dadf700ed559d8fc918e..cd2dd09d752eb462be5f601535c80cad1cbf70bf 100644 (file)
@@ -190,6 +190,13 @@ struct r600_cmask_info {
        unsigned base_address_reg;
 };
 
+struct r600_htile_info {
+       unsigned pitch;
+       unsigned height;
+       unsigned xalign;
+       unsigned yalign;
+};
+
 struct r600_texture {
        struct r600_resource            resource;
 
@@ -210,6 +217,7 @@ struct r600_texture {
        unsigned                        color_clear_value[2];
 
        /* Depth buffer compression and fast clear. */
+       struct r600_htile_info          htile;
        struct r600_resource            *htile_buffer;
        bool                            depth_cleared; /* if it was cleared at least once */
        float                           depth_clear_value;
index edd1636a8a99271e753792ccfc2d90d9262e03b7..bf0358bff12d2362e4de925ecadcfafca9e4df5a 100644 (file)
@@ -568,6 +568,11 @@ static unsigned r600_texture_get_htile_size(struct r600_common_screen *rscreen,
        pipe_interleave_bytes = rscreen->tiling_info.group_bytes;
        base_align = num_pipes * pipe_interleave_bytes;
 
+       rtex->htile.pitch = width;
+       rtex->htile.height = height;
+       rtex->htile.xalign = cl_width * 8;
+       rtex->htile.yalign = cl_height * 8;
+
        return (util_max_layer(&rtex->resource.b.b, 0) + 1) *
                align(slice_bytes, base_align);
 }
@@ -630,9 +635,11 @@ r600_print_texture_info(struct r600_texture *rtex, FILE *f)
                        rtex->cmask.yalign, rtex->cmask.slice_tile_max);
 
        if (rtex->htile_buffer)
-               fprintf(f, "  HTile: size=%u, alignment=%u\n",
+               fprintf(f, "  HTile: size=%u, alignment=%u, pitch=%u, height=%u, "
+                       "xalign=%u, yalign=%u\n",
                        rtex->htile_buffer->b.b.width0,
-                       rtex->htile_buffer->buf->alignment);
+                       rtex->htile_buffer->buf->alignment, rtex->htile.pitch,
+                       rtex->htile.height, rtex->htile.xalign, rtex->htile.yalign);
 
        if (rtex->dcc_buffer) {
                fprintf(f, "  DCC: size=%u, alignment=%u\n",