summaryrefslogtreecommitdiffstats
path: root/src/amd
diff options
context:
space:
mode:
Diffstat (limited to 'src/amd')
-rw-r--r--src/amd/vulkan/radv_image.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/amd/vulkan/radv_image.c b/src/amd/vulkan/radv_image.c
index 1ba1a38c86f..6245873a4ed 100644
--- a/src/amd/vulkan/radv_image.c
+++ b/src/amd/vulkan/radv_image.c
@@ -1153,6 +1153,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) {