[Bf-blender-cvs] [c937f9c4e76] master: Cycles: fix another race condition in Geometry synchronization

Kévin Dietrich noreply at git.blender.org
Wed Nov 4 16:35:27 CET 2020


Commit: c937f9c4e76c04cc245775d39cd2684e65515863
Author: Kévin Dietrich
Date:   Wed Nov 4 16:29:06 2020 +0100
Branches: master
https://developer.blender.org/rBc937f9c4e76c04cc245775d39cd2684e65515863

Cycles: fix another race condition in Geometry synchronization

This was forgotten in the previous fix, we should not modify sockets
updated in a separated thread.

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

M	intern/cycles/blender/blender_curves.cpp
M	intern/cycles/blender/blender_mesh.cpp

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

diff --git a/intern/cycles/blender/blender_curves.cpp b/intern/cycles/blender/blender_curves.cpp
index 9070c093492..40f7a8c8c11 100644
--- a/intern/cycles/blender/blender_curves.cpp
+++ b/intern/cycles/blender/blender_curves.cpp
@@ -848,7 +848,7 @@ void BlenderSync::sync_hair(BL::Depsgraph b_depsgraph, BL::Object b_ob, Hair *ha
 
   for (const SocketType &socket : new_hair.type->inputs) {
     /* Those sockets are updated in sync_object, so do not modify them. */
-    if (socket.name == "use_motion_blur" || socket.name == "motion_steps") {
+    if (socket.name == "use_motion_blur" || socket.name == "motion_steps" || socket.name == "used_shaders") {
       continue;
     }
     hair->set_value(socket, new_hair, socket);
diff --git a/intern/cycles/blender/blender_mesh.cpp b/intern/cycles/blender/blender_mesh.cpp
index d84433ecd27..e87d87419d0 100644
--- a/intern/cycles/blender/blender_mesh.cpp
+++ b/intern/cycles/blender/blender_mesh.cpp
@@ -1065,7 +1065,7 @@ void BlenderSync::sync_mesh(BL::Depsgraph b_depsgraph, BL::Object b_ob, Mesh *me
 
   for (const SocketType &socket : new_mesh.type->inputs) {
     /* Those sockets are updated in sync_object, so do not modify them. */
-    if (socket.name == "use_motion_blur" || socket.name == "motion_steps") {
+    if (socket.name == "use_motion_blur" || socket.name == "motion_steps" || socket.name == "used_shaders") {
       continue;
     }
     mesh->set_value(socket, new_mesh, socket);



More information about the Bf-blender-cvs mailing list