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
// Generated by `scripts/generate.js`

use utils::vk_traits::*;

/// Wrapper for [VkPerformanceCounterStorageKHR](https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkPerformanceCounterStorageKHR.html).
#[repr(i32)]
#[derive(Debug, PartialEq, Copy, Clone)]
pub enum VkPerformanceCounterStorage {
    Int32 = 0,
    Int64 = 1,
    Uint32 = 2,
    Uint64 = 3,
    Float32 = 4,
    Float64 = 5,
}

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

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

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

impl Default for VkPerformanceCounterStorage {
    fn default() -> VkPerformanceCounterStorage {
        VkPerformanceCounterStorage::Int32
    }
}