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:
authorBrecht Van Lommel <brecht@blender.org>2020-06-05 12:39:11 +0300
committerBrecht Van Lommel <brecht@blender.org>2020-06-22 14:06:47 +0300
commitace3268482c6bfd9986815aaa6b027c99fa8e3f4 (patch)
tree54680ee08c805966f1c069fce911d0e1d59792e2 /intern/cycles/device/device_optix.cpp
parentb7c34c889b6158d542648f31133f201d330201eb (diff)
Cleanup: minor refactoring around DeviceTask
Diffstat (limited to 'intern/cycles/device/device_optix.cpp')
-rw-r--r--intern/cycles/device/device_optix.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/intern/cycles/device/device_optix.cpp b/intern/cycles/device/device_optix.cpp
index fbf6a914744..2d99a943015 100644
--- a/intern/cycles/device/device_optix.cpp
+++ b/intern/cycles/device/device_optix.cpp
@@ -1463,13 +1463,15 @@ class OptiXDevice : public CUDADevice {
void task_add(DeviceTask &task) override
{
- struct OptiXDeviceTask : public DeviceTask {
- OptiXDeviceTask(OptiXDevice *device, DeviceTask &task, int task_index) : DeviceTask(task)
+ struct OptiXDeviceTask : public Task {
+ OptiXDeviceTask(OptiXDevice *device, DeviceTask &task, int task_index) : task(task)
{
// Using task index parameter instead of thread index, since number of CUDA streams may
// differ from number of threads
- run = function_bind(&OptiXDevice::thread_run, device, *this, task_index);
+ run = function_bind(&OptiXDevice::thread_run, device, task, task_index);
}
+
+ DeviceTask task;
};
// Upload texture information to device if it has changed since last launch