summaryrefslogtreecommitdiff
path: root/src/pipeline.h
diff options
context:
space:
mode:
authorAnna (navi) Figueiredo Gomes <navi@vlhl.dev>2024-06-30 22:23:08 +0200
committerAnna (navi) Figueiredo Gomes <navi@vlhl.dev>2024-06-30 22:29:30 +0200
commit87c8428df0bf1b2f6932bb16390f69be57e21f6b (patch)
tree0cc0f7cab79a0373ef366898df8f5773391bae17 /src/pipeline.h
libvlkn: inital commit, basic prototype api in placeHEADmain
Signed-off-by: Anna (navi) Figueiredo Gomes <navi@vlhl.dev>
Diffstat (limited to 'src/pipeline.h')
-rw-r--r--src/pipeline.h39
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