gpu_descriptor_types/
types.rs1bitflags::bitflags! {
2 #[derive(Clone, Copy, Debug, Eq, PartialEq, Hash)]
6 pub struct DescriptorPoolCreateFlags: u32 {
7 const FREE_DESCRIPTOR_SET = 0x1;
9
10 const UPDATE_AFTER_BIND = 0x2;
12 }
13}
14
15#[derive(Clone, Copy, Debug, Default, PartialEq, Eq, Hash)]
19pub struct DescriptorTotalCount {
20 pub sampler: u32,
21 pub combined_image_sampler: u32,
22 pub sampled_image: u32,
23 pub storage_image: u32,
24 pub uniform_texel_buffer: u32,
25 pub storage_texel_buffer: u32,
26 pub uniform_buffer: u32,
27 pub storage_buffer: u32,
28 pub uniform_buffer_dynamic: u32,
29 pub storage_buffer_dynamic: u32,
30 pub input_attachment: u32,
31 pub acceleration_structure: u32,
32 pub inline_uniform_block_bytes: u32,
33 pub inline_uniform_block_bindings: u32,
34}
35
36impl DescriptorTotalCount {
37 pub fn total(&self) -> u32 {
38 self.sampler
39 + self.combined_image_sampler
40 + self.sampled_image
41 + self.storage_image
42 + self.uniform_texel_buffer
43 + self.storage_texel_buffer
44 + self.uniform_buffer
45 + self.storage_buffer
46 + self.uniform_buffer_dynamic
47 + self.storage_buffer_dynamic
48 + self.input_attachment
49 + self.acceleration_structure
50 + self.inline_uniform_block_bytes
51 + self.inline_uniform_block_bindings
52 }
53}