=?UTF-8?Q?J=C3=B3zef=20Kucia=20?=: vkd3d: Allocate memory for resource if heap memory cannot be used.

Alexandre Julliard julliard at winehq.org
Mon Oct 1 20:40:45 CDT 2018


Module: vkd3d
Branch: master
Commit: 04635885910f65bfb1aa2ed5ebd1dfca24e6e88e
URL:    https://source.winehq.org/git/vkd3d.git/?a=commit;h=04635885910f65bfb1aa2ed5ebd1dfca24e6e88e

Author: Józef Kucia <jkucia at codeweavers.com>
Date:   Mon Oct  1 13:57:10 2018 +0200

vkd3d: Allocate memory for resource if heap memory cannot be used.

Anvil has additional restrictions for index and vertex buffers.

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 | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/libs/vkd3d/resource.c b/libs/vkd3d/resource.c
index d633094..68c189a 100644
--- a/libs/vkd3d/resource.c
+++ b/libs/vkd3d/resource.c
@@ -1121,9 +1121,10 @@ static HRESULT vkd3d_bind_heap_memory(struct d3d12_device *device,
 
     if (!(requirements.memoryTypeBits & (1u << heap->vk_memory_type)))
     {
-        FIXME("Memory type %u cannot be bound to resource %p (allowed types %#x).\n",
+        FIXME("Memory type %u cannot be bound to resource %p (allowed types %#x), "
+                "allocating device memory.\n",
                 heap->vk_memory_type, resource, requirements.memoryTypeBits);
-        return E_NOTIMPL;
+        return vkd3d_allocate_resource_memory(device, resource, &heap->desc.Properties, heap->desc.Flags);
     }
 
     if (d3d12_resource_is_buffer(resource))




More information about the wine-cvs mailing list