From 4e1d76013c0b272383400beba48dc306e1a350f6 Mon Sep 17 00:00:00 2001 From: Dzmitry Malyshau Date: Tue, 26 May 2020 09:32:16 -0400 Subject: [PATCH] Add missing repr(C) on copy views --- wgpu-core/src/command/transfer.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/wgpu-core/src/command/transfer.rs b/wgpu-core/src/command/transfer.rs index ac29e124ed..a674962c8f 100644 --- a/wgpu-core/src/command/transfer.rs +++ b/wgpu-core/src/command/transfer.rs @@ -19,6 +19,7 @@ use std::iter; pub(crate) const BITS_PER_BYTE: u32 = 8; +#[repr(C)] #[derive(Clone, Debug)] #[cfg_attr(feature = "trace", derive(serde::Serialize))] #[cfg_attr(feature = "replay", derive(serde::Deserialize))] @@ -27,6 +28,7 @@ pub struct BufferCopyView { pub layout: TextureDataLayout, } +#[repr(C)] #[derive(Clone, Debug)] #[cfg_attr(feature = "trace", derive(serde::Serialize))] #[cfg_attr(feature = "replay", derive(serde::Deserialize))]