Cycles: Expose passes size to device tasks
authorMai Lavelle <mai.lavelle@gmail.com>
Fri, 20 Jan 2017 08:05:32 +0000 (03:05 -0500)
committerMai Lavelle <mai.lavelle@gmail.com>
Wed, 8 Mar 2017 05:52:41 +0000 (00:52 -0500)
This is needed so devices can know the size of a tile buffer before any
tiles are acquired.

intern/cycles/device/device_task.h
intern/cycles/render/session.cpp

index 8bd54c3d2b0a88721b618c39dd7ec4b0ced1eba1..f31092fd9d24f5e451d9e2f85a778c4c7e4957d6 100644 (file)
@@ -51,6 +51,8 @@ public:
        int shader_filter;
        int shader_x, shader_w;
 
        int shader_filter;
        int shader_x, shader_w;
 
+       int passes_size;
+
        explicit DeviceTask(Type type = PATH_TRACE);
 
        int get_subtask_count(int num, int max_size = 0);
        explicit DeviceTask(Type type = PATH_TRACE);
 
        int get_subtask_count(int num, int max_size = 0);
index 420866c9436c9ebd9641a9bf82f31dad25beb822..557447531288a619558f4c83e82498161e96aac1 100644 (file)
@@ -887,6 +887,7 @@ void Session::path_trace()
        task.need_finish_queue = params.progressive_refine;
        task.integrator_branched = scene->integrator->method == Integrator::BRANCHED_PATH;
        task.requested_tile_size = params.tile_size;
        task.need_finish_queue = params.progressive_refine;
        task.integrator_branched = scene->integrator->method == Integrator::BRANCHED_PATH;
        task.requested_tile_size = params.tile_size;
+       task.passes_size = tile_manager.params.get_passes_size();
 
        device->task_add(task);
 }
 
        device->task_add(task);
 }