OpenSubdiv: Tweaks to detecting whether geometry data is needed on GPU with new DEG

This commit is contained in:
Sergey Sharybin 2015-08-27 11:47:56 +02:00
parent 8cd4966722
commit efc6f9438f
1 changed files with 6 additions and 3 deletions

View File

@ -357,9 +357,12 @@ DepsRelation *Depsgraph::add_new_relation(OperationDepsNode *from,
#ifdef WITH_OPENSUBDIV
if (type == DEPSREL_TYPE_GEOMETRY_EVAL) {
IDDepsNode *id_to = to->owner->owner;
if ((id_to->eval_flags & DAG_EVAL_NEED_CPU) == 0) {
id_to->tag_update(this);
id_to->eval_flags |= DAG_EVAL_NEED_CPU;
IDDepsNode *id_from = to->owner->owner;
if (id_to != id_from) {
if ((id_to->eval_flags & DAG_EVAL_NEED_CPU) == 0) {
id_to->tag_update(this);
id_to->eval_flags |= DAG_EVAL_NEED_CPU;
}
}
}
#endif