From 8ce58f297398212bd5a6816094eafb1fbc8dc3dd Mon Sep 17 00:00:00 2001 From: Brecht Van Lommel Date: Wed, 26 Feb 2025 16:51:30 +0100 Subject: [PATCH] Cycles: Disable HIP-RT and MNEE on RDNA1 generation GPUs These have bugs in with the latest HIP-RT and HIP SDK, so just disable them as we do not expect a fix in time, and rolling back would re-introduce other bugs. As RDNA1 does not have hardware raytracing, it is also less important to use HIP-RT. Note that only RDNA2+ is officially supported by HIP, so these GPUs working at all is somewhat lucky. Fix #134979 Fix #134978 Fix #134975 Pull Request: https://projects.blender.org/blender/blender/pulls/135179 --- intern/cycles/blender/addon/properties.py | 2 +- intern/cycles/device/hip/device.cpp | 8 ++++++-- intern/cycles/device/hip/util.h | 9 +++++++++ 3 files changed, 16 insertions(+), 3 deletions(-) diff --git a/intern/cycles/blender/addon/properties.py b/intern/cycles/blender/addon/properties.py index 7df40b77145..64428eddc5d 100644 --- a/intern/cycles/blender/addon/properties.py +++ b/intern/cycles/blender/addon/properties.py @@ -1584,7 +1584,7 @@ class CyclesPreferences(bpy.types.AddonPreferences): use_hiprt: BoolProperty( name="HIP RT (Experimental)", - description="HIP RT enables AMD hardware ray tracing on RDNA2 and above, with shader fallback on older cards. " + description="HIP RT enables AMD hardware ray tracing on RDNA2 and above. " "This feature is experimental and some scenes may render incorrectly", default=False, ) diff --git a/intern/cycles/device/hip/device.cpp b/intern/cycles/device/hip/device.cpp index 1af17fceb56..8086c1eb169 100644 --- a/intern/cycles/device/hip/device.cpp +++ b/intern/cycles/device/hip/device.cpp @@ -168,8 +168,11 @@ void device_hip_info(vector &devices) info.description = string(name); info.num = num; + const bool is_rdna2_or_newer = hipIsRDNA2OrNewer(num); + + /* Disable on RDNA1 due to apparent bug in HIP SDK 6.3. */ + info.has_mnee = is_rdna2_or_newer; info.has_nanovdb = true; - info.has_mnee = true; info.has_gpu_queue = true; /* Check if the device has P2P access to any other device in the system. */ @@ -181,7 +184,8 @@ void device_hip_info(vector &devices) } } - info.use_hardware_raytracing = has_hardware_raytracing; + /* Disable on RDNA1 due to bug rendering curves in HIP-RT 2.5 or HIP SDK 6.3. */ + info.use_hardware_raytracing = has_hardware_raytracing && is_rdna2_or_newer; int pci_location[3] = {0, 0, 0}; hipDeviceGetAttribute(&pci_location[0], hipDeviceAttributePciDomainID, num); diff --git a/intern/cycles/device/hip/util.h b/intern/cycles/device/hip/util.h index bd6bb71a954..54caa9379c0 100644 --- a/intern/cycles/device/hip/util.h +++ b/intern/cycles/device/hip/util.h @@ -68,6 +68,15 @@ static inline bool hipSupportsDevice(const int hipDevId) return (major >= 10); } +static inline bool hipIsRDNA2OrNewer(const int hipDevId) +{ + int major, minor; + hipDeviceGetAttribute(&major, hipDeviceAttributeComputeCapabilityMajor, hipDevId); + hipDeviceGetAttribute(&minor, hipDeviceAttributeComputeCapabilityMinor, hipDevId); + + return (major > 10 || (major == 10 && minor >= 3)); +} + static inline bool hipSupportsDeviceOIDN(const int hipDevId) { /* Matches HIPDevice::getArch in HIP. */