-
-
Notifications
You must be signed in to change notification settings - Fork 21.4k
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
Reads from VisualServer causing unnecessary sync #64094
Comments
This was fixed in 4.x by #76859, but a backport would be a good idea for 3.x |
I can look at backporting this to 3.x |
Feel free to open a pull request against the |
@Calinou Should be able to get one up pretty soon, but noticed that gpu_particles_3d.cpp/h and gpu_particles_2d.cpp/h don't exist on 3.x, meaning the back port will really just be deleting a string. Is this expected change we want? Or do we want replace the 3.x particles.cpp/h with the new gpu versions? |
These are called |
Sweet, moved the changes over by hand. Set up pr here: #81559 |
Beginner here, want to help out. Is this issue fixed and just waiting to be reviewed in #81559? |
I see the issue is fixed both in 3.x and 4.x, shouldn't this issue be marked as completed? |
Godot version
3.5 stable, 4.0 alpha 13
System information
All
Issue description
This is just a reminder issue that we discovered today that some functions being called in VisualServer (
gets
) are potentially causing stalls in 3.x and 4.x. In general reading back data is discouraged except for the editor, and for one-off type operations like creating RIDs etc.The example we found was #14971 which reduz says should not have been merged. We should instead be using something like
call_deferred
orVisualServerCallbacks
to deferred return the result / signal without stalling.The problematic function is:
The pattern of having something that could be read back every tick / frame is problematic. There may be several of these causing problems, e.g. also:
There may be several of these we should convert to using deferred calls or alternative mechanisms where possible.
Steps to reproduce
Add a
ParticleSystem2D
with one shot mode, set to multithreaded renderer, and compile engine with#define DEBUG_SYNC
.Output is:
Minimal reproduction project
N/A
Discussion
These tend to be added in PRs by contributors who are not familiar with the command queue and separation between scene side and servers. Perhaps we could increase the documentation in the code in this area and have some policies on how to approach such problems.
The text was updated successfully, but these errors were encountered: