radv: Handle cmask being disallowed by addrlib.

alignment=0 does weird things with align64.

CC: <mesa-stable@lists.freedesktop.org>
Reviewed-by: Dave Airlie <airlied@redhat.com>
(cherry picked from commit e46b41b3ae)
This commit is contained in:
Bas Nieuwenhuizen 2019-07-07 21:24:17 +02:00 committed by Juan A. Suarez Romero
parent 5666f3b891
commit e0d44fd4fe

View file

@ -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) {