[Bf-blender-cvs] [46c9f7702af] master: Cycles: Enable MetalRT opt-in for AMD/Navi2 GPUs

Michael Jones noreply at git.blender.org
Mon Feb 6 12:14:13 CET 2023


Commit: 46c9f7702afa9688987de6fe0deea845b826b300
Author: Michael Jones
Date:   Mon Feb 6 11:14:01 2023 +0000
Branches: master
https://developer.blender.org/rB46c9f7702afa9688987de6fe0deea845b826b300

Cycles: Enable MetalRT opt-in for AMD/Navi2 GPUs

Reviewed By: brecht

Differential Revision: https://developer.blender.org/D17043

===================================================================

M	intern/cycles/blender/addon/properties.py

===================================================================

diff --git a/intern/cycles/blender/addon/properties.py b/intern/cycles/blender/addon/properties.py
index eed51eed95f..0c5d8a7cd55 100644
--- a/intern/cycles/blender/addon/properties.py
+++ b/intern/cycles/blender/addon/properties.py
@@ -1722,13 +1722,20 @@ class CyclesPreferences(bpy.types.AddonPreferences):
             row.prop(self, "peer_memory")
 
         if compute_device_type == 'METAL':
-            import platform
-            # MetalRT only works on Apple Silicon at present, pending argument encoding fixes on AMD
-            # Kernel specialization is only viable on Apple Silicon at present due to relative compilation speed
-            if platform.machine() == 'arm64':
+            import platform, re
+            isNavi2 = False
+            for device in devices:
+                obj = re.search("((RX)|(Pro)|(PRO))\s+W?6\d00X",device.name)
+                if obj:
+                    isNavi2 = True
+
+            # MetalRT only works on Apple Silicon and Navi2
+            if platform.machine() == 'arm64' or isNavi2:
                 col = layout.column()
                 col.use_property_split = True
-                col.prop(self, "kernel_optimization_level")
+                # Kernel specialization is only supported on Apple Silicon
+                if platform.machine() == 'arm64':
+                    col.prop(self, "kernel_optimization_level")
                 col.prop(self, "use_metalrt")
 
     def draw(self, context):



More information about the Bf-blender-cvs mailing list