Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Parallel Transform Propagation #17840

Merged
merged 39 commits into from
Feb 23, 2025
Merged
Show file tree
Hide file tree
Changes from 17 commits
Commits
Show all changes
39 commits
Select commit Hold shift + click to select a range
55ae4f6
parallel hierarchy propagation
aevyrie Feb 10, 2025
c2c20dc
Update comments
aevyrie Feb 10, 2025
032b869
Remove extra tracing
aevyrie Feb 10, 2025
e57ab7a
Tweak stack and chunking
aevyrie Feb 10, 2025
640b375
reduce transform derefs
aevyrie Feb 12, 2025
b9c74d1
mpsc queue transform prop
aevyrie Feb 13, 2025
c3af3dd
Merge remote-tracking branch 'origin/main' into parallel-transform
aevyrie Feb 13, 2025
b33088e
Fix lints
aevyrie Feb 13, 2025
5b5f256
Clean up most egregious issues.
aevyrie Feb 13, 2025
e89c2a4
Factor out unsafe code
aevyrie Feb 13, 2025
b108d0f
More factoring and comments
aevyrie Feb 13, 2025
e65f972
Pass hierarchy tests
aevyrie Feb 13, 2025
7be8c3c
Fix docs
aevyrie Feb 13, 2025
f54f2aa
Code cleanup
aevyrie Feb 14, 2025
ce29222
Improve safety justification
aevyrie Feb 14, 2025
ea7d217
factor batch sending
aevyrie Feb 14, 2025
f9826c5
Add perf note
aevyrie Feb 15, 2025
eee890f
Add single-entity-chain optimization
aevyrie Feb 15, 2025
3515c10
move bevy_log behind std flag
aevyrie Feb 15, 2025
b1c3367
Refactor to (hopefully) support `no_std`
aevyrie Feb 15, 2025
86dbed7
Flail wildly in an attempt to appease the feature flag demons.
aevyrie Feb 15, 2025
f5a0f0d
Expose executors to match existing crates
aevyrie Feb 15, 2025
9124929
naming consistency
aevyrie Feb 15, 2025
fa02db4
idk man feature flags suck
aevyrie Feb 16, 2025
f34caf7
add critical-section for no_std
aevyrie Feb 16, 2025
8f29725
add missed critical-section
aevyrie Feb 16, 2025
b0ba64a
Fix doc link
aevyrie Feb 16, 2025
73546c0
Fix up docs
aevyrie Feb 16, 2025
5688850
Depth first local traversal withing tasks
aevyrie Feb 17, 2025
264ac88
Clean up docs and field access
aevyrie Feb 17, 2025
d7c03ab
replace unbounded loop with for
aevyrie Feb 17, 2025
ea155b3
Merge branch 'main' into parallel-transform
aevyrie Feb 17, 2025
eda641e
Review feedback, profiling tweaks, and refactors.
aevyrie Feb 17, 2025
b6e9012
Review feedback doc improvements
aevyrie Feb 18, 2025
af378db
review feedback
aevyrie Feb 19, 2025
66c9f10
review feedback
aevyrie Feb 20, 2025
48ef711
Add comment about ambiguous transform systems
aevyrie Feb 20, 2025
8869402
Merge branch 'main' into parallel-transform
alice-i-cecile Feb 23, 2025
1158d40
Merge branch 'main' into parallel-transform
mockersf Feb 23, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions crates/bevy_transform/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,11 @@ keywords = ["bevy"]
# bevy
bevy_app = { path = "../bevy_app", version = "0.16.0-dev", default-features = false, optional = true }
bevy_ecs = { path = "../bevy_ecs", version = "0.16.0-dev", default-features = false, optional = true }
bevy_log = { path = "../bevy_log", version = "0.16.0-dev", default-features = false }
bevy_math = { path = "../bevy_math", version = "0.16.0-dev", default-features = false }
bevy_reflect = { path = "../bevy_reflect", version = "0.16.0-dev", default-features = false, optional = true }
bevy_tasks = { path = "../bevy_tasks", version = "0.16.0-dev", default-features = false }
bevy_utils = { path = "../bevy_utils", version = "0.16.0-dev", default-features = false }
serde = { version = "1", default-features = false, features = [
"derive",
], optional = true }
Expand Down
33 changes: 17 additions & 16 deletions crates/bevy_transform/src/plugins.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
use crate::systems::{propagate_transforms, sync_simple_transforms};
use crate::systems::{
compute_transform_leaves, propagate_parent_transforms, sync_simple_transforms,
};
use bevy_app::{App, Plugin, PostStartup, PostUpdate};
use bevy_ecs::schedule::{IntoSystemConfigs, IntoSystemSetConfigs, SystemSet};

Expand Down Expand Up @@ -31,28 +33,27 @@ impl Plugin for TransformPlugin {
// add transform systems to startup so the first update is "correct"
.add_systems(
PostStartup,
(
sync_simple_transforms
.in_set(TransformSystem::TransformPropagate)
// FIXME: https://github.com/bevyengine/bevy/issues/4381
// These systems cannot access the same entities,
// due to subtle query filtering that is not yet correctly computed in the ambiguity detector
.ambiguous_with(PropagateTransformsSet),
propagate_transforms.in_set(PropagateTransformsSet),
),
((
sync_simple_transforms,
propagate_parent_transforms,
compute_transform_leaves,
)
.chain()
.in_set(PropagateTransformsSet),),
)
.configure_sets(
PostUpdate,
PropagateTransformsSet.in_set(TransformSystem::TransformPropagate),
)
.add_systems(
PostUpdate,
(
sync_simple_transforms
.in_set(TransformSystem::TransformPropagate)
.ambiguous_with(PropagateTransformsSet),
propagate_transforms.in_set(PropagateTransformsSet),
),
((
sync_simple_transforms,
propagate_parent_transforms,
compute_transform_leaves,
)
.chain()
.in_set(PropagateTransformsSet),),
);
}
}
Loading
Loading