Fix artifacts with Cycles viewport denoising when rendering with multiple CUDA devices

Rendering with multiple CUDA devices but denoising with OptiX caused parts of the image to go
missing at the start while the resolution was scaled. This is because the copy operation in
`MultiDevice::map_neighbor_tiles` which slices the copy across all devices would slice based on the
full resolution and not the scaled one and therefore copy incorrect data between devices.
Since this is not the recommended way of using viewport denoising anyway, simply avoid those
incorrect copies for now by disabling denoising while the resolution is scaled. Doing both rendering
and denoising with OptiX is not affected by this, since it avoids those copies altogether anyway.
This commit is contained in:
Patrick Mours 2020-02-17 16:15:56 +01:00
parent 3a53ae8d4b
commit ab3a6e050c
1 changed files with 7 additions and 0 deletions

View File

@ -1115,6 +1115,13 @@ void Session::denoise()
return;
}
/* Cannot denoise with resolution divider and separate denoising devices.
* It breaks the copy in 'MultiDevice::map_neighbor_tiles' (which operates on the full buffer
* dimensions and not the scaled ones). */
if (!params.device.denoising_devices.empty() && tile_manager.state.resolution_divider > 1) {
return;
}
/* Add separate denoising task. */
DeviceTask task(DeviceTask::DENOISE);