Changeset View
Changeset View
Standalone View
Standalone View
intern/cycles/device/metal/device_impl.mm
| Show First 20 Lines • Show All 248 Lines • ▼ Show 20 Lines | switch (device_vendor) { | ||||
| case METAL_GPU_AMD: | case METAL_GPU_AMD: | ||||
| global_defines += "#define __KERNEL_METAL_AMD__\n"; | global_defines += "#define __KERNEL_METAL_AMD__\n"; | ||||
| break; | break; | ||||
| case METAL_GPU_APPLE: | case METAL_GPU_APPLE: | ||||
| global_defines += "#define __KERNEL_METAL_APPLE__\n"; | global_defines += "#define __KERNEL_METAL_APPLE__\n"; | ||||
| break; | break; | ||||
| } | } | ||||
| NSProcessInfo *processInfo = [NSProcessInfo processInfo]; | |||||
| NSOperatingSystemVersion macos_ver = [processInfo operatingSystemVersion]; | |||||
| global_defines += "#define __KERNEL_METAL_MACOS__ " + to_string(macos_ver.majorVersion) + "\n"; | |||||
| string &source = this->source[pso_type]; | string &source = this->source[pso_type]; | ||||
| source = "\n#include \"kernel/device/metal/kernel.metal\"\n"; | source = "\n#include \"kernel/device/metal/kernel.metal\"\n"; | ||||
| source = path_source_replace_includes(source, path_get("source")); | source = path_source_replace_includes(source, path_get("source")); | ||||
| /* Perform any required specialization on the source. | /* Perform any required specialization on the source. | ||||
| * With Metal function constants we can generate a single variant of the kernel source which can | * With Metal function constants we can generate a single variant of the kernel source which can | ||||
| * be repeatedly respecialized. | * be repeatedly respecialized. | ||||
| */ | */ | ||||
| ▲ Show 20 Lines • Show All 803 Lines • Show Last 20 Lines | |||||