HOME

TheInfoList



OR:

Metal is a low-level, low-overhead
hardware-accelerated Hardware acceleration is the use of computer hardware designed to perform specific functions more efficiently when compared to software running on a general-purpose central processing unit (CPU). Any function (mathematics), transformation of d ...
3D graphic 3D computer graphics, or “3D graphics,” sometimes called CGI, 3D-CGI or three-dimensional computer graphics are graphics that use a three-dimensional representation of geometric data (often Cartesian) that is stored in the computer for th ...
and
compute shader In computing, a compute kernel is a routine compiled for high throughput accelerators (such as graphics processing units (GPUs), digital signal processors (DSPs) or field-programmable gate arrays (FPGAs)), separate from but used by a main prog ...
API An application programming interface (API) is a way for two or more computer programs to communicate with each other. It is a type of software interface, offering a service to other pieces of software. A document or standard that describes how ...
created by Apple. It debuted in
iOS 8 iOS 8 is the eighth major release of the iOS mobile operating system developed by Apple Inc., being the successor to iOS 7. It was announced at the company's Worldwide Developers Conference on June 2, 2014, and was released on September 17, ...
. Metal combines functions similar to
OpenGL OpenGL (Open Graphics Library) is a cross-language, cross-platform application programming interface (API) for rendering 2D and 3D vector graphics. The API is typically used to interact with a graphics processing unit (GPU), to achieve hardwa ...
and
OpenCL OpenCL (Open Computing Language) is a framework for writing programs that execute across heterogeneous platforms consisting of central processing units (CPUs), graphics processing units (GPUs), digital signal processors (DSPs), field-prog ...
in one API. It is intended to improve performance by offering low-level access to the GPU hardware for apps on
iOS iOS (formerly iPhone OS) is a mobile operating system created and developed by Apple Inc. exclusively for its hardware. It is the operating system that powers many of the company's mobile devices, including the iPhone; the term also includes ...
, iPadOS, macOS, and
tvOS tvOS (formerly known as Apple TV Software) is an operating system developed by Apple Inc. for the Apple TV, a digital media player. In the first-generation Apple TV, Apple TV Software was based on Mac OS X. Starting with the second-generation ...
. It can be compared to low-level APIs on other platforms such as Vulkan and
DirectX 12 Microsoft DirectX is a collection of application programming interfaces (APIs) for handling tasks related to multimedia, especially game programming and video, on Microsoft platforms. Originally, the names of these APIs all began with "Direct", ...
. Metal is an object-oriented API that can be invoked using the Swift,
Objective-C Objective-C is a general-purpose, object-oriented programming language that adds Smalltalk-style messaging to the C programming language. Originally developed by Brad Cox and Tom Love in the early 1980s, it was selected by NeXT for its NeXTS ...
or
C++17 C++17 is a version of the ISO/ IEC 14882 standard for the C++ programming language. C++17 replaced the prior version of the C++ standard, called C++14, and was later replaced by C++20. History Before the C++ Standards Committee fixed a 3-year r ...
programming languages. Full-blown GPU execution is controlled via the Metal Shading Language. According to Apple promotional materials: "MSL '' etal 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."


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 shader In computing, a compute kernel is a routine compiled for high throughput accelerators (such as graphics processing units (GPUs), digital signal processors (DSPs) or field-programmable gate arrays (FPGAs)), separate from but used by a main prog ...
s. Metal uses a specific
shading language A shading language is a graphics programming language adapted to programming shader effects (characterizing surfaces, volumes, and objects). Such language forms usually consist of special data types, like "vector", "matrix", "color" and " normal". ...
based on
C++14 C++14 is a version of the ISO/ IEC 14882 standard for the C++ programming language. It is intended to be a small extension over C++11, featuring mainly bug fixes and small improvements, and was replaced by C++17. Its approval was announced on Aug ...
, implemented using
Clang Clang is a compiler front end for the C, C++, Objective-C, and Objective-C++ programming languages, as well as the OpenMP, OpenCL, RenderScript, CUDA, and HIP frameworks. It acts as a drop-in replacement for the GNU Compiler Collection (GCC) ...
and
LLVM LLVM is a set of compiler and toolchain technologies that can be used to develop a front end for any programming language and a back end for any instruction set architecture. LLVM is designed around a language-independent intermediate represe ...
. Metal offers application developers the flexibility where to create Metal resources (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 (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).


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
iOS devices Comparison of models Legend Supported Unsupported (64-bit CPU) Unsupported (32-bit CPU) iPhone systems-on-chips Timeline Geekbench benchmark scores Note: Hardware reviewers have commented that these benc ...
powered by
Apple A7 The Apple A7 is a 64-bit system on a chip (SoC) designed by Apple Inc. It first appeared in the iPhone 5S, which was announced on September 10, 2013, and the iPad Air and iPad Mini 2, which were both announced on October 22, 2013. Apple states ...
or later, and since June 8, 2015 on Macs (2012 models or later) running
OS X El Capitan OS X El Capitan ( ) () is the twelfth major release of macOS (named OS X at the time of El Capitan's release), Apple Inc.'s desktop and server operating system for Macintosh. It focuses mainly on performance, stability, and security. Followin ...
. On June 5, 2017 at WWDC, Apple announced the second version of Metal, to be supported by
macOS High Sierra macOS High Sierra (version 10.13) is the fourteenth major release of macOS, Apple Inc.'s desktop operating system for Macintosh computers. macOS High Sierra was announced at the WWDC 2017 on June 5, 2017 and was released on September 25, 2017 ...
,
iOS 11 iOS 11 is the iOS version history, eleventh major release of the iOS mobile operating system developed by Apple Inc., being the successor to iOS 10. It was announced at the company's Apple Worldwide Developers Conference, Worldwide Developers C ...
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 Xcode is Apple's integrated development environment (IDE) for macOS, used to develop software for macOS, iOS, iPadOS, watchOS, and tvOS. It was initially released in late 2003; the latest stable release is version 14.2, released on December 13, ...
, accelerated machine learning, lower
CPU A central processing unit (CPU), also called a central processor, main processor or just processor, is the electronic circuitry that executes instructions comprising a computer program. The CPU performs basic arithmetic, logic, controlling, a ...
workload, support for virtual reality on macOS, and specificities of the
Apple A11 The Apple A11 Bionic is a 64-bit ARM-based system on a chip (SoC), designed by Apple Inc. and manufactured by TSMC. It first appeared in the iPhone 8 and 8 Plus, and iPhone X which were introduced on September 12, 2017. Apple states that the t ...
GPU, in particular. At the 2020 WWDC, Apple announced the migration of the Mac to
Apple silicon Apple silicon is a series of system on a chip (SoC) and system in a package (SiP) processors designed by Apple Inc., mainly using the ARM architecture. It is the basis of most new Mac computers as well as iPhone, iPad, iPod Touch, Apple TV, a ...
. 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. At the 2022 WWDC, Apple announced the third version of Metal (Metal 3), which would debut with the release of
macOS Ventura macOS Ventura (version 13) is the nineteenth and current major release of macOS, Apple's desktop operating system for Mac computers. The successor to macOS Monterey, it was announced at WWDC 2022 on June 6, 2022, and launched on October 24, 20 ...
,
iOS 16 iOS 16 is the 16th and current major release of the iOS mobile operating system developed by Apple for its iPhone line of products. It was announced at the company's Worldwide Developers Conference (WWDC) on June 6, 2022, as the successor to ...
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. Also announced possibility to use C/C++ for Metal API.


Supported GPUs

The first version and the second version of Metal API supports the following hardware and software stated as below: *
Apple A7 The Apple A7 is a 64-bit system on a chip (SoC) designed by Apple Inc. It first appeared in the iPhone 5S, which was announced on September 10, 2013, and the iPad Air and iPad Mini 2, which were both announced on October 22, 2013. Apple states ...
SoC or later
Apple silicon Apple silicon is a series of system on a chip (SoC) and system in a package (SiP) processors designed by Apple Inc., mainly using the ARM architecture. It is the basis of most new Mac computers as well as iPhone, iPad, iPod Touch, Apple TV, a ...
with
iOS 8 iOS 8 is the eighth major release of the iOS mobile operating system developed by Apple Inc., being the successor to iOS 7. It was announced at the company's Worldwide Developers Conference on June 2, 2014, and was released on September 17, ...
or later
iOS iOS (formerly iPhone OS) is a mobile operating system created and developed by Apple Inc. exclusively for its hardware. It is the operating system that powers many of the company's mobile devices, including the iPhone; the term also includes ...
operating system *
Apple M1 Apple M1 is a series of ARM-based systems-on-a-chip (SoCs) designed by Apple Inc. as a central processing unit (CPU) and graphics processing unit (GPU) for its Mac desktops and notebooks, and the iPad Pro and iPad Air tablets. The M1 chip ...
SoC or later
Apple silicon Apple silicon is a series of system on a chip (SoC) and system in a package (SiP) processors designed by Apple Inc., mainly using the ARM architecture. It is the basis of most new Mac computers as well as iPhone, iPad, iPod Touch, Apple TV, a ...
with macOS Big Sur or later macOS operating system * Intel Processor with
Intel HD and Iris Graphics Intel Graphics Technology (GT) is the collective name for a series of integrated graphics processors (IGPs) produced by Intel that are manufactured on the same package or die as the central processing unit (CPU). It was first introduced in 201 ...
4000 series or later with
OS X El Capitan OS X El Capitan ( ) () is the twelfth major release of macOS (named OS X at the time of El Capitan's release), Apple Inc.'s desktop and server operating system for Macintosh. It focuses mainly on performance, stability, and security. Followin ...
or later macOS operating system * AMD Graphics with GCN or RDNA architecture with
OS X El Capitan OS X El Capitan ( ) () is the twelfth major release of macOS (named OS X at the time of El Capitan's release), Apple Inc.'s desktop and server operating system for Macintosh. It focuses mainly on performance, stability, and security. Followin ...
or later macOS operating system * NVIDIA Graphics with
Kepler Johannes Kepler (; ; 27 December 1571 – 15 November 1630) was a German astronomer, mathematician, astrologer, natural philosopher and writer on music. He is a key figure in the 17th-century Scientific Revolution, best known for his laws o ...
architecture with
OS X El Capitan OS X El Capitan ( ) () is the twelfth major release of macOS (named OS X at the time of El Capitan's release), Apple Inc.'s desktop and server operating system for Macintosh. It focuses mainly on performance, stability, and security. Followin ...
to macOS Big Sur operating system * NVIDIA Graphics with
Maxwell Maxwell may refer to: People * Maxwell (surname), including a list of people and fictional characters with the name ** James Clerk Maxwell, mathematician and physicist * Justice Maxwell (disambiguation) * Maxwell baronets, in the Baronetage of ...
architecture or
Pascal Pascal, Pascal's or PASCAL may refer to: People and fictional characters * Pascal (given name), including a list of people with the name * Pascal (surname), including a list of people and fictional characters with the name ** Blaise Pascal, Frenc ...
architecture with
OS X El Capitan OS X El Capitan ( ) () is the twelfth major release of macOS (named OS X at the time of El Capitan's release), Apple Inc.'s desktop and server operating system for Macintosh. It focuses mainly on performance, stability, and security. Followin ...
to
macOS High Sierra macOS High Sierra (version 10.13) is the fourteenth major release of macOS, Apple Inc.'s desktop operating system for Macintosh computers. macOS High Sierra was announced at the WWDC 2017 on June 5, 2017 and was released on September 25, 2017 ...
operating system The third version of Metal API supports the following hardware and software stated as below: *
Apple A13 The Apple A13 Bionic is a 64-bit ARM-based system on a chip (SoC), designed by Apple Inc. It appears in the iPhone 11, 11 Pro/Pro Max, the 9th generation iPad, the iPhone SE (2nd generation) and the Studio Display. Apple states that the two ...
or later
Apple silicon Apple silicon is a series of system on a chip (SoC) and system in a package (SiP) processors designed by Apple Inc., mainly using the ARM architecture. It is the basis of most new Mac computers as well as iPhone, iPad, iPod Touch, Apple TV, a ...
with
iOS 16 iOS 16 is the 16th and current major release of the iOS mobile operating system developed by Apple for its iPhone line of products. It was announced at the company's Worldwide Developers Conference (WWDC) on June 6, 2022, as the successor to ...
, iPadOS 16 or later
iOS iOS (formerly iPhone OS) is a mobile operating system created and developed by Apple Inc. exclusively for its hardware. It is the operating system that powers many of the company's mobile devices, including the iPhone; the term also includes ...
or iPadOS operating system *
Apple M1 Apple M1 is a series of ARM-based systems-on-a-chip (SoCs) designed by Apple Inc. as a central processing unit (CPU) and graphics processing unit (GPU) for its Mac desktops and notebooks, and the iPad Pro and iPad Air tablets. The M1 chip ...
SoC or later
Apple silicon Apple silicon is a series of system on a chip (SoC) and system in a package (SiP) processors designed by Apple Inc., mainly using the ARM architecture. It is the basis of most new Mac computers as well as iPhone, iPad, iPod Touch, Apple TV, a ...
with
macOS Ventura macOS Ventura (version 13) is the nineteenth and current major release of macOS, Apple's desktop operating system for Mac computers. The successor to macOS Monterey, it was announced at WWDC 2022 on June 6, 2022, and launched on October 24, 20 ...
or later macOS operating system * Intel Processor with Intel UHD 630 or Iris Plus (Kaby Lake or later) with
macOS Ventura macOS Ventura (version 13) is the nineteenth and current major release of macOS, Apple's desktop operating system for Mac computers. The successor to macOS Monterey, it was announced at WWDC 2022 on June 6, 2022, and launched on October 24, 20 ...
or later macOS operating system * AMD Graphics with RDNA architecture (5000 and 6000 series) and Pro Vega (5th generation GCN architecture)


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.


See also

*
Direct3D Direct3D is a graphics application programming interface (API) for Microsoft Windows. Part of DirectX, Direct3D is used to render three-dimensional graphics in applications where performance is important, such as games. Direct3D uses hardware a ...
DirectX 12 Microsoft DirectX is a collection of application programming interfaces (APIs) for handling tasks related to multimedia, especially game programming and video, on Microsoft platforms. Originally, the names of these APIs all began with "Direct", ...
introduces low-level APIs *
Mantle A mantle is a piece of clothing, a type of cloak. Several other meanings are derived from that. Mantle may refer to: *Mantle (clothing), a cloak-like garment worn mainly by women as fashionable outerwear **Mantle (vesture), an Eastern Orthodox ve ...
– low-level API by
AMD Advanced Micro Devices, Inc. (AMD) is an American multinational semiconductor company based in Santa Clara, California, that develops computer processors and related technologies for business and consumer markets. While it initially manufact ...
* Vulkan – low-overhead successor to OpenGL *
MoltenVK MoltenVK is a software library which allows Vulkan applications to run on top of Metal on Apple's macOS, iOS, and tvOS operating systems. It is the first software component to be released for the Vulkan Portability Initiative, a project to have ...
- software compatibility library to run Vulkan software on top of the Metal API *
WebGPU WebGPU is the working name for a future web standard and JavaScript API for hardware-accelerated, accelerated graphics and GPGPU, compute, aiming to provide "modern 3D graphics and computation capabilities". It is developed by the W3C ''GPU for t ...


References


External links


Metal for Developers


(preliminary)
WWDC14 demoextended version

Install macOS 10.14 Mojave on Mac Pro (Mid 2010) and Mac Pro (Mid 2012)
- Apple article explaining what GPUs are compatible with Apple's Metal APIs on Mac OS 10.14 (Mojave) operating system {{iOS Computer-related introductions in 2014 3D graphics APIs Graphics libraries IOS