diff options
| author | Juan Linietsky <juan@godotengine.org> | 2021-03-24 20:44:13 -0300 |
|---|---|---|
| committer | reduz <reduzio@gmail.com> | 2021-04-19 14:12:22 -0300 |
| commit | 2b730cad902196e081debfb47c2e3d7ecb472b81 (patch) | |
| tree | eb7c7cba55a36012adec07f3846d7e34295980ae /scene | |
| parent | 29775a1714d01f35570ef708d24a1cde77aa1a5a (diff) | |
| download | redot-engine-2b730cad902196e081debfb47c2e3d7ecb472b81.tar.gz | |
Use multiple threads to import.
- For now everything imports multithreaded by default (should work I guess, let's test).
- Controllable per importer
Early test benchmark. 64 large textures (importing as lossless, _not_ as vram) on a mobile i7, 12 threads:
Importing goes down from 46 to 7 seconds.
For VRAM I will change the logic to use a compressing thread in a subsequent PR, as well as implementing Betsy.
Diffstat (limited to 'scene')
| -rw-r--r-- | scene/3d/gpu_particles_collision_3d.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/scene/3d/gpu_particles_collision_3d.cpp b/scene/3d/gpu_particles_collision_3d.cpp index 97241be60f..628b823f89 100644 --- a/scene/3d/gpu_particles_collision_3d.cpp +++ b/scene/3d/gpu_particles_collision_3d.cpp @@ -346,7 +346,7 @@ void GPUParticlesCollisionSDF::_compute_sdf(ComputeSDFParams *params) { ThreadWorkPool work_pool; work_pool.init(); work_pool.begin_work(params->size.z, this, &GPUParticlesCollisionSDF::_compute_sdf_z, params); - while (work_pool.get_work_index() < (uint32_t)params->size.z) { + while (!work_pool.is_done_dispatching()) { OS::get_singleton()->delay_usec(10000); bake_step_function(work_pool.get_work_index() * 100 / params->size.z, "Baking SDF"); } |
