Subdivision Surface: add dependency graph tracking when CPU mesh is needed #104461
Open
Alexander Gavrilov
wants to merge 1 commits from
When changing the target branch, be careful to rebase the branch in your fork to match. See documentation.
angavrilov/blender:pr-depsgraph-subdiv-cpu
into main
pull from: angavrilov/blender:pr-depsgraph-subdiv-cpu
merge into: blender:main
blender:main
blender:brush-assets-project
blender:blender-v3.3-release
blender:partial-write-refactor
blender:universal-scene-description
blender:fix-121021
blender:blender-v4.1-release
blender:blender-v3.6-release
blender:blender-v3.6-temp_wmoss_animrig_public
blender:temp-sculpt-dyntopo
blender:gpencil-next
blender:anim/animation-id-113594
blender:blender-v4.0-release
blender:blender-projects-basics
blender:bridge-curves
blender:sculpt-blender
blender:asset-browser-frontend-split
blender:asset-shelf
blender:tmp-usd-python-mtl
blender:tmp-usd-3.6
blender:blender-v3.5-release
blender:blender-v2.93-release
blender:realtime-clock
blender:sculpt-dev
blender:bevelv2
blender:xr-dev
When changing the target branch, be careful to rebase the branch in your fork to match. See documentation.
1 Commits
Author | SHA1 | Message | Date |
---|---|---|---|
Alexander Gavrilov | 7d5a6e7caf |
Subdivision Surface: add dependency graph tracking when cpu mesh is needed.
After addition of GPU subdivision it is necessary to choose between using CPU or GPU for a particular object when both ways are technically possible. Choosing GPU when the mesh is also needed by CPU code would cause subdivision to be run twice when the CPU mesh is requested by other code. This patch adds a simple way to track dependencies that need the CPU mesh through dependency graph via an already existing mechanism. Constraints targeting mesh vertex groups, as well as likely modifiers now tag their targets with a dependency graph flag to notify that the fully evaluated mesh is needed on the CPU. This is used to disable GPU subdiv in those cases. In addition, the evaluated mesh is used by sculpt and paint modes, so GPU subdivision is disabled in that case too. |