diff --git a/intern/cycles/blender/addon/properties.py b/intern/cycles/blender/addon/properties.py index 3951f0a27a2..7df40b77145 100644 --- a/intern/cycles/blender/addon/properties.py +++ b/intern/cycles/blender/addon/properties.py @@ -1769,13 +1769,16 @@ class CyclesPreferences(bpy.types.AddonPreferences): elif device_type == 'HIP': import sys if sys.platform[:3] == "win": - driver_version = "21.Q4" + adrenalin_driver_version = "24.6.1" + pro_driver_version = "24.Q2" col.label( text=rpt_("Requires AMD GPU with RDNA architecture"), icon='BLANK1', translate=False) - col.label(text=rpt_("and AMD Radeon Pro %s driver or newer") % driver_version, - icon='BLANK1', translate=False) + col.label(text=rpt_("and AMD Adrenalin driver %s or newer") % + adrenalin_driver_version, icon='BLANK1', translate=False) + col.label(text=rpt_("or AMD Radeon Pro %s driver or newer") % + pro_driver_version, icon='BLANK1', translate=False) elif sys.platform.startswith("linux"): driver_version = "23.40" col.label( diff --git a/intern/cycles/device/hip/device.cpp b/intern/cycles/device/hip/device.cpp index 242609fab99..1af17fceb56 100644 --- a/intern/cycles/device/hip/device.cpp +++ b/intern/cycles/device/hip/device.cpp @@ -38,9 +38,13 @@ bool device_hip_init() initialized = true; int hipew_result = hipewInit(HIPEW_INIT_HIP); + if (hipew_result == HIPEW_SUCCESS) { VLOG_INFO << "HIPEW initialization succeeded"; - if (HIPDevice::have_precompiled_kernels()) { + if (!hipSupportsDriver()) { + VLOG_WARNING << "Driver version is too old"; + } + else if (HIPDevice::have_precompiled_kernels()) { VLOG_INFO << "Found precompiled kernels"; result = true; } @@ -60,7 +64,7 @@ bool device_hip_init() else if (hipew_result == HIPEW_ERROR_OLD_DRIVER) { VLOG_WARNING << "HIPEW initialization failed: Driver version too old, requires AMD Radeon Pro " - "21.Q4 driver or newer"; + "24.Q2 driver or newer"; } else { VLOG_WARNING << "HIPEW initialization failed: Error opening HIP dynamic library"; diff --git a/intern/cycles/device/hip/util.cpp b/intern/cycles/device/hip/util.cpp index 11a97df86a8..86456f8e012 100644 --- a/intern/cycles/device/hip/util.cpp +++ b/intern/cycles/device/hip/util.cpp @@ -42,8 +42,33 @@ int hipewCompilerVersion() { return (HIP_VERSION / 100) + (HIP_VERSION % 100 / 10); } +# endif /* !WITH_HIP_DYNLOAD */ + +bool hipSupportsDriver() +{ +# ifdef _WIN32 +# ifndef WITH_HIP_SDK_5 + /* This check is only neccesary if we're using HIP SDK 6 or newer. */ + int hip_driver_version = 0; + hipError_t result = hipDriverGetVersion(&hip_driver_version); + if (result != hipSuccess) { + VLOG_WARNING << "Error getting driver version: " << hipewErrorString(result); + return false; + } + + VLOG_DEBUG << "Detected HIP driver version: " << hip_driver_version; + + if (hip_driver_version < 60140252) { + /* Cycles crashes during rendering due to issues in older GPU drivers. + * 60140252 corresponds to Adrenalin 24.6.1. */ + return false; + } +# endif # endif + return true; +} + CCL_NAMESPACE_END #endif /* WITH_HIP */ diff --git a/intern/cycles/device/hip/util.h b/intern/cycles/device/hip/util.h index 29a024bfc09..bd6bb71a954 100644 --- a/intern/cycles/device/hip/util.h +++ b/intern/cycles/device/hip/util.h @@ -47,7 +47,9 @@ class HIPContextScope { const char *hipewErrorString(hipError_t result); const char *hipewCompilerPath(); int hipewCompilerVersion(); -# endif /* WITH_HIP_DYNLOAD */ +# endif /* !WITH_HIP_DYNLOAD */ + +bool hipSupportsDriver(); static std::string hipDeviceArch(const int hipDevId) {