radv: reduce the number of small surfaces that need CMASK or DCC
authorSamuel Pitoiset <samuel.pitoiset@gmail.com>
Thu, 21 Dec 2017 16:45:23 +0000 (17:45 +0100)
committerSamuel Pitoiset <samuel.pitoiset@gmail.com>
Fri, 22 Dec 2017 09:38:44 +0000 (10:38 +0100)
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
src/amd/vulkan/radv_image.c

index efd17e488966b8ff252b0479b9153bcc8cecf762..15410f140e74bec333a0e7909135464484559a0e 100644 (file)
@@ -813,7 +813,7 @@ static inline bool
 radv_image_can_enable_dcc_or_cmask(struct radv_image *image)
 {
        if (image->info.samples <= 1 &&
-           image->info.width <= 512 && image->info.height <= 512) {
+           image->info.width * image->info.height <= 512 * 512) {
                /* Do not enable CMASK or DCC for small surfaces where the cost
                 * of the eliminate pass can be higher than the benefit of fast
                 * clear. RadeonSI does this, but the image threshold is