From 3bb8d173e70c1ec80612733c63efedc5e1d854e5 Mon Sep 17 00:00:00 2001 From: Sayak Biswas Date: Tue, 23 Nov 2021 14:16:24 +0100 Subject: Fix T93109: Cycles HIP missing check for correct driver version 21.Q4 is required, older version should not show devices in the preferences. This adds a check for the file version of amdhip64.dll file during hipew initialization. Differential Revision: https://developer.blender.org/D13324 --- intern/cycles/device/hip/device.cpp | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) (limited to 'intern/cycles/device') diff --git a/intern/cycles/device/hip/device.cpp b/intern/cycles/device/hip/device.cpp index 29304e50247..ecc109b2bb9 100644 --- a/intern/cycles/device/hip/device.cpp +++ b/intern/cycles/device/hip/device.cpp @@ -57,9 +57,16 @@ bool device_hip_init() } } else { - VLOG(1) << "HIPEW initialization failed: " - << ((hipew_result == HIPEW_ERROR_ATEXIT_FAILED) ? "Error setting up atexit() handler" : - "Error opening the library"); + if (hipew_result == HIPEW_ERROR_ATEXIT_FAILED) { + VLOG(1) << "HIPEW initialization failed: Error setting up atexit() handler"; + } + else if (hipew_result == HIPEW_ERROR_OLD_DRIVER) { + VLOG(1) << "HIPEW initialization failed: Driver version too old, requires AMD Radeon Pro " + "21.Q4 driver or newer"; + } + else { + VLOG(1) << "HIPEW initialization failed: Error opening HIP dynamic library"; + } } return result; -- cgit v1.2.3