From: Jonathan Marek Date: Tue, 21 Jan 2020 13:46:58 +0000 (-0500) Subject: turnip: set linear tiling for scanout images X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=e8afd4075846a08c7b94fee3789a8e739e2a6474;p=mesa.git turnip: set linear tiling for scanout images Fixes: 210e6887 "vulkan/wsi: Use the interface from the real modifiers extension" Signed-off-by: Jonathan Marek Acked-by: Eric Anholt Part-of: --- diff --git a/src/freedreno/vulkan/tu_image.c b/src/freedreno/vulkan/tu_image.c index 7dbbcb99682..c76c44870e9 100644 --- a/src/freedreno/vulkan/tu_image.c +++ b/src/freedreno/vulkan/tu_image.c @@ -395,6 +395,11 @@ tu_CreateImage(VkDevice device, if (mod_info->pDrmFormatModifiers[i] == DRM_FORMAT_MOD_QCOM_COMPRESSED) modifier = DRM_FORMAT_MOD_QCOM_COMPRESSED; } + } else { + const struct wsi_image_create_info *wsi_info = + vk_find_struct_const(pCreateInfo->pNext, WSI_IMAGE_CREATE_INFO_MESA); + if (wsi_info && wsi_info->scanout) + modifier = DRM_FORMAT_MOD_LINEAR; } return tu_image_create(device, pCreateInfo, pAllocator, pImage, modifier);