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:
authorYimingWu <xp8110@outlook.com>2022-05-09 17:06:02 +0300
committerYimingWu <xp8110@outlook.com>2022-05-10 08:58:25 +0300
commit07ef14bd3c480904213d65e33ac54f95aa15f452 (patch)
treed492dfb6f3b4f1aed385555eecfdcecc84b86608
parenta8b186047f8f8573b996d3ea2f4f12e2157680d1 (diff)
LineArt: Fix wrong user data reference.
the user data in lineart_identify_loose_edges should be the `tls` one rather than the plain `userdata`. This will lead to incorrect address being accessed. Fixed now.
-rw-r--r--source/blender/gpencil_modifiers/intern/lineart/lineart_cpu.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/source/blender/gpencil_modifiers/intern/lineart/lineart_cpu.c b/source/blender/gpencil_modifiers/intern/lineart/lineart_cpu.c
index 934fd0c2ff7..bf772437d2d 100644
--- a/source/blender/gpencil_modifiers/intern/lineart/lineart_cpu.c
+++ b/source/blender/gpencil_modifiers/intern/lineart/lineart_cpu.c
@@ -1748,11 +1748,11 @@ static void lineart_add_loose_edge(LooseEdgeData *loose_data, MEdge *e)
loose_data->loose_count++;
}
-static void lineart_identify_loose_edges(void *__restrict userdata,
+static void lineart_identify_loose_edges(void *__restrict UNUSED(userdata),
const int i,
- const TaskParallelTLS *__restrict UNUSED(tls))
+ const TaskParallelTLS *__restrict tls)
{
- LooseEdgeData *loose_data = (LooseEdgeData *)userdata;
+ LooseEdgeData *loose_data = (LooseEdgeData *)tls->userdata_chunk;
Mesh *me = loose_data->me;
if (me->medge[i].flag & ME_LOOSEEDGE) {