From 83e1fa87a7e25b8e60f0817b09df8b54cfc38abd Mon Sep 17 00:00:00 2001 From: Samuel Pitoiset Date: Mon, 27 Jan 2020 15:17:25 +0100 Subject: [PATCH] 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: --- src/amd/vulkan/radv_formats.c | 6 ++++++ 1 file changed, 6 insertions(+) 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, -- 2.30.2