From: Bas Nieuwenhuizen Date: Wed, 5 Aug 2020 22:51:38 +0000 (+0200) Subject: radv: Don't use both DCC and CMASK for single sample images. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=c6aadbae71562c14166a6e7942867eaf56b3e017;p=mesa.git radv: Don't use both DCC and CMASK for single sample images. Fixes: c67ef7695a2 "radv: Use ac_surface to allocate aux surfaces." Reviewed-by: Samuel Pitoiset Part-of: --- diff --git a/src/amd/vulkan/radv_image.c b/src/amd/vulkan/radv_image.c index 4644393196d..343a5d85a88 100644 --- a/src/amd/vulkan/radv_image.c +++ b/src/amd/vulkan/radv_image.c @@ -1233,9 +1233,11 @@ static void radv_image_alloc_single_sample_cmask(const struct radv_image *image, struct radeon_surf *surf) { + assert(image->info.storage_samples == 1 || surf->cmask_offset); + if (!surf->cmask_size || surf->cmask_offset || surf->bpe > 8 || image->info.levels > 1 || image->info.depth > 1 || - !radv_image_use_fast_clear_for_image(image)) + radv_image_has_dcc(image) || !radv_image_use_fast_clear_for_image(image)) return; surf->cmask_offset = align64(surf->total_size, surf->cmask_alignment);