diff --git a/intern/cycles/blender/addon/ui.py b/intern/cycles/blender/addon/ui.py index 172dd1608fa..58289dec69a 100644 --- a/intern/cycles/blender/addon/ui.py +++ b/intern/cycles/blender/addon/ui.py @@ -178,7 +178,7 @@ def get_effective_preview_denoiser(context, has_oidn_gpu): if has_oidn_gpu: return 'OPENIMAGEDENOISE' - if context.preferences.addons[__package__].preferences.get_devices_for_type('OPTIX'): + if has_optixdenoiser_gpu_devices(context): return 'OPTIX' return 'OPENIMAGEDENOISE' diff --git a/intern/cycles/integrator/denoiser.cpp b/intern/cycles/integrator/denoiser.cpp index d0241ada8d4..0dbd6581992 100644 --- a/intern/cycles/integrator/denoiser.cpp +++ b/intern/cycles/integrator/denoiser.cpp @@ -137,7 +137,7 @@ DenoiserType Denoiser::automatic_viewport_denoiser_type(const DeviceInfo &denois #endif #ifdef WITH_OPTIX - if (!Device::available_devices(DEVICE_MASK_OPTIX).empty()) { + if (OptiXDenoiser::is_device_supported(denoise_device_info)) { return DENOISER_OPTIX; } #endif