Cleanup: minor refactoring around DeviceTask
authorBrecht Van Lommel <brecht@blender.org>
Fri, 5 Jun 2020 09:39:11 +0000 (11:39 +0200)
committerBrecht Van Lommel <brecht@blender.org>
Mon, 22 Jun 2020 11:06:47 +0000 (13:06 +0200)
23 files changed:
intern/cycles/blender/blender_python.cpp
intern/cycles/bvh/bvh.cpp
intern/cycles/bvh/bvh_embree.cpp
intern/cycles/bvh/bvh_optix.cpp
intern/cycles/device/cuda/device_cuda.h
intern/cycles/device/cuda/device_cuda_impl.cpp
intern/cycles/device/device_cpu.cpp
intern/cycles/device/device_optix.cpp
intern/cycles/device/device_split_kernel.cpp
intern/cycles/device/device_split_kernel.h
intern/cycles/device/device_task.cpp
intern/cycles/device/device_task.h
intern/cycles/device/opencl/device_opencl.h
intern/cycles/device/opencl/device_opencl_impl.cpp
intern/cycles/render/denoising.cpp
intern/cycles/render/geometry.cpp
intern/cycles/render/image.cpp
intern/cycles/render/image.h
intern/cycles/render/integrator.cpp
intern/cycles/render/light.cpp
intern/cycles/render/object.cpp
intern/cycles/render/shader.cpp
intern/cycles/test/render_graph_finalize_test.cpp

index 0be19dbffd1ab766634a9c8fd6d2e79e84f29936..5595d6576402a33dd60be26a2b92f5fa59981133 100644 (file)
@@ -33,6 +33,7 @@
 #include "util/util_opengl.h"
 #include "util/util_path.h"
 #include "util/util_string.h"
+#include "util/util_task.h"
 #include "util/util_types.h"
 
 #ifdef WITH_OSL
index 0313bcd68b04c2f56b24d82a2494567f28f2361e..8749bcfc07ec71531d42a4ba22700dfb3439b246 100644 (file)
 #include "bvh/bvh4.h"
 #include "bvh/bvh8.h"
 #include "bvh/bvh_build.h"
+#include "bvh/bvh_embree.h"
 #include "bvh/bvh_node.h"
-
-#ifdef WITH_OPTIX
-#  include "bvh/bvh_optix.h"
-#endif
-#ifdef WITH_EMBREE
-#  include "bvh/bvh_embree.h"
-#endif
+#include "bvh/bvh_optix.h"
 
 #include "util/util_foreach.h"
 #include "util/util_logging.h"
index 6735202835b8b976cd463f34fb0fa2fca7127ef4..ebefc54be8874b2a1b580815a314a57dbc2e730f 100644 (file)
 #  include "render/hair.h"
 #  include "render/mesh.h"
 #  include "render/object.h"
+
 #  include "util/util_foreach.h"
 #  include "util/util_logging.h"
 #  include "util/util_progress.h"
+#  include "util/util_stats.h"
 
 CCL_NAMESPACE_BEGIN
 
index 740994b2ebc6827fe7ec3b7df8ddae9b95b70532..04cff674938815769a795c147ee10fe2bf666511 100644 (file)
 #ifdef WITH_OPTIX
 
 #  include "bvh/bvh_optix.h"
+
+#  include "device/device.h"
+
 #  include "render/geometry.h"
 #  include "render/hair.h"
 #  include "render/mesh.h"
 #  include "render/object.h"
+
 #  include "util/util_foreach.h"
 #  include "util/util_logging.h"
 #  include "util/util_progress.h"
index e7cf71ea96c7b75c5a350a506043f1850b7d5091..e5e3e24165dd29a9d12a0822166b3cbe5a0d79a3 100644 (file)
@@ -21,6 +21,7 @@
 #  include "device/device_split_kernel.h"
 
 #  include "util/util_map.h"
+#  include "util/util_task.h"
 
 #  ifdef WITH_CUDA_DYNLOAD
 #    include "cuew.h"
@@ -254,7 +255,7 @@ class CUDADevice : public Device {
                    bool transparent,
                    const DeviceDrawParams &draw_params) override;
 
