Label the command encoder of the `RenderContext`
- Dominant language
- Rust
- Stars
- 48.2k
- Forks
- 4.8k
- Avg merge
- 3d 22h
- Merged PRs (30d)
- 161
Description
## What problem does this solve or what need does it fill?
The command encoder of `RenderContext` doesn't have any debug label. This makes debugging on Metal quite painful because the top-level items are command encoder in the debug view, and the various other labelled items (_e.g._ compute or render pass) are collapsed children. At a glance you end up with a list of 10+ unlabelled command encoder, and you have to figure out which are from Bevy, which from wgpu itself, and which others (_e.g._ from Hanabi).
## What solution would you like?
It's slightly annoying because `RenderContext::command_encoder()` lazily creates the command encoder so it's not clear when exactly it's created and by who (probably by Bevy itself). But at least if it had a standard Bevy-related name, that would help a bit.
## What alternative(s) have you considered?
There's no way to label it after creation I believe.
It looks like Bevy is naming its internal encoders, by creating them explicitly from within `ViewNode::run()` instead of calling `RenderContext::command_encoder()`, so despite the fact that the `RenderContext` has already a command encoder which, from the look of the API, feels like it's the one you should be using. It's unclear why Bevy doesn't use the existing command encoder, and I don't think it's documented. If that's the way to go, I can use that in Hanabi too, but it would be nice to explain it somewhere.

Contributor guide
Assessment
This issue has not been assessed yet.