diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2016-03-03 13:59:20 +0300 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2016-03-03 14:02:31 +0300 |
commit | 8c113a95e3536dfa0be37c9e2e924ea8172bb613 (patch) | |
tree | fc71fffa34bc552168f79efccd5bd02b14700556 /source/blender/compositor/intern/COM_CPUDevice.h | |
parent | ba7eb0c7b9d93987173780d5b819c7f2ec79b96e (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.h')
-rw-r--r-- | source/blender/compositor/intern/COM_CPUDevice.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/source/blender/compositor/intern/COM_CPUDevice.h b/source/blender/compositor/intern/COM_CPUDevice.h index 3dc8fff66a3..d12666593d4 100644 --- a/source/blender/compositor/intern/COM_CPUDevice.h +++ b/source/blender/compositor/intern/COM_CPUDevice.h @@ -31,11 +31,18 @@ */ class CPUDevice : public Device { public: + CPUDevice(int thread_id); + /** * @brief execute a WorkPackage * @param work the WorkPackage to execute */ void execute(WorkPackage *work); + + int thread_id() { return m_thread_id; } + +protected: + int m_thread_id; }; #endif |