Fix OptiX viewport denoising not working when rendering scene (without OptiX) that uses unsupported features

Denoising devices do not need to load the full feature set of kernels, so only activate the denoising
feature for them (so that it is possible to use features that are supported by the render devices, but
not the denoising devices).
This commit is contained in:
Patrick Mours 2020-07-06 17:32:32 +02:00
parent aabfd2fb9b
commit 1562c9f031
1 changed files with 4 additions and 1 deletions

View File

@ -177,8 +177,11 @@ class MultiDevice : public Device {
return false;
if (requested_features.use_denoising) {
/* Only need denoising feature, everything else is unused. */
DeviceRequestedFeatures denoising_features;
denoising_features.use_denoising = true;
foreach (SubDevice &sub, denoising_devices)
if (!sub.device->load_kernels(requested_features))
if (!sub.device->load_kernels(denoising_features))
return false;
}