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`.
This commit is contained in:
parent
e34ff4926f
commit
332aed6399
|
@ -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();
|
||||
|
||||
|
|
Loading…
Reference in New Issue