Fix macOS build error after recent changes to enable Intel GPUs
This will only work once we upgrade to the macOS 13 SDK. Ref D16253
This commit is contained in:
parent
f9f834068e
commit
86abbf7176
Notes:
blender-bot
2023-02-14 08:58:01 +01:00
Referenced by issue #100749, Blender LTS: Maintenance Task 3.3
|
@ -338,11 +338,13 @@ 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, *)) {
|
||||
|
|
|
@ -110,9 +110,11 @@ vector<id<MTLDevice>> const &MetalInfo::get_usable_devices()
|
|||
usable |= (vendor == METAL_GPU_AMD);
|
||||
}
|
||||
|
||||
#if defined(MAC_OS_VERSION_13_0)
|
||||
if (@available(macos 13.0, *)) {
|
||||
usable |= (vendor == METAL_GPU_INTEL);
|
||||
}
|
||||
#endif
|
||||
|
||||
if (usable) {
|
||||
metal_printf("- %s\n", device_name.c_str());
|
||||
|
|
Loading…
Reference in New Issue