bevy/crates
James Liu eaeba0866d Parallelized transform propagation (#4775)
# Objective
Fixes #4697. Hierarchical propagation of properties, currently only Transform -> GlobalTransform, can be a very expensive operation. Transform propagation is a strict dependency for anything positioned in world-space. In large worlds, this can take quite a bit of time, so limiting it to a single thread can result in poor CPU utilization as it bottlenecks the rest of the frame's systems.

## Solution

 - Move transforms without a parent or a child (free-floating (Global)Transform) entities into a separate parallel system.
 - Chunk the hierarchy based on the root entities and process it in parallel with `Query::par_for_each_mut`. 
 - Utilize the hierarchy's specific properties introduced in #4717 to allow for safe use of `Query::get_unchecked` on multiple threads. Assuming each child is unique in the hierarchy, it is impossible to have an aliased `&mut GlobalTransform` so long as we verify that the parent for a child is the same one propagated from.

---

## Changelog
Removed: `transform_propagate_system` is no longer `pub`.
2022-11-21 18:18:38 +00:00
..
bevy_animation Release 0.9.0 (#6568) 2022-11-12 20:01:29 +00:00
bevy_app Release 0.9.0 (#6568) 2022-11-12 20:01:29 +00:00
bevy_asset Derive clone and debug for AssetPlugin (#6583) 2022-11-14 23:08:26 +00:00
bevy_audio Release 0.9.0 (#6568) 2022-11-12 20:01:29 +00:00
bevy_core The update_frame_count system should be placed in CorePlugin (#6676) 2022-11-21 13:19:41 +00:00
bevy_core_pipeline ExtractComponent output optional associated type (#6699) 2022-11-21 13:19:44 +00:00
bevy_derive Release 0.9.0 (#6568) 2022-11-12 20:01:29 +00:00
bevy_diagnostic Release 0.9.0 (#6568) 2022-11-12 20:01:29 +00:00
bevy_dylib Release 0.9.0 (#6568) 2022-11-12 20:01:29 +00:00
bevy_dynamic_plugin Release 0.9.0 (#6568) 2022-11-12 20:01:29 +00:00
bevy_ecs Fix PipeSystem panicking with exclusive systems (#6698) 2022-11-21 14:23:21 +00:00
bevy_ecs_compile_fail_tests Fix trybuild tests broken by rust 1.65 (#6457) 2022-11-03 15:09:27 +00:00
bevy_encase_derive Release 0.9.0 (#6568) 2022-11-12 20:01:29 +00:00
bevy_gilrs Bump gilrs version to 0.10 (#6558) 2022-11-15 20:31:17 +00:00
bevy_gltf Release 0.9.0 (#6568) 2022-11-12 20:01:29 +00:00
bevy_hierarchy bevy_scene: Add missing registration for SmallVec<[Entity; 8]> (#6578) 2022-11-14 23:08:23 +00:00
bevy_input Correct docs for ButtonSettingsError to read 0.0..=1.0 (#6570) 2022-11-12 22:59:49 +00:00
bevy_internal add span to winit event handler (#6612) 2022-11-14 23:08:31 +00:00
bevy_log Release 0.9.0 (#6568) 2022-11-12 20:01:29 +00:00
bevy_macro_utils Release 0.9.0 (#6568) 2022-11-12 20:01:29 +00:00
bevy_math Release 0.9.0 (#6568) 2022-11-12 20:01:29 +00:00
bevy_mikktspace Release 0.9.0 (#6568) 2022-11-12 20:01:29 +00:00
bevy_pbr Release 0.9.0 (#6568) 2022-11-12 20:01:29 +00:00
bevy_ptr Add safe constructors for untyped pointers Ptr and PtrMut (#6539) 2022-11-14 22:53:50 +00:00
bevy_reflect Add safe constructors for untyped pointers Ptr and PtrMut (#6539) 2022-11-14 22:53:50 +00:00
bevy_render ExtractComponent output optional associated type (#6699) 2022-11-21 13:19:44 +00:00
bevy_scene Make spawn_dynamic return InstanceId (#6663) 2022-11-18 21:16:31 +00:00
bevy_sprite wasm: pad globals uniform also in 2d (#6643) 2022-11-18 21:02:56 +00:00
bevy_tasks Fix panicking on another scope (#6524) 2022-11-21 12:59:08 +00:00
bevy_text Release 0.9.0 (#6568) 2022-11-12 20:01:29 +00:00
bevy_time Update old docs from Timer (#6646) 2022-11-18 20:42:33 +00:00
bevy_transform Parallelized transform propagation (#4775) 2022-11-21 18:18:38 +00:00
bevy_ui ExtractComponent output optional associated type (#6699) 2022-11-21 13:19:44 +00:00
bevy_utils Release 0.9.0 (#6568) 2022-11-12 20:01:29 +00:00
bevy_window Expose set_cursor_hittest() from winit (#6664) 2022-11-21 12:59:10 +00:00
bevy_winit Expose set_cursor_hittest() from winit (#6664) 2022-11-21 12:59:10 +00:00