From fdd4cbde9c30c9f4134fc11da9dd3e114215d15c Mon Sep 17 00:00:00 2001 From: Jarrod Doyle Date: Thu, 29 Jun 2023 11:26:11 +0100 Subject: [PATCH] Remove unnecessary count parameter in bind layout storage entries --- src/render/bind_group.rs | 16 ++++------------ src/voxel/voxel_renderer.rs | 8 ++++---- 2 files changed, 8 insertions(+), 16 deletions(-) diff --git a/src/render/bind_group.rs b/src/render/bind_group.rs index 82cb735..4d3dd55 100644 --- a/src/render/bind_group.rs +++ b/src/render/bind_group.rs @@ -55,11 +55,7 @@ impl<'a> BindGroupLayoutBuilder<'a> { } #[inline] - pub fn with_rw_storage_entry( - self, - visibility: wgpu::ShaderStages, - count: Option, - ) -> Self { + pub fn with_rw_storage_entry(self, visibility: wgpu::ShaderStages) -> Self { self.with_entry( visibility, wgpu::BindingType::Buffer { @@ -67,16 +63,12 @@ impl<'a> BindGroupLayoutBuilder<'a> { has_dynamic_offset: false, min_binding_size: None, }, - count, + None, ) } #[inline] - pub fn with_ro_storage_entry( - self, - visibility: wgpu::ShaderStages, - count: Option, - ) -> Self { + pub fn with_ro_storage_entry(self, visibility: wgpu::ShaderStages) -> Self { self.with_entry( visibility, wgpu::BindingType::Buffer { @@ -84,7 +76,7 @@ impl<'a> BindGroupLayoutBuilder<'a> { has_dynamic_offset: false, min_binding_size: None, }, - count, + None, ) } diff --git a/src/voxel/voxel_renderer.rs b/src/voxel/voxel_renderer.rs index aa7e7d9..93aaaac 100644 --- a/src/voxel/voxel_renderer.rs +++ b/src/voxel/voxel_renderer.rs @@ -78,10 +78,10 @@ impl VoxelRenderer { None, ) .with_uniform_entry(wgpu::ShaderStages::COMPUTE, None) - .with_rw_storage_entry(wgpu::ShaderStages::COMPUTE, None) - .with_ro_storage_entry(wgpu::ShaderStages::COMPUTE, None) - .with_ro_storage_entry(wgpu::ShaderStages::COMPUTE, None) - .with_rw_storage_entry(wgpu::ShaderStages::COMPUTE, None) + .with_rw_storage_entry(wgpu::ShaderStages::COMPUTE) + .with_ro_storage_entry(wgpu::ShaderStages::COMPUTE) + .with_ro_storage_entry(wgpu::ShaderStages::COMPUTE) + .with_rw_storage_entry(wgpu::ShaderStages::COMPUTE) .with_uniform_entry(wgpu::ShaderStages::COMPUTE, None) .build(context); let raycast_bind_group = render::BindGroupBuilder::new()