Fix #116810: Cycles HIP OpenImageDenoise device not available

Fixed the order of setting device id and querying OIDN.
This check needs info.id to be set.

Pull Request: https://projects.blender.org/blender/blender/pulls/117006
This commit is contained in:
salipourto
2024-01-11 15:28:43 +01:00
committed by Brecht Van Lommel
parent 135b42c3c4
commit b358b89faa

View File

@@ -159,12 +159,6 @@ void device_hip_info(vector<DeviceInfo> &devices)
info.has_nanovdb = true;
info.has_light_tree = true;
info.has_mnee = true;
info.denoisers = 0;
# if defined(WITH_OPENIMAGEDENOISE)
if (OIDNDenoiserGPU::is_device_supported(info)) {
info.denoisers |= DENOISER_OPENIMAGEDENOISE;
}
# endif
info.has_gpu_queue = true;
/* Check if the device has P2P access to any other device in the system. */
@@ -188,6 +182,13 @@ void device_hip_info(vector<DeviceInfo> &devices)
(unsigned int)pci_location[1],
(unsigned int)pci_location[2]);
info.denoisers = 0;
# if defined(WITH_OPENIMAGEDENOISE)
if (OIDNDenoiserGPU::is_device_supported(info)) {
info.denoisers |= DENOISER_OPENIMAGEDENOISE;
}
# endif
/* If device has a kernel timeout and no compute preemption, we assume
* it is connected to a display and will freeze the display while doing
* computations. */