Mesa (master): turnip: use linear tiling for scanout image
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Thu Sep 26 21:38:07 UTC 2019
Module: Mesa
Branch: master
Commit: 195abadd2c0d589f9b29a3061c6b2b72f1450151
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=195abadd2c0d589f9b29a3061c6b2b72f1450151
Author: Jonathan Marek <jonathan at marek.ca>
Date: Wed Sep 25 22:47:02 2019 -0400
turnip: use linear tiling for scanout image
Signed-off-by: Jonathan Marek <jonathan at marek.ca>
Reviewed-by: Kristian H. Kristensen <hoegsberg at google.com>
Acked-by: Eric Anholt <eric at anholt.net>
---
src/freedreno/vulkan/tu_image.c | 11 +++++++++--
1 file changed, 9 insertions(+), 2 deletions(-)
diff --git a/src/freedreno/vulkan/tu_image.c b/src/freedreno/vulkan/tu_image.c
index 8bea11b6ff7..694f45802bc 100644
--- a/src/freedreno/vulkan/tu_image.c
+++ b/src/freedreno/vulkan/tu_image.c
@@ -172,7 +172,10 @@ tu_image_create(VkDevice _device,
vk_find_struct_const(pCreateInfo->pNext,
EXTERNAL_MEMORY_IMAGE_CREATE_INFO) != NULL;
- image->tile_mode = pCreateInfo->tiling == VK_IMAGE_TILING_OPTIMAL ? 3 : 0;
+ image->tile_mode = TILE6_LINEAR;
+ if (pCreateInfo->tiling == VK_IMAGE_TILING_OPTIMAL && !create_info->scanout)
+ image->tile_mode = TILE6_3;
+
setup_slices(image, pCreateInfo);
image->size = image->layer_size * pCreateInfo->arrayLayers;
@@ -339,10 +342,14 @@ tu_CreateImage(VkDevice device,
pAllocator, pImage);
#endif
+ const struct wsi_image_create_info *wsi_info =
+ vk_find_struct_const(pCreateInfo->pNext, WSI_IMAGE_CREATE_INFO_MESA);
+ bool scanout = wsi_info && wsi_info->scanout;
+
return tu_image_create(device,
&(struct tu_image_create_info) {
.vk_info = pCreateInfo,
- .scanout = false,
+ .scanout = scanout,
},
pAllocator, pImage);
}
More information about the mesa-commit
mailing list