21 std::weak_ptr<Context> context,
23 VmaAllocationInfo info,
24 bool is_host_coherent);
39 VmaAllocationInfo info = {};
44 : buffer(
std::move(p_buffer)), info(p_info) {}
46 BufferResource(BufferResource&& o) {
47 std::swap(o.buffer, buffer);
48 std::swap(o.info, info);
56 std::weak_ptr<Context> context_;
57 UniqueResourceVKT<BufferResource> resource_;
58 bool is_host_coherent_ =
false;
61 uint8_t* OnGetContents()
const override;
64 bool OnCopyHostBuffer(
const uint8_t* source,
66 size_t offset)
override;
69 bool SetLabel(std::string_view label)
override;
72 bool SetLabel(std::string_view label, Range range)
override;
75 void Flush(std::optional<Range> range)
const override;
78 void Invalidate(std::optional<Range> range)
const override;