Replace the wgpu_trace
feature with a field in bevy_render::settings::WgpuSettings
#14842
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Objective
wgpu_trace
feature while still making it easy/possible to record wgpu traces for debugging.Solution
This PR performs the above objective by removing the
wgpu_trace
feature from allCargo.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 atrace_path
field, so that all of Bevy's automatic initialization can happen while still allowing for tracing.Testing
cargo run -p ci
. I am hoping the Github Actions workflows will catch anything I missed.docs/debugging.md
) section on WGPU Tracing.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
bevy/wgpu_trace
,bevy_render/wgpu_trace
, andbevy_internal/wgpu_trace
features no longer exist. Remove them from yourCargo.toml
, CI, tooling, and what-not.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.