Closed Swoorup closed 3 months ago
We should probably provide a min_binding_size for uniform buffer when generating the Bind Group Layout Descriptor.
min_binding_size
wgpu::BindGroupLayoutEntry { binding: 0, visibility: wgpu::ShaderStages::VERTEX | wgpu::ShaderStages::FRAGMENT, ty: wgpu::BindingType::Buffer { ty: wgpu::BufferBindingType::Uniform, has_dynamic_offset: false, min_binding_size: NonZeroU64::new(std::mem::size_of::<gpu_data::BatchUniformBuffer>() as _), }, count: None, }
Comment from the man himself: https://matrix.to/#/!FZyQrssSlHEZqrYcOb:matrix.org/$8OeoKDnC8ZI4SDsAd0oXHiWRmSxhT-TWgctUYWmffKY?via=matrix.org&via=mozilla.org&via=envs.net
For binding layout entries, also might be useful to generate comments for each layout entry. This helps especially when correlating large number of bindings.
We should probably provide a
min_binding_size
for uniform buffer when generating the Bind Group Layout Descriptor.