move bind type
This commit is contained in:
parent
d08b243317
commit
cfaee577e7
@ -689,30 +689,4 @@ impl Renderer for WgpuRenderer {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl From<&BindType> for wgpu::BindingType {
|
|
||||||
fn from(bind_type: &BindType) -> Self {
|
|
||||||
match bind_type {
|
|
||||||
BindType::Uniform {
|
|
||||||
dynamic,
|
|
||||||
properties: _,
|
|
||||||
} => wgpu::BindingType::UniformBuffer { dynamic: *dynamic },
|
|
||||||
BindType::Buffer { dynamic, readonly } => wgpu::BindingType::StorageBuffer {
|
|
||||||
dynamic: *dynamic,
|
|
||||||
readonly: *readonly,
|
|
||||||
},
|
|
||||||
BindType::SampledTexture {
|
|
||||||
dimension,
|
|
||||||
multisampled,
|
|
||||||
} => wgpu::BindingType::SampledTexture {
|
|
||||||
dimension: (*dimension).into(),
|
|
||||||
multisampled: *multisampled,
|
|
||||||
},
|
|
||||||
BindType::Sampler => wgpu::BindingType::Sampler,
|
|
||||||
BindType::StorageTexture { dimension } => wgpu::BindingType::StorageTexture {
|
|
||||||
dimension: (*dimension).into(),
|
|
||||||
},
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
@ -3,7 +3,7 @@ use crate::{
|
|||||||
render::{
|
render::{
|
||||||
pass::{LoadOp, StoreOp},
|
pass::{LoadOp, StoreOp},
|
||||||
pipeline::{
|
pipeline::{
|
||||||
InputStepMode, VertexAttributeDescriptor, VertexBufferDescriptor, VertexFormat,
|
InputStepMode, VertexAttributeDescriptor, VertexBufferDescriptor, VertexFormat, BindType
|
||||||
},
|
},
|
||||||
render_resource::BufferUsage,
|
render_resource::BufferUsage,
|
||||||
},
|
},
|
||||||
@ -131,3 +131,29 @@ impl From<StoreOp> for wgpu::StoreOp {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
impl From<&BindType> for wgpu::BindingType {
|
||||||
|
fn from(bind_type: &BindType) -> Self {
|
||||||
|
match bind_type {
|
||||||
|
BindType::Uniform {
|
||||||
|
dynamic,
|
||||||
|
properties: _,
|
||||||
|
} => wgpu::BindingType::UniformBuffer { dynamic: *dynamic },
|
||||||
|
BindType::Buffer { dynamic, readonly } => wgpu::BindingType::StorageBuffer {
|
||||||
|
dynamic: *dynamic,
|
||||||
|
readonly: *readonly,
|
||||||
|
},
|
||||||
|
BindType::SampledTexture {
|
||||||
|
dimension,
|
||||||
|
multisampled,
|
||||||
|
} => wgpu::BindingType::SampledTexture {
|
||||||
|
dimension: (*dimension).into(),
|
||||||
|
multisampled: *multisampled,
|
||||||
|
},
|
||||||
|
BindType::Sampler => wgpu::BindingType::Sampler,
|
||||||
|
BindType::StorageTexture { dimension } => wgpu::BindingType::StorageTexture {
|
||||||
|
dimension: (*dimension).into(),
|
||||||
|
},
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user