838: wait for buffer to be done in the player r=cwfitzgerald a=kvark
**Connections**
Fixes our code enough to replay #834 without issues. Doesn't help to solve the original problem though.
**Description**
There are two things in here:
1. don't deduplicate the BGLs if we are not generating new IDs at this layer. This helps Servo/Gecko/player. cc @kunalmohan
2. have an option in `buffer_destroy` to *actually* kill it, at the cost of blocking on GPU sometimes. This is required for the player, since the very next command may try to reuse the ID.
**Testing**
Tested on the trace in #834
Co-authored-by: Dzmitry Malyshau <kvarkus@gmail.com>
* Replace &[T] in descriptor structs with Cow<[T]>
* Changed label fields to use Cow<'a, str>
* Deduplicate types across the tracing API
Introduce the ToStatic trait
* Deduplicate trace::RenderBundleDescriptor
* Remove ugly ToOwned bounds
* Simplifiy Action variants
* Make Clone bounds on type defs less verbose
* Fix a error in play.rs
* Remove ToStatic, and Make Action<'a> borrow descriptors instead
813: Add buffer creation error type r=kvark a=GabrielMajeri
**Connections**
Part of #638
**Description**
Adds an error type for the buffer creation functions.
**Testing**
Checked with core and ran test on player.
Co-authored-by: Gabriel Majeri <gabriel.majeri6@gmail.com>
812: Error type for `WaitIdle` r=kvark a=GabrielMajeri
**Connections**
Part of #638
**Description**
Adds an error type for the `wait_idle` function.
**Testing**
Checked with core.
Co-authored-by: Gabriel Majeri <gabriel.majeri6@gmail.com>
773: Error handling for data transfer API r=kvark a=GabrielMajeri
**Connections**
Work on the error model described in #376
**Description**
Removes assertions from the transfer functions, instead returning a custom error type.
**Testing**
Checked with `player` and `wgpu-rs`: https://github.com/gfx-rs/wgpu-rs/pull/430
Co-authored-by: Gabriel Majeri <gabriel.majeri6@gmail.com>
763: Remove raw pointers from the render pipelines API r=kvark a=GabrielMajeri
**Connections**
Rust-ification of API, as part of #689
**Description**
The objective is to get rid of raw pointers in the render pipeline descriptor and associated structures.
**Testing**
Checked with `player` and the `trace` feature, and with `wgpu-rs` with the changes in https://github.com/gfx-rs/wgpu-rs/pull/425
Co-authored-by: Gabriel Majeri <gabriel.majeri6@gmail.com>
739: Remove Peek-Poke r=cwfitzgerald a=kvark
**Connections**
Related to https://github.com/gfx-rs/wgpu/issues/738
Related to https://github.com/djg/peek-poke/issues/10
**Description**
As of #726 , the buffers have a minimum binding size that has to include the shader struct size. It, therefore, can't be zero.
We can remove the hacks we had previously and switch fully to the idiomatic `Option<NonZeroU64>`.
Peek-poke doesn't `NonZeroU64` and friends, so this made me reconsider the user of it entirely. Today, render bundles as well as the Player already represent command streams using a much rustier method. I tried to move everything to this method now, and I think this is going to work much better, and safer.
**Testing**
wgpu-rs works - https://github.com/gfx-rs/wgpu-rs/pull/396
Co-authored-by: Dzmitry Malyshau <kvarkus@gmail.com>
There was a lot of highly unsafe use of serialization based on peek-poke that we
weren't entirely happy with. It's replaced by just serializing the passes now.
Also, switch BufferSize to Option<NonZero>.