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
This commit is contained in:
Brecht Van Lommel 2022-09-06 17:27:55 +02:00
parent 64b10c43c4
commit 0759f671ce
Notes: blender-bot 2023-04-17 00:53:35 +02:00
Referenced by issue #104055, Action Editor: Animations no longer work after renaming bones.
Referenced by issue #102713, Saved blend file has a different hash when re-saved in a different instance
Referenced by issue #102679, Copy Rotation Constraint unexpectedly have numerical instability
Referenced by issue #102682, Viewport - Numpad Hotkeys - Spinning an orthographic camera via numpad 4 / 6 does not work as intended
Referenced by issue #101879, [bug] Screw modifier seemingly generates inaccurate geometry with "Calulate order" enabled - only when being unapplied.
Referenced by issue #101782, Cycles: Compositor File Output BW Color Option Issue (again)
Referenced by issue #101583, Regression: apply data transfer crash
Referenced by issue #101498, Bug with selecting objects
Referenced by issue #101480, Blender GPU Render crashes with NVidia in Ubuntu
Referenced by issue #101250, Relocate library crashes to desktop in Blender 3.3
Referenced by issue #101045, Deleting a baked action results in an error
Referenced by issue #100824, Cycles GPU rendering is broken on Apple M1/macOS Ventura
Referenced by issue #107018, [Regression] node input in-place swapping no longer works
1 changed files with 5 additions and 2 deletions

View File

@ -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