summaryrefslogtreecommitdiffstats
path: root/src/amd/vulkan/radv_image.c
diff options
context:
space:
mode:
authorDave Airlie <[email protected]>2016-12-29 23:11:19 +0000
committerDave Airlie <[email protected]>2016-12-30 00:04:16 +0000
commit80bafc0c11bbccaceebebc8950cb564950894802 (patch)
treeea7cbb951fd7ab1a5bc268f6d39d2f931796e618 /src/amd/vulkan/radv_image.c
parent1814df7ea7e92095dafed1b825f8d5897371af21 (diff)
radv: only allow cmask/dcc in color optimal.
I had this on transfers due to the clear color cmd, but it seems like that path shouldn't get fast clears. Reviewed-by: Bas Nieuwenhuizen <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
Diffstat (limited to 'src/amd/vulkan/radv_image.c')
-rw-r--r--src/amd/vulkan/radv_image.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/amd/vulkan/radv_image.c b/src/amd/vulkan/radv_image.c
index a3f5676a292..9c0bba2165b 100644
--- a/src/amd/vulkan/radv_image.c
+++ b/src/amd/vulkan/radv_image.c
@@ -712,7 +712,7 @@ radv_image_create(VkDevice _device,
image->size = image->surface.bo_size;
image->alignment = image->surface.bo_alignment;
- if (image->exclusive || (image->queue_family_mask & 1) == 1)
+ if (image->exclusive || image->queue_family_mask == 1)
can_cmask_dcc = true;
if ((pCreateInfo->usage & VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT) &&
@@ -900,8 +900,7 @@ bool radv_layout_can_fast_clear(const struct radv_image *image,
VkImageLayout layout,
unsigned queue_mask)
{
- return (layout == VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL ||
- layout == VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL) &&
+ return layout == VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL &&
queue_mask == (1u << RADV_QUEUE_GENERAL);
}