- 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.
This commit is contained in:
Christoph Oelckers 2019-03-22 21:14:32 +01:00
parent 10e62e7b5d
commit d500cedf49

View file

@ -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;