Cycles: disable Metal inlining optimization on Apple GPUs

This gave a 1.1x speedup, however also leads to very long compile times
that make it seems like Blender has stopped working.

This can be brought back in the future behind an option that users can
explicitly enabled.

Fix T100102

Ref D14923, D14763, T92212
This commit is contained in:
Brecht Van Lommel 2022-08-17 18:31:52 +02:00
parent f2f680d82d
commit e11c899e71
Notes: blender-bot 2023-10-04 09:42:55 +02:00
Referenced by issue #100824, Cycles GPU rendering is broken on Apple M1/macOS Ventura
Referenced by issue #100102, Loading render kernels time increase from 20s to 6m45s (Apple Metal)
1 changed files with 5 additions and 4 deletions

View File

@ -29,11 +29,12 @@ using namespace metal::raytracing;
/* Qualifiers */
#if defined(__KERNEL_METAL_APPLE__)
/* Inline everything for Apple GPUs. This gives ~1.1x speedup and 10% spill
* reduction for integator_shade_surface. However it comes at the cost of
* longer compile times (~4.5 minutes on M1 Max) and is disabled for that
* reason, until there is a user option to manually enable it. */
/* Inline everything for Apple GPUs.
* This gives ~1.1x speedup and 10% spill reduction for integator_shade_surface
* at the cost of longer compile times (~4.5 minutes on M1 Max). */
#if 0 // defined(__KERNEL_METAL_APPLE__)
# define ccl_device __attribute__((always_inline))
# define ccl_device_inline __attribute__((always_inline))