diff --git a/intern/cycles/device/hip/device.cpp b/intern/cycles/device/hip/device.cpp index 8086c1eb169..983d2e6ea24 100644 --- a/intern/cycles/device/hip/device.cpp +++ b/intern/cycles/device/hip/device.cpp @@ -170,8 +170,15 @@ void device_hip_info(vector &devices) const bool is_rdna2_or_newer = hipIsRDNA2OrNewer(num); - /* Disable on RDNA1 due to apparent bug in HIP SDK 6.3. */ + /* Disable MNEE on devices that don't work properly with it. + * Common symptoms are either rendering artifacts, + * or renders that get stuck in the MNEE kernel. + * These are most likely compiler bugs and can be re-enabled in the future. */ +# ifdef _WIN32 + info.has_mnee = is_rdna2_or_newer && !hipIsRDNA4OrNewer(num); +# else info.has_mnee = is_rdna2_or_newer; +# endif info.has_nanovdb = true; info.has_gpu_queue = true; diff --git a/intern/cycles/device/hip/util.h b/intern/cycles/device/hip/util.h index 7c4d776cc1d..1485335a424 100644 --- a/intern/cycles/device/hip/util.h +++ b/intern/cycles/device/hip/util.h @@ -77,6 +77,14 @@ static inline bool hipIsRDNA2OrNewer(const int hipDevId) return (major > 10 || (major == 10 && minor >= 3)); } +static inline bool hipIsRDNA4OrNewer(const int hipDevId) +{ + int major; + hipDeviceGetAttribute(&major, hipDeviceAttributeComputeCapabilityMajor, hipDevId); + + return (major >= 12); +} + static inline bool hipNeedPreciseMath(const std::string &arch) { # ifdef _WIN32