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:
authorAntony Riakiotakis <kalast@gmail.com>2014-03-29 00:01:26 +0400
committerAntony Riakiotakis <kalast@gmail.com>2014-03-29 00:02:26 +0400
commit6d973b87a6c0351510603b118814618333318321 (patch)
treed17293f2cbd7c94f353081ca03b2ef5ed067db21 /source/blender/editors/sculpt_paint/paint_utils.c
parent8b43b9f2552fb6d769c751a1eb8eeb927ebfc079 (diff)
Fix T39468
Issue is that sampling functions did not pass a thread index to the texture sampler so all threads were contesting for the same pool. Paint cursors and sculpting that used openmp for threading suffered from this. Now use omp_get_thread_num to pass the thread number.
Diffstat (limited to 'source/blender/editors/sculpt_paint/paint_utils.c')
-rw-r--r--source/blender/editors/sculpt_paint/paint_utils.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/source/blender/editors/sculpt_paint/paint_utils.c b/source/blender/editors/sculpt_paint/paint_utils.c
index e6efba4fa0c..de09709fcce 100644
--- a/source/blender/editors/sculpt_paint/paint_utils.c
+++ b/source/blender/editors/sculpt_paint/paint_utils.c
@@ -164,26 +164,25 @@ float paint_calc_object_space_radius(ViewContext *vc, const float center[3],
return len_v3(delta) / scale;
}
-float paint_get_tex_pixel(MTex *mtex, float u, float v, struct ImagePool *pool)
+float paint_get_tex_pixel(MTex *mtex, float u, float v, struct ImagePool *pool, int thread)
{
float intensity, rgba[4];
float co[3] = {u, v, 0.0f};
externtex(mtex, co, &intensity,
- rgba, rgba + 1, rgba + 2, rgba + 3, 0, pool);
+ rgba, rgba + 1, rgba + 2, rgba + 3, thread, pool);
return intensity;
}
-void paint_get_tex_pixel_col(MTex *mtex, float u, float v, float rgba[4], struct ImagePool *pool)
+void paint_get_tex_pixel_col(MTex *mtex, float u, float v, float rgba[4], struct ImagePool *pool, int thread)
{
float co[3] = {u, v, 0.0f};
int hasrgb;
float intensity;
hasrgb = externtex(mtex, co, &intensity,
- rgba, rgba + 1, rgba + 2, rgba + 3, 0, pool);
-
+ rgba, rgba + 1, rgba + 2, rgba + 3, thread, pool);
if (!hasrgb) {
rgba[0] = intensity;
rgba[1] = intensity;