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
use core;
use utils;
use vks;
gen_chain_struct! {
name: DisplayPresentInfoChainKhr [DisplayPresentInfoChainKhrWrapper],
query: DisplayPresentInfoChainQueryKhr [DisplayPresentInfoChainQueryKhrWrapper],
vks: VkDisplayPresentInfoKHR,
input: true,
output: false,
}
#[derive(Debug, Clone, PartialEq)]
pub struct DisplayPresentInfoKhr {
pub src_rect: core::Rect2D,
pub dst_rect: core::Rect2D,
pub persistent: bool,
pub chain: Option<DisplayPresentInfoChainKhr>,
}
#[derive(Debug)]
pub(crate) struct VkDisplayPresentInfoKHRWrapper {
pub vks_struct: vks::VkDisplayPresentInfoKHR,
chain: Option<DisplayPresentInfoChainKhrWrapper>,
}
impl VkDisplayPresentInfoKHRWrapper {
pub fn new(info: &DisplayPresentInfoKhr, with_chain: bool) -> Self {
let (pnext, chain) = DisplayPresentInfoChainKhrWrapper::new_optional(&info.chain, with_chain);
VkDisplayPresentInfoKHRWrapper {
vks_struct: vks::VkDisplayPresentInfoKHR {
sType: vks::VK_STRUCTURE_TYPE_DISPLAY_PRESENT_INFO_KHR,
pNext: pnext,
srcRect: (&info.src_rect).into(),
dstRect: (&info.dst_rect).into(),
persistent: utils::to_vk_bool(info.persistent),
},
chain: chain,
}
}
}