From b59eb9c8b791e59cadca161f952ae2ef4473ebe4 Mon Sep 17 00:00:00 2001 From: Mike Blumenkrantz Date: Tue, 2 Aug 2022 12:26:55 -0400 Subject: [PATCH] zink: demote dmabuf tiling to linear if modifiers aren't supported this is effectively the same as LINEAR, and it still allows dmabuf creation cc: mesa-stable Reviewed-by: Dave Airlie Part-of: --- src/gallium/drivers/zink/zink_resource.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gallium/drivers/zink/zink_resource.c b/src/gallium/drivers/zink/zink_resource.c index 2c42ceeeb81..1b29e8e2c97 100644 --- a/src/gallium/drivers/zink/zink_resource.c +++ b/src/gallium/drivers/zink/zink_resource.c @@ -471,7 +471,7 @@ create_ici(struct zink_screen *screen, VkImageCreateInfo *ici, const struct pipe ici->samples = templ->nr_samples ? templ->nr_samples : VK_SAMPLE_COUNT_1_BIT; ici->tiling = screen->info.have_EXT_image_drm_format_modifier && modifiers_count ? VK_IMAGE_TILING_DRM_FORMAT_MODIFIER_EXT : - bind & PIPE_BIND_LINEAR ? VK_IMAGE_TILING_LINEAR : VK_IMAGE_TILING_OPTIMAL; + bind & (PIPE_BIND_LINEAR | ZINK_BIND_DMABUF) ? VK_IMAGE_TILING_LINEAR : VK_IMAGE_TILING_OPTIMAL; ici->sharingMode = VK_SHARING_MODE_EXCLUSIVE; ici->initialLayout = VK_IMAGE_LAYOUT_UNDEFINED;