mirror of
https://github.com/gfx-rs/wgpu.git
synced 2024-11-26 00:33:51 +00:00
Add Serialize/Deserialize derive to BufferDescriptor
This commit is contained in:
parent
615f6f4af2
commit
45be9035b7
@ -15,11 +15,14 @@ use crate::{
|
||||
use hal;
|
||||
use rendy_memory::MemoryBlock;
|
||||
use smallvec::SmallVec;
|
||||
#[cfg(feature = "serde")]
|
||||
use serde::{Deserialize, Serialize};
|
||||
|
||||
use std::{borrow::Borrow, fmt};
|
||||
|
||||
bitflags::bitflags! {
|
||||
#[repr(transparent)]
|
||||
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
|
||||
pub struct BufferUsage: u32 {
|
||||
const MAP_READ = 1;
|
||||
const MAP_WRITE = 2;
|
||||
@ -46,6 +49,7 @@ bitflags::bitflags! {
|
||||
}
|
||||
|
||||
#[repr(C)]
|
||||
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
|
||||
#[derive(Clone, Debug)]
|
||||
pub struct BufferDescriptor {
|
||||
pub size: BufferAddress,
|
||||
|
Loading…
Reference in New Issue
Block a user