transfer.size = size;
transfer.staging_address = static_cast<char *>(i->mapped_address)+transfer.offset;
- i->used += size;
+ i->used += size+47;
+ i->used -= i->used%48;
++i->async_count;
}
MemoryAllocator &allocator = device.get_allocator();
memory_id = allocator.allocate(buffer, STAGING_MEMORY);
- mapped_address = allocator.map(memory_id, 0, size);
+ mapped_address = allocator.map(memory_id);
}
TransferQueue::StagingBuffer::StagingBuffer(StagingBuffer &&other):
if(mapped_address)
{
- allocator.unmap(mapped_address);
+ allocator.unmap(memory_id);
allocator.release(memory_id);
}
if(buffer)