0
0
forked from blender/blender
The official Blender project repository.
Go to file
Hans Goudey 97f2b01ea9 Fix #112351: Sculpt implicit sharing thread safety crash
Currently the iteration over a PBVH node's vertices retrieves mutable
access to the mask custom data layer. This isn't threadsafe, but it is
done in the multithreaded loops over all nodes.

In general, we need to be more careful and conservative about storage
of non-const pointers to mesh data. Ideally we would only have one
mutable reference to a resource at a time. And we should avoid doing
work like looking up custom data layers more than we need to.

To that end, make the pointer to the custom data layer used everywhere
const, and retrieve mutable access before parallel node iteration with
a specific function, and write to the mask data with that in mind.

This pushes us in the direction of sharing less code per PBVH type.
In my opinion that's a good thing, because we can actually optimize for
each type. For example, `write_mask_data` gives a picture of
how each of these hot loops could become much simpler.

Pull Request: blender/blender#112690
2023-09-26 14:21:07 +02:00
.gitea
.github
build_files
doc
extern
intern Cleanup: update code comments for wayland cursor locking 2023-09-26 19:50:48 +10:00
locale
release
scripts Anim: implement a new curve-aware vertex to B-Bone segment mapping mode. 2023-09-26 14:17:21 +02:00
source Fix #112351: Sculpt implicit sharing thread safety crash 2023-09-26 14:21:07 +02:00
tests
tools
.clang-format
.clang-tidy
.editorconfig
.git-blame-ignore-revs
.gitignore
AUTHORS
CMakeLists.txt
COPYING
GNUmakefile
make.bat
pyproject.toml
README.md

Blender

Blender is the free and open source 3D creation suite. It supports the entirety of the 3D pipeline-modeling, rigging, animation, simulation, rendering, compositing, motion tracking and video editing.

Blender screenshot

Project Pages

Development

License

Blender as a whole is licensed under the GNU General Public License, Version 3. Individual files may have a different, but compatible license.

See blender.org/about/license for details.