Fix #108778: Crash when rendering multiple view layers #108816

Merged
Sergey Sharybin merged 1 commits from Sergey/blender:fix_108778 into main 2023-06-09 18:42:08 +02:00

1 Commits

Author SHA1 Message Date
Sergey Sharybin 1081fa77de Fix 108778: Crash when rendering multiple view layers
buildbot/vexp-code-patch-coordinator Build done. Details
The rendering pipeline will re-use dependency graph and request
for re-building its relations for every new view layer, and try
to re-use as much evaluation as possible.

This could potentially run into situation when a content of
collection is changed: due to the difference in the per-view
layer visibility. If the evaluated collection has an object cache
this will make the cache to get out-of-sync with the actual
content. The cache on the evaluated collection might be created
when instancing system iterates over the collection.

This change makes it so the cache is freed when the dependency
graph relations are updated. This might be a bit too intrusive.
There might be ways to somehow ensure the content of the collection
is still the same as it was before the relations update, but this
is much more complicated task. Perhaps the performance is already
good enough.

This is a collaboration with Jacques Lucke, who was looking into
the same report, bouncing some ideas back and forth, and helped
testing the patch.
2023-06-09 18:03:05 +02:00