[Bf-blender-cvs] [644e6c7a3e9] master: Fix T93941: geometry proximity breaks with high resolution mesh

Jacques Lucke noreply at git.blender.org
Mon Dec 27 17:24:03 CET 2021


Commit: 644e6c7a3e99ae1d43edb25a7d4c3ed86727faba
Author: Jacques Lucke
Date:   Mon Dec 27 17:20:54 2021 +0100
Branches: master
https://developer.blender.org/rB644e6c7a3e99ae1d43edb25a7d4c3ed86727faba

Fix T93941: geometry proximity breaks with high resolution mesh

The calls to `.fill` were overwriting indices that are processed by
other threads.

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

M	source/blender/nodes/geometry/nodes/node_geo_proximity.cc

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

diff --git a/source/blender/nodes/geometry/nodes/node_geo_proximity.cc b/source/blender/nodes/geometry/nodes/node_geo_proximity.cc
index 45086918ef4..49be56acd16 100644
--- a/source/blender/nodes/geometry/nodes/node_geo_proximity.cc
+++ b/source/blender/nodes/geometry/nodes/node_geo_proximity.cc
@@ -177,7 +177,7 @@ class ProximityFunction : public fn::MultiFunction {
      * comparison per vertex, so it's likely not worth it. */
     MutableSpan<float> distances = params.uninitialized_single_output<float>(2, "Distance");
 
-    distances.fill(FLT_MAX);
+    distances.fill_indices(mask, FLT_MAX);
 
     bool success = false;
     if (target_.has_mesh()) {
@@ -191,8 +191,8 @@ class ProximityFunction : public fn::MultiFunction {
     }
 
     if (!success) {
-      positions.fill(float3(0));
-      distances.fill(0.0f);
+      positions.fill_indices(mask, float3(0));
+      distances.fill_indices(mask, 0.0f);
       return;
     }



More information about the Bf-blender-cvs mailing list