From 5b2a6b6ebb7fb6116e6094eba4e9ae931d1a8934 Mon Sep 17 00:00:00 2001 From: Brecht Van Lommel Date: Fri, 29 Apr 2022 16:26:51 +0200 Subject: Fix T96880: viewport render animation hangs Blender Isolate frame writing task so that multithreaded image operations don't cause the thread to start writing another frame. If that happens we may reach the MAX_SCHEDULED_FRAMES limit, and cause the render thread and writing threads to deadlock waiting for each other. Additionally, don't set task priority to low because this may cause the task scheduler to be slow in scheduling the write and color management tasks. --- source/blender/imbuf/intern/imageprocess.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source/blender/imbuf') diff --git a/source/blender/imbuf/intern/imageprocess.c b/source/blender/imbuf/intern/imageprocess.c index 02a0c0189e0..ec25b67af5f 100644 --- a/source/blender/imbuf/intern/imageprocess.c +++ b/source/blender/imbuf/intern/imageprocess.c @@ -368,7 +368,7 @@ void IMB_processor_apply_threaded( int total_tasks = (buffer_lines + lines_per_task - 1) / lines_per_task; int i, start_line; - task_pool = BLI_task_pool_create(do_thread, TASK_PRIORITY_LOW); + task_pool = BLI_task_pool_create(do_thread, TASK_PRIORITY_HIGH); handles = MEM_callocN(handle_size * total_tasks, "processor apply threaded handles"); -- cgit v1.2.3