diff options
author | Brecht Van Lommel <brecht@blender.org> | 2022-09-06 18:27:55 +0300 |
---|---|---|
committer | Brecht Van Lommel <brecht@blender.org> | 2022-09-06 20:11:52 +0300 |
commit | 6d08ba8a5082ee6bbac8e735a4817d704a03212b (patch) | |
tree | 6e948b5703540b498ac30bd0f51ef930e8b43168 | |
parent | da9e685e26021202f5cc82e757f4fdf643548805 (diff) |
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
-rw-r--r-- | intern/cycles/kernel/device/metal/compat.h | 7 |
1 files changed, 5 insertions, 2 deletions
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 |