vulkan: allocate host-visible memory for swapchain images
authorErik Faye-Lund <erik.faye-lund@collabora.com>
Tue, 13 Jul 2021 13:38:16 +0000 (15:38 +0200)
committerMarge Bot <eric+marge@anholt.net>
Wed, 14 Jul 2021 07:09:38 +0000 (07:09 +0000)
commite3542b35a8c5980dd4dd43a047ded4a36f89b055
tree8cd8be0754b334bce219495610230358faa64742
parentd0c7a2106bbea28dbdcc22437340589a17ae3ff7
vulkan: allocate host-visible memory for swapchain images

The Vulkan 1.2 specification, section 11.2.12 ("Host Access to Device
Memory Objects") say the following:

> memory must have been created with a memory type that reports
> VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT

Since there's no guarantee that there's any memory that is *both*
device-local *and* host-visible, let's just use the latter requirement.

Fixes: 8af568e4ae7 ("vulkan: implement wsi_win32 backend")
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11848>
src/vulkan/wsi/wsi_common_win32.c