--- /dev/null
+#ifndef MSP_GL_COMMANDS_BACKEND_H_
+#define MSP_GL_COMMANDS_BACKEND_H_
+
+#include <vector>
+#include "fence.h"
+#include "handles.h"
+
+namespace Msp {
+namespace GL {
+
+class Batch;
+union ClearValue;
+class Device;
+class Framebuffer;
+class PipelineState;
+class QueryPool;
+class Semaphore;
+class SwapChain;
+
+class VulkanCommands
+{
+protected:
+ struct CommandPool
+ {
+ Device &device;
+ VkCommandPool pool = 0;
+ Fence fence;
+ bool in_use = false;
+
+ CommandPool(Device &);
+ CommandPool(CommandPool &&);
+ ~CommandPool();
+ };
+
+ Device &device;
+ std::vector<CommandPool> command_pools;
+ CommandPool *current_pool = 0;
+ VkCommandBuffer current_buffer = 0;
+ const PipelineState *pipeline_state = 0;
+ VkRenderPass render_pass = 0;
+
+ VulkanCommands();
+ ~VulkanCommands();
+
+ void begin_buffer();
+ void begin_render_pass(const ClearValue *);
+ void end_render_pass();
+
+ void begin_frame(unsigned);
+ void submit_frame();
+ void submit_frame(Semaphore *, Semaphore *);
+
+ void use_pipeline(const PipelineState *);
+ void clear(const ClearValue *);
+ void draw(const Batch &);
+ void draw_instanced(const Batch &, unsigned);
+ void resolve_multisample(Framebuffer &);
+
+ void begin_query(const QueryPool &, unsigned);
+ void end_query(const QueryPool &, unsigned);
+};
+
+using CommandsBackend = VulkanCommands;
+
+} // namespace GL
+} // namespace Msp
+
+#endif
+