Commit graph

9 commits

Author SHA1 Message Date
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
Daniel McNab
3a20462d3f Useful changes with relicensing benefits (#2497)
This obsoletes #1111 and #2445, since @ColonisationCaptain and @temhotaokeaha haven't replied to #2373.

I believe that both of those PRs would be fine to keep, but they're even more fine to keep now :)
2021-07-17 21:59:31 +00:00
MGlolenstine
23fcdfae56
Grammar correction (#856)
* Grammar correction
* Adjust for cart's personal taste

Co-authored-by: Carter Anderson <mcanders1@gmail.com>
2020-11-15 11:33:21 -08:00
CGMossa
58eb7e7e05
Documenting small things here and there.. (#706)
Documenting small things here and there..
2020-10-21 15:57:03 -07:00
Carter Anderson
7db4821287 add more tracing docs 2020-08-16 01:26:42 -07:00
Carter Anderson
9e1a1d15ea Add wgpu trace docs 2020-08-16 01:21:37 -07:00
Zicklag
968fdbba9b
Add Note About Cargo Expand Pager 2020-08-12 19:22:01 -05:00
Zicklag
4977837fad
Add Cargo Expand to Macro Debugging Tips 2020-08-12 19:18:26 -05:00
Carter Anderson
8a10c06ad5 add texture to frag shader. fix weird macro name collision bug 2020-02-18 20:26:02 -08:00