]> git.tdb.fi Git - libs/gl.git/blobdiff - source/backends/vulkan/transferqueue.cpp
Refactor Vulkan memory mapping functions
[libs/gl.git] / source / backends / vulkan / transferqueue.cpp
index 9fc941401ed90ef954b4a156ae7b1b801baf149f..4ad50d860f126952ad4024c6d9208cd05149f055 100644 (file)
@@ -126,7 +126,7 @@ TransferQueue::StagingBuffer::StagingBuffer(Device &d, size_t s):
 
        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):
@@ -149,7 +149,7 @@ TransferQueue::StagingBuffer::~StagingBuffer()
 
        if(mapped_address)
        {
-               allocator.unmap(mapped_address);
+               allocator.unmap(memory_id);
                allocator.release(memory_id);
        }
        if(buffer)