About Metal and this Guide
The Metal framework supports GPU-accelerated advanced 3D graphics rendering and data-parallel computation workloads. Metal provides a modern and streamlined API for fine-grain, low-level control of the organization, processing, and submission of graphics and computation commands and the management of the associated data and resources for these commands. A primary goal of Metal is to minimize the CPU overhead necessary for executing these GPU workloads.
At a Glance
This document describes the fundamental concepts of Metal: the command submission model, the memory management model, and the use of independently compiled code (i.e., graphics shader functions or data-parallel computation functions). The document then details how to use the Metal API to write an app that:
sets hardware state necessary for graphics or data-parallel compute workloads,
commits commands for execution by the GPU,
manages memory allocations, including buffer and texture objects,
and manages compiled (or compilable) graphics shader or compute function code written in the Metal shader programming language.
How to Use This Document
This document contains the following articles:
Fundamental Metal Concepts briefly describes the main features of Metal.
Command Organization and Execution Model explains creating, committing, and executing commands on the GPU.
Resource Objects: Buffers and Textures discusses the management of device memory, including buffer and texture objects that represent GPU memory allocations.
Functions and Libraries describes how Metal shading language code can be represented in an Metal app, and how Metal shading language code is loaded onto and executed by the GPU.
Graphics Rendering: Render Command Encoder describes how to render 3D graphics, including how to distribute graphics operations across multiple threads.
Data-Parallel Compute Processing: Compute Command Encoder explains how to perform data-parallel processing.
Buffer and Texture Operations: Blit Command Encoder describes how to copy data between textures and buffers.
Metal Tips and Techniques lists development tips, such as how to build libraries off-line with compiled code.
Prerequisites
This document assumes the reader is familiar with the Objective-C language and is experienced in programming with OpenGL, OpenCL, or similar APIs.
See Also
The Metal Reference is a collection of documents that describes the interfaces in the Metal framework.
The Metal Shading Language Guide is a document that specifies the Metal shading language, which is used to write a graphics shader or a compute function that is used by a Metal app.
Copyright © 2014 Apple Inc. All Rights Reserved. Terms of Use | Privacy Policy | Updated: 2014-06-02