Menu
Home Explore People Places Arts History Plants & Animals Science Life & Culture Technology
On this page
Metal (API)
IOS, macOS, and tvOS graphics rendering 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, and tvOS. It can be compared 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 [Metal Shading Language] 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."

We don't have any images related to Metal (API) yet.
We don't have any YouTube videos related to Metal (API) yet.
We don't have any PDF documents related to Metal (API) yet.
We don't have any Books related to Metal (API) yet.
We don't have any archived web articles related to Metal (API) yet.

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.3

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.4

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.56

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 (on certain MacBooks and Macs) 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 (commands to render a scene can be executed by the discrete GPU while post-processing and display can be handled by the integrated GPU).7

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.8 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 iOS devices powered by Apple A7 or later,9 and since June 8, 2015 on Macs (2012 models or later) running OS X El Capitan.10

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.11

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 (TBDR) architecture of Apple GPUs.12

At the 2022 WWDC, Apple announced the third version of Metal (Metal 3), 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.13 Also announced possibility to use C/C++ for Metal API.14

Supported GPUs

The first version of Metal supports the following hardware and software:15

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

The third version of Metal supports the following hardware and software:16

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.17 macOS games using Metal for rendering are listed below.

TitleDeveloper (macOS version)Game engineMacOS release date (OpenGL/DirectX)Metal-based release dateMetal support notes
Ark: Survival EvolvedStudio WildcardUnreal Engine 429 August 2017
ARMA 3Virtual ProgrammingReal VirtualityTBAMetal support in beta since 17 September 2017
Baldur's Gate IIILarian StudiosDivinity Engine 4.022 September 2023Metal support in early access since 6 October 2020
Ballistic OverkillAquiris Game StudioUnity Engine 528 March 2017
Batman: Arkham CityFeral InteractiveUnreal Engine 318 October 2013Metal support since 21 February 2019 with v1.2
Batman: The Enemy WithinTelltale GamesTelltale Tool8 August 2017
BattleTechHarebrained SchemesUnity Engine 524 April 2018
Bioshock RemasteredFeral InteractiveUnreal Engine 2.522 August 2017
Bioshock 2 RemasteredFeral InteractiveUnreal Engine 2.522 October 2020
Cities: SkylinesParadox InteractiveUnity Engine 510 March 2015Metal support since 18 May 2017
Civilization VIAspyr MediaLORE24 October 2016Metal support since 5 April 2019
Company of Heroes 2Feral InteractiveEssence Engine 321 January 2015Metal support since 19 October 2018
Deus Ex: Mankind DividedFeral InteractiveDawn Engine12 December 2017
DiRT RallyFeral InteractiveEGO Engine 2.516 November 2017
Divinity: Original Sin IILarian StudiosDivinity Engine 231 January 2019
Dota 2ValveSource 218 July 2013MoltenVK was announced on 26 February 2018.18 The option to use this became available on 31 May 2018.19
The Elder Scrolls OnlineZenimax Online StudiosN/A4 April 201422 October 2018OpenGL Renderer replaced with Vulkan via MoltenVK wrapper (translates Vulkan API calls to Metal) in patch 4.2.5
Empire: Total WarFeral InteractiveTW Engine 34 March 2009Metal support since 16 December 2019
EVE OnlineCCP GamesN/A6 November 200714 October 2021Previously available on macOS via DirectX 9.0 from November 2007 until February 2009; native macOS version using Metal released 14 November 2021
EverspaceRockfishUnreal Engine 426 May 2017
F1 2016Feral InteractiveEGO Engine 4.06 April 2017
F1 2017Feral InteractiveEGO Engine 4.025 August 2017
FortniteEpic GamesUnreal Engine 425 July 2017
GravelVirtual ProgrammingUnreal Engine 420 January 2019
Guardians of the Galaxy: The Telltale SeriesTelltale GamesTelltale Tool18 April 2017
HeadlanderDouble Fine ProductionsBuddha Engine18 November 2016
Heroes of the StormBlizzard EntertainmentSC2 Engine2 June 2015Metal support in beta since 24 January 2017 (temporarily removed on 29 November 201720 until ?)
HitmanFeral InteractiveGlacier 220 June 2017
Life Is Strange: Before the StormFeral InteractiveUnity Engine13 September 2018
Life Is Strange 2Feral InteractiveUnreal Engine 42019
Mafia IIIAspyr MediaIllusion Engine11 May 2017
Medieval II: Total WarFeral InteractiveTW Engine 217 December 2015Metal support since 25 October 2018
Micro Machines World SeriesVirtual ProgrammingUnity Engine 530 June 2017
Minecraft: Story Mode - Season TwoTelltale GamesTelltale Tool11 July 2017
MXGP3Virtual ProgrammingUnreal Engine 423 November 2018
Napoleon: Total WarFeral InteractiveTW Engine 32 July 2013Metal support since 25 October 2019 with v1.2
ObductionCyan WorldsUnreal Engine 429 March 2017
ObserverBloober TeamUnreal Engine 424 October 2017
Quake IIid SoftwareQuake II engine9 February 2019A port using MoltenVK was released as vkQuake2.21
RefunctDominique GrieshoferUnreal Engine 45 September 2016
Resident Evil VillageCapcomRE Engine28 October 2022First macOS game with MetalFX support
Rise of the Tomb RaiderFeral InteractiveFoundation Engine12 April 2018
Shadow of the Tomb RaiderFeral InteractiveFoundation Engine2019
Sid Meier's Railroads!Feral InteractiveGamebryo1 November 2012Metal support since 18 December 2018
The Sims 3Maxis Redwood ShoresThe Sims 3 Engine2 June 200928 October 2020
The Sims 4MaxisSmartSim17 February 2015Metal support added 12 November 2019
Sky: Children of the LightThatgamecompanyN/A18 July 2019Native Metal support added since pre-global live in November 2017
StarcraftBlizzard EntertainmentModified Warcraft II engine20 November 2001Metal support since 2 July 2020 with v1.23.5
StarCraft IIBlizzard EntertainmentSC2 Engine27 July 2010Metal support in beta since 24 January 2017
Tomb RaiderFeral InteractiveFoundation Engine17 January 2014Metal support with v1.2 in July 2019
Total War: Rome RemasteredFeral InteractiveTW Engine 229 April 2021
Total War: Shogun 2Feral InteractiveTW Engine 331 July 2014Metal support since 4 October 2019
Total War: Shogun 2: Fall of the SamuraiFeral InteractiveTW Engine 318 December 2014Metal support since 4 October 2019
Total War: Three KingdomsFeral InteractiveTW Engine 323 May 2019
Total War: WarhammerFeral InteractiveTW Engine 319 April 2017
Total War: Warhammer IIFeral InteractiveTW Engine 320 November 2018
Total War Saga: Thrones of BritanniaFeral InteractiveTW Engine 324 May 2018
Total War Saga: TroyFeral InteractiveTW Engine 313 August 2020
Universe SandboxGiant ArmyUnity Engine 5TBAMetal support in beta since June 2017
Unreal TournamentEpic GamesUnreal Engine 4CancelledMetal support since January 2017
War ThunderGaijin EntertainmentDagor Engine 41 November 2012Metal support added 24 May 2017 (removed in ? 2018 and reintroduced 27 August 2020)
Warhammer 40,000: Dawn of War IIIFeral InteractiveEssence Engine 49 June 2017
The WitnessThekla, IncThekla Engine8 March 2017
World of WarcraftBlizzard EntertainmentWoW Engine23 November 2004Metal support since August 2016
X-Plane 11Laminar ResearchN/A30 May 2017Metal support in beta since 2 April 202022

