radv: Don't allocate CMASK for linear images.
authorBas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Sun, 27 Aug 2017 22:18:44 +0000 (00:18 +0200)
committerBas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Tue, 12 Sep 2017 20:06:55 +0000 (22:06 +0200)
We can't use it anyway in fast clears, and on GFX9 it seems to
actually hange the card if we specify it.

Fixes: f4e499ec791 "radv: add initial non-conformant radv vulkan driver"
src/amd/vulkan/radv_image.c

index 1488471e1b030376d0be3b23ba8c17f961e39d4a..4d83ae564fcc45494ed10504311887a88fa80dcd 100644 (file)
@@ -839,8 +839,10 @@ radv_image_create(VkDevice _device,
 
        if ((pCreateInfo->usage & VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT) &&
            pCreateInfo->mipLevels == 1 &&
-           !image->surface.dcc_size && image->info.depth == 1 && can_cmask_dcc)
+           !image->surface.dcc_size && image->info.depth == 1 && can_cmask_dcc &&
+           !image->surface.is_linear)
                radv_image_alloc_cmask(device, image);
+
        if (image->info.samples > 1 && vk_format_is_color(pCreateInfo->format)) {
                radv_image_alloc_fmask(device, image);
        } else if (vk_format_is_depth(pCreateInfo->format)) {