[Bf-blender-cvs] [55fbb0fd691] master: BM_mesh_intersect: Match the mesh in Debug build with Release
mano-wii
noreply at git.blender.org
Mon Jan 6 16:34:05 CET 2020
Commit: 55fbb0fd691e61745c0f3f9dc947155231387b7e
Author: mano-wii
Date: Mon Jan 6 12:33:36 2020 -0300
Branches: master
https://developer.blender.org/rB55fbb0fd691e61745c0f3f9dc947155231387b7e
BM_mesh_intersect: Match the mesh in Debug build with Release
Prevents regression in unit tests.
===================================================================
M source/blender/bmesh/tools/bmesh_intersect.c
===================================================================
diff --git a/source/blender/bmesh/tools/bmesh_intersect.c b/source/blender/bmesh/tools/bmesh_intersect.c
index 9a3cade85db..df88dcf3006 100644
--- a/source/blender/bmesh/tools/bmesh_intersect.c
+++ b/source/blender/bmesh/tools/bmesh_intersect.c
@@ -1082,7 +1082,15 @@ bool BM_mesh_intersect(BMesh *bm,
tree_b = tree_a;
}
- overlap = BLI_bvhtree_overlap(tree_b, tree_a, &tree_overlap_tot, NULL, NULL);
+ int flag = BVH_OVERLAP_USE_THREADING | BVH_OVERLAP_RETURN_PAIRS;
+# if DEBUG
+ /* The overlap result must match that obtained in Release to succeed
+ * in the `bmesh_boolean` test. */
+ if (looptris_tot < 1024) {
+ flag &= ~BVH_OVERLAP_USE_THREADING;
+ }
+# endif
+ overlap = BLI_bvhtree_overlap_ex(tree_b, tree_a, &tree_overlap_tot, NULL, NULL, 0, flag);
if (overlap) {
uint i;
More information about the Bf-blender-cvs
mailing list