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>2018-01-09 18:15:33 +0300
committerSergey Sharybin <sergey.vfx@gmail.com>2018-01-09 18:15:33 +0300
commit6deb908a5c9f34deb4c19561082b14d8eda51e43 (patch)
treee72c9fd7b77f486deea839428573c0788c9ceda9 /source/blender/editors/sculpt_paint/paint_cursor.c
parent1cab3be7a7af483ed645c2912b3aed3292812746 (diff)
parent932d448ae013b5425efa974be5a106d9d6a16652 (diff)
Merge branch 'master' into blender2.8
Diffstat (limited to 'source/blender/editors/sculpt_paint/paint_cursor.c')
-rw-r--r--source/blender/editors/sculpt_paint/paint_cursor.c16
1 files changed, 10 insertions, 6 deletions
diff --git a/source/blender/editors/sculpt_paint/paint_cursor.c b/source/blender/editors/sculpt_paint/paint_cursor.c
index e1e90506299..24a7137da19 100644
--- a/source/blender/editors/sculpt_paint/paint_cursor.c
+++ b/source/blender/editors/sculpt_paint/paint_cursor.c
@@ -151,7 +151,7 @@ typedef struct LoadTexData {
float radius;
} LoadTexData;
-static void load_tex_task_cb_ex(void *userdata, void *UNUSED(userdata_chunck), const int j, const int thread_id)
+static void load_tex_task_cb_ex(void *userdata, const int j, const ParallelRangeTLS *tls)
{
LoadTexData *data = userdata;
Brush *br = data->br;
@@ -212,7 +212,7 @@ static void load_tex_task_cb_ex(void *userdata, void *UNUSED(userdata_chunck), c
if (col) {
float rgba[4];
- paint_get_tex_pixel_col(mtex, x, y, rgba, pool, thread_id, convert_to_linear, colorspace);
+ paint_get_tex_pixel_col(mtex, x, y, rgba, pool, tls->thread_id, convert_to_linear, colorspace);
buffer[index * 4] = rgba[0] * 255;
buffer[index * 4 + 1] = rgba[1] * 255;
@@ -220,7 +220,7 @@ static void load_tex_task_cb_ex(void *userdata, void *UNUSED(userdata_chunck), c
buffer[index * 4 + 3] = rgba[3] * 255;
}
else {
- float avg = paint_get_tex_pixel(mtex, x, y, pool, thread_id);
+ float avg = paint_get_tex_pixel(mtex, x, y, pool, tls->thread_id);
avg += br->texture_sample_bias;
@@ -318,7 +318,9 @@ static int load_tex(Brush *br, ViewContext *vc, float zoom, bool col, bool prima
.pool = pool, .size = size, .rotation = rotation, .radius = radius,
};
- BLI_task_parallel_range_ex(0, size, &data, NULL, 0, load_tex_task_cb_ex, true, false);
+ ParallelRangeSettings settings;
+ BLI_parallel_range_settings_defaults(&settings);
+ BLI_task_parallel_range(0, size, &data, load_tex_task_cb_ex, &settings);
if (mtex->tex && mtex->tex->nodetree)
ntreeTexEndExecTree(mtex->tex->nodetree->execdata);
@@ -365,7 +367,7 @@ static int load_tex(Brush *br, ViewContext *vc, float zoom, bool col, bool prima
return 1;
}
-static void load_tex_cursor_task_cb(void *userdata, const int j)
+static void load_tex_cursor_task_cb(void *userdata, const int j, const ParallelRangeTLS *UNUSED(tls))
{
LoadTexData *data = userdata;
Brush *br = data->br;
@@ -445,7 +447,9 @@ static int load_tex_cursor(Brush *br, ViewContext *vc, float zoom)
.br = br, .buffer = buffer, .size = size,
};
- BLI_task_parallel_range(0, size, &data, load_tex_cursor_task_cb, true);
+ ParallelRangeSettings settings;
+ BLI_parallel_range_settings_defaults(&settings);
+ BLI_task_parallel_range(0, size, &data, load_tex_cursor_task_cb, &settings);
if (!cursor_snap.overlay_texture)
glGenTextures(1, &cursor_snap.overlay_texture);