Mesa (main): vulkan: allocate host-visible memory for swapchain images
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Wed Jul 14 07:27:34 UTC 2021
Module: Mesa
Branch: main
Commit: e3542b35a8c5980dd4dd43a047ded4a36f89b055
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=e3542b35a8c5980dd4dd43a047ded4a36f89b055
Author: Erik Faye-Lund <erik.faye-lund at collabora.com>
Date: Tue Jul 13 15:38:16 2021 +0200
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 at jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11848>
---
src/vulkan/wsi/wsi_common_win32.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/vulkan/wsi/wsi_common_win32.c b/src/vulkan/wsi/wsi_common_win32.c
index 1b21914acf2..c62de45c881 100644
--- a/src/vulkan/wsi/wsi_common_win32.c
+++ b/src/vulkan/wsi/wsi_common_win32.c
@@ -387,7 +387,7 @@ wsi_create_native_image(const struct wsi_swapchain *chain,
.sType = VK_STRUCTURE_TYPE_MEMORY_ALLOCATE_INFO,
.pNext = &memory_dedicated_info,
.allocationSize = reqs.size,
- .memoryTypeIndex = select_memory_type(wsi, VK_MEMORY_PROPERTY_DEVICE_LOCAL_BIT,
+ .memoryTypeIndex = select_memory_type(wsi, VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT,
reqs.memoryTypeBits),
};
result = wsi->AllocateMemory(chain->device, &memory_info,
More information about the mesa-commit
mailing list