1 #ifndef MSP_GL_COMMANDS_BACKEND_H_
2 #define MSP_GL_COMMANDS_BACKEND_H_
26 std::vector<VkCommandBuffer> buffers;
27 unsigned next_buffer = 0;
33 VkCommandPool pool = 0;
34 CommandBuffers primary;
35 CommandBuffers secondary;
39 CommandPool(Device &);
40 CommandPool(CommandPool &&);
45 std::vector<CommandPool> command_pools;
46 CommandPool *current_pool = 0;
47 VkCommandBuffer primary_buffer = 0;
48 VkCommandBuffer pass_buffer = 0;
49 const PipelineState *pipeline_state = 0;
50 const Framebuffer *framebuffer = 0;
51 const Rect *viewport = 0;
52 bool fb_is_swapchain = false;
53 std::vector<char> pass_begin_info;
58 void begin_buffer(VkRenderPass);
59 void begin_render_pass(bool, const ClearValue *);
60 void end_render_pass();
62 void begin_frame(unsigned);
64 void submit_frame(Semaphore *, Semaphore *);
66 void use_pipeline(const PipelineState *);
67 void clear(const ClearValue *);
68 void draw(const Batch &);
69 void draw_instanced(const Batch &, unsigned);
70 void resolve_multisample(Framebuffer &);
72 void begin_query(const QueryPool &, unsigned);
73 void end_query(const QueryPool &, unsigned);
76 using CommandsBackend = VulkanCommands;