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
This commit is contained in:
@@ -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();
|
||||
|
Reference in New Issue
Block a user