Bind group and layout entries should be optional
Spec:
- https://gpuweb.github.io/gpuweb/#gpubindingcommandsmixin-setbindgroup
- https://www.w3.org/TR/webgpu/#dom-gpupipelinelayoutdescriptor-bindgrouplayouts
Bind group layouts and bind groups should be nullable, which in Rust parlance means we should take an Option of them. This lets app authors “unset” a bind group at an index.
It's unclear what the underlying platform APIs' expectations are around removing bindgroups, so we're going to need to investigate this a bit before we can tell how much work it will be.
Relevant spec PR: https://github.com/gpuweb/gpuweb/pull/3938
this got fixed in
- https://github.com/gfx-rs/wgpu/pull/6216
ah I spoke too soon, HAL doesn't handle this yet it seems?
Note that this should include optional PipelineLayoutDescriptor::bind_group_layouts.
ETA: Folded into OP.
Firefox downstream tracking: bug 1992771
Also discussed in #1489. (I am not going to mark a duplicate right now because there is some discussion in both issues that might be worth consolidating.)