tornavis/source
Alexander Gavrilov 4d3bfb3f41 Subdivision Surface: fix a serious performance hit when mixing CPU & GPU.
Subdivision surface efficiency relies on caching pre-computed topology
data for evaluation between frames. However, while eed45d2a23
introduced a second GPU subdiv evaluator type, it still only kept
one slot for caching this runtime data per mesh.

The result is that if the mesh is also needed on CPU, for instance
due to a modifier on a different object (e.g. shrinkwrap), the two
evaluators are used at the same time and fight over the single slot.
This causes the topology data to be discarded and recomputed twice
per frame.

Since avoiding duplicate evaluation is a complex task, this fix
simply adds a second separate cache slot for the GPU data, so that
the cost is simply running subdivision twice, not recomputing topology
twice.

To help diagnostics, I also add a message to show when GPU evaluation
is actually used to the modifier panel. Two frame counters are used
to suppress flicker in the UI panel.

Differential Revision: https://developer.blender.org/D17117

Pull Request #104441
2023-02-08 10:27:22 +01:00
..
blender Subdivision Surface: fix a serious performance hit when mixing CPU & GPU. 2023-02-08 10:27:22 +01:00
creator Vulkan: Changes to CMake config. 2023-01-30 12:04:44 +01:00
tools@e133fc08cd Vulkan: Fix compilation warning in VMA. 2023-02-02 08:19:17 +01:00
CMakeLists.txt Clang-tidy: Don't warn about unrecognized compiler flags 2022-05-06 15:26:54 +02:00