mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-08 06:58:05 +02:00
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: 8af568e4ae ("vulkan: implement wsi_win32 backend")
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11848>
(cherry picked from commit e3542b35a8)
This commit is contained in:
parent
211ffe02a2
commit
fd630afd32
2 changed files with 2 additions and 2 deletions
|
|
@ -256,7 +256,7 @@
|
|||
"description": "vulkan: allocate host-visible memory for swapchain images",
|
||||
"nominated": true,
|
||||
"nomination_type": 1,
|
||||
"resolution": 0,
|
||||
"resolution": 1,
|
||||
"main_sha": null,
|
||||
"because_sha": "8af568e4ae77332e1cc09031301e559996b81fe9"
|
||||
},
|
||||
|
|
|
|||
|
|
@ -383,7 +383,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,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue