48 std::size_t element_size,
49 std::size_t alignment,
51 const VmaAllocator& allocator,
52 const VmaAllocation& allocation,
53 const std::string& name);
74 static std::unique_ptr<IVulkanBuffer> Allocate(BufferType type,
76 std::size_t element_size,
77 std::size_t alignment,
79 const VmaAllocator& allocator,
80 const VkBufferCreateInfo& create_info,
81 const VmaAllocationCreateInfo& allocation_info,
82 VmaAllocationInfo* allocation_result =
nullptr);
98 static std::unique_ptr<IVulkanBuffer> Allocate(
const std::string& name,
101 std::size_t element_size,
102 std::size_t alignment,
104 const VmaAllocator& allocator,
105 const VkBufferCreateInfo& create_info,
106 const VmaAllocationCreateInfo& allocation_info,
107 VmaAllocationInfo* allocation_result =
nullptr);
110 [[nodiscard]] BufferType type()
const override;
113 [[nodiscard]]
unsigned elements()
const noexcept override;
116 [[nodiscard]] std::size_t size()
const noexcept override;
119 [[nodiscard]] std::size_t elementSize()
const noexcept override;
122 [[nodiscard]] std::size_t elementAlignment()
const override;
125 [[nodiscard]] std::size_t alignedElementSize()
const noexcept override;
128 [[nodiscard]]
bool writable()
const noexcept override;
131 void map(
const void* data, std::size_t size,
unsigned element)
override;
134 void map(std::span<const void*> data, std::size_t element_size,
unsigned first_element)
override;
137 void map(
void* data,
size_t size,
unsigned element,
bool write)
override;
140 void map(std::span<void*> data,
size_t element_size,
unsigned first_element,
bool write)
override;
144 std::unique_ptr<Impl> m_impl;
void map(std::span< const void * > data, std::size_t element_size, unsigned first_element) override
Maps the memory at data into the internal memory of the object.