740: First Phase of Tracing Transition r=kvark a=cwfitzgerald
## Connections
First step in the implementation of #491. https://github.com/gfx-rs/wgpu-rs/pull/395
## Description
This adds the tracing crate, implements a tracing "layer" for chrome tracing, and instruments every entrypoint into wgpu.
Tracing is added as a main dependency. A feature is added called `subscriber` which guards the tracing and default logger implementation, as that adds 3 dependencies.
The main macro is there to make creating a span a simple one line process. This macro will come in useful in the next couple stages. Use of this macro is used unqualified with it imported into scope as that style allows IntelliJ ides to actually find the macro.
I also removed a really annoying warning that was driving me crazy.
This PR does not make sure the logging output from tracing is up to snuff, that will be done when logging output and conversion is the priority.
Both commits should compile individually, so shouldn't need to be squashed.
## Testing
This PR was tested with the wgpu-rs PR on various examples, as well as my personal project.
Co-authored-by: Connor Fitzgerald <connorwadefitzgerald@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>.
735: Set descriptor set name when creating bind group r=kvark a=GabrielMajeri
**Description**
There is a [`TODO` in the code](a02a566841/wgpu-core/src/device/mod.rs (L1428)) for setting the descriptor set name when creating a bind group. It was blocked on https://github.com/gfx-rs/gfx-extras/pull/5
**Testing**
Tested with examples from `wgpu-rs`.
Co-authored-by: Gabriel Majeri <gabriel.majeri6@gmail.com>
PowerPreference::Default will now prefer discrete GPUs
when on AC power and will prefer integrated GPUs while
on battery power (i.e. the battery is discharging).