From 361702f239528803260ba966d4174b8601e90a53 Mon Sep 17 00:00:00 2001 From: Jagannadhan Ravi Date: Fri, 7 Jan 2022 11:31:02 +0100 Subject: Fix T94310: Blender doesn't support with 128 threads well in Win11 Query TBB for the maximum allowed concurrency, which is free from a bug in own concurrency detection code. One thing to keep in mind is that now Cycles is limited by the number of threads in the TBB areana from which Session is created. This isn't a problem for Blender since we do not limit arena on Blender side. Could be something to watch out for in other Cycles integrations. Differential Revision: https://developer.blender.org/D13658 --- intern/cycles/util/task.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'intern/cycles/util') diff --git a/intern/cycles/util/task.cpp b/intern/cycles/util/task.cpp index ce61bf8d6c4..eeccbaf1c44 100644 --- a/intern/cycles/util/task.cpp +++ b/intern/cycles/util/task.cpp @@ -89,7 +89,7 @@ void TaskScheduler::init(int num_threads) active_num_threads = num_threads; } else { - active_num_threads = system_cpu_thread_count(); + active_num_threads = tbb::this_task_arena::max_concurrency(); } } -- cgit v1.2.3