Metal Cheat Sheet
|
This content was generated with the assistance of AI and should be verified against the official documentation before being relied on in production. |
A single-page index of quick links to every page in this sub-section, grouped like the sub-section itself, for jumping straight to the topic you need instead of paging through the navigation.
The downloadable PDF is a separate, single A4 page meant for printing. It states the version baseline this sub-section targets (Metal 4, MSL 4.1 and Xcode 27, all checked on 1 November 2026) and covers:
-
the version matrix, with the hardware that runs Metal 4 and the toolchain it needs;
-
the Metal 4 frame loop from device and queue through the per-frame allocator, command buffer, encoder and argument table to commit and present;
-
the map from the
MTLtypes to theMTL4types, and a quick syntax reference for MSL with address spaces, attributes and function constants; -
the storage modes and when to use each, the load and store actions with the tile-based deferred rendering tips, and the compute dispatch;
-
resource binding with argument buffers,
gpuResourceID, residency sets and heaps; -
the steps of ray tracing, the mesh-shader pipeline, the MetalFX options and their inputs;
-
the debugging and profiling tools, the porting tools and a strip of deprecations.
Orientation — Metal, What’s New in Metal 4, and What Has Changed Since the Older Metal Guides.
Foundations — Setup: Xcode and the Project, GPU Architecture and TBDR, and Math for 3D.
First frame and shaders — Hello Triangle with Metal 4, MetalKit, MTKView and SwiftUI, The Metal Render Pipeline, and The Metal Shading Language.
Data and appearance — Buffers and Vertex Descriptors, Transforms and Camera, Textures and Samplers, Models with Model I/O and USD, Lighting Fundamentals in Metal, and PBR Materials in Metal.
Passes and synchronisation — Render Passes and Load/Store Actions in Metal, Shadows in Metal, Deferred and Tile Shading, and Synchronization and Barriers.
Compute and GPU-driven rendering — Compute Kernels, Particles, Image Processing, Metal Performance Shaders and MPSGraph, Argument Buffers and Bindless Resources, GPU-Driven Rendering and Indirect Command Buffers, Mesh Shaders, and Tessellation in Metal.
Advanced rendering — Ray Tracing in Metal, Image-Based Lighting and HDR in Metal, MetalFX: Upscaling, Frame Interpolation and Denoising, Machine Learning in Metal 4, Resource Loading and Streaming, and Shader Compilation and Pipeline Caching.
Tools, platforms and porting — Debugging and Profiling Metal, Performance Best Practices, metal-cpp and Game Porting, Metal on visionOS, SwiftUI Shaders and RealityKit Interop, and Migrating from OpenGL.
References
-
Metal: https://developer.apple.com/metal/ and Metal documentation: https://developer.apple.com/documentation/metal
-
Metal Shading Language specification: https://developer.apple.com/metal/Metal-Shading-Language-Specification.pdf
-
Metal Feature Set Tables: https://developer.apple.com/metal/Metal-Feature-Set-Tables.pdf
-
Understanding the Metal 4 core API: https://developer.apple.com/documentation/metal/understanding-the-metal-4-core-api
-
Metal developer tools: https://developer.apple.com/metal/tools/