Metal Cheat Sheet

About

Metal Shading Language

  • float float2 float3 float4
  • half half2 half3 float4
fragment half4 fragShader(
        VertexStruct in         [[ stage_in   ]],
        texture2d<half> texture [[ texture(0) ]],
        constant Uniforms& u    [[ buffer(0)  ]])
{
  half3 color = texture.read(...);
  half3 final = u.brightness * color;
  return half4(final, 1.0);
}

iOS GPU Families

A breakdown of each family of macOS, tvOS and iOS devices and their respective features in iOS 12 / tvOS 12 / macOS 10.14
iOS Family
Devices
  • iPhone 5S
  • iPad Air 1
  • iPad Mini 2
  • iPad Mini 3
  • iPhone 6
  • iPhone 6+
  • iPod Touch 6
  • iPad Mini 4
  • iPad Air 2
  • iPhone 6S
  • iPhone 6S+
  • iPhone SE
  • iPad 9.7" 5th Gen (2017)
  • iPad Pro 1st Gen
  • iPhone 7
  • iPhone 7+
  • iPad 9.7 6th Gen (2018)
  • iPad Pro 10.5" (2017)
  • iPad Pro 12.9" 2 (2017)
  • Apple TV 4K
  • iPhone X
  • iPhone 8
  • iPhone 8+
  • iPhone XS
  • iPhone XS Max
  • iPhone XR
  • iPad Pro (2018)
GPUs
  • A7
  • A8
  • A9
  • A10
  • A11
  • A12
