radeonsi/gfx9: print the swizzle mode for testdma
authorMarek Olšák <marek.olsak@amd.com>
Sun, 11 Mar 2018 17:11:01 +0000 (13:11 -0400)
committerMarek Olšák <marek.olsak@amd.com>
Wed, 21 Mar 2018 17:40:06 +0000 (13:40 -0400)
Tested-by: Dieter Nützel <Dieter@nuetzel-hh.de>
src/gallium/drivers/radeonsi/si_test_dma.c

index 779572eddb067d825c5a2e2aeb1f15cb7637870a..76a31936b461bb8c87add86912459573f6e513ed 100644 (file)
@@ -139,8 +139,22 @@ 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: