Jim Blandy 92953cf50f Bug 1752869: Handle invalid BindGroupLayouts better. r=jgilbert
Arrange for passing an invalid `BindGroupLayout` to `CreatePipelineLayout` or
`CreateBindGroup` to produce an invalid `PipelineLayout`/`BindGroup`, instead of
trying to pass the `BindGroupLayout`'s bogus `RawId` (which is zero) over to the
GPU process, causing a panic in deserialization (thank you, Rust!).

Arrange for a `PipelineLayout` constructed with a zero `RawId` to mark itself
invalid, as most other WebGPU content objects do. This permits
`WebGPUChild::DeviceCreatePipelineLayout` to return zero if the descriptor is
invalid.

Differential Revision: https://phabricator.services.mozilla.com/D145036
2022-04-29 00:31:20 +00:00
..