Merge branch 'master' into blender2.8
[blender.git] / source / blender / depsgraph / intern / eval / deg_eval_flush.cc
index c3b1f56a71b02bdde5d7d6e83fc7434b848ed4a4..74c3cd28455fac68b486dc4ad99df7412c925877 100644 (file)
@@ -100,7 +100,7 @@ BLI_INLINE void flush_prepare(Depsgraph *graph)
                const int num_operations = graph->operations.size();
                ParallelRangeSettings settings;
                BLI_parallel_range_settings_defaults(&settings);
-               settings.use_threading = (num_operations > 256);
+               settings.min_iter_per_thread = 1024;
                BLI_task_parallel_range(0, num_operations,
                                        graph,
                                        flush_init_operation_node_func,
@@ -110,7 +110,7 @@ BLI_INLINE void flush_prepare(Depsgraph *graph)
                const int num_id_nodes = graph->id_nodes.size();
                ParallelRangeSettings settings;
                BLI_parallel_range_settings_defaults(&settings);
-               settings.use_threading = (num_id_nodes > 256);
+               settings.min_iter_per_thread = 1024;
                BLI_task_parallel_range(0, num_id_nodes,
                                        graph,
                                        flush_init_id_node_func,
@@ -310,10 +310,9 @@ void deg_graph_clear_tags(Depsgraph *graph)
 {
        /* Go over all operation nodes, clearing tags. */
        const int num_operations = graph->operations.size();
-       const bool do_threads = num_operations > 256;
        ParallelRangeSettings settings;
        BLI_parallel_range_settings_defaults(&settings);
-       settings.use_threading = do_threads;
+       settings.min_iter_per_thread = 1024;
        BLI_task_parallel_range(0, num_operations,
                                graph,
                                graph_clear_func,