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
40
41
42
43
44
45
// Generated by `scripts/generate.js`

use utils::vk_traits::*;

/// Wrapper for [VkDescriptorType](https://www.khronos.org/registry/vulkan/specs/1.1-extensions/man/html/VkDescriptorType.html).
#[repr(i32)]
#[derive(Debug, PartialEq, Copy, Clone)]
pub enum VkDescriptorType {
    Sampler = 0,
    CombinedImageSampler = 1,
    SampledImage = 2,
    StorageImage = 3,
    UniformTexelBuffer = 4,
    StorageTexelBuffer = 5,
    UniformBuffer = 6,
    StorageBuffer = 7,
    UniformBufferDynamic = 8,
    StorageBufferDynamic = 9,
    InputAttachment = 10,
    InlineUniformBlockExt = 1000138000,
    AccelerationStructureNv = 1000165000,
}

#[doc(hidden)]
pub type RawVkDescriptorType = i32;

impl VkWrappedType<RawVkDescriptorType> for VkDescriptorType {
    fn vk_to_raw(src: &VkDescriptorType, dst: &mut RawVkDescriptorType) {
        *dst = *src as i32
    }
}

impl VkRawType<VkDescriptorType> for RawVkDescriptorType {
    fn vk_to_wrapped(src: &RawVkDescriptorType) -> VkDescriptorType {
        unsafe {
            *((src as *const i32) as *const VkDescriptorType)
        }
    }
}

impl Default for VkDescriptorType {
    fn default() -> VkDescriptorType {
        VkDescriptorType::Sampler
    }
}