Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPatrick Mours <pmours@nvidia.com>2022-08-12 16:49:30 +0300
committerPatrick Mours <pmours@nvidia.com>2022-08-12 17:00:54 +0300
commit79787bf8e1e1d766e34dc6f8c5eda2efcceaa6cc (patch)
tree95255c7ae7c5075abc07995126efc76701882050 /intern/cycles/session/session.cpp
parent27105af938b14c48fb498a292e2b371cbd8faf31 (diff)
Cycles: Improve denoiser update performance when rendering with multiple GPUs
This patch causes the render buffers to be copied to the denoiser device only once before denoising and output/display is then fed from that single buffer on the denoiser device. That way usually all but one copy (from all the render devices to the denoiser device) can be eliminated, provided that the denoiser device is also the display device (in which case interop is used to update the display). As such this patch also adds some logic that tries to ensure the chosen denoiser device is the same as the display device. Differential Revision: https://developer.blender.org/D15657
Diffstat (limited to 'intern/cycles/session/session.cpp')
-rw-r--r--intern/cycles/session/session.cpp15
1 files changed, 9 insertions, 6 deletions
diff --git a/intern/cycles/session/session.cpp b/intern/cycles/session/session.cpp
index e7de82a6e1b..c94b53535a7 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);
}
@@ -618,12 +626,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)