Remove unnecessary count parameter in bind layout uniform entries

This commit is contained in:
Jarrod Doyle 2023-06-29 11:27:24 +01:00
parent fdd4cbde9c
commit d8ba20d06e
Signed by: Jayrude
GPG Key ID: 38B57B16E7C0ADF7
2 changed files with 4 additions and 8 deletions

View File

@ -38,11 +38,7 @@ impl<'a> BindGroupLayoutBuilder<'a> {
} }
#[inline] #[inline]
pub fn with_uniform_entry( pub fn with_uniform_entry(self, visibility: wgpu::ShaderStages) -> Self {
self,
visibility: wgpu::ShaderStages,
count: Option<NonZeroU32>,
) -> Self {
self.with_entry( self.with_entry(
visibility, visibility,
wgpu::BindingType::Buffer { wgpu::BindingType::Buffer {
@ -50,7 +46,7 @@ impl<'a> BindGroupLayoutBuilder<'a> {
has_dynamic_offset: false, has_dynamic_offset: false,
min_binding_size: None, min_binding_size: None,
}, },
count, None,
) )
} }

View File

@ -77,12 +77,12 @@ impl VoxelRenderer {
}, },
None, None,
) )
.with_uniform_entry(wgpu::ShaderStages::COMPUTE, None) .with_uniform_entry(wgpu::ShaderStages::COMPUTE)
.with_rw_storage_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_ro_storage_entry(wgpu::ShaderStages::COMPUTE) .with_ro_storage_entry(wgpu::ShaderStages::COMPUTE)
.with_rw_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); .build(context);
let raycast_bind_group = render::BindGroupBuilder::new() let raycast_bind_group = render::BindGroupBuilder::new()
.with_layout(&raycast_layout) .with_layout(&raycast_layout)