540: Add serialization to more types r=kvark a=HeroesGrave
With these changes, pretty much everything in wgpu-types can be serialized with the exception of BufferDescriptor, CommandEncoderDescriptor, and TextureDescriptor which contain a `*const c_char`.
Options for dealing with those:
- Leave these types as not de/serializable
- Skip when serializing, deserialize as nullptr
- Serialize as a string, deserialize as nullptr
AFAICT there's not really a way to allow a full roundtrip for these fields because nul-terminated strings don't play nicely with serde. Maybe it could serialize as a byte array?
Co-authored-by: HeroesGrave <heroesgrave@gmail.com>
Helps when attempting to support multiple samplers in an immediate mode
context (e.g. easily compare sampler descriptors and check if I need to
add a command to switch bind groups).