Using Integrated GPU with Metal
The following steps were required to get a Metal-based renderer on macos Mojave (10.4.6) to use the Intel (Integrated) GPU instead of the AMD discrete one (High Perf GPU).
Do not use
MTLCreateDefaultDevice. Instead, use
MTLCopyAllDevicesto get a list of all available GPUs and then keep the one satisfying
device.lowPower == true
Set "Supports Automatic Graphics Switching" (
NSSupportsAutomaticGraphicsSwitching)key in the App's
Launch Activity Monitor and verify the App is now listed with "Requires High-Perf GPU: NO".