Fix: Assert in Cycles multi-device OIDN check

Co-authored-by: Brecht Van Lommel <brecht@blender.org>
Pull Request: https://projects.blender.org/blender/blender/pulls/119267
This commit is contained in:
Alaska
2024-03-11 12:54:45 +01:00
committed by Brecht Van Lommel
parent 23fd84ffbe
commit 989e9ef890
2 changed files with 5 additions and 1 deletions
+3 -1
View File
@@ -48,7 +48,9 @@ unique_ptr<Denoiser> Denoiser::create(Device *path_trace_device, const DenoisePa
DenoiserType Denoiser::automatic_viewport_denoiser_type(const DeviceInfo &path_trace_device_info)
{
if (OIDNDenoiserGPU::is_device_supported(path_trace_device_info)) {
if (path_trace_device_info.type != DEVICE_CPU &&
OIDNDenoiserGPU::is_device_supported(path_trace_device_info))
{
return DENOISER_OPENIMAGEDENOISE;
}
else if (!Device::available_devices(DEVICE_MASK_OPTIX).empty()) {
@@ -36,6 +36,8 @@ bool OIDNDenoiserGPU::is_device_supported(const DeviceInfo &device)
return true;
}
}
return false;
}
int device_type = OIDN_DEVICE_TYPE_DEFAULT;