From abe0995e881e46b3117384f46dd29b5b554249df Mon Sep 17 00:00:00 2001 From: Hans-Kristian Arntzen Date: Wed, 9 Jun 2021 19:56:44 +0200 Subject: [PATCH] vkd3d: Use correct allocation size for memory block. We cannot use the memory requirement output, since we will zero-clear memory with a size that might be larger than the VkBuffer size. Signed-off-by: Hans-Kristian Arntzen --- libs/vkd3d/memory.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libs/vkd3d/memory.c b/libs/vkd3d/memory.c index c3e9116e..d3ee4517 100644 --- a/libs/vkd3d/memory.c +++ b/libs/vkd3d/memory.c @@ -417,7 +417,7 @@ static HRESULT vkd3d_memory_allocation_init(struct vkd3d_memory_allocation *allo flags_info.flags |= VK_MEMORY_ALLOCATE_DEVICE_ADDRESS_BIT_KHR; } - allocation->resource.size = memory_requirements.size; + allocation->resource.size = info->memory_requirements.size; if (info->heap_flags & D3D12_HEAP_FLAG_ALLOW_WRITE_WATCH) {