Changeset View
Changeset View
Standalone View
Standalone View
source/blender/depsgraph/intern/eval/deg_eval.cc
| Show First 20 Lines • Show All 202 Lines • ▼ Show 20 Lines | else { | ||||
| pool, deg_task_run_func, node, false, TASK_PRIORITY_HIGH, thread_id); | pool, deg_task_run_func, node, false, TASK_PRIORITY_HIGH, thread_id); | ||||
| } | } | ||||
| } | } | ||||
| } | } | ||||
| static void schedule_graph(TaskPool *pool, Depsgraph *graph) | static void schedule_graph(TaskPool *pool, Depsgraph *graph) | ||||
| { | { | ||||
| for (OperationNode *node : graph->operations) { | for (OperationNode *node : graph->operations) { | ||||
| schedule_node(pool, graph, node, false, 0); | schedule_node(pool, graph, node, false, -1); | ||||
brecht: This seems like an unrelated change? | |||||
sergeyAuthorUnsubmitted Not Done Inline ActionsThis is very first commit in the series: Depsgraph: Don't use push-from-thread when scheduling graph This isn't guaranteed that graph is scheduled from main thread, so it is actually a miracle how it all worked. Noticed an assert failure when following the steps from T70660. sergey: This is very first commit in the series:
Depsgraph: Don't use push-from-thread when… | |||||
| } | } | ||||
| } | } | ||||
| static void schedule_children(TaskPool *pool, | static void schedule_children(TaskPool *pool, | ||||
| Depsgraph *graph, | Depsgraph *graph, | ||||
| OperationNode *node, | OperationNode *node, | ||||
| const int thread_id) | const int thread_id) | ||||
| { | { | ||||
| Show All 32 Lines | |||||
| void deg_evaluate_on_refresh(Depsgraph *graph) | void deg_evaluate_on_refresh(Depsgraph *graph) | ||||
| { | { | ||||
| /* Nothing to update, early out. */ | /* Nothing to update, early out. */ | ||||
| if (BLI_gset_len(graph->entry_tags) == 0) { | if (BLI_gset_len(graph->entry_tags) == 0) { | ||||
| return; | return; | ||||
| } | } | ||||
| const bool do_time_debug = ((G.debug & G_DEBUG_DEPSGRAPH_TIME) != 0); | const bool do_time_debug = ((G.debug & G_DEBUG_DEPSGRAPH_TIME) != 0); | ||||
| const double start_time = do_time_debug ? PIL_check_seconds_timer() : 0; | const double start_time = do_time_debug ? PIL_check_seconds_timer() : 0; | ||||
| graph->debug_is_evaluating = true; | graph->is_evaluating = true; | ||||
| depsgraph_ensure_view_layer(graph); | depsgraph_ensure_view_layer(graph); | ||||
| /* Set up evaluation state. */ | /* Set up evaluation state. */ | ||||
| DepsgraphEvalState state; | DepsgraphEvalState state; | ||||
| state.graph = graph; | state.graph = graph; | ||||
| state.do_stats = do_time_debug; | state.do_stats = do_time_debug; | ||||
| /* Set up task scheduler and pull for threaded evaluation. */ | /* Set up task scheduler and pull for threaded evaluation. */ | ||||
| TaskScheduler *task_scheduler; | TaskScheduler *task_scheduler; | ||||
| bool need_free_scheduler; | bool need_free_scheduler; | ||||
| Show All 24 Lines | void deg_evaluate_on_refresh(Depsgraph *graph) | ||||
| if (state.do_stats) { | if (state.do_stats) { | ||||
| deg_eval_stats_aggregate(graph); | deg_eval_stats_aggregate(graph); | ||||
| } | } | ||||
| /* Clear any uncleared tags - just in case. */ | /* Clear any uncleared tags - just in case. */ | ||||
| deg_graph_clear_tags(graph); | deg_graph_clear_tags(graph); | ||||
| if (need_free_scheduler) { | if (need_free_scheduler) { | ||||
| BLI_task_scheduler_free(task_scheduler); | BLI_task_scheduler_free(task_scheduler); | ||||
| } | } | ||||
| graph->debug_is_evaluating = false; | graph->is_evaluating = false; | ||||
| if (do_time_debug) { | if (do_time_debug) { | ||||
| printf("Depsgraph updated in %f seconds.\n", PIL_check_seconds_timer() - start_time); | printf("Depsgraph updated in %f seconds.\n", PIL_check_seconds_timer() - start_time); | ||||
| } | } | ||||
| } | } | ||||
| } // namespace DEG | } // namespace DEG | ||||
This seems like an unrelated change?