845: Finish error model refactor r=kvark a=GabrielMajeri
**Connections**
I think this is the last part of #638. I've reviewed all the remaining `unwrap`s and `assert`s in the code, and these should be the last ones left which ought to return errors (the remaining ones seem to uphold internal invariants).
**Description**
Implements error handling for various conditions, which are then returned to the caller. Including, but not limited to:
- running out of memory when creating a command pool
- running out of memory when creating a frame buffer for a render pass
- invalid dimensions when creating a texture
**Testing**
Tested with core and player.
Co-authored-by: Gabriel Majeri <gabriel.majeri6@gmail.com>
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>
839: Fix push constant pipeline invalidation r=kvark a=cwfitzgerald
**Connections**
Fixes#821
**Description**
We need to invalidate everything if push constants change. This code is kinda ugly but this is try three and it's the least terrible I got.
**Testing**
Pinging @Wumpf :)
Co-authored-by: Connor Fitzgerald <connorwadefitzgerald@gmail.com>
832: Return errors from device functions r=kvark a=GabrielMajeri
**Connections**
Part of #638
**Description**
Lots of changes, but they should be easily reviewable commit-by-commit.
- Error types for most of the fallible resource creation errors in `device/mod.rs`
- Removed assertions and replaced them with error types
- All of the `BufferMap`, `BufferNotMapped` etc. errors were united in a single `BufferAccessError`, since it was pretty weird to have so many overlapping error types.
- Removed all `unwrap`s of `gfx-hal` errors - they are now returned to the caller.
**Testing**
Checked with core and tested with `wgpu-rs` (see https://github.com/gfx-rs/wgpu-rs/pull/469)
Co-authored-by: Gabriel Majeri <gabriel.majeri6@gmail.com>
833: Switch pipeline flag to mutation of depth/stencil r=startoaster a=kvark
**Connections**
Reported on the matrix
**Description**
If the pass mutates depth/stencil, but the pipeline doesn't, it's not a bug!
**Testing**
on it...
Co-authored-by: Dzmitry Malyshau <kvarkus@gmail.com>
831: Carry RefCount in future suspects in order to prevent early removal r=cwfitzgerald a=kvark
**Connections**
Fixes #830
**Description**
see https://github.com/gfx-rs/wgpu/issues/830#issuecomment-662825775
**Testing**
Tested on harmony + Sponza
Co-authored-by: Dzmitry Malyshau <kvarkus@gmail.com>
825: Add depth clamping support r=cwfitzgerald a=kvark
**Connections**
Implements https://github.com/gpuweb/gpuweb/pull/900
**Description**
Depth clamping is useful for shadow mapping and stuff. We'd want to use it in our `shadow` example.
**Testing**
Untested, should work though :)
Co-authored-by: Dzmitry Malyshau <dmalyshau@mozilla.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