The Metal shading language is a unified programming language for writing both graphics and compute functions that are used by apps written with the Metal framework.

The Metal shading language is designed to work together with the Metal framework, which manages the execution, and optionally the compilation, of the Metal shading language code. The Metal shading language uses clang and LLVM so developers get a compiler that delivers close to the metal performance for code executing on the GPU.

At a Glance

This document describes the Metal unified graphics and compute shading language. The Metal shading language is a C++ based programming language that developers can use to write code that is executed on the GPU for graphics and general-purpose data-parallel computations. Since the Metal shading language is based on C++, developers will find it familiar and easy to use. With the Metal shading language, both graphics and compute programs can be written with a single, unified language, which allows tighter integration between the two.

How to Use This Document

Developers who are writing code with the Metal framework will want to read this document, because they will need to use the Metal shading language to write graphics and compute programs to be executed on the GPU. This document is organized into the following chapters:

See Also


Metal Framework