Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergey Sharybin <sergey.vfx@gmail.com>2016-03-03 13:59:20 +0300
committerSergey Sharybin <sergey.vfx@gmail.com>2016-03-03 14:02:31 +0300
commit8c113a95e3536dfa0be37c9e2e924ea8172bb613 (patch)
treefc71fffa34bc552168f79efccd5bd02b14700556 /source/blender/compositor/intern/COM_CPUDevice.cpp
parentba7eb0c7b9d93987173780d5b819c7f2ec79b96e (diff)
Make texture node threaded
Quite trivial idea -- just pass tread ID to the texture sampling function. Implemented as a TLS to avoid passing huge amount of extra contexts around. Should be working on all platforms, but compilation test is required. Reviewers: juicyfruit, campbellbarton Reviewed By: campbellbarton Differential Revision: https://developer.blender.org/D1831
Diffstat (limited to 'source/blender/compositor/intern/COM_CPUDevice.cpp')
-rw-r--r--source/blender/compositor/intern/COM_CPUDevice.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/source/blender/compositor/intern/COM_CPUDevice.cpp b/source/blender/compositor/intern/COM_CPUDevice.cpp
index c7c3f7769fe..a5824ec5248 100644
--- a/source/blender/compositor/intern/COM_CPUDevice.cpp
+++ b/source/blender/compositor/intern/COM_CPUDevice.cpp
@@ -22,6 +22,12 @@
#include "COM_CPUDevice.h"
+CPUDevice::CPUDevice(int thread_id)
+ : Device(),
+ m_thread_id(thread_id)
+{
+}
+
void CPUDevice::execute(WorkPackage *work)
{
const unsigned int chunkNumber = work->getChunkNumber();