Mesa (master): turnip: set linear tiling for scanout images

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Thu Jan 23 19:07:37 UTC 2020


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

Author: Jonathan Marek <jonathan at marek.ca>
Date:   Tue Jan 21 08:46:58 2020 -0500

turnip: set linear tiling for scanout images

Fixes: 210e6887 "vulkan/wsi: Use the interface from the real modifiers extension"

Signed-off-by: Jonathan Marek <jonathan at marek.ca>
Acked-by: Eric Anholt <eric at anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3485>

---

 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);



More information about the mesa-commit mailing list