[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [53913] trunk/blender/source/blender/ editors/sculpt_paint/sculpt.c: Disable OpenMP with dyntopo in paint_mesh_restore_co()

Nicholas Bishop nicholasbishop at gmail.com
Sun Jan 20 00:52:34 CET 2013


Revision: 53913
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=53913
Author:   nicholasbishop
Date:     2013-01-19 23:52:33 +0000 (Sat, 19 Jan 2013)
Log Message:
-----------
Disable OpenMP with dyntopo in paint_mesh_restore_co()

Otherwise, new entries might be inserted by sculpt_undo_push_node()
into the GHash used internally by BM_log_original_vert_co() by a
different thread.

Fixes bug [#33787]
http://projects.blender.org/tracker/?func=detail&aid=33787&group_id=9&atid=498

Modified Paths:
--------------
    trunk/blender/source/blender/editors/sculpt_paint/sculpt.c

Modified: trunk/blender/source/blender/editors/sculpt_paint/sculpt.c
===================================================================
--- trunk/blender/source/blender/editors/sculpt_paint/sculpt.c	2013-01-19 16:10:21 UTC (rev 53912)
+++ trunk/blender/source/blender/editors/sculpt_paint/sculpt.c	2013-01-19 23:52:33 UTC (rev 53913)
@@ -430,7 +430,11 @@
 
 	BKE_pbvh_search_gather(ss->pbvh, NULL, NULL, &nodes, &totnode);
 
-	#pragma omp parallel for schedule(guided) if (sd->flags & SCULPT_USE_OPENMP)
+	/* Disable OpenMP when dynamic-topology is enabled. Otherwise, new
+	 * entries might be inserted by sculpt_undo_push_node() into the
+	 * GHash used internally by BM_log_original_vert_co() by a
+	 * different thread. [#33787] */
+	#pragma omp parallel for schedule(guided) if (sd->flags & SCULPT_USE_OPENMP && !ss->bm)
 	for (n = 0; n < totnode; n++) {
 		SculptUndoNode *unode;
 		SculptUndoType type = (brush->sculpt_tool == SCULPT_TOOL_MASK ?




More information about the Bf-blender-cvs mailing list