[Bf-blender-cvs] [00a9e77] master: Fix compiling sculpt without OpenMP available
Jens Verwiebe
noreply at git.blender.org
Fri Mar 28 22:37:27 CET 2014
Commit: 00a9e77259528d7e4d74101546e17a2396deac39
Author: Jens Verwiebe
Date: Fri Mar 28 22:37:05 2014 +0100
https://developer.blender.org/rB00a9e77259528d7e4d74101546e17a2396deac39
Fix compiling sculpt without OpenMP available
===================================================================
M source/blender/editors/sculpt_paint/sculpt.c
===================================================================
diff --git a/source/blender/editors/sculpt_paint/sculpt.c b/source/blender/editors/sculpt_paint/sculpt.c
index 9dbf76b..803869f 100644
--- a/source/blender/editors/sculpt_paint/sculpt.c
+++ b/source/blender/editors/sculpt_paint/sculpt.c
@@ -945,6 +945,7 @@ static float tex_strength(SculptSession *ss, Brush *br,
MTex *mtex = &br->mtex;
float avg = 1;
float rgba[4];
+ int thread_num;
if (!mtex->tex) {
avg = 1;
@@ -987,7 +988,12 @@ static float tex_strength(SculptSession *ss, Brush *br,
x += br->mtex.ofs[0];
y += br->mtex.ofs[1];
- avg = paint_get_tex_pixel(&br->mtex, x, y, ss->tex_pool, omp_get_thread_num());
+ thread_num = 0;
+#ifdef _OPENMP
+ if (sd->flags & SCULPT_USE_OPENMP)
+ thread_num = omp_get_thread_num();
+#endif
+ avg = paint_get_tex_pixel(&br->mtex, x, y, ss->tex_pool, thread_num);
avg += br->texture_sample_bias;
}
More information about the Bf-blender-cvs
mailing list