Skip to content

Commit

Permalink
Merge #405
Browse files Browse the repository at this point in the history
405: Derive BufferDescriptor from Serialize/Deserialize r=kvark a=imiklos

cc @kvark @zakorgy

Co-authored-by: Istvan Miklos <istvan.miklos@h-lab.eu>
  • Loading branch information
bors[bot] and Istvan Miklos authored Dec 11, 2019
2 parents 615f6f4 + 45be903 commit 6b097ab
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions wgpu-core/src/resource.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -46,6 +49,7 @@ bitflags::bitflags! {
}

#[repr(C)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[derive(Clone, Debug)]
pub struct BufferDescriptor {
pub size: BufferAddress,
Expand Down

0 comments on commit 6b097ab

Please sign in to comment.