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 <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17775>
This commit is contained in:
Mike Blumenkrantz 2022-08-02 12:26:55 -04:00 committed by Marge Bot
parent b9c413e8ec
commit b59eb9c8b7

View file

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