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:
parent
66e6e8afe6
commit
737d94a545
|
@ -603,11 +603,10 @@ resource_object_create(struct zink_screen *screen, const struct pipe_resource *t
|
||||||
struct wsi_image_create_info image_wsi_info = {
|
struct wsi_image_create_info image_wsi_info = {
|
||||||
VK_STRUCTURE_TYPE_WSI_IMAGE_CREATE_INFO_MESA,
|
VK_STRUCTURE_TYPE_WSI_IMAGE_CREATE_INFO_MESA,
|
||||||
NULL,
|
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 &&
|
if ((screen->needs_mesa_wsi || screen->needs_mesa_flush_wsi) && scanout) {
|
||||||
ici.tiling != VK_IMAGE_TILING_DRM_FORMAT_MODIFIER_EXT) {
|
|
||||||
image_wsi_info.pNext = ici.pNext;
|
image_wsi_info.pNext = ici.pNext;
|
||||||
ici.pNext = &image_wsi_info;
|
ici.pNext = &image_wsi_info;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue