[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [32087] trunk/blender/source/blender/ render/intern/source/rendercore.c: Fix #23170: multithreaded texture baking could give wrong results with margin,

Brecht Van Lommel brechtvanlommel at pandora.be
Thu Sep 23 23:38:02 CEST 2010


Revision: 32087
          http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=32087
Author:   blendix
Date:     2010-09-23 23:38:01 +0200 (Thu, 23 Sep 2010)

Log Message:
-----------
Fix #23170: multithreaded texture baking could give wrong results with margin,
with some threads not writing the margin mask.

Modified Paths:
--------------
    trunk/blender/source/blender/render/intern/source/rendercore.c

Modified: trunk/blender/source/blender/render/intern/source/rendercore.c
===================================================================
--- trunk/blender/source/blender/render/intern/source/rendercore.c	2010-09-23 21:01:12 UTC (rev 32086)
+++ trunk/blender/source/blender/render/intern/source/rendercore.c	2010-09-23 21:38:01 UTC (rev 32087)
@@ -2562,10 +2562,9 @@
 	if (bs->usemask) {
 		if (bs->ibuf->userdata==NULL) {
 			BLI_lock_thread(LOCK_CUSTOM1);
-			if (bs->ibuf->userdata==NULL) { /* since the thread was locked, its possible another thread alloced the value */
+			if (bs->ibuf->userdata==NULL) /* since the thread was locked, its possible another thread alloced the value */
 				bs->ibuf->userdata = (void *)MEM_callocN(sizeof(char)*bs->rectx*bs->recty, "BakeMask");
-				bs->rect_mask= (char *)bs->ibuf->userdata;
-			}
+			bs->rect_mask= (char *)bs->ibuf->userdata;
 			BLI_unlock_thread(LOCK_CUSTOM1);
 		} else {
 			bs->rect_mask= (char *)bs->ibuf->userdata;





More information about the Bf-blender-cvs mailing list