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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
use core;
use utils;
use vks;
gen_chain_struct! {
name: DedicatedAllocationImageCreateInfoChainNv [DedicatedAllocationImageCreateInfoChainNvWrapper],
query: DedicatedAllocationImageCreateInfoChainQueryNv [DedicatedAllocationImageCreateInfoChainQueryNvWrapper],
vks: VkDedicatedAllocationImageCreateInfoNV,
input: true,
output: false,
}
#[derive(Debug, Clone, PartialEq)]
pub struct DedicatedAllocationImageCreateInfoNv {
pub dedicated_allocation: bool,
pub chain: Option<DedicatedAllocationImageCreateInfoChainNv>,
}
#[derive(Debug)]
pub(crate) struct VkDedicatedAllocationImageCreateInfoNVWrapper {
pub vks_struct: vks::VkDedicatedAllocationImageCreateInfoNV,
chain: Option<DedicatedAllocationImageCreateInfoChainNvWrapper>,
}
impl VkDedicatedAllocationImageCreateInfoNVWrapper {
pub fn new(create_info: &DedicatedAllocationImageCreateInfoNv, with_chain: bool) -> Self {
let (pnext, chain) = DedicatedAllocationImageCreateInfoChainNvWrapper::new_optional(&create_info.chain, with_chain);
VkDedicatedAllocationImageCreateInfoNVWrapper {
vks_struct: vks::VkDedicatedAllocationImageCreateInfoNV {
sType: vks::VK_STRUCTURE_TYPE_DEDICATED_ALLOCATION_IMAGE_CREATE_INFO_NV,
pNext: pnext,
dedicatedAllocation: utils::to_vk_bool(create_info.dedicated_allocation),
},
chain: chain,
}
}
}
gen_chain_struct! {
name: DedicatedAllocationBufferCreateInfoChainNv [DedicatedAllocationBufferCreateInfoChainNvWrapper],
query: DedicatedAllocationBufferCreateInfoChainQueryNv [DedicatedAllocationBufferCreateInfoChainQueryNvWrapper],
vks: VkDedicatedAllocationBufferCreateInfoNV,
input: true,
output: false,
}
#[derive(Debug, Clone, PartialEq)]
pub struct DedicatedAllocationBufferCreateInfoNv {
pub dedicated_allocation: bool,
pub chain: Option<DedicatedAllocationBufferCreateInfoChainNv>,
}
#[derive(Debug)]
pub(crate) struct VkDedicatedAllocationBufferCreateInfoNVWrapper {
pub vks_struct: vks::VkDedicatedAllocationBufferCreateInfoNV,
chain: Option<DedicatedAllocationBufferCreateInfoChainNvWrapper>,
}
impl VkDedicatedAllocationBufferCreateInfoNVWrapper {
pub fn new(create_info: &DedicatedAllocationBufferCreateInfoNv, with_chain: bool) -> Self {
let (pnext, chain) = DedicatedAllocationBufferCreateInfoChainNvWrapper::new_optional(&create_info.chain, with_chain);
VkDedicatedAllocationBufferCreateInfoNVWrapper {
vks_struct: vks::VkDedicatedAllocationBufferCreateInfoNV {
sType: vks::VK_STRUCTURE_TYPE_DEDICATED_ALLOCATION_BUFFER_CREATE_INFO_NV,
pNext: pnext,
dedicatedAllocation: utils::to_vk_bool(create_info.dedicated_allocation),
},
chain: chain,
}
}
}
gen_chain_struct! {
name: DedicatedAllocationMemoryAllocateInfoChainNv [DedicatedAllocationMemoryAllocateInfoChainNvWrapper],
query: DedicatedAllocationMemoryAllocateInfoChainQueryNv [DedicatedAllocationMemoryAllocateInfoChainQueryNvWrapper],
vks: VkDedicatedAllocationMemoryAllocateInfoNV,
input: true,
output: false,
}
#[derive(Debug, Clone, PartialEq)]
pub struct DedicatedAllocationMemoryAllocateInfoNv {
pub image: Option<core::Image>,
pub buffer: Option<core::Buffer>,
pub chain: Option<DedicatedAllocationMemoryAllocateInfoChainNv>,
}
#[derive(Debug)]
pub(crate) struct VkDedicatedAllocationMemoryAllocateInfoNVWrapper {
pub vks_struct: vks::VkDedicatedAllocationMemoryAllocateInfoNV,
image: Option<core::Image>,
buffer: Option<core::Buffer>,
chain: Option<DedicatedAllocationMemoryAllocateInfoChainNvWrapper>,
}
impl VkDedicatedAllocationMemoryAllocateInfoNVWrapper {
pub fn new(info: &DedicatedAllocationMemoryAllocateInfoNv, with_chain: bool) -> Self {
let (pnext, chain) = DedicatedAllocationMemoryAllocateInfoChainNvWrapper::new_optional(&info.chain, with_chain);
VkDedicatedAllocationMemoryAllocateInfoNVWrapper {
vks_struct: vks::VkDedicatedAllocationMemoryAllocateInfoNV {
sType: vks::VK_STRUCTURE_TYPE_DEDICATED_ALLOCATION_MEMORY_ALLOCATE_INFO_NV,
pNext: pnext,
image: info.image.as_ref().map_or(Default::default(), core::Image::handle),
buffer: info.buffer.as_ref().map_or(Default::default(), core::Buffer::handle),
},
chain: chain,
image: info.image.clone(),
buffer: info.buffer.clone(),
}
}
}