See also

References

  1. "Getting started with Metal-CPP - Metal". https://developer.apple.com/metal/cpp/

  2. Apple Inc. "Metal Shading Language Specification" (PDF). https://developer.apple.com/metal/Metal-Shading-Language-Specification.pdf

  3. "Setting Up a Command Structure". Apple Inc. https://developer.apple.com/documentation/metal/setting_up_a_command_structure

  4. "Metal Shading Language Guide". September 8, 2014. Retrieved September 10, 2014. https://developer.apple.com/library/prerelease/ios/documentation/Metal/Reference/MetalShadingLanguageGuide/Introduction/Introduction.html#//apple_ref/doc/uid/TP40014364

  5. Apple Inc. "Setting Resource Storage Mode". https://developer.apple.com/documentation/metal/setting_resource_storage_modes

  6. "Synchronizing a Managed Resource". Apple Inc. https://developer.apple.com/documentation/metal/synchronizing_a_managed_resource

  7. "GPU Selection in macOS". Apple Inc. https://developer.apple.com/documentation/metal/gpu_selection_in_macos

  8. "Metal Performance Shaders". https://developer.apple.com/documentation/metalperformanceshaders

  9. Machkovech, Same (June 2, 2014). "Apple gets heavy with gaming, announces Metal development platform". Ars Technica. Condé Nast. https://arstechnica.com/apple/2014/06/apple-gets-heavy-with-gaming-announces-metal-development-platform/

  10. Smith, Colin; Meza, Starlayne (June 8, 2015). "Apple Announces OS X El Capitan with Refined Experience & Improved Performance". Newsroom. San Francisco: Apple. https://www.apple.com/pr/library/2015/06/08Apple-Announces-OS-X-El-Capitan-with-Refined-Experience-Improved-Performance.html

  11. "Metal 2". Apple Developer. Apple. November 20, 2017. Archived from the original on November 20, 2017 – via Wayback Machine. https://web.archive.org/web/20171120014933/https://developer.apple.com/metal/

  12. "Bring your Metal app to Apple Silicon Macs". developer.apple.com. Retrieved July 13, 2020. https://developer.apple.com/videos/play/wwdc2020/10631

  13. "Discover Metal 3". developer.apple.com. Retrieved June 24, 2022. https://developer.apple.com/videos/play/wwdc2022/10066

  14. "Program Metal in C++ with metal-cpp". developer.apple.com. Retrieved September 10, 2022. https://developer.apple.com/videos/play/wwdc2022/10160

  15. Chiappetta, Marco (December 11, 2018). "Apple Turns Its Back On Customers And NVIDIA With macOS Mojave". Forbes. https://www.forbes.com/sites/marcochiappetta/2018/12/11/apple-turns-its-back-on-customers-and-nvidia-with-macos-mojave

  16. "Metal feature set tables" (PDF). Apple. https://developer.apple.com/metal/Metal-Feature-Set-Tables.pdf

  17. Apple Inc. "WWDC 2017 Platforms State of the Union". https://developer.apple.com/videos/play/wwdc2017/102/

  18. "Vulkan Applications Enabled on Apple Platforms". Khronos Group Press Release. Retrieved February 24, 2021. https://www.khronos.org/news/press/vulkan-applications-enabled-on-apple-platforms

  19. Larabel, Michael (June 1, 2018). "Initial Vulkan Performance On macOS With Dota 2 Is Looking Very Good". Phoronix. Retrieved June 5, 2018. https://www.phoronix.com/scan.php?page=news_item&px=Dota-2-Initial-Mac-Vulkan

  20. "HEROES OF THE STORM BALANCE PATCH NOTES — NOVEMBER 29, 2017". news.blizzard.com. November 29, 2017. https://news.blizzard.com/en-us/heroes-of-the-storm/21273597/heroes-of-the-storm-balance-patch-notes-november-29-2017

  21. Kondrak, Krzysztof [@k_kondrak] (February 9, 2019). "vkQuake2 gets MacOS support" (Tweet). Retrieved February 9, 2019 – via Twitter. https://x.com/k_kondrak/status/1094192063292297217

  22. "X-Plane 11.50 Public Beta 1: Vulkan and Metal Are Here". X-Plane Developer. April 2, 2020. Retrieved April 2, 2020. https://developer.x-plane.com/2020/04/x-plane-11-50-public-beta-1-vulkan-and-metal-are-here/