-  void thread_run(DeviceTask *task);
+  void thread_run(DeviceTask &task);
 
   virtual void task_add(DeviceTask &task) override;
 
index 7aa63ff48c3b604180d069bb255732e2e1357680..83f7bc10911d0b78fdc85caba9eab39b04ad6e8f 100644 (file)
@@ -105,7 +105,7 @@ class CUDASplitKernel : public DeviceSplitKernel {
   virtual SplitKernelFunction *get_split_kernel_function(const string &kernel_name,
                                                          const DeviceRequestedFeatures &);
   virtual int2 split_kernel_local_size();
-  virtual int2 split_kernel_global_size(device_memory &kg, device_memory &data, DeviceTask *task);
+  virtual int2 split_kernel_global_size(device_memory &kg, device_memory &data, DeviceTask &task);
 };
 
 /* Utility to push/pop CUDA context. */
@@ -2326,11 +2326,11 @@ void CUDADevice::draw_pixels(device_memory &mem,
   Device::draw_pixels(mem, y, w, h, width, height, dx, dy, dw, dh, transparent, draw_params);
 }
 
-void CUDADevice::thread_run(DeviceTask *task)
+void CUDADevice::thread_run(DeviceTask &task)
 {
   CUDAContextScope scope(this);
 
-  if (task->type == DeviceTask::RENDER) {
+  if (task.type == DeviceTask::RENDER) {
     DeviceRequestedFeatures requested_features;
     if (use_split_kernel()) {
       if (split_kernel == NULL) {
@@ -2343,70 +2343,72 @@ void CUDADevice::thread_run(DeviceTask *task)
 
     /* keep rendering tiles until done */
     RenderTile tile;
-    DenoisingTask denoising(this, *task);
+    DenoisingTask denoising(this, task);
 
-    while (task->acquire_tile(this, tile, task->tile_types)) {
+    while (task.acquire_tile(this, tile, task.tile_types)) {
       if (tile.task == RenderTile::PATH_TRACE) {
         if (use_split_kernel()) {
           device_only_memory<uchar> void_buffer(this, "void_buffer");
           split_kernel->path_trace(task, tile, void_buffer, void_buffer);
         }
         else {
-          render(*task, tile, work_tiles);
+          render(task, tile, work_tiles);
         }
       }
       else if (tile.task == RenderTile::BAKE) {
-        render(*task, tile, work_tiles);
+        render(task, tile, work_tiles);
       }
       else if (tile.task == RenderTile::DENOISE) {
         tile.sample = tile.start_sample + tile.num_samples;
 
         denoise(tile, denoising);
 
-        task->update_progress(&tile, tile.w * tile.h);
+        task.update_progress(&tile, tile.w * tile.h);
       }
 
-      task->release_tile(tile);
+      task.release_tile(tile);
 
-      if (task->get_cancel()) {
-        if (task->need_finish_queue == false)
+      if (task.get_cancel()) {
+        if (task.need_finish_queue == false)
           break;
       }
     }
 
     work_tiles.free();
   }
-  else if (task->type == DeviceTask::SHADER) {
-    shader(*task);
+  else if (task.type == DeviceTask::SHADER) {
+    shader(task);
 
     cuda_assert(cuCtxSynchronize());
   }
-  else if (task->type == DeviceTask::DENOISE_BUFFER) {
+  else if (task.type == DeviceTask::DENOISE_BUFFER) {
     RenderTile tile;
-    tile.x = task->x;
-    tile.y = task->y;
-    tile.w = task->w;
-    tile.h = task->h;
-    tile.buffer = task->buffer;
-    tile.sample = task->sample + task->num_samples;
-    tile.num_samples = task->num_samples;
-    tile.start_sample = task->sample;
-    tile.offset = task->offset;
-    tile.stride = task->stride;
-    tile.buffers = task->buffers;
-
-    DenoisingTask denoising(this, *task);
+    tile.x = task.x;
+    tile.y = task.y;
+    tile.w = task.w;
+    tile.h = task.h;
+    tile.buffer = task.buffer;
+    tile.sample = task.sample + task.num_samples;
+    tile.num_samples = task.num_samples;
+    tile.start_sample = task.sample;
+    tile.offset = task.offset;
+    tile.stride = task.stride;
+    tile.buffers = task.buffers;
+
+    DenoisingTask denoising(this, task);
     denoise(tile, denoising);
-    task->update_progress(&tile, tile.w * tile.h);
+    task.update_progress(&tile, tile.w * tile.h);
   }
 }
 
-class CUDADeviceTask : public DeviceTask {
+class CUDADeviceTask : public Task {
  public:
-  CUDADeviceTask(CUDADevice *device, DeviceTask &task) : DeviceTask(task)
+  CUDADeviceTask(CUDADevice *device, DeviceTask &task) : task(task)
   {
-    run = function_bind(&CUDADevice::thread_run, device, this);
+    run = function_bind(&CUDADevice::thread_run, device, task);
   }
+
+  DeviceTask task;
 };
 
 void CUDADevice::task_add(DeviceTask &task)
@@ -2652,7 +2654,7 @@ int2 CUDASplitKernel::split_kernel_local_size()
 
 int2 CUDASplitKernel::split_kernel_global_size(device_memory &kg,
                                                device_memory &data,
-                                               DeviceTask * /*task*/)
+                                               DeviceTask & /*task*/)
 {
   CUDAContextScope scope(device);
   size_t free;
index fc6febd8cee31933d46869fa65a9139ef826bc6b..096cb83552acaf97ef5e898b0b4368107cf4bcd8 100644 (file)
@@ -55,6 +55,7 @@
 #include "util/util_optimization.h"
 #include "util/util_progress.h"
 #include "util/util_system.h"
+#include "util/util_task.h"
 #include "util/util_thread.h"
 
 CCL_NAMESPACE_BEGIN
@@ -161,7 +162,7 @@ class CPUSplitKernel : public DeviceSplitKernel {
   virtual SplitKernelFunction *get_split_kernel_function(const string &kernel_name,
                                                          const DeviceRequestedFeatures &);
   virtual int2 split_kernel_local_size();
-  virtual int2 split_kernel_global_size(device_memory &kg, device_memory &data, DeviceTask *task);
+  virtual int2 split_kernel_global_size(device_memory &kg, device_memory &data, DeviceTask &task);
   virtual uint64_t state_buffer_size(device_memory &kg, device_memory &data, size_t num_threads);
 };
 
@@ -527,24 +528,26 @@ class CPUDevice : public Device {
 #endif
   }
 
-  void thread_run(DeviceTask *task)
+  void thread_run(DeviceTask &task)
   {
-    if (task->type == DeviceTask::RENDER)
-      thread_render(*task);
-    else if (task->type == DeviceTask::SHADER)
-      thread_shader(*task);
-    else if (task->type == DeviceTask::FILM_CONVERT)
-      thread_film_convert(*task);
-    else if (task->type == DeviceTask::DENOISE_BUFFER)
-      thread_denoise(*task);
+    if (task.type == DeviceTask::RENDER)
+      thread_render(task);
+    else if (task.type == DeviceTask::SHADER)
+      thread_shader(task);
+    else if (task.type == DeviceTask::FILM_CONVERT)
+      thread_film_convert(task);
+    else if (task.type == DeviceTask::DENOISE_BUFFER)
+      thread_denoise(task);
   }
 
-  class CPUDeviceTask : public DeviceTask {
+  class CPUDeviceTask : public Task {
    public:
-    CPUDeviceTask(CPUDevice *device, DeviceTask &task) : DeviceTask(task)
+    CPUDeviceTask(CPUDevice *device, DeviceTask &task) : task(task)
     {
-      run = function_bind(&CPUDevice::thread_run, device, this);
+      run = function_bind(&CPUDevice::thread_run, device, task);
     }
+
+    DeviceTask task;
   };
 
   bool denoising_non_local_means(device_ptr image_ptr,
@@ -1027,7 +1030,7 @@ class CPUDevice : public Device {
       if (tile.task == RenderTile::PATH_TRACE) {
         if (use_split_kernel) {
           device_only_memory<uchar> void_buffer(this, "void_buffer");
-          split_kernel->path_trace(&task, tile, kgbuffer, void_buffer);
+          split_kernel->path_trace(task, tile, kgbuffer, void_buffer);
         }
         else {
           render(task, tile, kg);
@@ -1326,7 +1329,7 @@ int2 CPUSplitKernel::split_kernel_local_size()
 
 int2 CPUSplitKernel::split_kernel_global_size(device_memory & /*kg*/,
                                               device_memory & /*data*/,
-                                              DeviceTask * /*task*/)
+                                              DeviceTask & /*task*/)
 {
   return make_int2(1, 1);
 }
index fbf6a914744ccfe0322fc97923fe3f4c54e458c9..2d99a943015f325758737948ad3ea33e430008d4 100644 (file)
@@ -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
index f22d87610587e3d6b483a7931659074d7462f49e..4c288f60c16f16d9dbadfc7f1a7636fb12f5b9b2 100644 (file)
@@ -145,7 +145,7 @@ size_t DeviceSplitKernel::max_elements_for_max_buffer_size(device_memory &kg,
   return max_buffer_size / size_per_element;
 }
 
-bool DeviceSplitKernel::path_trace(DeviceTask *task,
+bool DeviceSplitKernel::path_trace(DeviceTask &task,
                                    RenderTile &tile,
                                    device_memory &kgbuffer,
                                    device_memory &kernel_data)
@@ -222,9 +222,9 @@ bool DeviceSplitKernel::path_trace(DeviceTask *task,
     subtile.start_sample = tile.sample;
     subtile.num_samples = samples_per_second;
 
-    if (task->adaptive_sampling.use) {
-      subtile.num_samples = task->adaptive_sampling.align_dynamic_samples(subtile.start_sample,
-                                                                          subtile.num_samples);
+    if (task.adaptive_sampling.use) {
+      subtile.num_samples = task.adaptive_sampling.align_dynamic_samples(subtile.start_sample,
+                                                                         subtile.num_samples);
     }
 
     /* Don't go beyond requested number of samples. */
@@ -286,7 +286,7 @@ bool DeviceSplitKernel::path_trace(DeviceTask *task,
         ENQUEUE_SPLIT_KERNEL(queue_enqueue, global_size, local_size);
         ENQUEUE_SPLIT_KERNEL(buffer_update, global_size, local_size);
 
-        if (task->get_cancel() && cancel_time == DBL_MAX) {
+        if (task.get_cancel() && cancel_time == DBL_MAX) {
           /* Wait up to twice as many seconds for current samples to finish
            * to avoid artifacts in render result from ending too soon.
            */
@@ -323,7 +323,7 @@ bool DeviceSplitKernel::path_trace(DeviceTask *task,
     }
 
     int filter_sample = tile.sample + subtile.num_samples - 1;
-    if (task->adaptive_sampling.use && task->adaptive_sampling.need_filter(filter_sample)) {
+    if (task.adaptive_sampling.use && task.adaptive_sampling.need_filter(filter_sample)) {
       size_t buffer_size[2];
       buffer_size[0] = round_up(tile.w, local_size[0]);
       buffer_size[1] = round_up(tile.h, local_size[1]);
@@ -352,16 +352,16 @@ bool DeviceSplitKernel::path_trace(DeviceTask *task,
 #undef ENQUEUE_SPLIT_KERNEL
 
     tile.sample += subtile.num_samples;
-    task->update_progress(&tile, tile.w * tile.h * subtile.num_samples);
+    task.update_progress(&tile, tile.w * tile.h * subtile.num_samples);
 
     time_multiplier = min(time_multiplier << 1, 10);
 
-    if (task->get_cancel()) {
+    if (task.get_cancel()) {
       return true;
     }
   }
 
-  if (task->adaptive_sampling.use) {
+  if (task.adaptive_sampling.use) {
     /* Reset the start samples. */
     RenderTile subtile = tile;
     subtile.start_sample = tile.start_sample;
index 9d6b9efdd623f85b0b48fd11b0a21aea74d36962..07a21b10299f64114a519c35d60e9a2ba580b875 100644 (file)
@@ -109,7 +109,7 @@ class DeviceSplitKernel {
   virtual ~DeviceSplitKernel();
 
   bool load_kernels(const DeviceRequestedFeatures &requested_features);
-  bool path_trace(DeviceTask *task,
+  bool path_trace(DeviceTask &task,
                   RenderTile &rtile,
                   device_memory &kgbuffer,
                   device_memory &kernel_data);
@@ -137,7 +137,7 @@ class DeviceSplitKernel {
   virtual int2 split_kernel_local_size() = 0;
   virtual int2 split_kernel_global_size(device_memory &kg,
                                         device_memory &data,
-                                        DeviceTask *task) = 0;
+                                        DeviceTask &task) = 0;
 };
 
 CCL_NAMESPACE_END
index 7485e1b41de15cae1c49a060accf2b5dd8376c81..6e7c184c6c9db51f8ebd7b0427fd3339591d297e 100644 (file)
@@ -50,7 +50,7 @@ DeviceTask::DeviceTask(Type type_)
   last_update_time = time_dt();
 }
 
-int DeviceTask::get_subtask_count(int num, int max_size)
+int DeviceTask::get_subtask_count(int num, int max_size) const
 {
   if (max_size != 0) {
     int max_size_num;
@@ -78,7 +78,7 @@ int DeviceTask::get_subtask_count(int num, int max_size)
   return num;
 }
 
-void DeviceTask::split(list<DeviceTask> &tasks, int num, int max_size)
+void DeviceTask::split(list<DeviceTask> &tasks, int num, int max_size) const
 {
   num = get_subtask_count(num, max_size);
 
index 8c4e682adb1e0517387f690c67c39cfdc5d1fae8..5f675bf7e0410457396a21d76944deb7b8aa2740 100644 (file)
@@ -21,7 +21,6 @@
 
 #include "util/util_function.h"
 #include "util/util_list.h"
-#include "util/util_task.h"
 
 CCL_NAMESPACE_BEGIN
 
@@ -75,7 +74,7 @@ class AdaptiveSampling {
   int min_samples;
 };
 
-class DeviceTask : public Task {
+class DeviceTask {
  public:
   typedef enum { RENDER, FILM_CONVERT, SHADER, DENOISE_BUFFER } Type;
   Type type;
@@ -98,8 +97,8 @@ class DeviceTask : public Task {
 
   explicit DeviceTask(Type type = RENDER);
 
-  int get_subtask_count(int num, int max_size = 0);
-  void split(list<DeviceTask> &tasks, int num, int max_size = 0);
+  int get_subtask_count(int num, int max_size = 0) const;
+  void split(list<DeviceTask> &tasks, int num, int max_size = 0) const;
 
   void update_progress(RenderTile *rtile, int pixel_samples = -1);
 
index 389268e1c2aa8fcf3b6a0af246cd4ec08ca15aca..49104cf7c3df7b16c1ba2a07194551c234237785 100644 (file)
@@ -23,6 +23,7 @@
 #  include "util/util_map.h"
 #  include "util/util_param.h"
 #  include "util/util_string.h"
+#  include "util/util_task.h"
 
 #  include "clew.h"
 
@@ -455,12 +456,14 @@ class OpenCLDevice : public Device {
 
   void denoise(RenderTile &tile, DenoisingTask &denoising);
 
-  class OpenCLDeviceTask : public DeviceTask {
+  class OpenCLDeviceTask : public Task {
    public:
-    OpenCLDeviceTask(OpenCLDevice *device, DeviceTask &task) : DeviceTask(task)
+    OpenCLDeviceTask(OpenCLDevice *device, DeviceTask &task) : task(task)
     {
-      run = function_bind(&OpenCLDevice::thread_run, device, this);
+      run = function_bind(&OpenCLDevice::thread_run, device, task);
     }
+
+    DeviceTask task;
   };
 
   int get_split_task_count(DeviceTask & /*task*/)
@@ -483,7 +486,7 @@ class OpenCLDevice : public Device {
     task_pool.cancel();
   }
 
-  void thread_run(DeviceTask *task);
+  void thread_run(DeviceTask &task);
 
   virtual BVHLayoutMask get_bvh_layout_mask() const
   {
index 7a84b271878e7e220ba807fe7af7ff8e1fe805c8..368f7bef23663a3b8249f1b1174c7dc82f907f7c 100644 (file)
@@ -542,7 +542,7 @@ class OpenCLSplitKernel : public DeviceSplitKernel {
 
   virtual int2 split_kernel_global_size(device_memory &kg,
                                         device_memory &data,
-                                        DeviceTask * /*task*/)
+                                        DeviceTask & /*task*/)
   {
     cl_device_type type = OpenCLInfo::get_device_type(device->cdDevice);
     /* Use small global size on CPU devices as it seems to be much faster. */
@@ -1336,20 +1336,20 @@ void OpenCLDevice::flush_texture_buffers()
   memory_manager.alloc("texture_info", texture_info);
 }
 
-void OpenCLDevice::thread_run(DeviceTask *task)
+void OpenCLDevice::thread_run(DeviceTask &task)
 {
   flush_texture_buffers();
 
-  if (task->type == DeviceTask::RENDER) {
+  if (task.type == DeviceTask::RENDER) {
     RenderTile tile;
-    DenoisingTask denoising(this, *task);
+    DenoisingTask denoising(this, task);
 
     /* Allocate buffer for kernel globals */
     device_only_memory<KernelGlobalsDummy> kgbuffer(this, "kernel_globals");
     kgbuffer.alloc_to_device(1);
 
     /* Keep rendering tiles until done. */
-    while (task->acquire_tile(this, tile, task->tile_types)) {
+    while (task.acquire_tile(this, tile, task.tile_types)) {
       if (tile.task == RenderTile::PATH_TRACE) {
         assert(tile.task == RenderTile::PATH_TRACE);
         scoped_timer timer(&tile.buffers->render_time);
@@ -1368,42 +1368,42 @@ void OpenCLDevice::thread_run(DeviceTask *task)
         clFinish(cqCommandQueue);
       }
       else if (tile.task == RenderTile::BAKE) {
-        bake(*task, tile);
+        bake(task, tile);
       }
       else if (tile.task == RenderTile::DENOISE) {
         tile.sample = tile.start_sample + tile.num_samples;
         denoise(tile, denoising);
-        task->update_progress(&tile, tile.w * tile.h);
+        task.update_progress(&tile, tile.w * tile.h);
       }
 
-      task->release_tile(tile);
+      task.release_tile(tile);
     }
 
     kgbuffer.free();
   }
-  else if (task->type == DeviceTask::SHADER) {
-    shader(*task);
+  else if (task.type == DeviceTask::SHADER) {
+    shader(task);
   }
-  else if (task->type == DeviceTask::FILM_CONVERT) {
-    film_convert(*task, task->buffer, task->rgba_byte, task->rgba_half);
+  else if (task.type == DeviceTask::FILM_CONVERT) {
+    film_convert(task, task.buffer, task.rgba_byte, task.rgba_half);
   }
-  else if (task->type == DeviceTask::DENOISE_BUFFER) {
+  else if (task.type == DeviceTask::DENOISE_BUFFER) {
     RenderTile tile;
-    tile.x = task->x;
-    tile.y = task->y;
-    tile.w = task->w;
-    tile.h = task->h;
-    tile.buffer = task->buffer;
-    tile.sample = task->sample + task->num_samples;
-    tile.num_samples = task->num_samples;
-    tile.start_sample = task->sample;
-    tile.offset = task->offset;
-    tile.stride = task->stride;
-    tile.buffers = task->buffers;
-
-    DenoisingTask denoising(this, *task);
+    tile.x = task.x;
+    tile.y = task.y;
+    tile.w = task.w;
+    tile.h = task.h;
+    tile.buffer = task.buffer;
+    tile.sample = task.sample + task.num_samples;
+    tile.num_samples = task.num_samples;
+    tile.start_sample = task.sample;
+    tile.offset = task.offset;
+    tile.stride = task.stride;
+    tile.buffers = task.buffers;
+
+    DenoisingTask denoising(this, task);
     denoise(tile, denoising);
-    task->update_progress(&tile, tile.w * tile.h);
+    task.update_progress(&tile, tile.w * tile.h);
   }
 }
 
index 4d819d1119ee07a9435aa511963f776d08ae2859..93815ebfbc412900fc8b94270c9f2c35d09954b3 100644 (file)
@@ -21,6 +21,7 @@
 #include "util/util_foreach.h"
 #include "util/util_map.h"
 #include "util/util_system.h"
+#include "util/util_task.h"
 #include "util/util_time.h"
 
 #include <OpenImageIO/filesystem.h>
index d46ed430c4f7ddc152992c9a4a86af8116dfc9fd..f448c2fb07f566074e1ae2e7cbc8d6ac5d3b8d84 100644 (file)
 
 #include "bvh/bvh.h"
 #include "bvh/bvh_build.h"
+#include "bvh/bvh_embree.h"
 
-#ifdef WITH_EMBREE
-#  include "bvh/bvh_embree.h"
-#endif
+#include "device/device.h"
 
 #include "render/attribute.h"
 #include "render/camera.h"
index 75050b66bf204a7170243c2fb733d546a64812f5..8d187814d64cee149b9e59a1e3b625f09786d9ba 100644 (file)
@@ -27,6 +27,7 @@
 #include "util/util_logging.h"
 #include "util/util_path.h"
 #include "util/util_progress.h"
+#include "util/util_task.h"
 #include "util/util_texture.h"
 #include "util/util_unique_ptr.h"
 
index 2000582ce706e64296d8575e06253585d8a7d07a..fffe7c5152a6ac338bf534b68f219ff0fb75a0f4 100644 (file)
@@ -17,7 +17,6 @@
 #ifndef __IMAGE_H__
 #define __IMAGE_H__
 
-#include "device/device.h"
 #include "device/device_memory.h"
 
 #include "render/colorspace.h"
@@ -31,6 +30,7 @@
 CCL_NAMESPACE_BEGIN
 
 class Device;
+class DeviceInfo;
 class ImageHandle;
 class ImageKey;
 class ImageMetaData;
index d4beb06e57bebeba237ac08a66b0df7f30a69b4a..eff416efa2bcc0a21b750f4eeebc88c1e4dd8f98 100644 (file)
@@ -29,6 +29,7 @@
 #include "util/util_foreach.h"
 #include "util/util_hash.h"
 #include "util/util_logging.h"
+#include "util/util_task.h"
 
 CCL_NAMESPACE_BEGIN
 
index 225cedfef55f05fbf28d032a5f461a41456bdcc1..25c91a76d581a8a30262dc58a6f2c4cc914054a8 100644 (file)
@@ -31,6 +31,7 @@
 #include "util/util_logging.h"
 #include "util/util_path.h"
 #include "util/util_progress.h"
+#include "util/util_task.h"
 
 CCL_NAMESPACE_BEGIN
 
index 61deef4cd76b946bdd6a16a6a913109dc7ec313f..752350ad76e0c7381dbf3c44752cfacb3a27e013 100644 (file)
@@ -31,6 +31,7 @@
 #include "util/util_murmurhash.h"
 #include "util/util_progress.h"
 #include "util/util_set.h"
+#include "util/util_task.h"
 #include "util/util_vector.h"
 
 #include "subd/subd_patch_table.h"
index 39ba45a751a3e44f1650d925cd5d53a38f1fcd5a..1120d909e988ab3f455eac8f841c049a71e16d13 100644 (file)
@@ -33,6 +33,7 @@
 
 #include "util/util_foreach.h"
 #include "util/util_murmurhash.h"
+#include "util/util_task.h"
 
 #ifdef WITH_OCIO
 #  include <OpenColorIO/OpenColorIO.h>
index 87389ebfb163e11823575be3f73e52adf15857d2..4ea3470cda8844b62821e10622d85000155a6157 100644 (file)
 #include "testing/mock_log.h"
 #include "testing/testing.h"
 
+#include "device/device.h"
+
 #include "render/graph.h"
 #include "render/nodes.h"
 #include "render/scene.h"
+
 #include "util/util_array.h"
 #include "util/util_logging.h"
+#include "util/util_stats.h"
 #include "util/util_string.h"
 #include "util/util_vector.h"