From 6515a634107c482e6073dc27df7f5e34ed68dee5 Mon Sep 17 00:00:00 2001 From: Bas Nieuwenhuizen Date: Sat, 30 Jan 2021 22:06:25 +0100 Subject: [PATCH] radv: Stop using plane_count. Reviewed-by: Samuel Pitoiset Part-of: --- src/amd/vulkan/radv_formats.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/amd/vulkan/radv_formats.c b/src/amd/vulkan/radv_formats.c index 7519bbafa5b..58b68fd0602 100644 --- a/src/amd/vulkan/radv_formats.c +++ b/src/amd/vulkan/radv_formats.c @@ -1458,7 +1458,7 @@ 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) + if (vk_format_get_plane_count(format) > 1) goto unsupported; } @@ -1467,7 +1467,7 @@ static VkResult radv_get_image_format_properties(struct radv_physical_device *ph if (physical_device->rad_info.chip_class < GFX8) goto unsupported; - if (desc->plane_count > 1 || info->type != VK_IMAGE_TYPE_2D || + if (vk_format_get_plane_count(format) > 1 || info->type != VK_IMAGE_TYPE_2D || info->tiling != VK_IMAGE_TILING_OPTIMAL || vk_format_is_depth_or_stencil(format)) goto unsupported;