node: fixed issue with "taking" values from input tables

As opposed to simply leaving all values in the table, nodes can now "take"
values that they use to free up memory (e.g. "taking" input buffers if they're
used to produce an output buffer).

This is a fairly large change, expect regressions.
This commit is contained in:
itsmattkc
2020-04-16 23:12:05 +10:00
parent cc8699c0bc
commit 2f80be437a
30 changed files with 179 additions and 101 deletions
+3 -3
View File
@@ -200,7 +200,7 @@ void OpenGLProxy::Close()
ctx_ = nullptr;
}
void OpenGLProxy::RunNodeAccelerated(const Node *node, const TimeRange &range, const NodeValueDatabase &input_params, NodeValueTable *output_params)
void OpenGLProxy::RunNodeAccelerated(const Node *node, const TimeRange &range, NodeValueDatabase &input_params, NodeValueTable &output_params)
{
if (!(node->GetCapabilities(input_params) & Node::kShader)) {
return;
@@ -257,7 +257,7 @@ void OpenGLProxy::RunNodeAccelerated(const Node *node, const TimeRange &range, c
NodeInput* input = static_cast<NodeInput*>(param);
// Get value from database at this input
NodeValue meta_value = node->InputValueFromTable(input, input_params);
NodeValue meta_value = node->InputValueFromTable(input, input_params, true);
const QVariant& value = meta_value.data();
NodeParam::DataType data_type;
@@ -423,7 +423,7 @@ void OpenGLProxy::RunNodeAccelerated(const Node *node, const TimeRange &range, c
shader->release();
output_params->Push(NodeParam::kTexture, QVariant::fromValue(output_tex));
output_params.Push(NodeParam::kTexture, QVariant::fromValue(output_tex));
}
void OpenGLProxy::TextureToBuffer(const QVariant &tex_in, void *buffer)