[Bf-blender-cvs] [71cf9f4b3f0] master: Fix T91955: Cycles crash with denoising on non-available device

Sergey Sharybin noreply at git.blender.org
Tue Oct 5 10:52:38 CEST 2021


Commit: 71cf9f4b3f0b750325a0037c4ef5c43fea71248f
Author: Sergey Sharybin
Date:   Tue Oct 5 10:50:40 2021 +0200
Branches: master
https://developer.blender.org/rB71cf9f4b3f0b750325a0037c4ef5c43fea71248f

Fix T91955: Cycles crash with denoising on non-available device

For example, crash when attempting to use OptiX denoiser on systems
without OptiX-capable device.

Perform check that scene update happened without errors.

Note that `et_error` makes progress to cancel, so the code was
simplified a bit.

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

M	intern/cycles/render/session.cpp

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

diff --git a/intern/cycles/render/session.cpp b/intern/cycles/render/session.cpp
index 550188b196a..4f93c3a9054 100644
--- a/intern/cycles/render/session.cpp
+++ b/intern/cycles/render/session.cpp
@@ -157,6 +157,13 @@ void Session::run_main_render_loop()
       continue;
     }
 
+    /* Stop rendering if error happenned during scene update or other step of preparing scene
+     * for render. */
+    if (device->have_error()) {
+      progress.set_error(device->error_message());
+      break;
+    }
+
     {
       /* buffers mutex is locked entirely while rendering each
        * sample, and released/reacquired on each iteration to allow
@@ -172,10 +179,9 @@ void Session::run_main_render_loop()
       /* update status and timing */
       update_status_time();
 
+      /* Stop rendering if error happenned during path tracing. */
       if (device->have_error()) {
-        const string &error_message = device->error_message();
-        progress.set_error(error_message);
-        progress.set_cancel(error_message);
+        progress.set_error(device->error_message());
         break;
       }
     }



More information about the Bf-blender-cvs mailing list