Make the device clonable again
This commit is contained in:
parent
eb3c3caf2c
commit
23340d5a8f
1 changed files with 7 additions and 3 deletions
|
@ -4,12 +4,13 @@ pub use device::DeviceV1_0;
|
||||||
pub use entry::EntryV1_0;
|
pub use entry::EntryV1_0;
|
||||||
use std::mem;
|
use std::mem;
|
||||||
pub trait FunctionPointers {
|
pub trait FunctionPointers {
|
||||||
type InstanceFp: InstanceLoader;
|
type InstanceFp: InstanceLoader + Clone;
|
||||||
type DeviceFp: DeviceLoader;
|
type DeviceFp: DeviceLoader + Clone;
|
||||||
type EntryFp: EntryLoader;
|
type EntryFp: EntryLoader + Clone;
|
||||||
}
|
}
|
||||||
|
|
||||||
#[allow(non_camel_case_types)]
|
#[allow(non_camel_case_types)]
|
||||||
|
#[derive(Clone)]
|
||||||
pub struct V1_0;
|
pub struct V1_0;
|
||||||
impl FunctionPointers for V1_0 {
|
impl FunctionPointers for V1_0 {
|
||||||
type InstanceFp = InstanceFpV1_0;
|
type InstanceFp = InstanceFpV1_0;
|
||||||
|
@ -18,11 +19,13 @@ impl FunctionPointers for V1_0 {
|
||||||
}
|
}
|
||||||
|
|
||||||
#[allow(non_camel_case_types)]
|
#[allow(non_camel_case_types)]
|
||||||
|
#[derive(Clone)]
|
||||||
pub struct InstanceFpV1_0 {
|
pub struct InstanceFpV1_0 {
|
||||||
pub instance_fn: vk::InstanceFnV1_0,
|
pub instance_fn: vk::InstanceFnV1_0,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[allow(non_camel_case_types)]
|
#[allow(non_camel_case_types)]
|
||||||
|
#[derive(Clone)]
|
||||||
pub struct EntryFpV1_0 {
|
pub struct EntryFpV1_0 {
|
||||||
pub entry_fn: vk::EntryFnV1_0,
|
pub entry_fn: vk::EntryFnV1_0,
|
||||||
}
|
}
|
||||||
|
@ -83,6 +86,7 @@ impl InstanceLoader for InstanceFpV1_0 {
|
||||||
}
|
}
|
||||||
|
|
||||||
#[allow(non_camel_case_types)]
|
#[allow(non_camel_case_types)]
|
||||||
|
#[derive(Clone)]
|
||||||
pub struct DeviceFpV1_0 {
|
pub struct DeviceFpV1_0 {
|
||||||
pub device_fn: vk::DeviceFnV1_0,
|
pub device_fn: vk::DeviceFnV1_0,
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue