Metal (API)


Metal is a low-level, low-overhead hardware-accelerated 3D graphic and compute shader API created by Apple, debuting in iOS 8. Metal combines functions similar to OpenGL and OpenCL in one API. It is intended to improve performance by offering low-level access to the GPU hardware for apps on iOS, iPadOS, macOS, tvOS, watchOS and visionOS. It is similar to low-level APIs on other platforms such as Vulkan and DirectX 12.
Metal is an object-oriented API that can be invoked using the Swift, Objective-C or C++17 programming languages. Full-blown GPU execution is controlled via the Metal Shading Language. According to Apple promotional materials: "MSL is a single, unified language that allows tighter integration between the graphics and compute programs. Since MSL is C++-based, you will find it familiar and easy to use."

Features

Metal aims to provide low-overhead access to the GPU. Commands are encoded beforehand and then submitted to the GPU for asynchronous execution. The application controls when to wait for the execution to complete thus allowing application developers to increase throughput by encoding other commands while commands are executed on the GPU or save power by explicitly waiting for GPU execution to complete. Additionally, command encoding is CPU independent thus applications can encode commands to each CPU thread independently. Lastly, render states are pre-computed beforehand, allowing the GPU driver to know in advance how to configure and optimize the render pipeline before command execution.
Metal improves the capabilities of GPGPU programming by using compute shaders. Metal uses a specific shading language based on C++14, implemented using Clang and LLVM.
Metal allows application developers to create Metal resources such as buffers, textures. Resources can be allocated on the CPU, GPU, or both and provides facilities to update and synchronize allocated resources. Metal can also enforce a resource's state during a command encoder's lifetime.
On macOS, Metal can provide application developers the discretion to specify which GPU to execute. Application developers can choose between the low-power integrated GPU of the CPU, the discrete GPU or an external GPU connected through Thunderbolt. Application developers also have the preference on how GPU commands are executed on which GPUs and provides suggestion on which GPU a certain command is most efficient to execute.

Metal Performance Shaders

Metal Performance Shaders is a highly optimized library of graphics functions that can help application developers achieve great performance at the same time decrease work on maintaining GPU family specific functions. It provides functions including:
  • Image filtering algorithms
  • Neural network processing
  • Advanced math operations
  • Ray tracing

History

Metal has been available since June 2, 2014 on List of [iOS devices|iOS devices] powered by Apple A7 or later, and since June 8, 2015 on Macs running OS X El Capitan.
On June 5, 2017, at WWDC, Apple announced the second version of Metal, to be supported by macOS High Sierra, iOS 11 and tvOS 11. Metal 2 is not a separate API from Metal and is supported by the same hardware. Metal 2 enables more efficient profiling and debugging in Xcode, accelerated machine learning, lower CPU workload, support for virtual reality on macOS, and specificities of the Apple A11 GPU, in particular.
At the 2020 WWDC, Apple announced the migration of the Mac to Apple silicon. Macs using Apple silicon will feature Apple GPUs with a feature set combining what was previously available on macOS and iOS, and will be able to take advantage of features tailored to the tile based deferred rendering architecture of Apple GPUs.
At the 2022 WWDC, Apple announced the third version of Metal, which would debut with the release of macOS Ventura, iOS 16 and iPadOS 16. Metal 3 introduces the MetalFX upscaling framework, which renders complex scenes in less time per frame with high-performance upscaling and anti-aliasing, mesh shaders support. Also announced possibility to use C/C++ for Metal API.
At the 2023 WWDC, Apple announced a brand new toolkit called the Game Porting Toolkit to port Windows 10/11-based games. It includes an environment to test binaries, translation layers from HLSL to MSL, and Metal-cpp bindings. Jeremy Sandmel announced a new Game Mode for macOS Sonoma, and Hideo Kojima announced Death Stranding for the macOS App Store.
At the 2024 WWDC, Apple announced Game Porting Toolkit 2, along with the release of new games such as Control: Ultimate Edition, Frostpunk 2, and Assassin's Creed Shadows for macOS.
At the 2025 WWDC, Apple announced Metal 4, a new version of the API featuring a unified command encoder system, support for neural rendering, and new technologies such as MetalFX Frame Interpolation and a ray tracing denoiser.

Supported GPUs

The first version of Metal supports the following hardware and software:
The second version of Metal supports the following hardware and software:
The third version of Metal supports the following hardware and software:
The fourth version of Metal supports the following hardware and software:

Adoption

According to Apple, more than 148,000 applications use Metal directly, and 1.7 million use it through high-level frameworks, as of June 2017. macOS games using Metal for rendering are listed below.
TitleDeveloper Game engineMacOS release date Metal-based release dateMetal support notes
Ark: Survival EvolvedStudio WildcardUnreal Engine 4
Assassin's Creed ShadowsUbisoft QuebecUbisoft Anvil
ARMA 3Virtual ProgrammingReal VirtualityMetal support in beta since
Baldur's Gate IIILarian StudiosDivinity Engine 4.0Metal support in early access since
Ballistic OverkillAquiris Game StudioUnity Engine 5
Batman: Arkham CityFeral InteractiveUnreal Engine 3Metal support since 21 February 2019 with v1.2
Batman: The Enemy WithinTelltale GamesTelltale Tool
BattleTechHarebrained SchemesUnity Engine 5
Bioshock RemasteredFeral InteractiveUnreal Engine 2.5
Bioshock 2 RemasteredFeral InteractiveUnreal Engine 2.5
Cyberpunk 2077CD ProjektREDengine 4Support for Metal 4
Cities: SkylinesParadox InteractiveUnity Engine 5Metal support since
Civilization VIAspyr MediaLOREMetal support since 5 April 2019
Company of Heroes 2Feral InteractiveEssence Engine 3Metal support since
Control: Ultimate EditionRemedy EntertainmentNorthlight Engine
Dead Island 2Dambuster StudiosUnreal Engine 4
Deus Ex: Mankind DividedFeral InteractiveDawn Engine
DiRT RallyFeral InteractiveEGO Engine 2.5
Divinity: Original Sin IILarian StudiosDivinity Engine 2
Dota 2ValveSource 2MoltenVK was announced on. The option to use this became available on.
The Elder Scrolls OnlineZenimax Online StudiosN/AOpenGL Renderer replaced with Vulkan via MoltenVK wrapper in patch 4.2.5
Empire: Total WarFeral InteractiveTW Engine 3Metal support since 16 December 2019
EVE OnlineCCP GamesN/APreviously available on macOS via DirectX 9.0 from November 2007 until February 2009; native macOS version using Metal released 14 November 2021
EverspaceRockfishUnreal Engine 4
F1 2016Feral InteractiveEGO Engine 4.0
F1 2017Feral InteractiveEGO Engine 4.0
FortniteEpic GamesUnreal Engine 4
Frostpunk11 Bit StudiosLiquid Engine
Frostpunk 211 Bit StudiosUnreal Engine 5
GravelVirtual ProgrammingUnreal Engine 4
Guardians of the Galaxy: The Telltale SeriesTelltale GamesTelltale Tool
HeadlanderDouble Fine ProductionsBuddha Engine
Heroes of the StormBlizzard EntertainmentSC2 EngineMetal support in beta since
HitmanFeral InteractiveGlacier 2
Life Is Strange: Before the StormFeral InteractiveUnity Engine
Life Is Strange 2Feral InteractiveUnreal Engine 4
Mafia IIIAspyr MediaIllusion Engine
Medieval II: Total WarFeral InteractiveTW Engine 2Metal support since 25 October 2018
Micro Machines World SeriesVirtual ProgrammingUnity Engine 5
Minecraft: Story Mode - Season TwoTelltale GamesTelltale Tool
MXGP3Virtual ProgrammingUnreal Engine 4
Napoleon: Total WarFeral InteractiveTW Engine 3Metal support since 25 October 2019 with v1.2
ObductionCyan WorldsUnreal Engine 4
ObserverBloober TeamUnreal Engine 4
Quake IIid SoftwareQuake II engineA port using MoltenVK was released as vkQuake2.
RefunctDominique GrieshoferUnreal Engine 4
Resident Evil 2CapcomRE Engine
Resident Evil 3CapcomRE Engine
Resident Evil 4CapcomRE Engine
Resident Evil VillageCapcomRE EngineFirst macOS game with MetalFX support
Rise of the Tomb RaiderFeral InteractiveFoundation Engine
Shadow of the Tomb RaiderFeral InteractiveFoundation Engine
Sid Meier's Railroads!Feral InteractiveGamebryoMetal support since
The Sims 3Maxis Redwood ShoresThe Sims 3 Engine
The Sims 4MaxisSmartSimMetal support added
Sky: Children of the LightThatgamecompanyN/ANative Metal support added since pre-global live in November 2017
StarcraftBlizzard EntertainmentModified Warcraft II engineMetal support since with v1.23.5
StarCraft IIBlizzard EntertainmentSC2 EngineMetal support in beta since
Tomb RaiderFeral InteractiveFoundation EngineMetal support with v1.2 in July 2019
Total War: Rome RemasteredFeral InteractiveTW Engine 2
Total War: Shogun 2Feral InteractiveTW Engine 3Metal support since 4 October 2019
Total War: Shogun 2: Fall of the SamuraiFeral InteractiveTW Engine 3Metal support since 4 October 2019
Total War: Three KingdomsFeral InteractiveTW Engine 3
Total War: WarhammerFeral InteractiveTW Engine 3
Total War: Warhammer IIFeral InteractiveTW Engine 3
Total War Saga: Thrones of BritanniaFeral InteractiveTW Engine 3
Total War Saga: TroyFeral InteractiveTW Engine 3
Universe SandboxGiant ArmyUnity Engine 5Metal support in beta since June 2017
Unreal TournamentEpic GamesUnreal Engine 4Metal support since January 2017
War ThunderGaijin EntertainmentDagor Engine 4Metal support added
Warhammer 40,000: Dawn of War IIIFeral InteractiveEssence Engine 4
The WitnessThekla, IncThekla Engine
World of WarcraftBlizzard EntertainmentWoW EngineMetal support since August 2016
X-Plane 11Laminar ResearchN/AMetal support in beta since