Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergey Sharybin <sergey.vfx@gmail.com>2015-07-18 23:57:02 +0300
committerSergey Sharybin <sergey.vfx@gmail.com>2015-07-18 23:57:02 +0300
commit003b56801c1449ecc596c2b904fa75faecb7dfea (patch)
tree320e4b07054f579b7a1e757f3345f6696c75bd03 /source/blender
parent9b406162490d9ee93e9786350432cdc1563b7bf6 (diff)
Point density: Workaround for possible race condition
There was possible race condition in the point density sampling caused by access to the same data in particle system from sampling thread and sampling initialization. Could have happened when two different point density textures were using same particle system
Diffstat (limited to 'source/blender')
-rw-r--r--source/blender/render/intern/source/pointdensity.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/source/blender/render/intern/source/pointdensity.c b/source/blender/render/intern/source/pointdensity.c
index d2ec5d80c91..165a1bbb687 100644
--- a/source/blender/render/intern/source/pointdensity.c
+++ b/source/blender/render/intern/source/pointdensity.c
@@ -687,8 +687,6 @@ void RE_sample_point_density(Scene *scene, PointDensity *pd,
BLI_mutex_lock(&sample_mutex);
cache_pointdensity_ex(scene, pd, mat, mat, 1, 1);
- BLI_mutex_unlock(&sample_mutex);
-
for (z = 0; z < resolution; ++z) {
for (y = 0; y < resolution; ++y) {
for (x = 0; x < resolution; ++x) {
@@ -711,4 +709,5 @@ void RE_sample_point_density(Scene *scene, PointDensity *pd,
}
}
free_pointdensity(pd);
+ BLI_mutex_unlock(&sample_mutex);
}