Mesa (master): radv: fix format feature reporting for modifiers

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Tue Apr 6 09:30:20 UTC 2021


Module: Mesa
Branch: master
Commit: 7499f84956f22efa1aa28a3675fcfa783c06b80f
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=7499f84956f22efa1aa28a3675fcfa783c06b80f

Author: Simon Ser <contact at emersion.fr>
Date:   Thu Apr  1 17:06:31 2021 +0200

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

---

 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 5d3dfd94a07..0ac7d02703c 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) {



More information about the mesa-commit mailing list