diff options
author | Fabian Schempp <fabianschempp@googlemail.com> | 2022-04-18 23:28:08 +0300 |
---|---|---|
committer | Fabian Schempp <fabianschempp@googlemail.com> | 2022-04-18 23:28:08 +0300 |
commit | 01616f9ed2da14b5cad40efac03d1a22dbb759f3 (patch) | |
tree | 4955ad12f260e557aa1c0f724a320e565f8bce5c /intern/cycles/integrator/path_trace.cpp | |
parent | f06d361da1249c93568153bae88bcdf43b4774a1 (diff) | |
parent | 314b27850ccb6d103cf5c73855187cfc11ec48d8 (diff) |
Merge branch 'master' into soc-2021-porting-modifiers-to-nodes-remesh-voxel
Diffstat (limited to 'intern/cycles/integrator/path_trace.cpp')
-rw-r--r-- | intern/cycles/integrator/path_trace.cpp | 38 |
1 files changed, 20 insertions, 18 deletions
diff --git a/intern/cycles/integrator/path_trace.cpp b/intern/cycles/integrator/path_trace.cpp index ab134179602..4ecd3b829e8 100644 --- a/intern/cycles/integrator/path_trace.cpp +++ b/intern/cycles/integrator/path_trace.cpp @@ -334,7 +334,7 @@ void PathTrace::init_render_buffers(const RenderWork &render_work) /* Handle initialization scheduled by the render scheduler. */ if (render_work.init_render_buffers) { - tbb::parallel_for_each(path_trace_works_, [&](unique_ptr<PathTraceWork> &path_trace_work) { + parallel_for_each(path_trace_works_, [&](unique_ptr<PathTraceWork> &path_trace_work) { path_trace_work->zero_render_buffers(); }); @@ -355,7 +355,9 @@ void PathTrace::path_trace(RenderWork &render_work) const int num_works = path_trace_works_.size(); - tbb::parallel_for(0, num_works, [&](int i) { + thread_capture_fp_settings(); + + parallel_for(0, num_works, [&](int i) { const double work_start_time = time_dt(); const int num_samples = render_work.path_trace.num_samples; @@ -405,7 +407,7 @@ void PathTrace::adaptive_sample(RenderWork &render_work) const double start_time = time_dt(); uint num_active_pixels = 0; - tbb::parallel_for_each(path_trace_works_, [&](unique_ptr<PathTraceWork> &path_trace_work) { + parallel_for_each(path_trace_works_, [&](unique_ptr<PathTraceWork> &path_trace_work) { const uint num_active_pixels_in_work = path_trace_work->adaptive_sampling_converge_filter_count_active( render_work.adaptive_sampling.threshold, render_work.adaptive_sampling.reset); @@ -483,7 +485,7 @@ void PathTrace::cryptomatte_postprocess(const RenderWork &render_work) } VLOG(3) << "Perform cryptomatte work."; - tbb::parallel_for_each(path_trace_works_, [&](unique_ptr<PathTraceWork> &path_trace_work) { + parallel_for_each(path_trace_works_, [&](unique_ptr<PathTraceWork> &path_trace_work) { path_trace_work->cryptomatte_postproces(); }); } @@ -536,7 +538,7 @@ void PathTrace::denoise(const RenderWork &render_work) if (multi_device_buffers) { multi_device_buffers->copy_from_device(); - tbb::parallel_for_each( + parallel_for_each( path_trace_works_, [&multi_device_buffers](unique_ptr<PathTraceWork> &path_trace_work) { path_trace_work->copy_from_denoised_render_buffers(multi_device_buffers.get()); }); @@ -806,7 +808,7 @@ void PathTrace::tile_buffer_read() } /* Read buffers back from device. */ - tbb::parallel_for_each(path_trace_works_, [&](unique_ptr<PathTraceWork> &path_trace_work) { + parallel_for_each(path_trace_works_, [&](unique_ptr<PathTraceWork> &path_trace_work) { path_trace_work->copy_render_buffers_from_device(); }); @@ -814,7 +816,7 @@ void PathTrace::tile_buffer_read() PathTraceTile tile(*this); if (output_driver_->read_render_tile(tile)) { /* Copy buffers to device again. */ - tbb::parallel_for_each(path_trace_works_, [](unique_ptr<PathTraceWork> &path_trace_work) { + parallel_for_each(path_trace_works_, [](unique_ptr<PathTraceWork> &path_trace_work) { path_trace_work->copy_render_buffers_to_device(); }); } @@ -878,20 +880,20 @@ void PathTrace::progress_set_status(const string &status, const string &substatu void PathTrace::copy_to_render_buffers(RenderBuffers *render_buffers) { - tbb::parallel_for_each(path_trace_works_, - [&render_buffers](unique_ptr<PathTraceWork> &path_trace_work) { - path_trace_work->copy_to_render_buffers(render_buffers); - }); + parallel_for_each(path_trace_works_, + [&render_buffers](unique_ptr<PathTraceWork> &path_trace_work) { + path_trace_work->copy_to_render_buffers(render_buffers); + }); render_buffers->copy_to_device(); } void PathTrace::copy_from_render_buffers(RenderBuffers *render_buffers) { render_buffers->copy_from_device(); - tbb::parallel_for_each(path_trace_works_, - [&render_buffers](unique_ptr<PathTraceWork> &path_trace_work) { - path_trace_work->copy_from_render_buffers(render_buffers); - }); + parallel_for_each(path_trace_works_, + [&render_buffers](unique_ptr<PathTraceWork> &path_trace_work) { + path_trace_work->copy_from_render_buffers(render_buffers); + }); } bool PathTrace::copy_render_tile_from_device() @@ -903,7 +905,7 @@ bool PathTrace::copy_render_tile_from_device() bool success = true; - tbb::parallel_for_each(path_trace_works_, [&](unique_ptr<PathTraceWork> &path_trace_work) { + parallel_for_each(path_trace_works_, [&](unique_ptr<PathTraceWork> &path_trace_work) { if (!success) { return; } @@ -1004,7 +1006,7 @@ bool PathTrace::get_render_tile_pixels(const PassAccessor &pass_accessor, bool success = true; - tbb::parallel_for_each(path_trace_works_, [&](unique_ptr<PathTraceWork> &path_trace_work) { + parallel_for_each(path_trace_works_, [&](unique_ptr<PathTraceWork> &path_trace_work) { if (!success) { return; } @@ -1021,7 +1023,7 @@ bool PathTrace::set_render_tile_pixels(PassAccessor &pass_accessor, { bool success = true; - tbb::parallel_for_each(path_trace_works_, [&](unique_ptr<PathTraceWork> &path_trace_work) { + parallel_for_each(path_trace_works_, [&](unique_ptr<PathTraceWork> &path_trace_work) { if (!success) { return; } |