vulkan/wsi: Add support for image -> image blits
authorBoris Brezillon <boris.brezillon@collabora.com>
Wed, 27 Apr 2022 16:25:34 +0000 (18:25 +0200)
committerMarge Bot <emma+marge@anholt.net>
Wed, 11 Jan 2023 09:31:02 +0000 (09:31 +0000)
commit2975a7f453a03907827bbb8b38ea1394f052d045
tree74710953537ca5f3f98926db2fb6381aa3d4de97
parent65e4873d829debd4951a26eb0e190f3b6982ba48
vulkan/wsi: Add support for image -> image blits

The win32 swapchain can be backed by a DXGI swapchain, but such swapchains
are incompatible with STORAGE images (AKA UNORDERED_ACCESS usage in
DXGI). So, we need to allocate an intermediate image that will serve as
a render-target, and copy this image to the WSI image when QueuePresent()
is called. That's pretty similar to what we do for the buffer blit case,
except the image -> buffer copy is replaced by an image -> image copy.

Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Reviewed-by: Daniel Stone <daniels@collabora.com>
Reviewed-by: Jason Ekstrand <jason.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16200>
src/vulkan/wsi/wsi_common.c
src/vulkan/wsi/wsi_common.h
src/vulkan/wsi/wsi_common_private.h