mirror of
https://github.com/storytold/wgpu.git
synced 2026-11-30 01:54:31 +01:00
Merge #405
405: Derive BufferDescriptor from Serialize/Deserialize r=kvark a=imiklos cc @kvark @zakorgy Co-authored-by: Istvan Miklos <istvan.miklos@h-lab.eu>
This commit is contained in:
commit
6b097ab77a
1 file changed
+4
@@ -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,
|
||||
|
||||
Reference in new issue
Block a user