diff options
Diffstat (limited to 'src/pipeline.h')
-rw-r--r-- | src/pipeline.h | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/src/pipeline.h b/src/pipeline.h new file mode 100644 index 0000000..e571d68 --- /dev/null +++ b/src/pipeline.h @@ -0,0 +1,39 @@ +#ifndef _PIPELINE_H_ +#define _PIPELINE_H_ + +#include <vlkn.h> +#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 |