From 72abd054c8ddd57684f5ada493fb9c30f5efc362 Mon Sep 17 00:00:00 2001 From: baldurk Date: Wed, 21 Jun 2017 21:16:13 +0100 Subject: [PATCH] Make sure to pad allocations to allow for buffers on replay as well * Capture allocations were already doing this, but we create a whole-mem buffer for replay allocations so we should also pad them up. --- renderdoc/driver/vulkan/wrappers/vk_resource_funcs.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/renderdoc/driver/vulkan/wrappers/vk_resource_funcs.cpp b/renderdoc/driver/vulkan/wrappers/vk_resource_funcs.cpp index 9afb15b74..6a49dc1a6 100644 --- a/renderdoc/driver/vulkan/wrappers/vk_resource_funcs.cpp +++ b/renderdoc/driver/vulkan/wrappers/vk_resource_funcs.cpp @@ -215,9 +215,9 @@ VkResult WrappedVulkan::vkAllocateMemory(VkDevice device, const VkMemoryAllocate { VkMemoryAllocateInfo info = *pAllocateInfo; if(m_State >= WRITING) - { info.memoryTypeIndex = GetRecord(device)->memIdxMap[info.memoryTypeIndex]; + { // we need to be able to allocate a buffer that covers the whole memory range. However // if the memory is e.g. 100 bytes (arbitrary example) and buffers have memory requirements // such that it must be bound to a multiple of 128 bytes, then we can't create a buffer