diff options
author | Brecht Van Lommel <brecht@blender.org> | 2022-01-24 21:10:52 +0300 |
---|---|---|
committer | Brecht Van Lommel <brecht@blender.org> | 2022-01-24 21:18:11 +0300 |
commit | 04c3b085188616c375dd5ba3a0632665629b9208 (patch) | |
tree | 243d800c68e41f200ec163b7027a5b6b0a56a160 /intern/cycles/integrator | |
parent | 263f862ba567a8209ced7d6d6486a1f275578aa4 (diff) |
Fix T94355: Cycles wrong GPU bake with adaptive sampling
Diffstat (limited to 'intern/cycles/integrator')
-rw-r--r-- | intern/cycles/integrator/path_trace.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/intern/cycles/integrator/path_trace.cpp b/intern/cycles/integrator/path_trace.cpp index 0b55d1078a8..fd697836f52 100644 --- a/intern/cycles/integrator/path_trace.cpp +++ b/intern/cycles/integrator/path_trace.cpp @@ -820,8 +820,15 @@ void PathTrace::tile_buffer_read() return; } + /* Read buffers back from device. */ + tbb::parallel_for_each(path_trace_works_, [&](unique_ptr<PathTraceWork> &path_trace_work) { + path_trace_work->copy_render_buffers_from_device(); + }); + + /* Read (subset of) passes from output driver. */ 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) { path_trace_work->copy_render_buffers_to_device(); }); |