ac/surface: require that gfx8 doesn't have DCC in order to be displayable
authorMarek Olšák <marek.olsak@amd.com>
Thu, 11 Jun 2020 08:20:44 +0000 (04:20 -0400)
committerMarge Bot <eric+marge@anholt.net>
Thu, 11 Jun 2020 10:01:57 +0000 (10:01 +0000)
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5424>

src/amd/common/ac_surface.c

index 4ef72b1b3232799ef4ab6f282ecd798f408f869c..be55e6deaaa458352bcd7ea388b85bd7ea199af3 100644 (file)
@@ -1120,9 +1120,10 @@ static int gfx6_compute_surface(ADDR_HANDLE addrlib,
        }
 
        surf->is_linear = surf->u.legacy.level[0].mode == RADEON_SURF_MODE_LINEAR_ALIGNED;
-       surf->is_displayable = surf->is_linear ||
-                              surf->micro_tile_mode == RADEON_MICRO_MODE_DISPLAY ||
-                              surf->micro_tile_mode == RADEON_MICRO_MODE_RENDER;
+       surf->is_displayable = (surf->is_linear ||
+                               surf->micro_tile_mode == RADEON_MICRO_MODE_DISPLAY ||
+                               surf->micro_tile_mode == RADEON_MICRO_MODE_RENDER /* rotated */) &&
+                              !surf->dcc_size;
 
        /* The rotated micro tile mode doesn't work if both CMASK and RB+ are
         * used at the same time. This case is not currently expected to occur