Changeset View
Changeset View
Standalone View
Standalone View
intern/cycles/integrator/path_trace_work_cpu.cpp
| Show First 20 Lines • Show All 61 Lines • ▼ Show 20 Lines | |||||
| } | } | ||||
| void PathTraceWorkCPU::init_execution() | void PathTraceWorkCPU::init_execution() | ||||
| { | { | ||||
| /* Cache per-thread kernel globals. */ | /* Cache per-thread kernel globals. */ | ||||
| device_->get_cpu_kernel_thread_globals(kernel_thread_globals_); | device_->get_cpu_kernel_thread_globals(kernel_thread_globals_); | ||||
| } | } | ||||
| void PathTraceWorkCPU::render_samples(int start_sample, int samples_num) | void PathTraceWorkCPU::render_samples(RenderStatistics &statistics, | ||||
| int start_sample, | |||||
| int samples_num) | |||||
| { | { | ||||
| const int64_t image_width = effective_buffer_params_.width; | const int64_t image_width = effective_buffer_params_.width; | ||||
| const int64_t image_height = effective_buffer_params_.height; | const int64_t image_height = effective_buffer_params_.height; | ||||
| const int64_t total_pixels_num = image_width * image_height; | const int64_t total_pixels_num = image_width * image_height; | ||||
| for (CPUKernelThreadGlobals &kernel_globals : kernel_thread_globals_) { | for (CPUKernelThreadGlobals &kernel_globals : kernel_thread_globals_) { | ||||
| kernel_globals.start_profiling(); | kernel_globals.start_profiling(); | ||||
| } | } | ||||
| Show All 22 Lines | tbb::parallel_for(int64_t(0), total_pixels_num, [&](int64_t work_index) { | ||||
| render_samples_full_pipeline(kernel_globals, work_tile, samples_num); | render_samples_full_pipeline(kernel_globals, work_tile, samples_num); | ||||
| }); | }); | ||||
| }); | }); | ||||
| for (CPUKernelThreadGlobals &kernel_globals : kernel_thread_globals_) { | for (CPUKernelThreadGlobals &kernel_globals : kernel_thread_globals_) { | ||||
| kernel_globals.stop_profiling(); | kernel_globals.stop_profiling(); | ||||
| } | } | ||||
| statistics.occupancy = 1.0f; | |||||
| } | } | ||||
| void PathTraceWorkCPU::render_samples_full_pipeline(KernelGlobals *kernel_globals, | void PathTraceWorkCPU::render_samples_full_pipeline(KernelGlobals *kernel_globals, | ||||
| const KernelWorkTile &work_tile, | const KernelWorkTile &work_tile, | ||||
| const int samples_num) | const int samples_num) | ||||
| { | { | ||||
| const bool has_shadow_catcher = device_scene_->data.integrator.has_shadow_catcher; | const bool has_shadow_catcher = device_scene_->data.integrator.has_shadow_catcher; | ||||
| const bool has_bake = device_scene_->data.bake.use; | const bool has_bake = device_scene_->data.bake.use; | ||||
| ▲ Show 20 Lines • Show All 161 Lines • Show Last 20 Lines | |||||