diff options
author | RĂ©mi Verschelde <remi@verschelde.fr> | 2021-11-08 13:39:39 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-11-08 13:39:39 +0100 |
commit | e87687a6d0bd052d282b0645b7fff47c5559c981 (patch) | |
tree | 088dfb41f984caefac2031eeec86d0d05fcd3523 /servers | |
parent | 63559f2c80e29231596aec9cee4de79139584373 (diff) | |
parent | 151d2e34caff77b9b2ffcadea1e4fa0a7ddd450c (diff) |
Merge pull request #54486 from ibrahn/thread-work-pool-lazier
Diffstat (limited to 'servers')
-rw-r--r-- | servers/physics_2d/godot_step_2d.cpp | 6 | ||||
-rw-r--r-- | servers/physics_3d/godot_step_3d.cpp | 6 |
2 files changed, 2 insertions, 10 deletions
diff --git a/servers/physics_2d/godot_step_2d.cpp b/servers/physics_2d/godot_step_2d.cpp index 3010315571..84ec0e3c63 100644 --- a/servers/physics_2d/godot_step_2d.cpp +++ b/servers/physics_2d/godot_step_2d.cpp @@ -255,11 +255,7 @@ void GodotStep2D::step(GodotSpace2D *p_space, real_t p_delta, int p_iterations) // Warning: _solve_island modifies the constraint islands for optimization purpose, // their content is not reliable after these calls and shouldn't be used anymore. - if (island_count > 1) { - work_pool.do_work(island_count, this, &GodotStep2D::_solve_island, nullptr); - } else if (island_count > 0) { - _solve_island(0); - } + work_pool.do_work(island_count, this, &GodotStep2D::_solve_island, nullptr); { //profile profile_endtime = OS::get_singleton()->get_ticks_usec(); diff --git a/servers/physics_3d/godot_step_3d.cpp b/servers/physics_3d/godot_step_3d.cpp index a8654c617b..331d65df49 100644 --- a/servers/physics_3d/godot_step_3d.cpp +++ b/servers/physics_3d/godot_step_3d.cpp @@ -359,11 +359,7 @@ void GodotStep3D::step(GodotSpace3D *p_space, real_t p_delta, int p_iterations) // Warning: _solve_island modifies the constraint islands for optimization purpose, // their content is not reliable after these calls and shouldn't be used anymore. - if (island_count > 1) { - work_pool.do_work(island_count, this, &GodotStep3D::_solve_island, nullptr); - } else if (island_count > 0) { - _solve_island(0); - } + work_pool.do_work(island_count, this, &GodotStep3D::_solve_island, nullptr); { //profile profile_endtime = OS::get_singleton()->get_ticks_usec(); |