From: Józef Kucia jkucia@codeweavers.com
Signed-off-by: Józef Kucia jkucia@codeweavers.com --- libs/vkd3d/resource.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-)
diff --git a/libs/vkd3d/resource.c b/libs/vkd3d/resource.c index c1a80c0360f8..1d13be5982c5 100644 --- a/libs/vkd3d/resource.c +++ b/libs/vkd3d/resource.c @@ -24,7 +24,7 @@ static unsigned int vkd3d_select_memory_type(struct d3d12_device *device, uint32 const D3D12_HEAP_PROPERTIES *heap_properties, D3D12_HEAP_FLAGS heap_flags) { const VkPhysicalDeviceMemoryProperties *memory_info = &device->memory_properties; - VkMemoryPropertyFlags flags[2]; + VkMemoryPropertyFlags flags[3]; unsigned int i, j, count = 0;
switch (heap_properties->Type) @@ -37,13 +37,18 @@ static unsigned int vkd3d_select_memory_type(struct d3d12_device *device, uint32 flags[count++] = VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT | VK_MEMORY_PROPERTY_HOST_COHERENT_BIT; break;
+ case D3D12_HEAP_TYPE_READBACK: + flags[count++] = VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT + | VK_MEMORY_PROPERTY_HOST_CACHED_BIT | VK_MEMORY_PROPERTY_HOST_COHERENT_BIT; + flags[count++] = VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT | VK_MEMORY_PROPERTY_HOST_COHERENT_BIT; + break; + case D3D12_HEAP_TYPE_CUSTOM: FIXME("Custom heaps not supported yet.\n"); - /* fall-through */ - case D3D12_HEAP_TYPE_READBACK: flags[count++] = VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT | VK_MEMORY_PROPERTY_HOST_CACHED_BIT | VK_MEMORY_PROPERTY_HOST_COHERENT_BIT; flags[count++] = VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT | VK_MEMORY_PROPERTY_HOST_COHERENT_BIT; + flags[count++] = VK_MEMORY_PROPERTY_DEVICE_LOCAL_BIT; break;
default: