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 <contact@emersion.fr>
Fixes:
6c83e3ea98b7 ("radv: Add format modifier format queries.")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9978>
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) {