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

use utils::vk_traits::*;

pub type RawVkLogicOp = i32;

#[repr(i32)]
#[derive(Debug, PartialEq, Copy, Clone)]
pub enum VkLogicOp {
    Clear = 0,
    And = 1,
    AndReverse = 2,
    Copy = 3,
    AndInverted = 4,
    NoOp = 5,
    Xor = 6,
    Or = 7,
    Nor = 8,
    Equivalent = 9,
    Invert = 10,
    OrReverse = 11,
    CopyInverted = 12,
    OrInverted = 13,
    Nand = 14,
    Set = 15,
}

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

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

impl Default for VkLogicOp {
    fn default() -> VkLogicOp {
        VkLogicOp::Clear
    }
}