=?UTF-8?Q?J=C3=B3zef=20Kucia=20?=: vkd3d: Allow more memory types for custom heaps.
Alexandre Julliard
julliard at winehq.org
Thu Mar 7 16:20:50 CST 2019
Module: vkd3d
Branch: master
Commit: fd48757d25936c33c53e7464fd1853e3bc8a41ef
URL: https://source.winehq.org/git/vkd3d.git/?a=commit;h=fd48757d25936c33c53e7464fd1853e3bc8a41ef
Author: Józef Kucia <jkucia at codeweavers.com>
Date: Thu Mar 7 11:01:12 2019 +0100
vkd3d: Allow more memory types for custom heaps.
Signed-off-by: Józef Kucia <jkucia at codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
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 c1a80c0..1d13be5 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:
More information about the wine-cvs
mailing list