diff options
author | Sergey Sharybin <sergey@blender.org> | 2021-10-05 11:50:40 +0300 |
---|---|---|
committer | Sergey Sharybin <sergey@blender.org> | 2021-10-05 11:52:35 +0300 |
commit | 71cf9f4b3f0b750325a0037c4ef5c43fea71248f (patch) | |
tree | 600d0dca00e9ef9beaae2c71e61dabf3c8df8163 /intern | |
parent | b6ad0735a6b0a84aaee20d072bf218e262e8bb89 (diff) |
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.
Diffstat (limited to 'intern')
-rw-r--r-- | intern/cycles/render/session.cpp | 12 |
1 files changed, 9 insertions, 3 deletions
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; } } |