diff options
Diffstat (limited to 'source/blender/editors/sculpt_paint/sculpt.c')
-rw-r--r-- | source/blender/editors/sculpt_paint/sculpt.c | 110 |
1 files changed, 80 insertions, 30 deletions
diff --git a/source/blender/editors/sculpt_paint/sculpt.c b/source/blender/editors/sculpt_paint/sculpt.c index 1af522ffd8d..69cf114f4b7 100644 --- a/source/blender/editors/sculpt_paint/sculpt.c +++ b/source/blender/editors/sculpt_paint/sculpt.c @@ -377,8 +377,10 @@ static bool sculpt_stroke_is_dynamic_topology( /*** paint mesh ***/ -static void paint_mesh_restore_co_task_cb(void *userdata, const int n, - const ParallelRangeTLS *UNUSED(tls)) +static void paint_mesh_restore_co_task_cb( + void *__restrict userdata, + const int n, + const ParallelRangeTLS *__restrict UNUSED(tls)) { SculptThreadedTaskData *data = userdata; SculptSession *ss = data->ob->sculpt; @@ -800,8 +802,10 @@ static float calc_symmetry_feather(Sculpt *sd, StrokeCache *cache) * \note These are all _very_ similar, when changing one, check others. * \{ */ -static void calc_area_normal_and_center_task_cb(void *userdata, const int n, - const ParallelRangeTLS *UNUSED(tls)) +static void calc_area_normal_and_center_task_cb( + void *__restrict userdata, + const int n, + const ParallelRangeTLS *__restrict UNUSED(tls)) { SculptThreadedTaskData *data = userdata; SculptSession *ss = data->ob->sculpt; @@ -1648,7 +1652,9 @@ typedef struct { } SculptFindNearestToRayData; static void do_smooth_brush_mesh_task_cb_ex( - void *userdata, const int n, const ParallelRangeTLS *tls) + void *__restrict userdata, + const int n, + const ParallelRangeTLS *__restrict tls) { SculptThreadedTaskData *data = userdata; SculptSession *ss = data->ob->sculpt; @@ -1696,7 +1702,9 @@ static void do_smooth_brush_mesh_task_cb_ex( } static void do_smooth_brush_bmesh_task_cb_ex( - void *userdata, const int n, const ParallelRangeTLS *tls) + void *__restrict userdata, + const int n, + const ParallelRangeTLS *__restrict tls) { SculptThreadedTaskData *data = userdata; SculptSession *ss = data->ob->sculpt; @@ -1744,7 +1752,9 @@ static void do_smooth_brush_bmesh_task_cb_ex( } static void do_smooth_brush_multires_task_cb_ex( - void *userdata, const int n, const ParallelRangeTLS *tls) + void *__restrict userdata, + const int n, + const ParallelRangeTLS *__restrict tls) { SculptThreadedTaskData *data = userdata; SculptDoBrushSmoothGridDataChunk *data_chunk = tls->userdata_chunk; @@ -1974,7 +1984,9 @@ static void do_smooth_brush(Sculpt *sd, Object *ob, PBVHNode **nodes, int totnod } static void do_mask_brush_draw_task_cb_ex( - void *userdata, const int n, const ParallelRangeTLS *tls) + void *__restrict userdata, + const int n, + const ParallelRangeTLS *__restrict tls) { SculptThreadedTaskData *data = userdata; SculptSession *ss = data->ob->sculpt; @@ -2039,7 +2051,9 @@ static void do_mask_brush(Sculpt *sd, Object *ob, PBVHNode **nodes, int totnode) } static void do_draw_brush_task_cb_ex( - void *userdata, const int n, const ParallelRangeTLS *tls) + void *__restrict userdata, + const int n, + const ParallelRangeTLS *__restrict tls) { SculptThreadedTaskData *data = userdata; SculptSession *ss = data->ob->sculpt; @@ -2108,7 +2122,9 @@ static void do_draw_brush(Sculpt *sd, Object *ob, PBVHNode **nodes, int totnode) * Used for 'SCULPT_TOOL_CREASE' and 'SCULPT_TOOL_BLOB' */ static void do_crease_brush_task_cb_ex( - void *userdata, const int n, const ParallelRangeTLS *tls) + void *__restrict userdata, + const int n, + const ParallelRangeTLS *__restrict tls) { SculptThreadedTaskData *data = userdata; SculptSession *ss = data->ob->sculpt; @@ -2207,7 +2223,9 @@ static void do_crease_brush(Sculpt *sd, Object *ob, PBVHNode **nodes, int totnod } static void do_pinch_brush_task_cb_ex( - void *userdata, const int n, const ParallelRangeTLS *tls) + void *__restrict userdata, + const int n, + const ParallelRangeTLS *__restrict tls) { SculptThreadedTaskData *data = userdata; SculptSession *ss = data->ob->sculpt; @@ -2263,7 +2281,9 @@ static void do_pinch_brush(Sculpt *sd, Object *ob, PBVHNode **nodes, int totnode } static void do_grab_brush_task_cb_ex( - void *userdata, const int n, const ParallelRangeTLS *tls) + void *__restrict userdata, + const int n, + const ParallelRangeTLS *__restrict tls) { SculptThreadedTaskData *data = userdata; SculptSession *ss = data->ob->sculpt; @@ -2329,7 +2349,9 @@ static void do_grab_brush(Sculpt *sd, Object *ob, PBVHNode **nodes, int totnode) } static void do_nudge_brush_task_cb_ex( - void *userdata, const int n, const ParallelRangeTLS *tls) + void *__restrict userdata, + const int n, + const ParallelRangeTLS *__restrict tls) { SculptThreadedTaskData *data = userdata; SculptSession *ss = data->ob->sculpt; @@ -2390,7 +2412,9 @@ static void do_nudge_brush(Sculpt *sd, Object *ob, PBVHNode **nodes, int totnode } static void do_snake_hook_brush_task_cb_ex( - void *userdata, const int n, const ParallelRangeTLS *tls) + void *__restrict userdata, + const int n, + const ParallelRangeTLS *__restrict tls) { SculptThreadedTaskData *data = userdata; SculptSession *ss = data->ob->sculpt; @@ -2501,7 +2525,9 @@ static void do_snake_hook_brush(Sculpt *sd, Object *ob, PBVHNode **nodes, int to } static void do_thumb_brush_task_cb_ex( - void *userdata, const int n, const ParallelRangeTLS *tls) + void *__restrict userdata, + const int n, + const ParallelRangeTLS *__restrict tls) { SculptThreadedTaskData *data = userdata; SculptSession *ss = data->ob->sculpt; @@ -2567,7 +2593,9 @@ static void do_thumb_brush(Sculpt *sd, Object *ob, PBVHNode **nodes, int totnode } static void do_rotate_brush_task_cb_ex( - void *userdata, const int n, const ParallelRangeTLS *tls) + void *__restrict userdata, + const int n, + const ParallelRangeTLS *__restrict tls) { SculptThreadedTaskData *data = userdata; SculptSession *ss = data->ob->sculpt; @@ -2634,7 +2662,9 @@ static void do_rotate_brush(Sculpt *sd, Object *ob, PBVHNode **nodes, int totnod } static void do_layer_brush_task_cb_ex( - void *userdata, const int n, const ParallelRangeTLS *tls) + void *__restrict userdata, + const int n, + const ParallelRangeTLS *__restrict tls) { SculptThreadedTaskData *data = userdata; SculptSession *ss = data->ob->sculpt; @@ -2726,7 +2756,9 @@ static void do_layer_brush(Sculpt *sd, Object *ob, PBVHNode **nodes, int totnode } static void do_inflate_brush_task_cb_ex( - void *userdata, const int n, const ParallelRangeTLS *tls) + void *__restrict userdata, + const int n, + const ParallelRangeTLS *__restrict tls) { SculptThreadedTaskData *data = userdata; SculptSession *ss = data->ob->sculpt; @@ -2895,7 +2927,9 @@ static float get_offset(Sculpt *sd, SculptSession *ss) } static void do_flatten_brush_task_cb_ex( - void *userdata, const int n, const ParallelRangeTLS *tls) + void *__restrict userdata, + const int n, + const ParallelRangeTLS *__restrict tls) { SculptThreadedTaskData *data = userdata; SculptSession *ss = data->ob->sculpt; @@ -2978,7 +3012,9 @@ static void do_flatten_brush(Sculpt *sd, Object *ob, PBVHNode **nodes, int totno } static void do_clay_brush_task_cb_ex( - void *userdata, const int n, const ParallelRangeTLS *tls) + void *__restrict userdata, + const int n, + const ParallelRangeTLS *__restrict tls) { SculptThreadedTaskData *data = userdata; SculptSession *ss = data->ob->sculpt; @@ -3069,7 +3105,9 @@ static void do_clay_brush(Sculpt *sd, Object *ob, PBVHNode **nodes, int totnode) } static void do_clay_strips_brush_task_cb_ex( - void *userdata, const int n, const ParallelRangeTLS *tls) + void *__restrict userdata, + const int n, + const ParallelRangeTLS *__restrict tls) { SculptThreadedTaskData *data = userdata; SculptSession *ss = data->ob->sculpt; @@ -3184,7 +3222,9 @@ static void do_clay_strips_brush(Sculpt *sd, Object *ob, PBVHNode **nodes, int t } static void do_fill_brush_task_cb_ex( - void *userdata, const int n, const ParallelRangeTLS *tls) + void *__restrict userdata, + const int n, + const ParallelRangeTLS *__restrict tls) { SculptThreadedTaskData *data = userdata; SculptSession *ss = data->ob->sculpt; @@ -3270,7 +3310,9 @@ static void do_fill_brush(Sculpt *sd, Object *ob, PBVHNode **nodes, int totnode) } static void do_scrape_brush_task_cb_ex( - void *userdata, const int n, const ParallelRangeTLS *tls) + void *__restrict userdata, + const int n, + const ParallelRangeTLS *__restrict tls) { SculptThreadedTaskData *data = userdata; SculptSession *ss = data->ob->sculpt; @@ -3355,7 +3397,9 @@ static void do_scrape_brush(Sculpt *sd, Object *ob, PBVHNode **nodes, int totnod } static void do_gravity_task_cb_ex( - void *userdata, const int n, const ParallelRangeTLS *tls) + void *__restrict userdata, + const int n, + const ParallelRangeTLS *__restrict tls) { SculptThreadedTaskData *data = userdata; SculptSession *ss = data->ob->sculpt; @@ -3515,8 +3559,10 @@ static void sculpt_topology_update(Sculpt *sd, Object *ob, Brush *brush, Unified } } -static void do_brush_action_task_cb(void *userdata, const int n, - const ParallelRangeTLS *UNUSED(tls)) +static void do_brush_action_task_cb( + void *__restrict userdata, + const int n, + const ParallelRangeTLS *__restrict UNUSED(tls)) { SculptThreadedTaskData *data = userdata; @@ -3662,8 +3708,10 @@ static void sculpt_flush_pbvhvert_deform(Object *ob, PBVHVertexIter *vd) copy_v3_v3(me->mvert[index].co, newco); } -static void sculpt_combine_proxies_task_cb(void *userdata, const int n, - const ParallelRangeTLS *UNUSED(tls)) +static void sculpt_combine_proxies_task_cb( + void *__restrict userdata, + const int n, + const ParallelRangeTLS *__restrict UNUSED(tls)) { SculptThreadedTaskData *data = userdata; SculptSession *ss = data->ob->sculpt; @@ -3763,8 +3811,10 @@ static void sculpt_update_keyblock(Object *ob) } } -static void sculpt_flush_stroke_deform_task_cb(void *userdata, const int n, - const ParallelRangeTLS *UNUSED(tls)) +static void sculpt_flush_stroke_deform_task_cb( + void *__restrict userdata, + const int n, + const ParallelRangeTLS *__restrict UNUSED(tls)) { SculptThreadedTaskData *data = userdata; SculptSession *ss = data->ob->sculpt; |