renderer: always hash along edges

This commit is contained in:
itsmattkc
2021-09-19 23:11:20 -07:00
parent 67c7c71ca2
commit 7ba5dca4ab
30 changed files with 76 additions and 59 deletions
+2 -2
View File
@@ -69,7 +69,7 @@ QVector<PreviewAutoCacher::HashData> PreviewAutoCacher::GenerateHashes(ViewerOut
const rational &time = times.at(i);
// See if hash already exists in disk cache
QByteArray hash = RenderManager::Hash(viewer->GetConnectedTextureOutput(), viewer->GetValueHintForInput(ViewerOutput::kTextureInput, -1), viewer->GetVideoParams(), time);
QByteArray hash = RenderManager::Hash(viewer->GetConnectedTextureOutput(), viewer->GetValueHintForInput(ViewerOutput::kTextureInput), viewer->GetVideoParams(), time);
// Check memory list since disk checking is slow
bool hash_exists = existing_hashes.contains(hash);
@@ -392,7 +392,7 @@ void PreviewAutoCacher::CopyValueHint(const NodeInput &input)
{
Node* our_input = copy_map_.value(input.node());
Node::ValueHint hint = input.node()->GetValueHintForInput(input.input(), input.element());
our_input->SetValueHintForInput(input.input(), input.element(), hint);
our_input->SetValueHintForInput(input.input(), hint, input.element());
}
void PreviewAutoCacher::InsertIntoCopyMap(Node *node, Node *copy)
+1 -1
View File
@@ -118,7 +118,7 @@ QByteArray RenderManager::Hash(const Node *n, const Node::ValueHint &output, con
hasher.addData(reinterpret_cast<const char*>(&interlacing), sizeof(interlacing));
if (n) {
n->Hash(output, hasher, NodeTraverser::GenerateGlobals(params, time), params);
Node::Hash(n, output, hasher, NodeTraverser::GenerateGlobals(params, time), params);
}
return hasher.result();
+2 -2
View File
@@ -49,7 +49,7 @@ TexturePtr RenderProcessor::GenerateTexture(const rational &time, const rational
NodeValueTable table;
Node *texture_output = viewer->GetConnectedTextureOutput();
if (texture_output) {
table = GenerateTable(texture_output, viewer->GetValueHintForInput(ViewerOutput::kTextureInput, -1), TimeRange(time, time + frame_length));
table = GenerateTable(texture_output, viewer->GetValueHintForInput(ViewerOutput::kTextureInput), TimeRange(time, time + frame_length));
}
return table.Get(NodeValue::kTexture).value<TexturePtr>();
@@ -171,7 +171,7 @@ void RenderProcessor::Run()
NodeValueTable table;
Node *texture_output = viewer->GetConnectedSampleOutput();
if (texture_output) {
table = GenerateTable(texture_output, viewer->GetValueHintForInput(ViewerOutput::kSamplesInput, -1),time);
table = GenerateTable(texture_output, viewer->GetValueHintForInput(ViewerOutput::kSamplesInput),time);
}
QVariant sample_variant = table.Get(NodeValue::kSamples);