Cycles: Fix automatic OptiX denoiser section criteria

Only select OptiX as the automatic denoiser if an OptiX
device is selected in preferences.

Pull Request: https://projects.blender.org/blender/blender/pulls/124032
This commit is contained in:
Alaska 2024-07-03 16:00:02 +02:00 committed by Sergey Sharybin
parent e10dcc01bd
commit 090fed06a9
2 changed files with 2 additions and 2 deletions

@ -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'

@ -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