nodes: optimize job infrastructure

Rework traversing so that jobs are only resolved when they are used. This should provide moderate optimize to the traversing process.
This commit is contained in:
itsmattkc
2022-05-03 11:19:21 -07:00
parent 5351e634b0
commit 028d2fd60c
31 changed files with 78 additions and 166 deletions
+3 -3
View File
@@ -382,7 +382,7 @@ void MathNodeBase::ValueInternal(Operation operation, Pairing pairing, const QSt
output->Push(texture_val);
} else {
// Push shader job
output->Push(NodeValue::kShaderJob, QVariant::fromValue(job), this);
output->Push(NodeValue::kTexture, QVariant::fromValue(job), this);
}
break;
}
@@ -413,10 +413,10 @@ void MathNodeBase::ValueInternal(Operation operation, Pairing pairing, const QSt
output->Push(NodeValue::kSamples, QVariant::fromValue(job.samples()), this);
} else {
output->Push(NodeValue::kSampleJob, QVariant::fromValue(job), this);
output->Push(NodeValue::kSamples, QVariant::fromValue(job), this);
}
} else {
output->Push(NodeValue::kSampleJob, QVariant::fromValue(job), this);
output->Push(NodeValue::kSamples, QVariant::fromValue(job), this);
}
break;
}
+1 -1
View File
@@ -101,7 +101,7 @@ void MergeNode::Value(const NodeValueRow &value, const NodeGlobals &globals, Nod
job.SetAlphaChannelRequired(GenerateJob::kAlphaForceOff);
}
table->Push(NodeValue::kShaderJob, QVariant::fromValue(job), this);
table->Push(NodeValue::kTexture, QVariant::fromValue(job), this);
}
}
}