Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJacques Lucke <jacques@blender.org>2021-06-08 10:37:45 +0300
committerJacques Lucke <jacques@blender.org>2021-06-08 11:39:33 +0300
commited1fc9d96bbac2ac3d4282400a9717e19e84211d (patch)
tree94892b3c1dd4a7be31124afa5084af4e165a97b6 /source/blender/gpencil_modifiers/intern/lineart/lineart_cpu.c
parent496045fc30f72be8d2ca32394ed233266f043152 (diff)
BLI: support disabling task isolation in task pool
Under some circumstances using task isolation can cause deadlocks. Previously, our task pool implementation would run all tasks in an isolated region. Now using task isolation is optional and can be turned on/off for individual task pools. Task pools that spawn new tasks recursively should never enable task isolation. There is a new check that finds these cases at runtime. Right now this check is disabled, so that this commit is a pure refactor. It will be enabled in an upcoming commit. This fixes T88598. Differential Revision: https://developer.blender.org/D11415
Diffstat (limited to 'source/blender/gpencil_modifiers/intern/lineart/lineart_cpu.c')
-rw-r--r--source/blender/gpencil_modifiers/intern/lineart/lineart_cpu.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/source/blender/gpencil_modifiers/intern/lineart/lineart_cpu.c b/source/blender/gpencil_modifiers/intern/lineart/lineart_cpu.c
index d623a553ab8..98b24be0d54 100644
--- a/source/blender/gpencil_modifiers/intern/lineart/lineart_cpu.c
+++ b/source/blender/gpencil_modifiers/intern/lineart/lineart_cpu.c
@@ -482,7 +482,7 @@ static void lineart_main_occlusion_begin(LineartRenderBuffer *rb)
rb->material.last = rb->material.first;
rb->edge_mark.last = rb->edge_mark.first;
- TaskPool *tp = BLI_task_pool_create(NULL, TASK_PRIORITY_HIGH);
+ TaskPool *tp = BLI_task_pool_create(NULL, TASK_PRIORITY_HIGH, TASK_ISOLATION_ON);
for (i = 0; i < thread_count; i++) {
rti[i].thread_id = i;
@@ -1987,7 +1987,7 @@ static void lineart_main_load_geometries(
}
DEG_OBJECT_ITER_END;
- TaskPool *tp = BLI_task_pool_create(NULL, TASK_PRIORITY_HIGH);
+ TaskPool *tp = BLI_task_pool_create(NULL, TASK_PRIORITY_HIGH, TASK_ISOLATION_ON);
for (int i = 0; i < thread_count; i++) {
olti[i].rb = rb;