Fix PBVH parallel range not initializing user data correctly in some cases

This was already changed for the TBB-based BLI_task_parallel_range in master.
This task local storage should always be initialized from the template, not
copied from another task which may be executing at the time the copy happens.

This may not fix any actual bug, we only use this user data for parallel reduce
and it's not clear that TBB ever calls the copy constructor for that case.

Ref T76858
This commit is contained in:
Brecht Van Lommel 2020-05-19 22:44:51 +02:00
parent 8d63d7337c
commit 59cfb20fa1
Notes: blender-bot 2023-02-14 06:42:54 +01:00
Referenced by issue #76858, Threading issue in sculpt mode
1 changed files with 1 additions and 1 deletions

View File

@ -49,7 +49,7 @@ struct PBVHTask {
PBVHTask(const PBVHTask &other)
: func(other.func), userdata(other.userdata), settings(other.settings)
{
init_chunk(other.userdata_chunk);
init_chunk(settings->userdata_chunk);
}
/* Splitting constructor for parallel reduce. */