---
title: Metal
framework: Metal
role: collection
role_heading: Framework
platforms: [iOS 8.0+, Mac Catalyst 13.0+, macOS 10.11+, tvOS 9.0+, visionOS 1.0+]
path: metal
---

# Metal

Render advanced 3D graphics and compute data in parallel with graphics processors.

## Overview

Overview The Metal framework gives your app direct access to a device’s graphics processing unit (GPU). With Metal, apps can leverage a GPU to quickly render complex scenes and run computational tasks in parallel. For example, apps in these categories use Metal to maximize their performance: Games that render sophisticated 2D or 3D environments Video processing apps, like Final Cut Pro Scientific research apps that analyze and process large datasets Fully immersive visionOS apps Metal works hand-in-hand with other frameworks that supplement its capability. For example, MetalFX upscales your renderings in less time than rendering them natively, and MetalKit simplifies the tasks that display your Metal content onscreen. The Metal Performance Shaders framework provides a large library of optimized compute and rendering shaders that take advantage of each GPU’s unique hardware. In visionOS, create fully immersive stereoscopic content with the help of the Compositor Services framework. Many high-level Apple frameworks leverage the performance of Metal, including RealityKit, SpriteKit, and Core Image. These high-level frameworks implement the GPU programming details for you. However, you can typically get better performance by writing your own custom Metal and shader code. See the Metal Shading Language Specification for shader implementation details.

## Topics

### Essentials

- [Understanding the Metal 4 core API](metal/understanding-the-metal-4-core-api.md)
- [Drawing a triangle with Metal 4](metal/drawing-a-triangle-with-metal-4.md)
- [Performing calculations on a GPU](metal/performing-calculations-on-a-gpu.md)
- [Using Metal to draw a view’s contents](metal/using-metal-to-draw-a-view's-contents.md)

### Samples

- [Metal sample code library](metal/metal-sample-code-library.md)

### GPU devices

- [GPU devices and work submission](metal/gpu-devices-and-work-submission.md)

### Command encoders

- [Render passes](metal/render-passes.md)
- [Compute passes](metal/compute-passes.md)
- [Machine learning passes](metal/machine-learning-passes.md)
- [Blit passes](metal/blit-passes.md)
- [Indirect command encoding](metal/indirect-command-encoding.md)
- [Ray tracing with acceleration structures](metal/ray-tracing-with-acceleration-structures.md)

### Resources

- [Resource fundamentals](metal/resource-fundamentals.md)
- [Buffers](metal/buffers.md)
- [Textures](metal/textures.md)
- [Memory heaps](metal/memory-heaps.md)
- [Resource loading](metal/resource-loading.md)
- [Resource synchronization](metal/resource-synchronization.md)

### Shader compilation and libraries

- [Writing reusable GPU functions with generic pointers](metal/writing-reusable-gpu-functions-with-generic-pointers.md)
- [Using the Metal 4 compilation API](metal/using-the-metal-4-compilation-api.md)
- [Shader libraries](metal/shader-libraries.md)
- [Using function specialization to build pipeline variants](metal/using-function-specialization-to-build-pipeline-variants.md)

### Presentation

- [Managing your game window for Metal in macOS](metal/managing-your-game-window-for-metal-in-macos.md)
- [Managing your Metal app window in iPadOS](metal/managing-your-metal-app-window-in-ipados.md)
- [Adapting your game interface for smaller screens](metal/adapting-your-game-interface-for-smaller-screens.md)
- [Onscreen presentation](metal/onscreen-presentation.md)
- [HDR content](metal/hdr-content.md)

### Developer tools

- [Supporting Simulator in a Metal app](metal/supporting-simulator-in-a-metal-app.md)
- [Capturing Metal commands programmatically](metal/capturing-metal-commands-programmatically.md)
- [Logging shader debug messages](metal/logging-shader-debug-messages.md)
- [Developing Metal apps that run in Simulator](metal/developing-metal-apps-that-run-in-simulator.md)
- [Improving your game’s graphics performance and settings](metal/improving-your-games-graphics-performance-and-settings.md)
- [Metal debugger](xcode/metal-debugger.md)
- [Metal developer workflows](xcode/metal-developer-workflows.md)
- [GPU counters and counter sample buffers](metal/gpu-counters-and-counter-sample-buffers.md)
- [Metal debugging types](metal/metal-debugging-types.md)

### Apple silicon

- [Porting your Metal code to Apple silicon](apple-silicon/porting-your-metal-code-to-apple-silicon.md)
- [Tailor your apps for Apple GPUs and tile-based deferred rendering](metal/tailor-your-apps-for-apple-gpus-and-tile-based-deferred-rendering.md)

### Reference

- [Metal structures](metal/metal-structures.md)
- [Metal enumerations](metal/metal-enumerations.md)
- [Metal constants](metal/metal-constants.md)
- [Metal data types](metal/metal-data-types.md)
- [Metal variables](metal/metal-variables.md)

### Classes

- [MTLTensorAuxiliaryPlaneDescriptor](metal/mtltensorauxiliaryplanedescriptor.md)
- [MTLTensorAuxiliaryPlaneDescriptorMap](metal/mtltensorauxiliaryplanedescriptormap.md)
- [MTLTensorAuxiliaryPlaneType](metal/mtltensorauxiliaryplanetype.md)
- [MTLTensorBufferAttachments](metal/mtltensorbufferattachments.md)

### Protocols

- [MTLTensorAuxiliaryPlane](metal/mtltensorauxiliaryplane.md)

### Structures

- [MTLDeviceError](metal/mtldeviceerror-swift.struct.md)

### Variables

- [MTLDeviceErrorDomain](metal/mtldeviceerrordomain.md)

### Enumerations

- [MTLContentionRelief](metal/mtlcontentionrelief.md)
- [MTLFloatingPointConversionRoundingMode](metal/mtlfloatingpointconversionroundingmode.md)
- [MTLForwardProgressUsage](metal/mtlforwardprogressusage.md)
- [MTLTensorPlaneType](metal/mtltensorplanetype.md)

## See Also

### Related Documentation

- [Metal Programming Guide](apple-archive/documentation/Miscellaneous/Conceptual/MetalProgrammingGuide/Introduction.md)
- [Metal Best Practices Guide](apple-archive/documentation/3DDrawing/Conceptual/MTLBestPracticesGuide.md)
