Merge pull request #69286 from dzil123/add_null_check_bake_step_function
GPUParticlesCollisionSDF3D add null `bake_step_function` check
This commit is contained in:
commit
7b18bf7bbd
1 changed files with 3 additions and 1 deletions
|
@ -347,8 +347,10 @@ void GPUParticlesCollisionSDF3D::_compute_sdf(ComputeSDFParams *params) {
|
||||||
WorkerThreadPool::GroupID group_task = WorkerThreadPool::get_singleton()->add_template_group_task(this, &GPUParticlesCollisionSDF3D::_compute_sdf_z, params, params->size.z);
|
WorkerThreadPool::GroupID group_task = WorkerThreadPool::get_singleton()->add_template_group_task(this, &GPUParticlesCollisionSDF3D::_compute_sdf_z, params, params->size.z);
|
||||||
while (!WorkerThreadPool::get_singleton()->is_group_task_completed(group_task)) {
|
while (!WorkerThreadPool::get_singleton()->is_group_task_completed(group_task)) {
|
||||||
OS::get_singleton()->delay_usec(10000);
|
OS::get_singleton()->delay_usec(10000);
|
||||||
|
if (bake_step_function) {
|
||||||
bake_step_function(WorkerThreadPool::get_singleton()->get_group_processed_element_count(group_task) * 100 / params->size.z, "Baking SDF");
|
bake_step_function(WorkerThreadPool::get_singleton()->get_group_processed_element_count(group_task) * 100 / params->size.z, "Baking SDF");
|
||||||
}
|
}
|
||||||
|
}
|
||||||
WorkerThreadPool::get_singleton()->wait_for_group_task_completion(group_task);
|
WorkerThreadPool::get_singleton()->wait_for_group_task_completion(group_task);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue