[Mesa-dev] [PATCH 3/5] radeonsi/gfx9: print the swizzle mode for testdma
Marek Olšák
maraeo at gmail.com
Sun Mar 11 18:11:11 UTC 2018
From: Marek Olšák <marek.olsak at amd.com>
---
src/gallium/drivers/radeonsi/si_test_dma.c | 18 ++++++++++++++++--
1 file changed, 16 insertions(+), 2 deletions(-)
diff --git a/src/gallium/drivers/radeonsi/si_test_dma.c b/src/gallium/drivers/radeonsi/si_test_dma.c
index 779572e..76a3193 100644
--- a/src/gallium/drivers/radeonsi/si_test_dma.c
+++ b/src/gallium/drivers/radeonsi/si_test_dma.c
@@ -132,22 +132,36 @@ static enum pipe_format get_format_from_bpp(int bpp)
default:
assert(0);
return PIPE_FORMAT_NONE;
}
}
static const char *array_mode_to_string(struct si_screen *sscreen,
struct radeon_surf *surf)
{
if (sscreen->info.chip_class >= GFX9) {
- /* TODO */
- return " UNKNOWN";
+ switch (surf->u.gfx9.surf.swizzle_mode) {
+ case 0:
+ return " LINEAR";
+ case 21:
+ return " 4KB_S_X";
+ case 22:
+ return " 4KB_D_X";
+ case 25:
+ return "64KB_S_X";
+ case 26:
+ return "64KB_D_X";
+ default:
+ printf("Unhandled swizzle mode = %u\n",
+ surf->u.gfx9.surf.swizzle_mode);
+ return " UNKNOWN";
+ }
} else {
switch (surf->u.legacy.level[0].mode) {
case RADEON_SURF_MODE_LINEAR_ALIGNED:
return "LINEAR_ALIGNED";
case RADEON_SURF_MODE_1D:
return "1D_TILED_THIN1";
case RADEON_SURF_MODE_2D:
return "2D_TILED_THIN1";
default:
assert(0);
--
2.7.4
More information about the mesa-dev
mailing list