Latest Version5 5 4 2 1
MetalKit✓✓✓✓✓
Metal Performance Shaders✓✓✓✓
Programmable blending✓✓✓✓✓
PVRTC pixel formats✓✓✓✓✓
EAC/ETC pixel formats✓✓✓✓✓
ASTC pixel formats✓✓✓✓✓
Linear textures✓✓✓✓✓
BC pixel formats✓✓✓✓✓
MSAA depth resolve✓✓✓
Counting occlusion query✓✓✓
Base vertex/instance drawing✓✓✓
Texture barriers
Memory barriers
Layered rendering✓
Tessellation✓✓✓
Resource heaps✓✓✓✓✓
Memoryless render targets✓✓✓✓✓
Function specialization✓✓✓✓✓
Function buffer read-writes✓✓✓
Function texture read-writes✓✓
Array of textures✓✓✓
Array of samplers✓✓✓
Cube map texture arrays✓✓
Stencil texture views✓✓✓✓✓
Depth-16 pixel format
Extended range pixel formats✓✓✓
Wide color pixel format✓✓✓✓✓
Combined MSAA store and resolve action✓✓✓
Deferred store action✓✓✓✓✓
MSAA blits✓✓✓✓✓
sRGB writes✓✓✓✓
16-bit unsigned integer coordinates✓✓✓✓✓
Extract, insert, and reverse bits✓✓✓✓✓
SIMD barrier✓✓✓✓✓
Sampler max anisotropy✓✓✓✓✓
Sampler LOD clamp✓✓✓✓✓
Border color
Dual-source blending✓✓✓✓✓
Indirect draw & dispatch arguments✓✓✓
Argument buffers[1]✓✓✓✓✓
Indirect command buffers✓✓✓✓
Programmable sample positions✓✓✓✓✓
Uniform type✓✓✓✓✓
Imageblocks✓✓
Tile shaders✓✓
Imageblock sample coverage control✓✓
Post-depth coverage✓✓
Quad-scoped permute operations✓✓
Raster order groups✓✓
Non-uniform threadgroup size✓✓
Multiple viewports✓
Device notifications
Stencil feedback✓
Stencil resolve✓
Function arguments
Maximum number of vertex attributes, per vertex descriptor3131313131
Maximum number of entries in the buffer argument table, per graphics or compute function3131313131
Maximum number of entries in the texture argument table, per graphics or compute function3131313131
Maximum number of entries in the sampler state argument table, per graphics or compute function[2]1616161616
Maximum number of entries in the threadgroup memory argument table, per compute function3131313131
Maximum number of inlined constant data buffers, per graphics or compute function3131313131
Maximum length of an inlined constant data buffer, per graphics or compute function4 KB4 KB4 KB4 KB4 KB
Maximum threads per threadgroup51251251210241024
Maximum total threadgroup memory allocation[3]16352 B16352 B16 KB64 KB64 KB
Maximum total tile memory allocation[4]Not accessibleNot accessibleNot accessible32 KB32 KB
Threadgroup memory length alignment16 B16 B16 B16 B16 B
Maximum function memory allocation for a buffer in the constant address spaceNo limitNo limitNo limitNo limitNo limit
Maximum number of inputs (scalars or vectors) to a fragment function, declared with the stage_in qualifier[5]6060606060
Maximum number of input components to a fragment function, declared with the stage_in qualifier[5]6060606060
Maximum number of function constants6553665536655366553665536
Maximum tessellation factorNot availableNot available161664
Maximum number of viewports and scissor rectangles, per vertex function111116
Maximum number of raster order groups, per fragment functionNot availableNot availableNot available88
Resources
Maximum buffer length≥ 256 MB[10]≥ 256 MB[10]≥ 256 MB[10]≥ 256 MB[10]≥ 256 MB[10]
Minimum buffer offset alignment4 B4 B4 B4 B4 B
Maximum 1D texture width8192 px8192 px16384 px16384 px16384 px
Maximum 2D texture width and height8192 px8192 px16384 px16384 px16384 px
Maximum cube map texture width and height8192 px8192 px16384 px16384 px16384 px
Maximum 3D texture width, height, and depth2048 px2048 px2048 px2048 px2048 px
Maximum number of layers per 1D texture array, 2D texture array, or 3D texture20482048204820482048
Buffer alignment for copying an existing texture to a buffer64 B64 B16 B16 B16 B
Buffer alignment for creating a new texture from a buffer (i.e. linear texture)6By API queryBy API queryBy API queryBy API queryBy API query
Render Targets
Maximum number of color render targets per render pass descriptor48888
Maximum size of a point primitive511511511511511
Maximum total render target size, per pixel, when using multiple color render targets128 bits256 bits256 bits512 bits512 bits
Ordinary 8-bit pixel formats
A8UnormFilterWriteColorMSAAResolveBlendFilterWriteColorMSAAResolveBlendFilterWriteColorMSAAResolveBlendFilterWriteColorMSAAResolveBlendFilterWriteColorMSAAResolveBlend
R8UnormFilterWriteColorMSAAResolveBlendFilterWriteColorMSAAResolveBlendFilterWriteColorMSAAResolveBlendFilterWriteColorMSAAResolveBlendFilterWriteColorMSAAResolveBlend
R8Unorm_​sRGBFilterWriteColorMSAAResolveBlendFilterWriteColorMSAAResolveBlendFilterWriteColorMSAAResolveBlendFilterWriteColorMSAAResolveBlendFilterWriteColorMSAAResolveBlend
R8SnormFilterWriteColorMSAAResolveBlendFilterWriteColorMSAAResolveBlendFilterWriteColorMSAAResolveBlendFilterWriteColorMSAAResolveBlendFilterWriteColorMSAAResolveBlend
R8Uint R8SintFilterWriteColorMSAAResolveBlendFilterWriteColorMSAAResolveBlendFilterWriteColorMSAAResolveBlendFilterWriteColorMSAAResolveBlendFilterWriteColorMSAAResolveBlend
Ordinary 16-bit pixel formats
R16Unorm R16SnormFilterWriteColorMSAAResolveBlendFilterWriteColorMSAAResolveBlendFilterWriteColorMSAAResolveBlendFilterWriteColorMSAAResolveBlendFilterWriteColorMSAAResolveBlend
R16Uint R16SintFilterWriteColorMSAAResolveBlendFilterWriteColorMSAAResolveBlendFilterWriteColorMSAAResolveBlendFilterWriteColorMSAAResolveBlendFilterWriteColorMSAAResolveBlend
R16FloatFilterWriteColorMSAAResolveBlendFilterWriteColorMSAAResolveBlendFilterWriteColorMSAAResolveBlendFilterWriteColorMSAAResolveBlendFilterWriteColorMSAAResolveBlend
RG8UnormFilterWriteColorMSAAResolveBlendFilterWriteColorMSAAResolveBlendFilterWriteColorMSAAResolveBlendFilterWriteColorMSAAResolveBlendFilterWriteColorMSAAResolveBlend
RG8Unorm_​sRGBFilterWriteColorMSAAResolveBlendFilterWriteColorMSAAResolveBlendFilterWriteColorMSAAResolveBlendFilterWriteColorMSAAResolveBlendFilterWriteColorMSAAResolveBlend
RG8SnormFilterWriteColorMSAAResolveBlendFilterWriteColorMSAAResolveBlendFilterWriteColorMSAAResolveBlendFilterWriteColorMSAAResolveBlendFilterWriteColorMSAAResolveBlend
RG8Uint RG8SintFilterWriteColorMSAAResolveBlendFilterWriteColorMSAAResolveBlendFilterWriteColorMSAAResolveBlendFilterWriteColorMSAAResolveBlendFilterWriteColorMSAAResolveBlend
Packed 16-bit pixel formats
B5G6R5Unorm A1BGR5Unorm ABGR4Unorm BGR5A1UnormFilterWriteColorMSAAResolveBlendFilterWriteColorMSAAResolveBlendFilterWriteColorMSAAResolveBlendFilterWriteColorMSAAResolveBlendFilterWriteColorMSAAResolveBlend
Ordinary 32-bit pixel formats
R32Uint R32SintFilterWriteColorMSAAResolveBlendFilterWriteColorMSAAResolveBlendFilterWriteColorMSAAResolveBlendFilterWriteColorMSAAResolveBlendFilterWriteColorMSAAResolveBlend
R32FloatFilterWriteColorMSAAResolveBlendFilterWriteColorMSAAResolveBlendFilterWriteColorMSAAResolveBlendFilterWriteColorMSAAResolveBlendFilterWriteColorMSAAResolveBlend
RG16Unorm RG16SnormFilterWriteColorMSAAResolveBlendFilterWriteColorMSAAResolveBlendFilterWriteColorMSAAResolveBlendFilterWriteColorMSAAResolveBlendFilterWriteColorMSAAResolveBlend
RG16Uint RG16SintFilterWriteColorMSAAResolveBlendFilterWriteColorMSAAResolveBlendFilterWriteColorMSAAResolveBlendFilterWriteColorMSAAResolveBlendFilterWriteColorMSAAResolveBlend
RG16FloatFilterWriteColorMSAAResolveBlendFilterWriteColorMSAAResolveBlendFilterWriteColorMSAAResolveBlendFilterWriteColorMSAAResolveBlendFilterWriteColorMSAAResolveBlend
RGBA8UnormFilterWriteColorMSAAResolveBlendFilterWriteColorMSAAResolveBlendFilterWriteColorMSAAResolveBlendFilterWriteColorMSAAResolveBlendFilterWriteColorMSAAResolveBlend
RGBA8Unorm_​sRGBFilterWriteColorMSAAResolveBlendFilterWriteColorMSAAResolveBlendFilterWriteColorMSAAResolveBlendFilterWriteColorMSAAResolveBlendFilterWriteColorMSAAResolveBlend
RGBA8SnormFilterWriteColorMSAAResolveBlendFilterWriteColorMSAAResolveBlendFilterWriteColorMSAAResolveBlendFilterWriteColorMSAAResolveBlendFilterWriteColorMSAAResolveBlend
RGBA8Uint RGBA8SintFilterWriteColorMSAAResolveBlendFilterWriteColorMSAAResolveBlendFilterWriteColorMSAAResolveBlendFilterWriteColorMSAAResolveBlendFilterWriteColorMSAAResolveBlend
BGRX8Unorm
BGRA8UnormFilterWriteColorMSAAResolveBlendFilterWriteColorMSAAResolveBlendFilterWriteColorMSAAResolveBlendFilterWriteColorMSAAResolveBlendFilterWriteColorMSAAResolveBlend
BGRA8Unorm_​sRGBFilterWriteColorMSAAResolveBlendFilterWriteColorMSAAResolveBlendFilterWriteColorMSAAResolveBlendFilterWriteColorMSAAResolveBlendFilterWriteColorMSAAResolveBlend
Packed 32-bit pixel formats
RGB[10]A2UnormFilterWriteColorMSAAResolveBlendFilterWriteColorMSAAResolveBlendFilterWriteColorMSAAResolveBlendFilterWriteColorMSAAResolveBlendFilterWriteColorMSAAResolveBlend
RGB[10]A2UintFilterWriteColorMSAAResolveBlendFilterWriteColorMSAAResolveBlendFilterWriteColorMSAAResolveBlendFilterWriteColorMSAAResolveBlendFilterWriteColorMSAAResolveBlend
RG11B10FloatFilterWriteColorMSAAResolveBlendFilterWriteColorMSAAResolveBlendFilterWriteColorMSAAResolveBlendFilterWriteColorMSAAResolveBlendFilterWriteColorMSAAResolveBlend
RGB9E5FloatFilterWriteColorMSAAResolveBlendFilterWriteColorMSAAResolveBlendFilterWriteColorMSAAResolveBlendFilterWriteColorMSAAResolveBlendFilterWriteColorMSAAResolveBlend
Ordinary 64-bit pixel formats
RG32Uint RG32SintFilterWriteColorMSAAResolveBlendFilterWriteColorMSAAResolveBlendFilterWriteColorMSAAResolveBlendFilterWriteColorMSAAResolveBlendFilterWriteColorMSAAResolveBlend
RG32FloatFilterWriteColorMSAAResolveBlendFilterWriteColorMSAAResolveBlendFilterWriteColorMSAAResolveBlendFilterWriteColorMSAAResolveBlendFilterWriteColorMSAAResolveBlend
RGBA16Unorm RGBA16SnormFilterWriteColorMSAAResolveBlendFilterWriteColorMSAAResolveBlendFilterWriteColorMSAAResolveBlendFilterWriteColorMSAAResolveBlendFilterWriteColorMSAAResolveBlend
RGBA16Uint RGBA16SintFilterWriteColorMSAAResolveBlendFilterWriteColorMSAAResolveBlendFilterWriteColorMSAAResolveBlendFilterWriteColorMSAAResolveBlendFilterWriteColorMSAAResolveBlend
RGBA16FloatFilterWriteColorMSAAResolveBlendFilterWriteColorMSAAResolveBlendFilterWriteColorMSAAResolveBlendFilterWriteColorMSAAResolveBlendFilterWriteColorMSAAResolveBlend
Ordinary 128-bit pixel formats
RGBA32Uint RGBA32SintFilterWriteColorMSAAResolveBlendFilterWriteColorMSAAResolveBlendFilterWriteColorMSAAResolveBlendFilterWriteColorMSAAResolveBlendFilterWriteColorMSAAResolveBlend
RGBA32FloatFilterWriteColorMSAAResolveBlendFilterWriteColorMSAAResolveBlendFilterWriteColorMSAAResolveBlendFilterWriteColorMSAAResolveBlendFilterWriteColorMSAAResolveBlend
Compressed pixel formats
PVRTC pixel formats[8]FilterWriteColorMSAAResolveBlendFilterWriteColorMSAAResolveBlendFilterWriteColorMSAAResolveBlendFilterWriteColorMSAAResolveBlendFilterWriteColorMSAAResolveBlend
EAC/ETC pixel formatsFilterWriteColorMSAAResolveBlendFilterWriteColorMSAAResolveBlendFilterWriteColorMSAAResolveBlendFilterWriteColorMSAAResolveBlendFilterWriteColorMSAAResolveBlend
ASTC pixel formatsFilterWriteColorMSAAResolveBlendFilterWriteColorMSAAResolveBlendFilterWriteColorMSAAResolveBlendFilterWriteColorMSAAResolveBlendFilterWriteColorMSAAResolveBlend
BC pixel formatsFilterWriteColorMSAAResolveBlendFilterWriteColorMSAAResolveBlendFilterWriteColorMSAAResolveBlendFilterWriteColorMSAAResolveBlendFilterWriteColorMSAAResolveBlend
YUV pixel formats
GBGR422 BGRG422FilterWriteColorMSAAResolveBlendFilterWriteColorMSAAResolveBlendFilterWriteColorMSAAResolveBlendFilterWriteColorMSAAResolveBlendFilterWriteColorMSAAResolveBlend
Depth and stencil pixel formats
Depth16UnormFilterWriteColorMSAAResolveBlendFilterWriteColorMSAAResolveBlendFilterWriteColorMSAAResolveBlendFilterWriteColorMSAAResolveBlendFilterWriteColorMSAAResolveBlend
Depth32FloatFilterWriteColorMSAAResolveBlendFilterWriteColorMSAAResolveBlendFilterWriteColorMSAAResolveBlendFilterWriteColorMSAAResolveBlendFilterWriteColorMSAAResolveBlend
Stencil8FilterWriteColorMSAAResolveBlendFilterWriteColorMSAAResolveBlendFilterWriteColorMSAAResolveBlendFilterWriteColorMSAAResolveBlendFilterWriteColorMSAAResolveBlend
Depth24Unorm_​Stencil89FilterWriteColorMSAAResolveBlendFilterWriteColorMSAAResolveBlendFilterWriteColorMSAAResolveBlendFilterWriteColorMSAAResolveBlendFilterWriteColorMSAAResolveBlend
Depth32Float_​Stencil8FilterWriteColorMSAAResolveBlendFilterWriteColorMSAAResolveBlendFilterWriteColorMSAAResolveBlendFilterWriteColorMSAAResolveBlendFilterWriteColorMSAAResolveBlend
X24_​Stencil8FilterWriteColorMSAAResolveBlendFilterWriteColorMSAAResolveBlendFilterWriteColorMSAAResolveBlendFilterWriteColorMSAAResolveBlendFilterWriteColorMSAAResolveBlend
X32_​Stencil8FilterWriteColorMSAAResolveBlendFilterWriteColorMSAAResolveBlendFilterWriteColorMSAAResolveBlendFilterWriteColorMSAAResolveBlendFilterWriteColorMSAAResolveBlend
Extended range and wide color pixel formats
BGRA10_XR BGRA10_XR_sRGB BGR10_XR BGR10_XR_​sRGBFilterWriteColorMSAAResolveBlendFilterWriteColorMSAAResolveBlendFilterWriteColorMSAAResolveBlendFilterWriteColorMSAAResolveBlendFilterWriteColorMSAAResolveBlend
BGR10A2UnormFilterWriteColorMSAAResolveBlendFilterWriteColorMSAAResolveBlendFilterWriteColorMSAAResolveBlendFilterWriteColorMSAAResolveBlendFilterWriteColorMSAAResolveBlend

