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
use nv_external_memory_capabilities;
use vks;
use win32_types;
gen_chain_struct! {
name: ImportMemoryWin32HandleInfoChainNv [ImportMemoryWin32HandleInfoChainNvWrapper],
query: ImportMemoryWin32HandleInfoChainQueryNv [ImportMemoryWin32HandleInfoChainQueryNvWrapper],
vks: vks::nv_external_memory_win32::VkImportMemoryWin32HandleInfoNV,
input: true,
output: false,
}
#[derive(Debug, Clone, PartialEq)]
pub struct ImportMemoryWin32HandleInfoNv {
pub handle_type: nv_external_memory_capabilities::ExternalMemoryHandleTypeFlagsNv,
pub handle: win32_types::HANDLE,
pub chain: Option<ImportMemoryWin32HandleInfoChainNv>,
}
#[derive(Debug)]
pub(crate) struct VkImportMemoryWin32HandleInfoNVWrapper {
pub vks_struct: vks::nv_external_memory_win32::VkImportMemoryWin32HandleInfoNV,
chain: Option<ImportMemoryWin32HandleInfoChainNvWrapper>,
}
impl VkImportMemoryWin32HandleInfoNVWrapper {
pub fn new(info: &ImportMemoryWin32HandleInfoNv, with_chain: bool) -> Self {
let (pnext, chain) = ImportMemoryWin32HandleInfoChainNvWrapper::new_optional(&info.chain, with_chain);
VkImportMemoryWin32HandleInfoNVWrapper {
vks_struct: vks::nv_external_memory_win32::VkImportMemoryWin32HandleInfoNV {
sType: vks::core::VK_STRUCTURE_TYPE_IMPORT_MEMORY_WIN32_HANDLE_INFO_NV,
pNext: pnext,
handleType: info.handle_type.bits(),
handle: info.handle,
},
chain: chain,
}
}
}
gen_chain_struct! {
name: ExportMemoryWin32HandleInfoChainNv [ExportMemoryWin32HandleInfoChainNvWrapper],
query: ExportMemoryWin32HandleInfoChainQueryNv [ExportMemoryWin32HandleInfoChainQueryNvWrapper],
vks: vks::nv_external_memory_win32::VkExportMemoryWin32HandleInfoNV,
input: true,
output: false,
}
#[derive(Debug, Clone, PartialEq)]
pub struct ExportMemoryWin32HandleInfoNv {
pub attributes: *const win32_types::SECURITY_ATTRIBUTES,
pub dw_access: win32_types::DWORD,
pub chain: Option<ExportMemoryWin32HandleInfoChainNv>,
}
#[derive(Debug)]
pub(crate) struct VkExportMemoryWin32HandleInfoNVWrapper {
pub vks_struct: vks::nv_external_memory_win32::VkExportMemoryWin32HandleInfoNV,
chain: Option<ExportMemoryWin32HandleInfoChainNvWrapper>,
}
impl VkExportMemoryWin32HandleInfoNVWrapper {
pub fn new(info: &ExportMemoryWin32HandleInfoNv, with_chain: bool) -> Self {
let (pnext, chain) = ExportMemoryWin32HandleInfoChainNvWrapper::new_optional(&info.chain, with_chain);
VkExportMemoryWin32HandleInfoNVWrapper {
vks_struct: vks::nv_external_memory_win32::VkExportMemoryWin32HandleInfoNV {
sType: vks::core::VK_STRUCTURE_TYPE_EXPORT_MEMORY_WIN32_HANDLE_INFO_NV,
pNext: pnext,
pAttributes: info.attributes,
dwAccess: info.dw_access,
},
chain: chain,
}
}
}