#ifndef _PIPELINE_H_ #define _PIPELINE_H_ #include #include "utils.h" struct pool_ratio { VkDescriptorType type; float ratio; }; struct descriptor_allocator { struct array(VkDescriptorPool) full, ready; uint32_t set_count; size_t ratio_count; struct pool_ratio *ratios; }; struct descriptor_writer { enum { DESCRIPTOR_WRITER_BUFFER, DESCRIPTOR_WRITER_IMAGE, } type; union { VkDescriptorBufferInfo buffer_info; VkDescriptorImageInfo image_info; }; VkWriteDescriptorSet write_info; }; struct vlkn_pipeline { struct descriptor_allocator allocator; VkDescriptorSetLayout descriptor_layout; VkDescriptorSet descriptor_set; VkPipelineLayout layout; VkPipeline pipeline; }; #endif