diff options
author | Sebastian Herholz <sebastian.herholz@intel.com> | 2022-11-09 11:13:08 +0300 |
---|---|---|
committer | Sebastian Herholz <sebastian.herholz@intel.com> | 2022-11-09 11:13:08 +0300 |
commit | 98398f5a5da09955543efa47a84b51d5a03b8574 (patch) | |
tree | 2c7f0edaafa7b62fcaa4ab30583a54c8877d8221 /intern/cycles/device/metal/device_impl.mm | |
parent | 3e3ec87846b264a87b50431abb4180e4f0f2193c (diff) | |
parent | 638bf05a23e1ef7dddd3b5d42d9521d8849a4375 (diff) |
Merge branch 'master' into cycles_path_guidingcycles_path_guiding
Diffstat (limited to 'intern/cycles/device/metal/device_impl.mm')
-rw-r--r-- | intern/cycles/device/metal/device_impl.mm | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/intern/cycles/device/metal/device_impl.mm b/intern/cycles/device/metal/device_impl.mm index 6a16d4bb3b4..6f1042b1e55 100644 --- a/intern/cycles/device/metal/device_impl.mm +++ b/intern/cycles/device/metal/device_impl.mm @@ -296,9 +296,11 @@ void MetalDevice::make_source(MetalPipelineType pso_type, const uint kernel_feat } source = global_defines + source; +# if 0 metal_printf("================\n%s================\n\%s================\n", global_defines.c_str(), baked_constants.c_str()); +# endif /* Generate an MD5 from the source and include any baked constants. This is used when caching * PSOs. */ @@ -339,6 +341,14 @@ bool MetalDevice::compile_and_load(MetalPipelineType pso_type) MTLCompileOptions *options = [[MTLCompileOptions alloc] init]; +# if defined(MAC_OS_VERSION_13_0) + if (@available(macos 13.0, *)) { + if (device_vendor == METAL_GPU_INTEL) { + [options setOptimizationLevel:MTLLibraryOptimizationLevelSize]; + } + } +# endif + options.fastMathEnabled = YES; if (@available(macOS 12.0, *)) { options.languageVersion = MTLLanguageVersion2_4; |