mirror of
https://github.com/gfx-rs/wgpu.git
synced 2024-11-22 23:04:07 +00:00
Rename serde feature
This commit is contained in:
parent
9940aef599
commit
24caf76765
@ -17,7 +17,7 @@ license = "MPL-2.0"
|
|||||||
[features]
|
[features]
|
||||||
default = []
|
default = []
|
||||||
metal-auto-capture = ["gfx-backend-metal/auto-capture"]
|
metal-auto-capture = ["gfx-backend-metal/auto-capture"]
|
||||||
serde1 = ["wgt/serde"]
|
serde = ["wgt/serde", "serde_crate"]
|
||||||
#NOTE: glutin feature is not stable, use at your own risk
|
#NOTE: glutin feature is not stable, use at your own risk
|
||||||
#glutin = ["gfx-backend-gl/glutin"]
|
#glutin = ["gfx-backend-gl/glutin"]
|
||||||
|
|
||||||
@ -33,10 +33,15 @@ parking_lot = "0.9"
|
|||||||
peek-poke = { git = "https://github.com/kvark/peek-poke", rev = "969bd7fe2be1a83f87916dc8b388c63cfd457075" }
|
peek-poke = { git = "https://github.com/kvark/peek-poke", rev = "969bd7fe2be1a83f87916dc8b388c63cfd457075" }
|
||||||
rendy-memory = "0.5"
|
rendy-memory = "0.5"
|
||||||
rendy-descriptor = "0.5"
|
rendy-descriptor = "0.5"
|
||||||
serde = { version = "1.0", features = ["serde_derive"], optional = true }
|
|
||||||
smallvec = "1.0"
|
smallvec = "1.0"
|
||||||
vec_map = "0.8"
|
vec_map = "0.8"
|
||||||
|
|
||||||
|
[dependencies.serde_crate]
|
||||||
|
package = "serde"
|
||||||
|
version = "1.0"
|
||||||
|
features = ["serde_derive"]
|
||||||
|
optional = true
|
||||||
|
|
||||||
[dependencies.wgt]
|
[dependencies.wgt]
|
||||||
path = "../wgpu-types"
|
path = "../wgpu-types"
|
||||||
package = "wgpu-types"
|
package = "wgpu-types"
|
||||||
|
@ -16,12 +16,12 @@ use arrayvec::ArrayVec;
|
|||||||
use rendy_descriptor::{DescriptorRanges, DescriptorSet};
|
use rendy_descriptor::{DescriptorRanges, DescriptorSet};
|
||||||
|
|
||||||
#[cfg(feature = "serde")]
|
#[cfg(feature = "serde")]
|
||||||
use serde::{Deserialize, Serialize};
|
use serde_crate::{Deserialize, Serialize};
|
||||||
use std::borrow::Borrow;
|
use std::borrow::Borrow;
|
||||||
|
|
||||||
#[repr(C)]
|
#[repr(C)]
|
||||||
#[derive(Copy, Clone, Debug, Hash, Eq, PartialEq)]
|
#[derive(Copy, Clone, Debug, Hash, Eq, PartialEq)]
|
||||||
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
|
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize), serde(crate="serde_crate"))]
|
||||||
pub enum BindingType {
|
pub enum BindingType {
|
||||||
UniformBuffer = 0,
|
UniformBuffer = 0,
|
||||||
StorageBuffer = 1,
|
StorageBuffer = 1,
|
||||||
@ -33,7 +33,7 @@ pub enum BindingType {
|
|||||||
|
|
||||||
#[repr(C)]
|
#[repr(C)]
|
||||||
#[derive(Clone, Debug, Hash, PartialEq)]
|
#[derive(Clone, Debug, Hash, PartialEq)]
|
||||||
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
|
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize), serde(crate="serde_crate"))]
|
||||||
pub struct BindGroupLayoutBinding {
|
pub struct BindGroupLayoutBinding {
|
||||||
pub binding: u32,
|
pub binding: u32,
|
||||||
pub visibility: wgt::ShaderStage,
|
pub visibility: wgt::ShaderStage,
|
||||||
@ -73,7 +73,7 @@ pub struct PipelineLayout<B: hal::Backend> {
|
|||||||
|
|
||||||
#[repr(C)]
|
#[repr(C)]
|
||||||
#[derive(Debug)]
|
#[derive(Debug)]
|
||||||
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
|
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize), serde(crate="serde_crate"))]
|
||||||
pub struct BufferBinding {
|
pub struct BufferBinding {
|
||||||
pub buffer: BufferId,
|
pub buffer: BufferId,
|
||||||
pub offset: BufferAddress,
|
pub offset: BufferAddress,
|
||||||
@ -82,7 +82,7 @@ pub struct BufferBinding {
|
|||||||
|
|
||||||
#[repr(C)]
|
#[repr(C)]
|
||||||
#[derive(Debug)]
|
#[derive(Debug)]
|
||||||
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
|
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize), serde(crate="serde_crate"))]
|
||||||
pub enum BindingResource {
|
pub enum BindingResource {
|
||||||
Buffer(BufferBinding),
|
Buffer(BufferBinding),
|
||||||
Sampler(SamplerId),
|
Sampler(SamplerId),
|
||||||
@ -91,7 +91,7 @@ pub enum BindingResource {
|
|||||||
|
|
||||||
#[repr(C)]
|
#[repr(C)]
|
||||||
#[derive(Debug)]
|
#[derive(Debug)]
|
||||||
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
|
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize), serde(crate="serde_crate"))]
|
||||||
pub struct BindGroupBinding {
|
pub struct BindGroupBinding {
|
||||||
pub binding: u32,
|
pub binding: u32,
|
||||||
pub resource: BindingResource,
|
pub resource: BindingResource,
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
|
|
||||||
use crate::{Epoch, Index};
|
use crate::{Epoch, Index};
|
||||||
#[cfg(feature = "serde")]
|
#[cfg(feature = "serde")]
|
||||||
use serde::{Deserialize, Serialize};
|
use serde_crate::{Deserialize, Serialize};
|
||||||
use wgt::Backend;
|
use wgt::Backend;
|
||||||
use std::{fmt, marker::PhantomData, mem};
|
use std::{fmt, marker::PhantomData, mem};
|
||||||
|
|
||||||
@ -13,7 +13,7 @@ const EPOCH_MASK: u32 = (1 << (32 - BACKEND_BITS)) - 1;
|
|||||||
type Dummy = crate::backend::Empty;
|
type Dummy = crate::backend::Empty;
|
||||||
|
|
||||||
#[repr(transparent)]
|
#[repr(transparent)]
|
||||||
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
|
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize), serde(crate="serde_crate"))]
|
||||||
pub struct Id<T>(u64, PhantomData<T>);
|
pub struct Id<T>(u64, PhantomData<T>);
|
||||||
|
|
||||||
impl<T> Id<T> {
|
impl<T> Id<T> {
|
||||||
|
@ -13,7 +13,7 @@ use crate::{
|
|||||||
use wgt::{Backend, BackendBit, DeviceDescriptor, PowerPreference, RequestAdapterOptions};
|
use wgt::{Backend, BackendBit, DeviceDescriptor, PowerPreference, RequestAdapterOptions};
|
||||||
|
|
||||||
#[cfg(feature = "serde")]
|
#[cfg(feature = "serde")]
|
||||||
use serde::{Deserialize, Serialize};
|
use serde_crate::{Deserialize, Serialize};
|
||||||
|
|
||||||
use hal::{
|
use hal::{
|
||||||
self,
|
self,
|
||||||
@ -103,7 +103,7 @@ pub struct Adapter<B: hal::Backend> {
|
|||||||
|
|
||||||
/// Metadata about a backend adapter.
|
/// Metadata about a backend adapter.
|
||||||
#[derive(Clone, Debug, PartialEq)]
|
#[derive(Clone, Debug, PartialEq)]
|
||||||
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
|
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize), serde(crate="serde_crate"))]
|
||||||
pub struct AdapterInfo {
|
pub struct AdapterInfo {
|
||||||
/// Adapter name
|
/// Adapter name
|
||||||
pub name: String,
|
pub name: String,
|
||||||
@ -138,7 +138,7 @@ impl AdapterInfo {
|
|||||||
|
|
||||||
/// Supported physical device types
|
/// Supported physical device types
|
||||||
#[derive(Clone, Debug, PartialEq)]
|
#[derive(Clone, Debug, PartialEq)]
|
||||||
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
|
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize), serde(crate="serde_crate"))]
|
||||||
pub enum DeviceType {
|
pub enum DeviceType {
|
||||||
/// Other
|
/// Other
|
||||||
Other,
|
Other,
|
||||||
|
@ -15,7 +15,7 @@ use wgt::{BufferAddress, BufferUsage, CompareFunction, TextureFormat};
|
|||||||
use hal;
|
use hal;
|
||||||
use rendy_memory::MemoryBlock;
|
use rendy_memory::MemoryBlock;
|
||||||
#[cfg(feature = "serde")]
|
#[cfg(feature = "serde")]
|
||||||
use serde::{Deserialize, Serialize};
|
use serde_crate::{Deserialize, Serialize};
|
||||||
|
|
||||||
use std::{borrow::Borrow, fmt};
|
use std::{borrow::Borrow, fmt};
|
||||||
|
|
||||||
|
@ -19,7 +19,7 @@ default = []
|
|||||||
path = "../wgpu-core"
|
path = "../wgpu-core"
|
||||||
package = "wgpu-core"
|
package = "wgpu-core"
|
||||||
version = "0.1"
|
version = "0.1"
|
||||||
features = ["serde1"]
|
features = ["serde"]
|
||||||
|
|
||||||
[dependencies.wgt]
|
[dependencies.wgt]
|
||||||
path = "../wgpu-types"
|
path = "../wgpu-types"
|
||||||
|
Loading…
Reference in New Issue
Block a user