From d2524ed4a072430ca4acba50f00041d03d7039b1 Mon Sep 17 00:00:00 2001 From: Samuel Pitoiset Date: Mon, 11 Jan 2021 16:00:47 +0100 Subject: [PATCH] radv: mark VK_IMAGE_CREATE_SPARSE_RESIDENCY_BIT as unsupported on GFX6-7 This is only supported on GFX8+, this fixes a ton of CTS failures on my Pitcairn (GFX6). Fixes: af7fb4df50f ("radv: Add sparse image queries.") Signed-off-by: Samuel Pitoiset Reviewed-by: Bas Nieuwenhuizen Part-of: --- src/amd/vulkan/radv_formats.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/amd/vulkan/radv_formats.c b/src/amd/vulkan/radv_formats.c index 79f9ea5b7f6..9ad2033a7b5 100644 --- a/src/amd/vulkan/radv_formats.c +++ b/src/amd/vulkan/radv_formats.c @@ -1284,6 +1284,10 @@ static VkResult radv_get_image_format_properties(struct radv_physical_device *ph } if (info->flags & VK_IMAGE_CREATE_SPARSE_RESIDENCY_BIT) { + /* Sparse textures are only supported on GFX8+. */ + if (physical_device->rad_info.chip_class < GFX8) + goto unsupported; + if (desc->plane_count > 1 || info->type != VK_IMAGE_TYPE_2D || info->tiling != VK_IMAGE_TILING_OPTIMAL || vk_format_is_depth_or_stencil(format))