[Bf-blender-cvs] [128aa7f3b09] blender-v3.2-release: Geometry Nodes: Fix Assert in Duplicate Elements
Johnny Matthews
noreply at git.blender.org
Mon Jun 6 18:13:14 CEST 2022
Commit: 128aa7f3b09802f325c151a921ac50c01c04b6e1
Author: Johnny Matthews
Date: Mon Jun 6 11:10:27 2022 -0500
Branches: blender-v3.2-release
https://developer.blender.org/rB128aa7f3b09802f325c151a921ac50c01c04b6e1
Geometry Nodes: Fix Assert in Duplicate Elements
The original assert did not take into account the offset size in the loop being -1. The tests were then run in non-debug mode, so while the mesh regressions still passed, the false positive asserts that happened were not caught.
Differential Revision: https://developer.blender.org/D15136
===================================================================
M source/blender/nodes/geometry/nodes/node_geo_duplicate_elements.cc
===================================================================
diff --git a/source/blender/nodes/geometry/nodes/node_geo_duplicate_elements.cc b/source/blender/nodes/geometry/nodes/node_geo_duplicate_elements.cc
index 4730109f3e3..555bb689582 100644
--- a/source/blender/nodes/geometry/nodes/node_geo_duplicate_elements.cc
+++ b/source/blender/nodes/geometry/nodes/node_geo_duplicate_elements.cc
@@ -98,7 +98,7 @@ static void threaded_slice_fill(Span<int> offsets,
MutableSpan<T> dst)
{
BLI_assert(offsets.last() == dst.size());
- BLI_assert(selection.size() == offsets.size());
+ BLI_assert(selection.size() == offsets.size() - 1);
threading::parallel_for(IndexRange(offsets.size() - 1), 512, [&](IndexRange range) {
for (const int i : range) {
dst.slice(range_for_offsets_index(offsets, i)).fill(src[selection[i]]);
More information about the Bf-blender-cvs
mailing list