bevy/crates/bevy_render/src
MichiRecRoom 94d40d206e
Replace the wgpu_trace feature with a field in bevy_render::settings::WgpuSettings (#14842)
# Objective
- Remove the `wgpu_trace` feature while still making it easy/possible to
record wgpu traces for debugging.
- Close #14725.
- Get a taste of the bevy codebase. :P

## Solution
This PR performs the above objective by removing the `wgpu_trace`
feature from all `Cargo.toml` files.

However, wgpu traces are still useful for debugging - but to record
them, you need to pass in a directory path to store the traces in. To
avoid forcing users into manually creating the renderer,
`bevy_render::settings::WgpuSettings` now has a `trace_path` field, so
that all of Bevy's automatic initialization can happen while still
allowing for tracing.

## Testing
- Did you test these changes? If so, how?
- I have tested these changes, but only via running `cargo run -p ci`. I
am hoping the Github Actions workflows will catch anything I missed.
- Are there any parts that need more testing?
  - I do not believe so.
- How can other people (reviewers) test your changes? Is there anything
specific they need to know?
- If you want to test these changes, I have updated the debugging guide
(`docs/debugging.md`) section on WGPU Tracing.
- If relevant, what platforms did you test these changes on, and are
there any important ones you can't test?
- I ran the above command on a Windows 10 64-bit (x64) machine, using
the `stable-x86_64-pc-windows-msvc` toolchain. I do not have anything
set up for other platforms or targets (though I can't imagine this needs
testing on other platforms).

---

## Migration Guide

1. The `bevy/wgpu_trace`, `bevy_render/wgpu_trace`, and
`bevy_internal/wgpu_trace` features no longer exist. Remove them from
your `Cargo.toml`, CI, tooling, and what-not.
2. Follow the instructions in the updated `docs/debugging.md` file in
the repository, under the WGPU Tracing section.

Because of the changes made, you can now generate traces to any path,
rather than the hardcoded `%WorkspaceRoot%/wgpu_trace` (where
`%WorkspaceRoot%` is... the root of your crate's workspace) folder.

(If WGPU hasn't restored tracing functionality...) Do note that WGPU has
not yet restored tracing functionality. However, once it does, the above
should be sufficient to generate new traces.

---------

Co-authored-by: TrialDragon <31419708+TrialDragon@users.noreply.github.com>
2024-08-25 14:16:11 +00:00
..
batching View filter for batch_and_prepare_render_phase (#14713) 2024-08-12 16:15:54 +00:00
camera Add depth_ndc_to_view_z for cpu-side (#14590) 2024-08-02 15:37:29 +00:00
diagnostic Wgpu 0.20 (#13186) 2024-06-14 18:39:31 +00:00
mesh Fix tiny seam in Annulus geometry. (#14913) 2024-08-25 14:11:58 +00:00
primitives Glam 0.28 update - adopted (#14613) 2024-08-06 01:28:00 +00:00
render_graph Don't ignore draw errors (#13240) 2024-07-22 19:22:30 +00:00
render_phase Apply unused_qualifications lint (#14828) 2024-08-21 12:29:33 +00:00
render_resource Apply unused_qualifications lint (#14828) 2024-08-21 12:29:33 +00:00
renderer Replace the wgpu_trace feature with a field in bevy_render::settings::WgpuSettings (#14842) 2024-08-25 14:16:11 +00:00
texture Apply unused_qualifications lint (#14828) 2024-08-21 12:29:33 +00:00
view Rewrite screenshots. (#14833) 2024-08-25 14:14:32 +00:00
alpha.rs Implement alpha to coverage (A2C) support. (#12970) 2024-04-15 20:37:52 +00:00
color_operations.wgsl move wgsl color operations from bevy_pbr to bevy_render (#13209) 2024-05-04 10:30:23 +00:00
extract_component.rs Fix some nightly Clippy lints (#12927) 2024-04-13 02:05:38 +00:00
extract_instances.rs Refactor App and SubApp internals for better separation (#9202) 2024-03-31 03:16:10 +00:00
extract_param.rs Enable the unsafe_op_in_unsafe_fn lint (#11591) 2024-01-28 23:18:11 +00:00
extract_resource.rs Add error when extract resource build fails (#4964) 2024-04-28 05:20:59 +00:00
globals.rs Refactor App and SubApp internals for better separation (#9202) 2024-03-31 03:16:10 +00:00
globals.wgsl Refactor Globals and View structs into separate shaders (#7512) 2023-02-11 17:55:18 +00:00
gpu_component_array_buffer.rs Refactor App and SubApp internals for better separation (#9202) 2024-03-31 03:16:10 +00:00
lib.rs Add RenderSet::FinalCleanup for World::clear_entities (#14764) 2024-08-15 18:48:43 +00:00
maths.wgsl add tonemapping LUT bindings for sprite and mesh2d pipelines (#13262) 2024-05-28 12:09:26 +00:00
pipelined_rendering.rs Fix lints introduced in Rust beta 1.80 (#13899) 2024-06-17 17:22:01 +00:00
render_asset.rs check sampler type in as_bind_group derives (#12637) 2024-08-21 01:41:31 +00:00
settings.rs Replace the wgpu_trace feature with a field in bevy_render::settings::WgpuSettings (#14842) 2024-08-25 14:16:11 +00:00
spatial_bundle.rs Clearer spatial bundle pub const docs (#14293) 2024-07-15 16:03:09 +00:00