3#include <vk_mem_alloc.h>
4#include <vulkan/vulkan_core.h>
8#include <vulkan/vulkan.hpp>
15 static auto create(
const VmaAllocator &allocator,
size_t size,
16 VkBufferUsageFlags usage,
17 const std::optional<VmaAllocationCreateFlags> &flags = {})
18 -> std::shared_ptr<Buffer>;
21 const ::vk::Queue &submit_queue,
22 const ::vk::CommandPool &command_pool,
23 const std::shared_ptr<Buffer> &src,
24 const std::shared_ptr<Buffer> &dst,
size_t size)
64 allocator_, data.data(), allocation_, {0}, {data.size_bytes()})));
static auto copy_buffer(const ::vk::Device &device, const ::vk::Queue &submit_queue, const ::vk::CommandPool &command_pool, const std::shared_ptr< Buffer > &src, const std::shared_ptr< Buffer > &dst, size_t size) -> expected< void >
Definition buffer.cpp:54
~Buffer()
Definition buffer.cpp:85
auto unmap()
Definition buffer.hpp:45
static auto create(const VmaAllocator &allocator, size_t size, VkBufferUsageFlags usage, const std::optional< VmaAllocationCreateFlags > &flags={}) -> std::shared_ptr< Buffer >
Definition buffer.cpp:13
void * mapped_ptr_
Definition buffer.hpp:58
VmaAllocation allocation_
Definition buffer.hpp:56
auto set_data_raw(std::span< const T > data) -> expected< void >
Definition buffer.hpp:62
auto operator=(const Buffer &)=delete
::vk::Buffer buffer_
Definition buffer.hpp:54
VmaAllocator allocator_
Definition buffer.hpp:55
Buffer(const Buffer &)=delete
Buffer(const VmaAllocator &allocator)
Definition buffer.hpp:27
auto map()
Definition buffer.hpp:40
auto get() const
Definition buffer.hpp:51
auto operator=(Buffer &&)=delete
Definition render_pass.hpp:19
std::expected< T, Err > expected
Definition result.hpp:49
#define VK_ERR_PROP_VOID(err)
Definition result.hpp:84