[Bf-blender-cvs] [6d08ba8a508] master: Fix T100824: Cycles GPU render broken on macOS 13 Beta and Apple silicon
Brecht Van Lommel
noreply at git.blender.org
Tue Sep 6 19:12:08 CEST 2022
Commit: 6d08ba8a5082ee6bbac8e735a4817d704a03212b
Author: Brecht Van Lommel
Date: Tue Sep 6 17:27:55 2022 +0200
Branches: master
https://developer.blender.org/rB6d08ba8a5082ee6bbac8e735a4817d704a03212b
Fix T100824: Cycles GPU render broken on macOS 13 Beta and Apple silicon
The recent revert of Apple silicon inlining changes to avoid long compile times
worked on macOS 12, but in macOS 13 Beta it results in render errors. This may
be a compiler bug and perhaps get fixed in time, but try to be on the safe side
and ensure Blender 3.3.0 works regardless.
This brings part of the inlining back, which brings improved performance but
also longer compiler times again. Compile time is around 2min now, where the
previous full inlining was about 5-7min.
Patch by Michael Jones.
Differential Revision: https://developer.blender.org/D15897
===================================================================
M intern/cycles/kernel/device/metal/compat.h
===================================================================
diff --git a/intern/cycles/kernel/device/metal/compat.h b/intern/cycles/kernel/device/metal/compat.h
index a04261011f0..130a9ebafae 100644
--- a/intern/cycles/kernel/device/metal/compat.h
+++ b/intern/cycles/kernel/device/metal/compat.h
@@ -46,8 +46,11 @@ using namespace metal::raytracing;
# define ccl_device
# define ccl_device_inline ccl_device
# define ccl_device_forceinline ccl_device
-# define ccl_device_noinline ccl_device __attribute__((noinline))
-
+# if defined(__KERNEL_METAL_APPLE__)
+# define ccl_device_noinline ccl_device
+# else
+# define ccl_device_noinline ccl_device __attribute__((noinline))
+# endif
#endif
#define ccl_device_noinline_cpu ccl_device
More information about the Bf-blender-cvs
mailing list