Make the device clonable again

This commit is contained in:
maik klein 2017-01-08 18:13:34 +01:00
parent eb3c3caf2c
commit 23340d5a8f

View file

@ -4,12 +4,13 @@ pub use device::DeviceV1_0;
pub use entry::EntryV1_0;
use std::mem;
pub trait FunctionPointers {
type InstanceFp: InstanceLoader;
type DeviceFp: DeviceLoader;
type EntryFp: EntryLoader;
type InstanceFp: InstanceLoader + Clone;
type DeviceFp: DeviceLoader + Clone;
type EntryFp: EntryLoader + Clone;
}
#[allow(non_camel_case_types)]
#[derive(Clone)]
pub struct V1_0;
impl FunctionPointers for V1_0 {
type InstanceFp = InstanceFpV1_0;
@ -18,11 +19,13 @@ impl FunctionPointers for V1_0 {
}
#[allow(non_camel_case_types)]
#[derive(Clone)]
pub struct InstanceFpV1_0 {
pub instance_fn: vk::InstanceFnV1_0,
}
#[allow(non_camel_case_types)]
#[derive(Clone)]
pub struct EntryFpV1_0 {
pub entry_fn: vk::EntryFnV1_0,
}
@ -83,6 +86,7 @@ impl InstanceLoader for InstanceFpV1_0 {
}
#[allow(non_camel_case_types)]
#[derive(Clone)]
pub struct DeviceFpV1_0 {
pub device_fn: vk::DeviceFnV1_0,
}