- tell the memory allocator when we are going to persistently map something
This commit is contained in:
parent
2e0b34ca72
commit
9a5112c1c9
3 changed files with 8 additions and 7 deletions
|
|
@ -40,7 +40,7 @@ void VKBuffer::SetData(size_t size, const void *data, bool staticdata)
|
|||
else
|
||||
{
|
||||
BufferBuilder builder;
|
||||
builder.setUsage(mBufferType, VMA_MEMORY_USAGE_CPU_TO_GPU);
|
||||
builder.setUsage(mBufferType, VMA_MEMORY_USAGE_CPU_TO_GPU, mPersistent ? VMA_ALLOCATION_CREATE_DEDICATED_MEMORY_BIT | VMA_ALLOCATION_CREATE_MAPPED_BIT : 0);
|
||||
builder.setSize(size);
|
||||
mBuffer = builder.create(fb->device);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue