summaryrefslogtreecommitdiffstats
path: root/src/amd
diff options
context:
space:
mode:
authorBas Nieuwenhuizen <[email protected]>2019-07-07 21:24:17 +0200
committerBas Nieuwenhuizen <[email protected]>2019-07-07 21:29:52 +0200
commite46b41b3aec3e3e1671b9a088291909f74953a88 (patch)
tree085315d9404e8da8f5a55274777ccaae9eed120d /src/amd
parent5eaed7ecfce49ae55128c3f6fed37727b14ce6f9 (diff)
radv: Handle cmask being disallowed by addrlib.
alignment=0 does weird things with align64. CC: <[email protected]> Reviewed-by: Dave Airlie <[email protected]>
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) {