diff options
author | Jacques Lucke <jacques@blender.org> | 2021-12-27 19:20:54 +0300 |
---|---|---|
committer | Jacques Lucke <jacques@blender.org> | 2021-12-27 19:21:09 +0300 |
commit | 644e6c7a3e99ae1d43edb25a7d4c3ed86727faba (patch) | |
tree | c14ade2c6daed541d6aa85c15b65376fd136baf3 /source | |
parent | eed45d2a239a2a18a2420ba15dfb55e0f8dc5630 (diff) |
Fix T93941: geometry proximity breaks with high resolution mesh
The calls to `.fill` were overwriting indices that are processed by
other threads.
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/nodes/geometry/nodes/node_geo_proximity.cc | 6 |
1 files changed, 3 insertions, 3 deletions
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; } |