diff options
author | Patrick Mours <pmours@nvidia.com> | 2022-08-12 17:04:06 +0300 |
---|---|---|
committer | Patrick Mours <pmours@nvidia.com> | 2022-08-12 17:04:42 +0300 |
commit | e7908c079042b8d64ee2a39bf2630e676e89fe6d (patch) | |
tree | bc54a33b4bcf45b7db62219783aa599eca707c91 /intern/cycles/session | |
parent | 8af5267495673a4e5492fca3b534357b5b6f0ee7 (diff) | |
parent | 79787bf8e1e1d766e34dc6f8c5eda2efcceaa6cc (diff) |
Merge branch 'blender-v3.3-release'
Diffstat (limited to 'intern/cycles/session')
-rw-r--r-- | intern/cycles/session/session.cpp | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/intern/cycles/session/session.cpp b/intern/cycles/session/session.cpp index a5a44aca4b7..e5df22211e7 100644 --- a/intern/cycles/session/session.cpp +++ b/intern/cycles/session/session.cpp @@ -370,6 +370,14 @@ RenderWork Session::run_update_for_next_iteration() if (update_scene(width, height)) { profiler.reset(scene->shaders.size(), scene->objects.size()); } + + /* Unlock scene mutex before loading denoiser kernels, since that may attempt to activate + * graphics interop, which can deadlock when the scene mutex is still being held. */ + scene_lock.unlock(); + + path_trace_->load_kernels(); + path_trace_->alloc_work_memory(); + progress.add_skip_time(update_timer, params.background); } @@ -621,12 +629,7 @@ bool Session::update_scene(int width, int height) Camera *cam = scene->camera; cam->set_screen_size(width, height); - const bool scene_update_result = scene->update(progress); - - path_trace_->load_kernels(); - path_trace_->alloc_work_memory(); - - return scene_update_result; + return scene->update(progress); } static string status_append(const string &status, const string &suffix) |