[Bf-blender-cvs] [43d4d72] master: Fix race condition in point density texture min/max code

Sergey Sharybin noreply at git.blender.org
Wed Feb 24 14:31:33 CET 2016


Commit: 43d4d72e05b94097154602e33f0ad1e785a95fc4
Author: Sergey Sharybin
Date:   Wed Feb 24 14:28:35 2016 +0100
Branches: master
https://developer.blender.org/rB43d4d72e05b94097154602e33f0ad1e785a95fc4

Fix race condition in point density texture min/max code

===================================================================

M	source/blender/render/intern/source/pointdensity.c

===================================================================

diff --git a/source/blender/render/intern/source/pointdensity.c b/source/blender/render/intern/source/pointdensity.c
index 936c448..2253265 100644
--- a/source/blender/render/intern/source/pointdensity.c
+++ b/source/blender/render/intern/source/pointdensity.c
@@ -834,11 +834,13 @@ void RE_point_density_sample(
 		return;
 	}
 
+	BLI_mutex_lock(&sample_mutex);
 	RE_point_density_minmax(scene,
 	                        pd,
 	                        use_render_params,
 	                        min,
 	                        max);
+	BLI_mutex_unlock(&sample_mutex);
 	sub_v3_v3v3(dim, max, min);
 	if (dim[0] <= 0.0f || dim[1] <= 0.0f || dim[2] <= 0.0f) {
 		sample_dummy_point_density(resolution, values);




More information about the Bf-blender-cvs mailing list