blob: e571d685424bbe639fd36510caefa0b53e7dcc47 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
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
|