From d500cedf4994ccf9e9ba42e7ce1a810bcdfc701b Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Fri, 22 Mar 2019 21:14:32 +0100 Subject: [PATCH] - call SetData in VKBuffer::Lock so that the buffer is valid. This allows models to render, but a proper fix should handle mapping of static buffers for real. This workaround just allocates a non-static persistent buffer in CPU memory which is not the most efficient solution here. --- src/rendering/vulkan/system/vk_buffers.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/rendering/vulkan/system/vk_buffers.cpp b/src/rendering/vulkan/system/vk_buffers.cpp index 57086017a..79d5af4f1 100644 --- a/src/rendering/vulkan/system/vk_buffers.cpp +++ b/src/rendering/vulkan/system/vk_buffers.cpp @@ -110,6 +110,7 @@ void VKBuffer::Unmap() void *VKBuffer::Lock(unsigned int size) { + SetData(size, nullptr, false); if (!mPersistent) map = mBuffer->Map(0, size); return map;