1023: Drop surfaces and adapters r=cwfitzgerald a=kvark
**Connections**
Not very connected
**Description**
Refactors our destruction paths a bit
**Testing**
tested on wgpu-rs
Co-authored-by: Dzmitry Malyshau <kvarkus@gmail.com>
1008: Add helpers to convert passes to serialized forms r=grovesNL a=kvark
**Connections**
Stuff I needed to fix in the upcoming Gecko WebGPU update.
**Description**
It allows us to use the tracing `Command` more aggressively.
**Testing**
Tested in Gecko, doesn't need testing in wgpu
Co-authored-by: Dzmitry Malyshau <dmalyshau@mozilla.com>
Co-authored-by: Dzmitry Malyshau <kvark@fastmail.com>
1000: Elide redundant set_pipeline calls. r=kvark a=Kimundi
**Description**
This adds an check in each `set_pipeline()` call for wether the same pipeline id has already been set previously. This should cause free performance wins for suboptimal usage of the wgpu API, while having neglible overhead otherwise.
An example scenario for where this would be useful is a game that just blindly sets all render state for each object, but has few actually different objects:
```rust
for game_obj in game_objs {
rpass.set_pipeline(...);
rpass.set_bind_group(...);
rpass.set_vertex_buffer(...);
rpass.draw(...);
}
```
**Testing**
Ideally we would have tests that check that pipeline changes have been ellided, but I'm not sure how to write them in the current codebase.
**Future work**
- We could extend this kind of redundant state change detection to most `.set_*` methods on `RenderPass`es.
- If we want to guarantee this behavior in the API, we should also document it.
Co-authored-by: Marvin Löbel <loebel.marvin@gmail.com>
982: Fix debug markers in render passes (#981) r=kvark a=kazimuth
Hey, that was easy. Didn't change anything in the debug groups markers / command pass markers, since afaict they work correctly.
I didn't add a test here because I'm not sure how to use the `player` testing apparatus, but I figure since I'm just adding a line of code that's already there for compute passes ([here](https://github.com/gfx-rs/wgpu/blob/master/wgpu-core/src/command/compute.rs#L452)) it should be alright. Let me know if there's anything else I should add.
Co-authored-by: James Gilles <jameshgilles@gmail.com>
966: Immediate resource destruction and freeing r=cwfitzgerald a=kvark
**Connections**
Fixes#964
**Description**
We are making it so a buffer or a texture can have their native resources freed while they are still referenced, so without waiting for GC.
In addition, the PR adds a few missing cases where error IDs should have been handled, like at render pass encoding.
**Testing**
Tested on wgpu-rs examples, see https://github.com/gfx-rs/wgpu-rs/pull/591
Co-authored-by: Dzmitry Malyshau <kvarkus@gmail.com>
* Pass [u8] instead of [u32] for push constants
Use 2-instruction aligner
Fixed alignment
Fixed offsets
Added alignment checks and fixed size
Use semantic constants
* Replaced all magic number with constant
* Fixed type cast