diff options
Diffstat (limited to 'source/blender/compositor/intern/COM_ExecutionSystem.cpp')
-rw-r--r-- | source/blender/compositor/intern/COM_ExecutionSystem.cpp | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/source/blender/compositor/intern/COM_ExecutionSystem.cpp b/source/blender/compositor/intern/COM_ExecutionSystem.cpp index 7c08188db90..0667271f4b1 100644 --- a/source/blender/compositor/intern/COM_ExecutionSystem.cpp +++ b/source/blender/compositor/intern/COM_ExecutionSystem.cpp @@ -137,11 +137,15 @@ void ExecutionSystem::execute() } unsigned int index; + // First allocale all write buffer for (index = 0; index < this->m_operations.size(); index++) { NodeOperation *operation = this->m_operations[index]; - operation->setbNodeTree(this->m_context.getbNodeTree()); - operation->initExecution(); + if (operation->isWriteBufferOperation()) { + operation->setbNodeTree(this->m_context.getbNodeTree()); + operation->initExecution(); + } } + // Connect read buffers to their write buffers for (index = 0; index < this->m_operations.size(); index++) { NodeOperation *operation = this->m_operations[index]; if (operation->isReadBufferOperation()) { @@ -149,6 +153,14 @@ void ExecutionSystem::execute() readOperation->updateMemoryBuffer(); } } + // initialize other operations + for (index = 0; index < this->m_operations.size(); index++) { + NodeOperation *operation = this->m_operations[index]; + if (!operation->isWriteBufferOperation()) { + operation->setbNodeTree(this->m_context.getbNodeTree()); + operation->initExecution(); + } + } for (index = 0; index < this->m_groups.size(); index++) { ExecutionGroup *executionGroup = this->m_groups[index]; executionGroup->setChunksize(this->m_context.getChunksize()); |