From: Samuel Pitoiset Date: Mon, 27 Jan 2020 14:17:25 +0000 (+0100) Subject: radv: do not allow sparse resources with multi-planar formats X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=83e1fa87a7e25b8e60f0817b09df8b54cfc38abd;p=mesa.git 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 Signed-off-by: Samuel Pitoiset Reviewed-by: Bas Nieuwenhuizen Tested-by: Marge Bot Part-of: --- diff --git a/src/amd/vulkan/radv_formats.c b/src/amd/vulkan/radv_formats.c index b5d1fa31ba7..67a9cb7bfe0 100644 --- a/src/amd/vulkan/radv_formats.c +++ b/src/amd/vulkan/radv_formats.c @@ -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,