aboutsummaryrefslogtreecommitdiffstats
path: root/src/amd
diff options
context:
space:
mode:
authorBas Nieuwenhuizen <[email protected]>2019-07-07 21:24:17 +0200
committerJuan A. Suarez Romero <[email protected]>2019-07-09 10:10:28 +0000
commite0d44fd4feee5b6a8d7b7480694baf225570a889 (patch)
treed03750903c62c65b22614d691397eddf756dbcaf /src/amd
parent5666f3b89154d95924451febf3563c83d161890c (diff)
radv: Handle cmask being disallowed by addrlib.
alignment=0 does weird things with align64. CC: <[email protected]> Reviewed-by: Dave Airlie <[email protected]> (cherry picked from commit e46b41b3aec3e3e1671b9a088291909f74953a88)
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 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) {