diff options
author | Patrick Mours <pmours@nvidia.com> | 2020-02-14 19:00:44 +0300 |
---|---|---|
committer | Patrick Mours <pmours@nvidia.com> | 2020-02-14 19:00:44 +0300 |
commit | 332aed6399a69070f6ad3ef8c81740cddc6ee4fa (patch) | |
tree | ecfd06ad12d893ba33e81e2dd9cda55d998236d6 /intern | |
parent | e34ff4926fad08cf63f479a0a1ebd0849cdd1f8e (diff) |
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`.
Diffstat (limited to 'intern')
-rw-r--r-- | intern/cycles/render/session.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
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(); |