[Bf-blender-cvs] [f13eb692692] master: Revert "Depsgraph: release GIL when evaluating the depsgraph"

Brecht Van Lommel noreply at git.blender.org
Thu Sep 9 19:20:07 CEST 2021


Commit: f13eb692692f9c622783a465e114c4e8c046782a
Author: Brecht Van Lommel
Date:   Thu Sep 9 19:16:18 2021 +0200
Branches: master
https://developer.blender.org/rBf13eb692692f9c622783a465e114c4e8c046782a

Revert "Depsgraph: release GIL when evaluating the depsgraph"

It is causing crashes in rendering, when releasing the GIL in render threads
while the main thread is holding it.

Ref T91046

This reverts commit fc460351170478e712740ae1917a2e24803eba3b.

===================================================================

M	source/blender/depsgraph/CMakeLists.txt
M	source/blender/depsgraph/intern/eval/deg_eval.cc

===================================================================

diff --git a/source/blender/depsgraph/CMakeLists.txt b/source/blender/depsgraph/CMakeLists.txt
index 41253117096..3ad26c6f4db 100644
--- a/source/blender/depsgraph/CMakeLists.txt
+++ b/source/blender/depsgraph/CMakeLists.txt
@@ -161,13 +161,6 @@ set(LIB
   bf_blenkernel
 )
 
-if(WITH_PYTHON)
-  add_definitions(-DWITH_PYTHON)
-  list(APPEND INC
-    ../python
-  )
-endif()
-
 blender_add_lib(bf_depsgraph "${SRC}" "${INC}" "${INC_SYS}" "${LIB}")
 
 if(WITH_GTESTS)
diff --git a/source/blender/depsgraph/intern/eval/deg_eval.cc b/source/blender/depsgraph/intern/eval/deg_eval.cc
index c816c7b8db5..ad88cf656ad 100644
--- a/source/blender/depsgraph/intern/eval/deg_eval.cc
+++ b/source/blender/depsgraph/intern/eval/deg_eval.cc
@@ -41,10 +41,6 @@
 #include "DEG_depsgraph.h"
 #include "DEG_depsgraph_query.h"
 
-#ifdef WITH_PYTHON
-#  include "BPY_extern.h"
-#endif
-
 #include "atomic_ops.h"
 
 #include "intern/depsgraph.h"
@@ -379,11 +375,6 @@ void deg_evaluate_on_refresh(Depsgraph *graph)
 
   graph->debug.begin_graph_evaluation();
 
-#ifdef WITH_PYTHON
-  /* Release the GIL so that Python drivers can be evaluated. See T91046. */
-  BPy_BEGIN_ALLOW_THREADS;
-#endif
-
   graph->is_evaluating = true;
   depsgraph_ensure_view_layer(graph);
   /* Set up evaluation state. */
@@ -424,10 +415,6 @@ void deg_evaluate_on_refresh(Depsgraph *graph)
   deg_graph_clear_tags(graph);
   graph->is_evaluating = false;
 
-#ifdef WITH_PYTHON
-  BPy_END_ALLOW_THREADS;
-#endif
-
   graph->debug.end_graph_evaluation();
 }



More information about the Bf-blender-cvs mailing list