[Bf-blender-cvs] [04c3b085188] master: Fix T94355: Cycles wrong GPU bake with adaptive sampling

Brecht Van Lommel noreply at git.blender.org
Mon Jan 24 19:26:18 CET 2022


Commit: 04c3b085188616c375dd5ba3a0632665629b9208
Author: Brecht Van Lommel
Date:   Mon Jan 24 19:10:52 2022 +0100
Branches: master
https://developer.blender.org/rB04c3b085188616c375dd5ba3a0632665629b9208

Fix T94355: Cycles wrong GPU bake with adaptive sampling

===================================================================

M	intern/cycles/integrator/path_trace.cpp

===================================================================

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();
     });



More information about the Bf-blender-cvs mailing list