diff options
author | Alexander Gavrilov <angavrilov@gmail.com> | 2018-12-03 15:22:19 +0300 |
---|---|---|
committer | Alexander Gavrilov <angavrilov@gmail.com> | 2018-12-03 17:01:02 +0300 |
commit | 1983a52e04eb0b0a8a71d66a1bb2f316f1326d90 (patch) | |
tree | 032e4d5d6909af1c21a7fc7abdb2b67911a32412 /source/blender/depsgraph/intern/depsgraph.cc | |
parent | 764e937d1a77b99d384a729700a08ef6fbe7bfac (diff) |
Depsgraph: assert that mesh_get_eval_final/deform aren't used in eval.
Using those functions during multithreaded evaluation is a sure
way to have a race condition and crash.
Diffstat (limited to 'source/blender/depsgraph/intern/depsgraph.cc')
-rw-r--r-- | source/blender/depsgraph/intern/depsgraph.cc | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/source/blender/depsgraph/intern/depsgraph.cc b/source/blender/depsgraph/intern/depsgraph.cc index 6dd7ae97073..664d30fdaf6 100644 --- a/source/blender/depsgraph/intern/depsgraph.cc +++ b/source/blender/depsgraph/intern/depsgraph.cc @@ -94,7 +94,8 @@ Depsgraph::Depsgraph(Scene *scene, mode(mode), ctime(BKE_scene_frame_get(scene)), scene_cow(NULL), - is_active(false) + is_active(false), + debug_is_evaluating(false) { BLI_spin_init(&lock); id_hash = BLI_ghash_ptr_new("Depsgraph id hash"); @@ -645,6 +646,13 @@ void DEG_make_inactive(struct Depsgraph *depsgraph) /* Evaluation and debug */ +bool DEG_debug_is_evaluating(struct Depsgraph *depsgraph) +{ + DEG::Depsgraph *deg_graph = + reinterpret_cast<DEG::Depsgraph *>(depsgraph); + return deg_graph->debug_is_evaluating; +} + static DEG::string depsgraph_name_for_logging(struct Depsgraph *depsgraph) { const char *name = DEG_debug_name_get(depsgraph); |