--- /dev/null
+#ifndef MSP_GL_DEVICE_BACKEND_H_
+#define MSP_GL_DEVICE_BACKEND_H_
+
+#include <msp/core/noncopyable.h>
+#include <msp/graphics/vulkancontext.h>
+#include "destroyqueue.h"
+#include "handles.h"
+#include "memoryallocator.h"
+#include "pipelinecache.h"
+#include "transferqueue.h"
+
+namespace Msp {
+namespace GL {
+
+struct VulkanFunctions;
+
+constexpr unsigned MAX_FRAMES_IN_FLIGHT = 3;
+
+class VulkanDevice: public NonCopyable
+{
+protected:
+ Graphics::VulkanContext context;
+ VkDevice device;
+ VkQueue graphics_queue;
+ RefPtr<VulkanFunctions> functions;
+ MemoryAllocator allocator;
+ DestroyQueue destroy_queue;
+ TransferQueue transfer_queue;
+ PipelineCache pipeline_cache;
+ unsigned n_frames_in_flight = 3;
+
+ VulkanDevice(Graphics::Window &, const Graphics::VulkanOptions &);
+ ~VulkanDevice();
+
+ static Graphics::VulkanOptions create_default_options();
+
+ void fill_info();
+
+ Graphics::VulkanContext &get_context() { return context; }
+
+public:
+ const VulkanFunctions &get_functions() const { return *functions; }
+ MemoryAllocator &get_allocator() { return allocator; }
+ DestroyQueue &get_destroy_queue() { return destroy_queue; }
+ TransferQueue &get_transfer_queue() { return transfer_queue; }
+ PipelineCache &get_pipeline_cache() { return pipeline_cache; }
+ unsigned get_n_frames_in_flight() const { return n_frames_in_flight; }
+};
+
+using DeviceBackend = VulkanDevice;
+using DeviceOptions = Graphics::VulkanOptions;
+
+} // namespace GL
+} // namespace Msp
+
+#endif