macOS GPU Families

A breakdown of each family of macOS, tvOS and iOS devices and their respective features in iOS 12 / tvOS 12 / macOS 10.14
macOS Family
Devices
  • iMac Pro
  • iMac 2012+
  • MacBook 2015+
  • MacBook Pro 2012+
  • MacBook Air 2012+
  • Mac mini 2012+
  • Mac Pro late 2013
  • iMac 2015+
  • MacBook Pro 2016+
  • MacBook 2016+
  • iMac Pro 2017+
GPUs
    • Intel Iris Graphics 5xx
    • Intel Iris Plus Graphics 6xx
    • Intel HD Graphics 5xx
    • Intel HD Graphics 6xx
    • AMD FirePro Dxxx
    • AMD Radeon R9 M2xx
    • AMD Radeon R9 M3xx
    • AMD Radeon Pro 4xx
    • AMD Radeon Pro 5xx
    • AMD Radeon Pro Vega
    Latest Version4 1
    MetalKit✓✓
    Metal Performance Shaders✓✓
    Programmable blending
    PVRTC pixel formats
    EAC/ETC pixel formats✓✓
    ASTC pixel formats✓✓
    Linear textures✓✓
    BC pixel formats✓✓
    MSAA depth resolve✓
    Counting occlusion query✓✓
    Base vertex/instance drawing✓✓
    Texture barriers✓✓
    Memory barriers✓✓
    Layered rendering✓✓
    Tessellation✓✓
    Resource heaps✓✓
    Memoryless render targets
    Function specialization✓✓
    Function buffer read-writes✓✓
    Function texture read-writes✓✓
    Array of textures✓✓
    Array of samplers✓✓
    Cube map texture arrays✓✓
    Stencil texture views✓✓
    Depth-16 pixel format✓✓
    Extended range pixel formats
    Wide color pixel format✓✓
    Combined MSAA store and resolve action✓✓
    Deferred store action✓✓
    MSAA blits✓✓
    sRGB writes✓
    16-bit unsigned integer coordinates✓✓
    Extract, insert, and reverse bits✓✓
    SIMD barrier✓✓
    Sampler max anisotropy✓✓
    Sampler LOD clamp✓✓
    Border color✓✓
    Dual-source blending✓✓
    Indirect draw & dispatch arguments✓✓
    Argument buffers[1]✓✓
    Indirect command buffers✓
    Programmable sample positions✓✓
    Uniform type✓✓
    Imageblocks
    Tile shaders
    Imageblock sample coverage control
    Post-depth coverage
    Quad-scoped permute operations✓✓
    Raster order groups✓✓
    Non-uniform threadgroup size✓✓
    Multiple viewports✓✓
    Device notifications✓✓
    Stencil feedback✓
    Stencil resolve✓
    Function arguments
    Maximum number of vertex attributes, per vertex descriptor3131
    Maximum number of entries in the buffer argument table, per graphics or compute function3131
    Maximum number of entries in the texture argument table, per graphics or compute function128128
    Maximum number of entries in the sampler state argument table, per graphics or compute function[2]1616
    Maximum number of entries in the threadgroup memory argument table, per compute function3131
    Maximum number of inlined constant data buffers, per graphics or compute function1414
    Maximum length of an inlined constant data buffer, per graphics or compute function4 KB4 KB
    Maximum threads per threadgroup10241024
    Maximum total threadgroup memory allocation[3]32 KB32 KB
    Maximum total tile memory allocation[4]Not accessibleNot accessible
    Threadgroup memory length alignment16 B16 B
    Maximum function memory allocation for a buffer in the constant address space64 KB64 KB
    Maximum number of inputs (scalars or vectors) to a fragment function, declared with the stage_in qualifier[5]3232
    Maximum number of input components to a fragment function, declared with the stage_in qualifier[5]128128
    Maximum number of function constants6553665536
    Maximum tessellation factor6464
    Maximum number of viewports and scissor rectangles, per vertex function1616
    Maximum number of raster order groups, per fragment function88
    Resources
    Maximum buffer length≥ 1 GB[10]≥ 1 GB[10]
    Minimum buffer offset alignment256 B256 B
    Maximum 1D texture width16384 px16384 px
    Maximum 2D texture width and height16384 px16384 px
    Maximum cube map texture width and height16384 px16384 px
    Maximum 3D texture width, height, and depth2048 px2048 px
    Maximum number of layers per 1D texture array, 2D texture array, or 3D texture20482048
    Buffer alignment for copying an existing texture to a buffer256 B256 B
    Buffer alignment for creating a new texture from a buffer (i.e. linear texture)6By API queryBy API query
    Render Targets
    Maximum number of color render targets per render pass descriptor88
    Maximum size of a point primitive511511
    Maximum total render target size, per pixel, when using multiple color render targetsNo limitNo limit
    Ordinary 8-bit pixel formats
    A8UnormFilterWriteColorMSAAResolveBlendFilterWriteColorMSAAResolveBlend
    R8UnormFilterWriteColorMSAAResolveBlendFilterWriteColorMSAAResolveBlend
    R8Unorm_​sRGBFilterWriteColorMSAAResolveBlendFilterWriteColorMSAAResolveBlend
    R8SnormFilterWriteColorMSAAResolveBlendFilterWriteColorMSAAResolveBlend
    R8Uint R8SintFilterWriteColorMSAAResolveBlendFilterWriteColorMSAAResolveBlend
    Ordinary 16-bit pixel formats
    R16Unorm R16SnormFilterWriteColorMSAAResolveBlendFilterWriteColorMSAAResolveBlend
    R16Uint R16SintFilterWriteColorMSAAResolveBlendFilterWriteColorMSAAResolveBlend
    R16FloatFilterWriteColorMSAAResolveBlendFilterWriteColorMSAAResolveBlend
    RG8UnormFilterWriteColorMSAAResolveBlendFilterWriteColorMSAAResolveBlend
    RG8Unorm_​sRGBFilterWriteColorMSAAResolveBlendFilterWriteColorMSAAResolveBlend
    RG8SnormFilterWriteColorMSAAResolveBlendFilterWriteColorMSAAResolveBlend
    RG8Uint RG8SintFilterWriteColorMSAAResolveBlendFilterWriteColorMSAAResolveBlend
    Packed 16-bit pixel formats
    B5G6R5Unorm A1BGR5Unorm ABGR4Unorm BGR5A1UnormFilterWriteColorMSAAResolveBlendFilterWriteColorMSAAResolveBlend
    Ordinary 32-bit pixel formats
    R32Uint R32SintFilterWriteColorMSAAResolveBlendFilterWriteColorMSAAResolveBlend
    R32FloatFilterWriteColorMSAAResolveBlendFilterWriteColorMSAAResolveBlend
    RG16Unorm RG16SnormFilterWriteColorMSAAResolveBlendFilterWriteColorMSAAResolveBlend
    RG16Uint RG16SintFilterWriteColorMSAAResolveBlendFilterWriteColorMSAAResolveBlend
    RG16FloatFilterWriteColorMSAAResolveBlendFilterWriteColorMSAAResolveBlend
    RGBA8UnormFilterWriteColorMSAAResolveBlendFilterWriteColorMSAAResolveBlend
    RGBA8Unorm_​sRGBFilterWriteColorMSAAResolveBlendFilterWriteColorMSAAResolveBlend
    RGBA8SnormFilterWriteColorMSAAResolveBlendFilterWriteColorMSAAResolveBlend
    RGBA8Uint RGBA8SintFilterWriteColorMSAAResolveBlendFilterWriteColorMSAAResolveBlend
    BGRX8Unorm
    BGRA8UnormFilterWriteColorMSAAResolveBlendFilterWriteColorMSAAResolveBlend
    BGRA8Unorm_​sRGBFilterWriteColorMSAAResolveBlendFilterWriteColorMSAAResolveBlend
    Packed 32-bit pixel formats
    RGB[10]A2UnormFilterWriteColorMSAAResolveBlendFilterWriteColorMSAAResolveBlend
    RGB[10]A2UintFilterWriteColorMSAAResolveBlendFilterWriteColorMSAAResolveBlend
    RG11B10FloatFilterWriteColorMSAAResolveBlendFilterWriteColorMSAAResolveBlend
    RGB9E5FloatFilterWriteColorMSAAResolveBlendFilterWriteColorMSAAResolveBlend
    Ordinary 64-bit pixel formats
    RG32Uint RG32SintFilterWriteColorMSAAResolveBlendFilterWriteColorMSAAResolveBlend
    RG32FloatFilterWriteColorMSAAResolveBlendFilterWriteColorMSAAResolveBlend
    RGBA16Unorm RGBA16SnormFilterWriteColorMSAAResolveBlendFilterWriteColorMSAAResolveBlend
    RGBA16Uint RGBA16SintFilterWriteColorMSAAResolveBlendFilterWriteColorMSAAResolveBlend
    RGBA16FloatFilterWriteColorMSAAResolveBlendFilterWriteColorMSAAResolveBlend
    Ordinary 128-bit pixel formats
    RGBA32Uint RGBA32SintFilterWriteColorMSAAResolveBlendFilterWriteColorMSAAResolveBlend
    RGBA32FloatFilterWriteColorMSAAResolveBlendFilterWriteColorMSAAResolveBlend
    Compressed pixel formats
    PVRTC pixel formats[8]FilterWriteColorMSAAResolveBlendFilterWriteColorMSAAResolveBlend
    EAC/ETC pixel formatsFilterWriteColorMSAAResolveBlendFilterWriteColorMSAAResolveBlend
    ASTC pixel formatsFilterWriteColorMSAAResolveBlendFilterWriteColorMSAAResolveBlend
    BC pixel formatsFilterWriteColorMSAAResolveBlendFilterWriteColorMSAAResolveBlend
    YUV pixel formats
    GBGR422 BGRG422FilterWriteColorMSAAResolveBlendFilterWriteColorMSAAResolveBlend
    Depth and stencil pixel formats
    Depth16UnormFilterWriteColorMSAAResolveBlendFilterWriteColorMSAAResolveBlend
    Depth32FloatFilterWriteColorMSAAResolveBlendFilterWriteColorMSAAResolveBlend
    Stencil8FilterWriteColorMSAAResolveBlendFilterWriteColorMSAAResolveBlend
    Depth24Unorm_​Stencil89FilterWriteColorMSAAResolveBlendFilterWriteColorMSAAResolveBlend
    Depth32Float_​Stencil8FilterWriteColorMSAAResolveBlendFilterWriteColorMSAAResolveBlend
    X24_​Stencil8FilterWriteColorMSAAResolveBlendFilterWriteColorMSAAResolveBlend
    X32_​Stencil8FilterWriteColorMSAAResolveBlendFilterWriteColorMSAAResolveBlend
    Extended range and wide color pixel formats
    BGRA10_XR BGRA10_XR_sRGB BGR10_XR BGR10_XR_​sRGBFilterWriteColorMSAAResolveBlendFilterWriteColorMSAAResolveBlend
    BGR10A2UnormFilterWriteColorMSAAResolveBlendFilterWriteColorMSAAResolveBlend

    Notes

    Not all macOS Family 1v3 devices support raster order groups. You query MTLDevice rasterOrderGroupsSupported at runtime to check.

    tvOS GPU Families

    A breakdown of each family of macOS, tvOS and iOS devices and their respective features in iOS 12 / tvOS 12 / macOS 10.14
    tvOS Family
    Devices
    • Apple TV
    • Apple TV 4K
    GPUs
    • A8
    • A9
    Latest Version4 2
    MetalKit✓✓
    Metal Performance Shaders✓✓
    Programmable blending✓✓
    PVRTC pixel formats✓✓
    EAC/ETC pixel formats✓✓
    ASTC pixel formats✓✓
    Linear textures✓✓
    BC pixel formats✓✓
    MSAA depth resolve✓
    Counting occlusion query✓
    Base vertex/instance drawing✓
    Texture barriers
    Memory barriers
    Layered rendering
    Tessellation✓
    Resource heaps✓✓
    Memoryless render targets✓✓
    Function specialization✓✓
    Function buffer read-writes✓
    Function texture read-writes
    Array of textures✓
    Array of samplers✓
    Cube map texture arrays
    Stencil texture views✓✓
    Depth-16 pixel format
    Extended range pixel formats✓
    Wide color pixel format✓✓
    Combined MSAA store and resolve action✓
    Deferred store action✓✓
    MSAA blits✓✓
    sRGB writes✓✓
    16-bit unsigned integer coordinates✓✓
    Extract, insert, and reverse bits✓✓
    SIMD barrier✓✓
    Sampler max anisotropy✓✓
    Sampler LOD clamp✓✓
    Border color
    Dual-source blending✓✓
    Indirect draw & dispatch arguments✓
    Argument buffers[1]✓✓
    Indirect command buffers✓
    Programmable sample positions✓✓
    Uniform type✓✓
    Imageblocks
    Tile shaders
    Imageblock sample coverage control
    Post-depth coverage
    Quad-scoped permute operations
    Raster order groups
    Non-uniform threadgroup size
    Multiple viewports
    Device notifications
    Stencil feedback
    Stencil resolve
    Function arguments
    Maximum number of vertex attributes, per vertex descriptor3131
    Maximum number of entries in the buffer argument table, per graphics or compute function3131
    Maximum number of entries in the texture argument table, per graphics or compute function3131
    Maximum number of entries in the sampler state argument table, per graphics or compute function[2]1616
    Maximum number of entries in the threadgroup memory argument table, per compute function3131
    Maximum number of inlined constant data buffers, per graphics or compute function3131
    Maximum length of an inlined constant data buffer, per graphics or compute function4 KB4 KB
    Maximum threads per threadgroup512512
    Maximum total threadgroup memory allocation[3]16352 B16 KB
    Maximum total tile memory allocation[4]Not accessibleNot accessible
    Threadgroup memory length alignment16 B16 B
    Maximum function memory allocation for a buffer in the constant address spaceNo limitNo limit
    Maximum number of inputs (scalars or vectors) to a fragment function, declared with the stage_in qualifier[5]6060
    Maximum number of input components to a fragment function, declared with the stage_in qualifier[5]6060
    Maximum number of function constants6553665536
    Maximum tessellation factorNot available16
    Maximum number of viewports and scissor rectangles, per vertex function11
    Maximum number of raster order groups, per fragment functionNot availableNot available
    Resources
    Maximum buffer length≥ 256 MB[10]≥ 256 MB[10]
    Minimum buffer offset alignment4 B4 B
    Maximum 1D texture width8192 px16384 px
    Maximum 2D texture width and height8192 px16384 px
    Maximum cube map texture width and height8192 px16384 px
    Maximum 3D texture width, height, and depth2048 px2048 px
    Maximum number of layers per 1D texture array, 2D texture array, or 3D texture20482048
    Buffer alignment for copying an existing texture to a buffer64 B16 B
    Buffer alignment for creating a new texture from a buffer (i.e. linear texture)6By API queryBy API query
    Render Targets
    Maximum number of color render targets per render pass descriptor88
    Maximum size of a point primitive511511
    Maximum total render target size, per pixel, when using multiple color render targets256 bits256 bits
    Ordinary 8-bit pixel formats
    A8UnormFilterWriteColorMSAAResolveBlendFilterWriteColorMSAAResolveBlend
    R8UnormFilterWriteColorMSAAResolveBlendFilterWriteColorMSAAResolveBlend
    R8Unorm_​sRGBFilterWriteColorMSAAResolveBlendFilterWriteColorMSAAResolveBlend
    R8SnormFilterWriteColorMSAAResolveBlendFilterWriteColorMSAAResolveBlend
    R8Uint R8SintFilterWriteColorMSAAResolveBlendFilterWriteColorMSAAResolveBlend
    Ordinary 16-bit pixel formats
    R16Unorm R16SnormFilterWriteColorMSAAResolveBlendFilterWriteColorMSAAResolveBlend
    R16Uint R16SintFilterWriteColorMSAAResolveBlendFilterWriteColorMSAAResolveBlend
    R16FloatFilterWriteColorMSAAResolveBlendFilterWriteColorMSAAResolveBlend
    RG8UnormFilterWriteColorMSAAResolveBlendFilterWriteColorMSAAResolveBlend
    RG8Unorm_​sRGBFilterWriteColorMSAAResolveBlendFilterWriteColorMSAAResolveBlend
    RG8SnormFilterWriteColorMSAAResolveBlendFilterWriteColorMSAAResolveBlend
    RG8Uint RG8SintFilterWriteColorMSAAResolveBlendFilterWriteColorMSAAResolveBlend
    Packed 16-bit pixel formats
    B5G6R5Unorm A1BGR5Unorm ABGR4Unorm BGR5A1UnormFilterWriteColorMSAAResolveBlendFilterWriteColorMSAAResolveBlend
    Ordinary 32-bit pixel formats
    R32Uint R32SintFilterWriteColorMSAAResolveBlendFilterWriteColorMSAAResolveBlend
    R32FloatFilterWriteColorMSAAResolveBlendFilterWriteColorMSAAResolveBlend
    RG16Unorm RG16SnormFilterWriteColorMSAAResolveBlendFilterWriteColorMSAAResolveBlend
    RG16Uint RG16SintFilterWriteColorMSAAResolveBlendFilterWriteColorMSAAResolveBlend
    RG16FloatFilterWriteColorMSAAResolveBlendFilterWriteColorMSAAResolveBlend
    RGBA8UnormFilterWriteColorMSAAResolveBlendFilterWriteColorMSAAResolveBlend
    RGBA8Unorm_​sRGBFilterWriteColorMSAAResolveBlendFilterWriteColorMSAAResolveBlend
    RGBA8SnormFilterWriteColorMSAAResolveBlendFilterWriteColorMSAAResolveBlend
    RGBA8Uint RGBA8SintFilterWriteColorMSAAResolveBlendFilterWriteColorMSAAResolveBlend
    BGRX8Unorm
    BGRA8UnormFilterWriteColorMSAAResolveBlendFilterWriteColorMSAAResolveBlend
    BGRA8Unorm_​sRGBFilterWriteColorMSAAResolveBlendFilterWriteColorMSAAResolveBlend
    Packed 32-bit pixel formats
    RGB[10]A2UnormFilterWriteColorMSAAResolveBlendFilterWriteColorMSAAResolveBlend
    RGB[10]A2UintFilterWriteColorMSAAResolveBlendFilterWriteColorMSAAResolveBlend
    RG11B10FloatFilterWriteColorMSAAResolveBlendFilterWriteColorMSAAResolveBlend
    RGB9E5FloatFilterWriteColorMSAAResolveBlendFilterWriteColorMSAAResolveBlend
    Ordinary 64-bit pixel formats
    RG32Uint RG32SintFilterWriteColorMSAAResolveBlendFilterWriteColorMSAAResolveBlend
    RG32FloatFilterWriteColorMSAAResolveBlendFilterWriteColorMSAAResolveBlend
    RGBA16Unorm RGBA16SnormFilterWriteColorMSAAResolveBlendFilterWriteColorMSAAResolveBlend
    RGBA16Uint RGBA16SintFilterWriteColorMSAAResolveBlendFilterWriteColorMSAAResolveBlend
    RGBA16FloatFilterWriteColorMSAAResolveBlendFilterWriteColorMSAAResolveBlend
    Ordinary 128-bit pixel formats
    RGBA32Uint RGBA32SintFilterWriteColorMSAAResolveBlendFilterWriteColorMSAAResolveBlend
    RGBA32FloatFilterWriteColorMSAAResolveBlendFilterWriteColorMSAAResolveBlend
    Compressed pixel formats
    PVRTC pixel formats[8]FilterWriteColorMSAAResolveBlendFilterWriteColorMSAAResolveBlend
    EAC/ETC pixel formatsFilterWriteColorMSAAResolveBlendFilterWriteColorMSAAResolveBlend
    ASTC pixel formatsFilterWriteColorMSAAResolveBlendFilterWriteColorMSAAResolveBlend
    BC pixel formatsFilterWriteColorMSAAResolveBlendFilterWriteColorMSAAResolveBlend
    YUV pixel formats
    GBGR422 BGRG422FilterWriteColorMSAAResolveBlendFilterWriteColorMSAAResolveBlend
    Depth and stencil pixel formats
    Depth16UnormFilterWriteColorMSAAResolveBlendFilterWriteColorMSAAResolveBlend
    Depth32FloatFilterWriteColorMSAAResolveBlendFilterWriteColorMSAAResolveBlend
    Stencil8FilterWriteColorMSAAResolveBlendFilterWriteColorMSAAResolveBlend
    Depth24Unorm_​Stencil89FilterWriteColorMSAAResolveBlendFilterWriteColorMSAAResolveBlend
    Depth32Float_​Stencil8FilterWriteColorMSAAResolveBlendFilterWriteColorMSAAResolveBlend
    X24_​Stencil8FilterWriteColorMSAAResolveBlendFilterWriteColorMSAAResolveBlend
    X32_​Stencil8FilterWriteColorMSAAResolveBlendFilterWriteColorMSAAResolveBlend
    Extended range and wide color pixel formats
    BGRA10_XR BGRA10_XR_sRGB BGR10_XR BGR10_XR_​sRGBFilterWriteColorMSAAResolveBlendFilterWriteColorMSAAResolveBlend
    BGR10A2UnormFilterWriteColorMSAAResolveBlendFilterWriteColorMSAAResolveBlend

    Sources: