-
-
Notifications
You must be signed in to change notification settings - Fork 3.9k
Bubble sync points if ignore_deferred
, do not ignore if target system is exclusive
#17880
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
Bubble sync points if ignore_deferred
, do not ignore if target system is exclusive
#17880
Conversation
…gnore-prior-exclusive-systems
Tagging @hymm as the original author of the modified file. 👋 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd like the tests to be more explicit about what the final inferred schedule looks like, and why that schedule is correct.
As in doing more assertions on the schedule's internal values or adding more comments? Btw I think there is some other problem to address. As it is now, bubbling a sync point further up means more than one sync point could be generated if there is more than one outgoing edge with each different distances. But that makes no sense, the original system that wants it's commands applied needs only one sync point. I try to think what to do here. Until then I put this one into draft again. |
More comments mostly :) I had a hard time following what the internal logic of the tests were, and why they were correct. |
…gnore-prior-exclusive-systems
I was unable to trigger any issues I assumed to be there so I decided to not change my approach. |
…gnore-prior-exclusive-systems
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great change!
…gnore-prior-exclusive-systems
…gnore-prior-exclusive-systems
Merged @andriyDev's changes into this PR. I must confess both our changes together make this hard to understand. I probably will try to make everything clearer, maybe with more comments, other variable names or such stuff. If someone has good ideas to make this more clear, please write them in a comment. 😃 EDIT: Done with my ideas, can be reviewed now |
…-exclusive-systems' of https://github.com/urben1680/bevy into bubble-sync-points-when-ignored-and-do-not-ignore-prior-exclusive-systems
Add more comments
…gnore-prior-exclusive-systems
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good test comments now! Thanks for tackling some cleanup work while you were here; I agree that this was getting quite tricky to follow 😅
Objective
Fixes #17828
This fixes two bugs:
*_ignore_deferred
which may lead to surprising situations. These configurations should not behave like that.*_ignore_deferred
is used, no sync point may be added at all after the config. Currently this can happen if the last nodes in that config have no deferred parameters themselves. Instead, sync points should always be added after such a config, so long systems have deferred parameters.Solution
AutoInsertApplyDeferredPass::no_sync_edges
if the target is an exclusive system.AutoInsertApplyDeferredPass::no_sync_edges
suppressed adding a sync point at the target node. Then, when the target node is evaluated later by the iteration and that prior suppression was the case, the target node will behave like it has deferred parameters even if the system itself does not.Testing
I added a test for each bug, please let me know if more are wanted and if yes, which cases you would want to see.
These tests also can be read as examples how the current code would fail.