mirror of
https://github.com/gfx-rs/wgpu.git
synced 2025-02-19 18:33:30 +00:00
Use repr(C)
for Id
This commit is contained in:
parent
a55502c1e2
commit
e921b59298
@ -240,7 +240,14 @@ typedef enum {
|
||||
|
||||
typedef struct WGPUBufferMapAsyncStatus WGPUBufferMapAsyncStatus;
|
||||
|
||||
typedef struct WGPUId WGPUId;
|
||||
typedef uint32_t WGPUIndex;
|
||||
|
||||
typedef uint32_t WGPUEpoch;
|
||||
|
||||
typedef struct {
|
||||
WGPUIndex _0;
|
||||
WGPUEpoch _1;
|
||||
} WGPUId;
|
||||
|
||||
typedef WGPUId WGPUDeviceId;
|
||||
|
||||
|
@ -18,6 +18,8 @@ use std::sync::Arc;
|
||||
|
||||
pub(crate) type Index = u32;
|
||||
pub(crate) type Epoch = u32;
|
||||
|
||||
#[repr(C)]
|
||||
#[derive(Clone, Copy, Debug, Hash, PartialEq)]
|
||||
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
|
||||
pub struct Id(Index, Epoch);
|
||||
|
Loading…
Reference in New Issue
Block a user