From 668a4e1f2c218f479dd15ab603ac4246164a4538 Mon Sep 17 00:00:00 2001 From: Philip Rebohle Date: Tue, 16 Feb 2021 14:04:42 +0100 Subject: [PATCH] vkd3d: Do not suballocate small image-only heaps. We have no way to manually reset these. Signed-off-by: Philip Rebohle --- libs/vkd3d/memory.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libs/vkd3d/memory.c b/libs/vkd3d/memory.c index 93f9b4cb..80b189f3 100644 --- a/libs/vkd3d/memory.c +++ b/libs/vkd3d/memory.c @@ -1153,7 +1153,8 @@ static HRESULT vkd3d_suballocate_memory(struct d3d12_device *device, struct vkd3 static HRESULT vkd3d_allocate_memory_2(struct d3d12_device *device, struct vkd3d_memory_allocator *allocator, const struct vkd3d_allocate_memory_info *info, struct vkd3d_memory_allocation *allocation) { - if (!info->pNext && !info->host_ptr && info->memory_requirements.size < VKD3D_VA_BLOCK_SIZE) + if (!info->pNext && !info->host_ptr && info->memory_requirements.size < VKD3D_VA_BLOCK_SIZE && + !(info->heap_flags & D3D12_HEAP_FLAG_DENY_BUFFERS)) return vkd3d_suballocate_memory(device, allocator, info, allocation); else return vkd3d_memory_allocation_init(allocation, device, allocator, info);