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.
This commit is contained in:
parent
b6ad0735a6
commit
71cf9f4b3f
Notes:
blender-bot
2023-02-14 09:17:57 +01:00
Referenced by issue #91955, blender crash when rendering after choose optix denoiser option in unsupported device
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue