bevy/crates/bevy_render/src
Brandon Reinhart 2d2ea337dd add a debug label to storage buffers (#5341)
# Objective

- Expose the wgpu debug label on storage buffer types.

## Solution

🐄

- Add an optional cow static string and pass that to the label field of create_buffer_with_data
- This pattern is already used by Bevy for debug tags on bind group and layout descriptors.

---

Example Usage:

A buffer is given a label using the label function. Alternatively a buffer may be labeled when it is created if the default() convention is not used.
![ray_buf](https://user-images.githubusercontent.com/106117615/179366494-f037bd8c-4d65-4b37-8135-01ac0c5c8ee0.png)

Here is the buffer appearing with the correct name in RenderDoc. Previously the buffer would have an anonymous name such as "Buffer223":
![buffer_named](https://user-images.githubusercontent.com/106117615/179366552-faeb6c27-5373-4e4e-a0e2-c04446f95a4b.png)



Co-authored-by: rebelroad-reinhart <reinhart@rebelroad.gg>
2022-07-28 20:37:49 +00:00
..
camera update wgpu to 0.13 (#5168) 2022-07-14 21:17:16 +00:00
color Very minor doc formatting changes (#5287) 2022-07-12 13:06:16 +00:00
mesh Improve ergonomics and reduce boilerplate around creating text elements. (#5343) 2022-07-20 14:14:29 +00:00
primitives Very minor doc formatting changes (#5287) 2022-07-12 13:06:16 +00:00
render_graph Camera Driven Rendering (#4745) 2022-06-02 00:12:17 +00:00
render_phase Fix various typos (#5417) 2022-07-21 20:46:54 +00:00
render_resource add a debug label to storage buffers (#5341) 2022-07-28 20:37:49 +00:00
renderer Fix various typos (#5417) 2022-07-21 20:46:54 +00:00
texture ImageSampler linear/nearest constructors (#5466) 2022-07-27 06:49:37 +00:00
view Recalculate entity aabbs when meshes change (#4944) 2022-07-20 07:05:29 +00:00
extract_component.rs Visibilty Inheritance, universal ComputedVisibility and RenderLayers support (#5310) 2022-07-15 23:24:42 +00:00
extract_param.rs Make RenderStage::Extract run on the render world (#4402) 2022-07-08 23:56:33 +00:00
extract_resource.rs remove an unused import in release (#5320) 2022-07-14 23:43:57 +00:00
lib.rs add a SpatialBundle with visibility and transform components (#5344) 2022-07-18 23:27:30 +00:00
rangefinder.rs Very minor doc formatting changes (#5287) 2022-07-12 13:06:16 +00:00
render_asset.rs Fix various typos (#5417) 2022-07-21 20:46:54 +00:00
settings.rs Add some docs about lowspec rendering (#5091) 2022-06-25 16:22:28 +00:00
spatial_bundle.rs add a SpatialBundle with visibility and transform components (#5344) 2022-07-18 23:27:30 +00:00