summaryrefslogtreecommitdiffstats
path: root/src/amd/vulkan
diff options
context:
space:
mode:
authorBas Nieuwenhuizen <[email protected]>2017-08-28 00:18:44 +0200
committerBas Nieuwenhuizen <[email protected]>2017-09-12 22:06:55 +0200
commit1a172fb113554fa03053052b161d5e22fc2fcb1f (patch)
tree831f2940dec5ebe3445cdaa06377c5b4b2ccb624 /src/amd/vulkan
parentbee83b26611c0a4a554aa37c59187351242e82fd (diff)
radv: Don't allocate CMASK for linear images.
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"
Diffstat (limited to 'src/amd/vulkan')
-rw-r--r--src/amd/vulkan/radv_image.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/amd/vulkan/radv_image.c b/src/amd/vulkan/radv_image.c
index 1488471e1b0..4d83ae564fc 100644
--- a/src/amd/vulkan/radv_image.c
+++ b/src/amd/vulkan/radv_image.c
@@ -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)) {