From 1cca259d9942e2f453c65e8d7f9f79fe9dc5f0a7 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Marek=20Ol=C5=A1=C3=A1k?= Date: Sat, 21 Nov 2015 23:54:27 +0100 Subject: [PATCH] gallium/radeon: print more info about CMASK MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Reviewed-by: Michel Dänzer --- src/gallium/drivers/radeon/r600_pipe_common.h | 4 ++++ src/gallium/drivers/radeon/r600_texture.c | 15 ++++++++++++--- 2 files changed, 16 insertions(+), 3 deletions(-) diff --git a/src/gallium/drivers/radeon/r600_pipe_common.h b/src/gallium/drivers/radeon/r600_pipe_common.h index b6009d2ca75..e4d292aa48b 100644 --- a/src/gallium/drivers/radeon/r600_pipe_common.h +++ b/src/gallium/drivers/radeon/r600_pipe_common.h @@ -182,6 +182,10 @@ struct r600_cmask_info { unsigned offset; unsigned size; unsigned alignment; + unsigned pitch; + unsigned height; + unsigned xalign; + unsigned yalign; unsigned slice_tile_max; unsigned base_address_reg; }; diff --git a/src/gallium/drivers/radeon/r600_texture.c b/src/gallium/drivers/radeon/r600_texture.c index 37cac91f76f..edd1636a8a9 100644 --- a/src/gallium/drivers/radeon/r600_texture.c +++ b/src/gallium/drivers/radeon/r600_texture.c @@ -380,6 +380,10 @@ void r600_texture_get_cmask_info(struct r600_common_screen *rscreen, assert(macro_tile_width % 128 == 0); assert(macro_tile_height % 128 == 0); + out->pitch = pitch_elements; + out->height = height; + out->xalign = macro_tile_width; + out->yalign = macro_tile_height; out->slice_tile_max = ((pitch_elements * height) / (128*128)) - 1; out->alignment = MAX2(256, base_align); out->size = (util_max_layer(&rtex->resource.b.b, 0) + 1) * @@ -425,6 +429,10 @@ static void si_texture_get_cmask_info(struct r600_common_screen *rscreen, /* Each element of CMASK is a nibble. */ unsigned slice_bytes = slice_elements / 2; + out->pitch = width; + out->height = height; + out->xalign = cl_width * 8; + out->yalign = cl_height * 8; out->slice_tile_max = (width * height) / (128*128); if (out->slice_tile_max) out->slice_tile_max -= 1; @@ -615,10 +623,11 @@ r600_print_texture_info(struct r600_texture *rtex, FILE *f) rtex->fmask.slice_tile_max, rtex->fmask.tile_mode_index); if (rtex->cmask.size) - fprintf(f, " CMask: offset=%u, size=%u, alignment=%u, " - "slice_tile_max=%u\n", + fprintf(f, " CMask: offset=%u, size=%u, alignment=%u, pitch=%u, " + "height=%u, xalign=%u, yalign=%u, slice_tile_max=%u\n", rtex->cmask.offset, rtex->cmask.size, rtex->cmask.alignment, - rtex->cmask.slice_tile_max); + rtex->cmask.pitch, rtex->cmask.height, rtex->cmask.xalign, + rtex->cmask.yalign, rtex->cmask.slice_tile_max); if (rtex->htile_buffer) fprintf(f, " HTile: size=%u, alignment=%u\n", -- 2.30.2