Is your feature request related to a problem? Please describe.
Sometimes it is convenient to "skip" bind groups in a pipeline (see gpuweb/gpuweb#2043). PiplineLayoutDescriptor::bind_group_layouts does not allow skipping bind groups. The corresponding WebGPU type GPUPipelineLayoutDescriptor enables this by allowing null elements in bindGroupLayouts.
Describe the solution you'd like
Change the type of PipelineLayoutDescriptor::bind_group_layouts to &'a [Option<&'a BindGroupLayout>]. The semantics of None values should be the same as null in WebGPU.
Describe alternatives you've considered
What already works is supplying an "empty" bind group layout (without any entries) where a None is desired in the pipeline layout descriptor, and setting an "empty" bind group (without any entries) in the render pass.
Additional context
WebGPU has allowed null in GPUPipelineLayoutDescriptor.bindGroupLayouts since the Working Draft, 5 November 2024.
Is your feature request related to a problem? Please describe.
Sometimes it is convenient to "skip" bind groups in a pipeline (see gpuweb/gpuweb#2043).
PiplineLayoutDescriptor::bind_group_layoutsdoes not allow skipping bind groups. The corresponding WebGPU typeGPUPipelineLayoutDescriptorenables this by allowingnullelements inbindGroupLayouts.Describe the solution you'd like
Change the type of
PipelineLayoutDescriptor::bind_group_layoutsto&'a [Option<&'a BindGroupLayout>]. The semantics ofNonevalues should be the same asnullin WebGPU.Describe alternatives you've considered
What already works is supplying an "empty" bind group layout (without any entries) where a
Noneis desired in the pipeline layout descriptor, and setting an "empty" bind group (without any entries) in the render pass.Additional context
WebGPU has allowed
nullinGPUPipelineLayoutDescriptor.bindGroupLayoutssince the Working Draft, 5 November 2024.