diff options
Diffstat (limited to 'src/amd')
-rw-r--r-- | src/amd/vulkan/radv_image.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/amd/vulkan/radv_image.c b/src/amd/vulkan/radv_image.c index 92409d147f1..4233d1b7cfc 100644 --- a/src/amd/vulkan/radv_image.c +++ b/src/amd/vulkan/radv_image.c @@ -860,6 +860,11 @@ radv_image_alloc_cmask(struct radv_device *device, uint32_t clear_value_size = 0; radv_image_get_cmask_info(device, image, &image->cmask); + if (!image->cmask.size) + return; + + assert(image->cmask.alignment); + image->cmask.offset = align64(image->size, image->cmask.alignment); /* + 8 for storing the clear values */ if (!image->clear_value_offset) { |