+#ifndef MSP_GL_BUFFER_BACKEND_H_
+#define MSP_GL_BUFFER_BACKEND_H_
+
+#include <msp/core/noncopyable.h>
+#include "handles.h"
+
+namespace Msp {
+namespace GL {
+
+class Device;
+
+class VulkanBuffer: public NonCopyable
+{
+ friend class VulkanPipelineState;
+ friend class VulkanVertexSetup;
+
+protected:
+ Device &device;
+ VkBuffer handle = 0;
+ unsigned memory_id = 0;
+ void *mapped_address = 0;
+ std::string debug_name;
+
+ VulkanBuffer();
+ VulkanBuffer(VulkanBuffer &&);
+ ~VulkanBuffer();
+
+ void allocate();
+ void sub_data(std::size_t, std::size_t, const void *);
+
+ bool can_map() const;
+ void *map();
+ bool unmap();
+
+ void set_debug_name(const std::string &);
+ void set_vulkan_object_name() const;
+};
+
+using BufferBackend = VulkanBuffer;
+
+} // namespace GL
+} // namespace Msp
+
+#endif