]> git.tdb.fi Git - libs/gl.git/blobdiff - source/backends/vulkan/buffer_backend.cpp
Refactor Vulkan memory mapping functions
[libs/gl.git] / source / backends / vulkan / buffer_backend.cpp
index 750c926bf2e90c0ff5feacd7a299febaa3a453ba..c3dcb8e12c5ccbb1fb21d9abc0b76862a65cad16 100644 (file)
@@ -70,14 +70,13 @@ bool VulkanBuffer::can_map() const
 
 void *VulkanBuffer::map()
 {
-       size_t size = static_cast<const Buffer *>(this)->size;
-       mapped_address = device.get_allocator().map(memory_id, 0, size);
+       mapped_address = device.get_allocator().map(memory_id);
        return mapped_address;
 }
 
 bool VulkanBuffer::unmap()
 {
-       device.get_allocator().unmap(mapped_address);
+       device.get_allocator().unmap(memory_id);
        mapped_address = 0;
        return true;
 }