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 unsigned frame_index = 0;
47 VkCommandBuffer primary_buffer = 0;
48 VkCommandBuffer pass_buffer = 0;
49 const PipelineState *pipeline_state = 0;
50 const PipelineState *last_pipeline = 0;
51 const Framebuffer *framebuffer = 0;
52 Rect viewport = Rect::max();
53 bool fb_is_swapchain = false;
54 bool discard_fb_contents = false;
55 std::vector<char> pass_begin_info;
60 void begin_buffer(VkRenderPass);
61 void begin_render_pass(bool, const ClearValue *);
62 void end_render_pass();
64 void begin_frame(unsigned);
66 void submit_frame(Semaphore *, Semaphore *);
68 void use_pipeline(const PipelineState *);
69 void clear(const ClearValue *);
70 void draw(const Batch &);
71 void draw_instanced(const Batch &, unsigned);
72 void resolve_multisample(Framebuffer &);
74 void begin_query(const QueryPool &, unsigned);
75 void end_query(const QueryPool &, unsigned);
78 using CommandsBackend = VulkanCommands;