1 #ifndef MSP_GL_VULKAN_SYNCHRONIZER_H_
2 #define MSP_GL_VULKAN_SYNCHRONIZER_H_
11 class VulkanCommandRecorder;
21 unsigned current_layout;
22 unsigned pending_layout;
28 std::size_t offset = 0;
30 bool was_written = false;
31 bool pending_write = false;
35 std::vector<BufferAccess> buffer_accesses;
36 std::vector<ImageAccess> image_accesses;
39 Synchronizer(Device &);
41 void write_buffer(VkBuffer, std::size_t, std::size_t, bool = false);
42 void split_image_mipmap(VkImage, unsigned, unsigned);
43 void change_image_layout(VkImage, unsigned, int, unsigned, bool);
45 void barrier(const VulkanCommandRecorder &);
48 bool is_write_layout(unsigned);