radv: Rely on ac_surface for avoiding cmask for linear images.
authorBas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Sun, 24 May 2020 11:25:53 +0000 (13:25 +0200)
committerMarge Bot <eric+marge@anholt.net>
Fri, 5 Jun 2020 13:27:55 +0000 (13:27 +0000)
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5194>

src/amd/common/ac_surface.c
src/amd/vulkan/radv_image.c

index b29bf552c9f66e2b2556f6ca83a42b0c637dab2f..8203a7f04261db157c54205820fc9fe80021dbcd 100644 (file)
@@ -505,7 +505,7 @@ static void ac_compute_cmask(const struct radeon_info *info,
        unsigned num_pipes = info->num_tile_pipes;
        unsigned cl_width, cl_height;
 
-       if (surf->flags & RADEON_SURF_Z_OR_SBUFFER ||
+       if (surf->flags & RADEON_SURF_Z_OR_SBUFFER || surf->is_linear ||
            (config->info.samples >= 2 && !surf->fmask_size))
                return;
 
index b84f71b9a581853d74dcecec1267771a56551575..a4a622a0d815e931f991320150de479cddd9c178 100644 (file)
@@ -1307,8 +1307,7 @@ radv_image_can_enable_cmask(struct radv_image *image)
 
        return radv_image_can_enable_dcc_or_cmask(image) &&
               image->info.levels == 1 &&
-              image->info.depth == 1 &&
-              !image->planes[0].surface.is_linear;
+              image->info.depth == 1;
 }
 
 static inline bool