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 bool discard_fb_contents = false;
54 std::vector<char> pass_begin_info;
59 void begin_buffer(VkRenderPass);
60 void begin_render_pass(bool, const ClearValue *);
61 void end_render_pass();
63 void begin_frame(unsigned);
65 void submit_frame(Semaphore *, Semaphore *);
67 void use_pipeline(const PipelineState *);
68 void clear(const ClearValue *);
69 void draw(const Batch &);
70 void draw_instanced(const Batch &, unsigned);
71 void resolve_multisample(Framebuffer &);
73 void begin_query(const QueryPool &, unsigned);
74 void end_query(const QueryPool &, unsigned);
77 using CommandsBackend = VulkanCommands;