Add repr(C) on mapping structs

This commit is contained in:
Dzmitry Malyshau 2020-10-06 13:36:17 -04:00
parent 1bac63c654
commit dc2d581c8d
2 changed files with 2 additions and 0 deletions

View File

@ -70,6 +70,7 @@ pub fn all_image_stages() -> hal::pso::PipelineStage {
| Ps::TRANSFER | Ps::TRANSFER
} }
#[repr(C)]
#[derive(Clone, Copy, Debug, PartialEq)] #[derive(Clone, Copy, Debug, PartialEq)]
#[cfg_attr(feature = "trace", derive(serde::Serialize))] #[cfg_attr(feature = "trace", derive(serde::Serialize))]
#[cfg_attr(feature = "replay", derive(serde::Deserialize))] #[cfg_attr(feature = "replay", derive(serde::Deserialize))]

View File

@ -104,6 +104,7 @@ unsafe impl<B: hal::Backend> Sync for BufferMapState<B> {}
pub type BufferMapCallback = unsafe extern "C" fn(status: BufferMapAsyncStatus, userdata: *mut u8); pub type BufferMapCallback = unsafe extern "C" fn(status: BufferMapAsyncStatus, userdata: *mut u8);
#[repr(C)]
#[derive(Debug)] #[derive(Debug)]
pub struct BufferMapOperation { pub struct BufferMapOperation {
pub host: crate::device::HostMap, pub host: crate::device::HostMap,