From d8ba20d06eddaaca3a533a3be56cda0ad5af8210 Mon Sep 17 00:00:00 2001 From: Jarrod Doyle Date: Thu, 29 Jun 2023 11:27:24 +0100 Subject: [PATCH] Remove unnecessary count parameter in bind layout uniform entries --- src/render/bind_group.rs | 8 ++------ src/voxel/voxel_renderer.rs | 4 ++-- 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/src/render/bind_group.rs b/src/render/bind_group.rs index 4d3dd55..ba1b213 100644 --- a/src/render/bind_group.rs +++ b/src/render/bind_group.rs @@ -38,11 +38,7 @@ impl<'a> BindGroupLayoutBuilder<'a> { } #[inline] - pub fn with_uniform_entry( - self, - visibility: wgpu::ShaderStages, - count: Option, - ) -> Self { + pub fn with_uniform_entry(self, visibility: wgpu::ShaderStages) -> Self { self.with_entry( visibility, wgpu::BindingType::Buffer { @@ -50,7 +46,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 93aaaac..606be4c 100644 --- a/src/voxel/voxel_renderer.rs +++ b/src/voxel/voxel_renderer.rs @@ -77,12 +77,12 @@ impl VoxelRenderer { }, None, ) - .with_uniform_entry(wgpu::ShaderStages::COMPUTE, None) + .with_uniform_entry(wgpu::ShaderStages::COMPUTE) .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) + .with_uniform_entry(wgpu::ShaderStages::COMPUTE) .build(context); let raycast_bind_group = render::BindGroupBuilder::new() .with_layout(&raycast_layout)