From 7499f84956f22efa1aa28a3675fcfa783c06b80f Mon Sep 17 00:00:00 2001 From: Simon Ser Date: Thu, 1 Apr 2021 17:06:31 +0200 Subject: [PATCH] radv: fix format feature reporting for modifiers The format_feature_flags bitfield is derived from the modifier if the tiling is set to VK_IMAGE_TILING_DRM_FORMAT_MODIFIER_EXT. However radv will reset the tiling to either LINEAR or OPTIMAL if the caller supplied a VkPhysicalDeviceImageDrmFormatModifierInfoEXT in the chain. Stop resetting the tiling, so that we can compute the correct feature flags. Signed-off-by: Simon Ser Fixes: 6c83e3ea98b7 ("radv: Add format modifier format queries.") Part-of: --- src/amd/vulkan/radv_formats.c | 5 ----- 1 file changed, 5 deletions(-) diff --git a/src/amd/vulkan/radv_formats.c b/src/amd/vulkan/radv_formats.c index 5d3dfd9..0ac7d02 100644 --- a/src/amd/vulkan/radv_formats.c +++ b/src/amd/vulkan/radv_formats.c @@ -1329,11 +1329,6 @@ static VkResult radv_get_image_format_properties(struct radv_physical_device *ph vk_find_struct_const(info->pNext, PHYSICAL_DEVICE_IMAGE_DRM_FORMAT_MODIFIER_INFO_EXT); VkResult result = VK_ERROR_FORMAT_NOT_SUPPORTED; - if (mod_info) { - tiling = mod_info->drmFormatModifier == DRM_FORMAT_MOD_LINEAR ? - VK_IMAGE_TILING_LINEAR : VK_IMAGE_TILING_OPTIMAL; - } - radv_physical_device_get_format_properties(physical_device, format, &format_props); if (tiling == VK_IMAGE_TILING_LINEAR) { -- 2.7.4