zink: always chain wsi_image_create_info for scanout images

Chaining wsi_image_create_info tells the drivers that the image can use
VK_IMAGE_LAYOUT_PRESENT_SRC_KHR layout.  We still use
wsi_image_create_info::scanout to indicate whether this is legacy
scanout or uses modifiers.

Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14872>
This commit is contained in:
Chia-I Wu 2022-02-03 23:55:31 -08:00 committed by Marge Bot
parent 66e6e8afe6
commit 737d94a545
1 changed files with 2 additions and 3 deletions

View File

@ -603,11 +603,10 @@ resource_object_create(struct zink_screen *screen, const struct pipe_resource *t
struct wsi_image_create_info image_wsi_info = {
VK_STRUCTURE_TYPE_WSI_IMAGE_CREATE_INFO_MESA,
NULL,
.scanout = true,
.scanout = scanout && ici.tiling != VK_IMAGE_TILING_DRM_FORMAT_MODIFIER_EXT,
};
if ((screen->needs_mesa_wsi || screen->needs_mesa_flush_wsi) && scanout &&
ici.tiling != VK_IMAGE_TILING_DRM_FORMAT_MODIFIER_EXT) {
if ((screen->needs_mesa_wsi || screen->needs_mesa_flush_wsi) && scanout) {
image_wsi_info.pNext = ici.pNext;
ici.pNext = &image_wsi_info;
}