[Bf-blender-cvs] [52f7f641789] cycles-x: Fix possible "run-away" error state in Cycles X

Sergey Sharybin noreply at git.blender.org
Thu Jun 24 10:52:16 CEST 2021


Commit: 52f7f641789291658cb596f496dae879381b09ff
Author: Sergey Sharybin
Date:   Thu Jun 24 10:47:34 2021 +0200
Branches: cycles-x
https://developer.blender.org/rB52f7f641789291658cb596f496dae879381b09ff

Fix possible "run-away" error state in Cycles X

If the path tracing kernel encountered an error, it could cause wrong
code paths to trigger in the GPU implementation of the display update.

For example, an error state in the path trace should not mate the display
update to attempt to roll-back from interop update to naive one.

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

M	intern/cycles/integrator/path_trace_work_gpu.cpp

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

diff --git a/intern/cycles/integrator/path_trace_work_gpu.cpp b/intern/cycles/integrator/path_trace_work_gpu.cpp
index ec77b85e94c..5228c3a12a1 100644
--- a/intern/cycles/integrator/path_trace_work_gpu.cpp
+++ b/intern/cycles/integrator/path_trace_work_gpu.cpp
@@ -629,6 +629,12 @@ void PathTraceWorkGPU::copy_to_gpu_display(GPUDisplay *gpu_display,
                                            PassMode pass_mode,
                                            int num_samples)
 {
+  if (device_->have_error()) {
+    /* Don't attempt to update GPU display if the device has errors: the error state will make
+     * wrong decisions to happen about interop, causing more chained bugs. */
+    return;
+  }
+
   if (!interop_use_checked_) {
     Device *device = queue_->device;
     interop_use_ = device->should_use_graphics_interop();



More information about the Bf-blender-cvs mailing list