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

Tracking issue: eliminate or explicitly silence all Bevy-internal execution order ambiguities #4377

Closed
11 tasks
alice-i-cecile opened this issue Mar 31, 2022 · 2 comments
Labels
A-ECS Entities, components, systems, and events A-Rendering Drawing game state to the screen C-Bug An unexpected or incorrect behavior C-Code-Quality A section of code that is hard to understand or change C-Tracking-Issue An issue that collects information about a broad development initiative

Comments

@alice-i-cecile
Copy link
Member

alice-i-cecile commented Mar 31, 2022

@alfonsolage and I have made the system execution order ambiguity detector significantly more user-friendly in #4299.

As a result, I think it's now worth pushing towards internal determinism as a goal (for the reasons laid out in #2480).

At the time of writing, there are 54 pairs of ambiguities (full list in next comment), split across two stages: CoreStage::PostUpdate and RenderStage::Extract. These are most usefully divided into true positives (which represent genuine bugs and require explicit ordering) and false positives (which should either be explicitly ignored or have their data access tweaked).

True positives

  • flex_node_system conflicts with parent_update_system on ["Children"]
  • ui_z_system conflicts with parent_update_system on ["Children"]
  • camera_system<OrthographicProjection> conflicts with assign_lights_to_clusters on ["Camera"]
  • camera_system<OrthographicProjection> conflicts with update_frusta<OrthographicProjection> on ["OrthographicProjection"]
  • assign_lights_to_clusters conflicts with various update_frusta systems on ["Frustum"]
  • check_visibility conflicts with update_directional_light_frusta on ["Frustum"]

False positives

  • change_window, play_queued_audio_system<AudioSource> and add_clusters
  • text_system, image_node_system, camera_system, text_2d_system: clashing on Assets<Image>
    • we don't really care what order those run in.
  • camera_system<OrthographicProjection> conflicts with camera_system<PerspectiveProjection> on ["Camera"] (and the same for update_frustra)
    • these queries should be disjoint
  • extract_cameras and extract_lights conflict on VisibleEntities
    • this seems to just want stricter query filtering
  • many extraction systems conflict on RenderWorld
    • extract_sprites, extract_clear_color, extract_cameras, extract_windows, extract_uinodes, extract_shaders, extract_text_uinodes, extract_text2dsprite, extract_sprite_events
    • these all seem to have disjoint data access, but because it's within a subworld, we can't represent this to the scheduler correctly
    • [Merged by Bors] - Make RenderStage::Extract run on the render world #4402 should help address this, even though it's not the main goal
@alice-i-cecile alice-i-cecile added C-Bug An unexpected or incorrect behavior C-Code-Quality A section of code that is hard to understand or change C-Tracking-Issue An issue that collects information about a broad development initiative A-Rendering Drawing game state to the screen A-ECS Entities, components, systems, and events labels Mar 31, 2022
@JoJoJet
Copy link
Member

JoJoJet commented Dec 15, 2022

What's the state of this issue? I think most of these points have been resolved by now.

@alice-i-cecile
Copy link
Member Author

Yep I'm calling this resolved.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-ECS Entities, components, systems, and events A-Rendering Drawing game state to the screen C-Bug An unexpected or incorrect behavior C-Code-Quality A section of code that is hard to understand or change C-Tracking-Issue An issue that collects information about a broad development initiative
Projects
None yet
Development

No branches or pull requests

2 participants