aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMarek Olšák <[email protected]>2015-11-22 00:02:53 +0100
committerMarek Olšák <[email protected]>2015-12-03 23:41:23 +0100
commita0bfb2798d243a4685d6ea32e9a7091fcec74700 (patch)
treeaf5d1f576ecd50ca9e3b78794dd627692166a425 /src
parent1cca259d9942e2f453c65e8d7f9f79fe9dc5f0a7 (diff)
gallium/radeon: print more info about HTILE
Reviewed-by: Michel Dänzer <[email protected]>
Diffstat (limited to 'src')
-rw-r--r--src/gallium/drivers/radeon/r600_pipe_common.h8
-rw-r--r--src/gallium/drivers/radeon/r600_texture.c11
2 files changed, 17 insertions, 2 deletions
diff --git a/src/gallium/drivers/radeon/r600_pipe_common.h b/src/gallium/drivers/radeon/r600_pipe_common.h
index e4d292aa48b..cd2dd09d752 100644
--- a/src/gallium/drivers/radeon/r600_pipe_common.h
+++ b/src/gallium/drivers/radeon/r600_pipe_common.h
@@ -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;
diff --git a/src/gallium/drivers/radeon/r600_texture.c b/src/gallium/drivers/radeon/r600_texture.c
index edd1636a8a9..bf0358bff12 100644
--- a/src/gallium/drivers/radeon/r600_texture.c
+++ b/src/gallium/drivers/radeon/r600_texture.c
@@ -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",