From e8afd4075846a08c7b94fee3789a8e739e2a6474 Mon Sep 17 00:00:00 2001 From: Jonathan Marek Date: Tue, 21 Jan 2020 08:46:58 -0500 Subject: [PATCH] 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: --- src/freedreno/vulkan/tu_image.c | 5 +++++ 1 file changed, 5 insertions(+) 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); -- 2.30.2