From 87c8428df0bf1b2f6932bb16390f69be57e21f6b Mon Sep 17 00:00:00 2001 From: "Anna (navi) Figueiredo Gomes" Date: Sun, 30 Jun 2024 22:23:08 +0200 Subject: libvlkn: inital commit, basic prototype api in place Signed-off-by: Anna (navi) Figueiredo Gomes --- src/pipeline.h | 39 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 src/pipeline.h (limited to 'src/pipeline.h') 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 +#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 -- cgit v1.2.3