diff --git a/src/render/renderer/renderers/wgpu_renderer/wgpu_renderer.rs b/src/render/renderer/renderers/wgpu_renderer/wgpu_renderer.rs index c2bb4b3b88..fe26f1ed45 100644 --- a/src/render/renderer/renderers/wgpu_renderer/wgpu_renderer.rs +++ b/src/render/renderer/renderers/wgpu_renderer/wgpu_renderer.rs @@ -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(), - }, - } - } -} +} \ No newline at end of file diff --git a/src/render/renderer/renderers/wgpu_renderer/wgpu_type_converter.rs b/src/render/renderer/renderers/wgpu_renderer/wgpu_type_converter.rs index c317d0e427..0ffc199080 100644 --- a/src/render/renderer/renderers/wgpu_renderer/wgpu_type_converter.rs +++ b/src/render/renderer/renderers/wgpu_renderer/wgpu_type_converter.rs @@ -3,7 +3,7 @@ use crate::{ render::{ pass::{LoadOp, StoreOp}, pipeline::{ - InputStepMode, VertexAttributeDescriptor, VertexBufferDescriptor, VertexFormat, + InputStepMode, VertexAttributeDescriptor, VertexBufferDescriptor, VertexFormat, BindType }, render_resource::BufferUsage, }, @@ -131,3 +131,29 @@ impl From 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(), + }, + } + } +} \ No newline at end of file