[Bf-blender-cvs] [332aed6399a] master: Fix sporadic CUDA launch failures with Cycles viewport denoising

Patrick Mours noreply at git.blender.org
Fri Feb 14 17:00:59 CET 2020


Commit: 332aed6399a69070f6ad3ef8c81740cddc6ee4fa
Author: Patrick Mours
Date:   Fri Feb 14 17:00:44 2020 +0100
Branches: master
https://developer.blender.org/rB332aed6399a69070f6ad3ef8c81740cddc6ee4fa

Fix sporadic CUDA launch failures with Cycles viewport denoising

Sometimes the viewport buffer size is zero for a frame, which caused the denoising task to also try to
launch CUDA kernels with a launch size of zero, which in turn failed with a CUDA error. This patch
prevents launches from occuring in this case, similar to how it is handled in `copy_to_display_buffer`.

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

M	intern/cycles/render/session.cpp

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

diff --git a/intern/cycles/render/session.cpp b/intern/cycles/render/session.cpp
index 160b77d5f14..b41844cb132 100644
--- a/intern/cycles/render/session.cpp
+++ b/intern/cycles/render/session.cpp
@@ -1128,6 +1128,10 @@ void Session::denoise()
   else {
     assert(buffers);
 
+    if (tile_manager.state.buffer.width == 0 || tile_manager.state.buffer.height == 0) {
+      return; /* Avoid empty launches. */
+    }
+
     /* Wait for rendering to finish. */
     device->task_wait();



More information about the Bf-blender-cvs mailing list