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
47
48
use utils::vk_traits::*;
pub type RawVkSparseMemoryBindFlags = u32;
#[derive(Debug, Clone, Copy)]
pub struct VkSparseMemoryBindFlags {
pub metadata: bool,
}
impl VkRawType<VkSparseMemoryBindFlags> for RawVkSparseMemoryBindFlags {
fn vk_to_wrapped(src: &RawVkSparseMemoryBindFlags) -> VkSparseMemoryBindFlags {
VkSparseMemoryBindFlags {
metadata: (src & 0x00000001) != 0,
}
}
}
impl VkWrappedType<RawVkSparseMemoryBindFlags> for VkSparseMemoryBindFlags {
fn vk_to_raw(src: &VkSparseMemoryBindFlags, dst: &mut RawVkSparseMemoryBindFlags) {
*dst = 0;
if src.metadata { *dst |= 0x00000001; }
}
}
impl Default for VkSparseMemoryBindFlags {
fn default() -> VkSparseMemoryBindFlags {
VkSparseMemoryBindFlags {
metadata: false,
}
}
}
impl VkSparseMemoryBindFlags {
pub fn none() -> VkSparseMemoryBindFlags {
VkSparseMemoryBindFlags {
metadata: false,
}
}
pub fn all() -> VkSparseMemoryBindFlags {
VkSparseMemoryBindFlags {
metadata: true,
}
}
}