radv: do not allow sparse resources with multi-planar formats

It's unsupported.

Fixes some fails or hangs with
dEQP-VK.sparse_resources.image_sparse_binding.*

Cc: 19.3 <mesa-stable@lists.freedesktop.org>
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3581>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3581>
This commit is contained in:
Samuel Pitoiset 2020-01-27 15:17:25 +01:00 committed by Marge Bot
parent 24360966ab
commit 83e1fa87a7
1 changed files with 6 additions and 0 deletions

View File

@ -1248,6 +1248,12 @@ static VkResult radv_get_image_format_properties(struct radv_physical_device *ph
}
}
/* Sparse resources with multi-planar formats are unsupported. */
if (info->flags & VK_IMAGE_CREATE_SPARSE_BINDING_BIT) {
if (desc->plane_count > 1)
goto unsupported;
}
*pImageFormatProperties = (VkImageFormatProperties) {
.maxExtent = maxExtent,
.maxMipLevels = maxMipLevels,