963: Add repr(C) on mapping structs r=trivial a=kvark

**Connections**
Required for https://phabricator.services.mozilla.com/D92636

**Description**
Allows C clients to avoid redefining those structs.

**Testing**
No need

Co-authored-by: Dzmitry Malyshau <dmalyshau@mozilla.com>
This commit is contained in:
bors[bot] 2020-10-06 17:37:45 +00:00 committed by GitHub
commit aee0bead78
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
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
}
#[repr(C)]
#[derive(Clone, Copy, Debug, PartialEq)]
#[cfg_attr(feature = "trace", derive(serde::Serialize))]
#[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);
#[repr(C)]
#[derive(Debug)]
pub struct BufferMapOperation {
pub host: crate::device::HostMap,