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
path: root/source
diff options
context:
space:
mode:
authorBrecht Van Lommel <brecht@blender.org>2022-05-30 14:28:38 +0300
committerBrecht Van Lommel <brecht@blender.org>2022-05-30 15:06:03 +0300
commit24e74f8bef813820076cce08635e7c4cb3f2da13 (patch)
tree0648fcbee74ed8cb0aeac591b2647da5e9cf8c56 /source
parentf1c29b9bd3c8241b212d7d50b2d538b980a7d62e (diff)
Fix T98449: Cycles crash changing frame after recent changes
Subdivision did not properly update when evaluating first without and then with orco coordinates. Now update the subdivision evaluator settings every time, and reallocate the vertex data buffer when needed. there is an additional issue in this file where orco coordinates are not available immediately on the first frame when they should be, and only appear on the second frame. However that is an old limitation related to the depsgraph not getting re-evaluated on viewport display mode changes, here we just fix the crash.
Diffstat (limited to 'source')
-rw-r--r--source/blender/blenkernel/intern/subdiv_eval.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/source/blender/blenkernel/intern/subdiv_eval.c b/source/blender/blenkernel/intern/subdiv_eval.c
index d03c0f89948..b8f6dc322c5 100644
--- a/source/blender/blenkernel/intern/subdiv_eval.c
+++ b/source/blender/blenkernel/intern/subdiv_eval.c
@@ -58,7 +58,7 @@ bool BKE_subdiv_eval_begin(Subdiv *subdiv,
opensubdiv_evalutor_from_subdiv_evaluator_type(evaluator_type);
BKE_subdiv_stats_begin(&subdiv->stats, SUBDIV_STATS_EVALUATOR_CREATE);
subdiv->evaluator = openSubdiv_createEvaluatorFromTopologyRefiner(
- subdiv->topology_refiner, opensubdiv_evaluator_type, evaluator_cache, settings);
+ subdiv->topology_refiner, opensubdiv_evaluator_type, evaluator_cache);
BKE_subdiv_stats_end(&subdiv->stats, SUBDIV_STATS_EVALUATOR_CREATE);
if (subdiv->evaluator == NULL) {
return false;
@@ -67,6 +67,7 @@ bool BKE_subdiv_eval_begin(Subdiv *subdiv,
else {
/* TODO(sergey): Check for topology change. */
}
+ subdiv->evaluator->setSettings(subdiv->evaluator, settings);
BKE_subdiv_eval_init_displacement(subdiv);
return true;
}