This chapter describes the features, limits, and capabilities of the Metal feature sets.
Each Metal feature set is tied to a specific OS and GPU (or Mac model), as listed in Table 9-1. Query the supportsFeatureSet:
method with a valid MTLFeatureSet
value to find out if a specific feature set is supported by a MTLDevice
object.
| Apple A7 GPU | Apple A8 GPU | Apple A9 GPU | MacBook (early 2015) MacBook Air (mid 2012 or newer) MacBook Pro (mid 2012 or newer) Mac Mini (late 2012 or newer) iMac (late 2012 or newer) Mac Pro (late 2013 and newer) |
---|---|---|---|---|
iOS 8 | iOS GPU Family 1 v1 | iOS GPU Family 2 v1 | — | — |
iOS 9 | iOS GPU Family 1 v2 | iOS GPU Family 2 v2 | iOS GPU Family 3 v1 | — |
OS X 10.11 | — | — | — | OS X GPU Family 1 v1 |
Feature Availability
Table 9-2 lists the availability of major Metal features. For specific API availability information, see the Metal Framework Reference.
Feature | iOS GPU Family 1 v1 iOS GPU Family 1 v2 | iOS GPU Family 2 v1 iOS GPU Family 2 v2 | iOS GPU Family 3 v1 | OS X GPU Family 1 v1 |
---|---|---|---|---|
MetalKit | | |||
Programmable blending | | | ||
PVRTC pixel formats | | | ||
ETC pixel formats | | | ||
BC pixel formats | | | ||
Cube map texture arrays | | | ||
Texture barriers | | | ||
Layered rendering | | | ||
Sampler comparison functions | | | ||
Counting occlusion query | | | ||
Base vertex/instance drawing | | | ||
Indirect drawing | | | ||
Indirect processing | | | ||
MSAA depth resolve | | | | |
ASTC pixel formats | | | | |
Metal Performance Shaders | | | |
Limits
Table 9-3 lists the hardware and/or software limits throughout the Metal framework.
Note: For any listed entry in Table 9-3, a ‘—’ indicates that the feature corresponding to the limit is not available in that specific feature set.
Limit | iOS GPU Family 1 v1 | iOS GPU Family 1 v2 | iOS GPU Family 2 v1 | iOS GPU Family 2 v2 | iOS GPU Family 3 v1 | OS X GPU Family 1 v1 |
---|---|---|---|---|---|---|
Maximum number of vertex attributes per vertex descriptor | 31 | |||||
Maximum number of entries in the buffer argument table, per render or compute command encoder | 31 | |||||
Maximum number of entries in the sampler state argument table, per render or compute command encoder | 16 | |||||
Maximum length of a data block for a function, per render or compute command encoder | 4096 B | |||||
Maximum number of 32-bit components that can be passed from a vertex function to a fragment function | 60 | |||||
Maximum number of texture layers per 1D or 2D texture array | 2048 | |||||
Maximum number of texture layers per 3D texture | 2048 | |||||
Maximum size of a point primitive | 511.0 | |||||
Maximum visibility query offset for | 65528 B | |||||
Maximum 3D texture width, height, and depth | 2048 px | |||||
Maximum buffer length | 256 MB | |||||
Maximum number of entries in the texture argument table, per render or compute command encoder | 31 | 128 | ||||
Maximum threads per threadgroup, per call to | 512 | 1024 | ||||
Maximum total threadgroup memory allocation, per call to | 16 KB | 32 KB | ||||
Minimum buffer offset alignment for a shader or compute function parameter | 4 B | 256 B | ||||
Maximum number of cube maps in a cube map texture array | — | 341 | ||||
Maximum memory allocation for a shader or compute function variable in the constant address space | No limit | 64 KB | ||||
Buffer alignment for creating a new texture from a buffer | 64 B | 16 B | — | |||
Buffer alignment for copying from an existing texture to a buffer | 64 B | 16 B | 256 B | |||
Maximum number of color render targets per render pass descriptor | 4 | 8 | ||||
Maximum total render target size, per pixel, when using multiple color render targets | 16 B | 32 B | No limit | |||
Maximum 1D texture width | 4096 px | 8192 px | 4096 px | 8192 px | 16384 px | |
Maximum 2D texture width and height | 4096 px | 8192 px | 4096 px | 8192 px | 16384 px | |
Maximum cube map texture width and height | 4096 px | 8192 px | 4096 px | 8192 px | 16384 px |
Pixel Format Capabilities
The tables in this section list and categorize pixel format support and capabilities in each GPU family.
-
Sample indicates whether a texture with that pixel format is filterable during sampling and can generate mipmaps.
-
Write indicates whether a compute shader can write to a texture that uses that pixel format.
-
Render indicates whether a texture with that pixel format is color-renderable. A color-renderable texture can be used as a color render target in a
MTLRenderPassAttachmentDescriptor
object. -
MSAA indicates whether a texture of type
MTLTextureType2DMultisample
that uses that pixel format can be allocated. -
Resolve indicates whether a texture of type
MTLTextureType2DMultisample
that uses that pixel format can perform a multisample resolve. An MSAA-resolve texture can be used for theresolveTexture
property of a render target with theMTLStoreActionMultisampleResolve
store action. -
Blend indicates whether a texture with that pixel format is blendable. A blendable texture can be used in a blend operation if the value of
blendingEnabled
isYES
.
Note: For any listed entry in Table 9-4 through Table 9-16, a ‘—’ indicates that the pixel format is not available in that specific feature set.
Pixel Format | iOS GPU Family 1 v1 iOS GPU Family 1 v2 | iOS GPU Family 2 v1 iOS GPU Family 2 v2 | iOS GPU Family 3 v1 | OS X GPU Family 1 v1 |
---|---|---|---|---|
| Sample | |||
| Sample Write Render MSAA Resolve Blend | |||
| Sample Render MSAA Resolve Blend | Sample Write Render MSAA Resolve Blend | — | |
| Sample Write Render MSAA Blend | Sample Write Render MSAA Resolve Blend | ||
| Write Render MSAA | |||
| Write Render MSAA |
Pixel Format | iOS GPU Family 1 v1 iOS GPU Family 1 v2 | iOS GPU Family 2 v1 iOS GPU Family 2 v2 | iOS GPU Family 3 v1 | OS X GPU Family 1 v1 |
---|---|---|---|---|
| Sample Write Render MSAA Blend | Sample Write Render MSAA Resolve Blend | ||
| Sample Write Render MSAA Blend | Sample Write Render MSAA Resolve Blend | ||
| Write Render MSAA | |||
| Write Render MSAA | |||
| Sample Write Render MSAA Resolve Blend | |||
| Sample Write Render MSAA Resolve Blend | |||
| Sample Render MSAA Resolve Blend | Sample Write Render MSAA Resolve Blend | — | |
| Sample Write Render MSAA Blend | Sample Write Render MSAA Resolve Blend | ||
| Write Render MSAA | |||
| Write Render MSAA |
Pixel Format | iOS GPU Family 1 v1 iOS GPU Family 1 v2 | iOS GPU Family 2 v1 iOS GPU Family 2 v2 | iOS GPU Family 3 v1 | OS X GPU Family 1 v1 |
---|---|---|---|---|
| Sample Render MSAA Resolve Blend | — | ||
| Sample Render MSAA Resolve Blend | — | ||
| Sample Render MSAA Resolve Blend | — | ||
| Sample Render MSAA Resolve Blend | — |
Pixel Format | iOS GPU Family 1 v1 iOS GPU Family 1 v2 | iOS GPU Family 2 v1 iOS GPU Family 2 v2 | iOS GPU Family 3 v1 | OS X GPU Family 1 v1 |
---|---|---|---|---|
| Write Render MSAA | |||
| Write Render MSAA | |||
| Write Render MSAA Blend | Sample Write Render MSAA Resolve Blend | ||
| Sample Write Render MSAA Blend | Sample Write Render MSAA Resolve Blend | ||
| Sample Write Render MSAA Blend | Sample Write Render MSAA Resolve Blend | ||
| Write Render MSAA | |||
| Write Render MSAA | |||
| Sample Write Render MSAA Resolve Blend | |||
| Sample Write Render MSAA Resolve Blend | |||
| Sample Render MSAA Resolve Blend | Sample Write Render MSAA Resolve Blend | Sample Render MSAA Resolve Blend | |
| Sample Write Render MSAA Blend | Sample Write Render MSAA Resolve Blend | ||
| Write Render MSAA | |||
| Write Render MSAA | |||
| Sample Write Render MSAA Resolve Blend | |||
| Sample Render MSAA Resolve Blend | Sample Write Render MSAA Resolve Blend | Sample Render MSAA Resolve Blend |
Pixel Format | iOS GPU Family 1 v1 iOS GPU Family 1 v2 | iOS GPU Family 2 v1 iOS GPU Family 2 v2 | iOS GPU Family 3 v1 | OS X GPU Family 1 v1 |
---|---|---|---|---|
| Sample Render MSAA Resolve Blend | Sample Write Render MSAA Resolve Blend | ||
| Render MSAA | Write Render MSAA | ||
| Sample Render MSAA Resolve Blend | Sample Write Render MSAA Resolve Blend | ||
| Sample Render MSAA Resolve Blend | Sample Write Render MSAA Resolve Blend | Sample |
Pixel Format | iOS GPU Family 1 v1 iOS GPU Family 1 v2 | iOS GPU Family 2 v1 iOS GPU Family 2 v2 | iOS GPU Family 3 v1 | OS X GPU Family 1 v1 |
---|---|---|---|---|
| Write Render MSAA | |||
| Write Render MSAA | |||
| Write Render MSAA Blend | Sample Write Render MSAA Resolve Blend | ||
| Sample Write Render MSAA Blend | Sample Write Render MSAA Resolve Blend | ||
| Sample Write Render MSAA Blend | Sample Write Render MSAA Resolve Blend | ||
| Write Render MSAA | |||
| Write Render MSAA | |||
| Sample Write Render MSAA Resolve Blend |
Pixel Format | iOS GPU Family 1 v1 iOS GPU Family 1 v2 | iOS GPU Family 2 v1 iOS GPU Family 2 v2 | iOS GPU Family 3 v1 | OS X GPU Family 1 v1 |
---|---|---|---|---|
| Write Render MSAA | |||
| Write Render MSAA | |||
| Write Render MSAA | Sample Write Render MSAA Resolve Blend |
Pixel Format | iOS GPU Family 1 v1 iOS GPU Family 1 v2 | iOS GPU Family 2 v1 iOS GPU Family 2 v2 | iOS GPU Family 3 v1 | OS X GPU Family 1 v1 |
---|---|---|---|---|
| — | Sample |
Pixel Format | iOS GPU Family 1 v1 iOS GPU Family 1 v2 | iOS GPU Family 2 v1 iOS GPU Family 2 v2 | iOS GPU Family 3 v1 | OS X GPU Family 1 v1 |
---|---|---|---|---|
| Sample | — |
Pixel Format | iOS GPU Family 1 v1 iOS GPU Family 1 v2 | iOS GPU Family 2 v1 iOS GPU Family 2 v2 | iOS GPU Family 3 v1 | OS X GPU Family 1 v1 |
---|---|---|---|---|
| Sample | — |
Pixel Format | iOS GPU Family 1 v1 iOS GPU Family 1 v2 | iOS GPU Family 2 v1 iOS GPU Family 2 v2 | iOS GPU Family 3 v1 | OS X GPU Family 1 v1 |
---|---|---|---|---|
| — | Sample | — |
Pixel Format | iOS GPU Family 1 v1 iOS GPU Family 1 v2 | iOS GPU Family 2 v1 iOS GPU Family 2 v2 | iOS GPU Family 3 v1 | OS X GPU Family 1 v1 |
---|---|---|---|---|
| Sample |
Pixel Format | iOS GPU Family 1 v1 iOS GPU Family 1 v2 | iOS GPU Family 2 v1 iOS GPU Family 2 v2 | iOS GPU Family 3 v1 | OS X GPU Family 1 v1 |
---|---|---|---|---|
| MSAA | MSAA Resolve | Sample MSAA Resolve | |
| MSAA | |||
| — | Sample MSAA Resolve | ||
| MSAA | MSAA Resolve | Sample MSAA Resolve |
Color-Renderable Pixel Format Sizes
Due to the tile-based rendering architecture of iOS GPUs, the contents of render target textures are temporarily cached in tile memory during a render pass. As listed in Table 9-3, this tile memory has a limited size; therefore, the summed size of all the render target pixel formats for a particular render pass must fit within this limit. (16 bytes per pixel in iOS GPU Family 1; 32 bytes per pixel in iOS GPU Family 2 and 3).
Some color-renderable pixel formats are expanded when temporarily stored in tile memory, and consume more space than inferred from their implicit size. In some cases, this size difference is further affected by whether or not the render target uses MSAA.Table 9-17 describes how much tile memory space each pixel format consumes, in bytes per pixel.
Note: These size differences are not applicable to OS X GPUs; they can accept up to any 8 textures as render targets, regardless of pixel format.
Typical texture memory size | Render target storage size (non-MSAA) | Render target storage size (MSAA) | |||
---|---|---|---|---|---|
Pixel Format | All Feature Sets | iOS GPU Family 1 v1 iOS GPU Family 1 v2 | iOS GPU Family 2 v1 iOS GPU Family 2 v2 iOS GPU Family 3 v1 | iOS GPU Family 1 v1 iOS GPU Family 1 v2 | iOS GPU Family 2 v1 iOS GPU Family 2 v2 iOS GPU Family 3 v1 |
| 1 | 4 | 4 | ||
| 2 | 4 | 4 | ||
| 2 | 4 | 4 | ||
| 2 | 4 | 8 | 4 | 8 |
| 4 | 4 | 4 | ||
| 4 | 4 | 4 | ||
| 4 | 4 | 4 | 8 | |
| 4 | 4 | 8 | ||
| 4 | 4 | 4 | ||
| 4 | 4 | 4 | 8 | |
| 4 | 4 | 8 | ||
| 4 | 8 | 8 | ||
| 4 | 4 | 4 | ||
| 4 | 8 | 8 | ||
| 8 | 8 | 8 | ||
| 8 | 8 | 8 | ||
| 16 | 16 | 16 |
This information is particularly important for multiple render target (MRT) techniques and g-buffer configurations. For example—a deferred shading algorithm might have these four render targets with different pixel formats:
-
Diffuse color (
RGBA16Unorm
) -
Surface normal (
RGBA8Unorm
) -
Linear depth (
R16Float
) -
Ambient occlusion (
R16Float
)
For this MRT configuration, the typical texture memory size total is 16 (8+4+2+2) and should fit within all the iOS feature set limits. However, the non-MSAA render target storage size total is actually 20 (8+4+4+4). This means that this MRT configuration is only valid for iOS GPU Family 2 and 3; it is not valid for iOS GPU Family 1.
Refer to the values listed in Table 9-3 and Table 9-17 in order to choose appropriate pixel formats for your own MRT configurations.
This chapter describes the features, limits, and capabilities of the Metal feature sets.
Each Metal feature set is tied to a specific OS and GPU (or Mac model), as listed in Table 9-1. Query the supportsFeatureSet:
method with a valid MTLFeatureSet
value to find out if a specific feature set is supported by a MTLDevice
object.
| Apple A7 GPU | Apple A8 GPU | Apple A9 GPU | MacBook (early 2015) MacBook Air (mid 2012 or newer) MacBook Pro (mid 2012 or newer) Mac Mini (late 2012 or newer) iMac (late 2012 or newer) Mac Pro (late 2013 and newer) |
---|---|---|---|---|
iOS 8 | iOS GPU Family 1 v1 | iOS GPU Family 2 v1 | — | — |
iOS 9 | iOS GPU Family 1 v2 | iOS GPU Family 2 v2 | iOS GPU Family 3 v1 | — |
OS X 10.11 | — | — | — | OS X GPU Family 1 v1 |
Feature Availability
Table 9-2 lists the availability of major Metal features. For specific API availability information, see the Metal Framework Reference.
Feature | iOS GPU Family 1 v1 iOS GPU Family 1 v2 | iOS GPU Family 2 v1 iOS GPU Family 2 v2 | iOS GPU Family 3 v1 | OS X GPU Family 1 v1 |
---|---|---|---|---|
MetalKit | | |||
Programmable blending | | | ||
PVRTC pixel formats | | | ||
ETC pixel formats | | | ||
BC pixel formats | | | ||
Cube map texture arrays | | | ||
Texture barriers | | | ||
Layered rendering | | | ||
Sampler comparison functions | | | ||
Counting occlusion query | | | ||
Base vertex/instance drawing | | | ||
Indirect drawing | | | ||
Indirect processing | | | ||
MSAA depth resolve | | | | |
ASTC pixel formats | | | | |
Metal Performance Shaders | | | |
Limits
Table 9-3 lists the hardware and/or software limits throughout the Metal framework.
Note: For any listed entry in Table 9-3, a ‘—’ indicates that the feature corresponding to the limit is not available in that specific feature set.
Limit | iOS GPU Family 1 v1 | iOS GPU Family 1 v2 | iOS GPU Family 2 v1 | iOS GPU Family 2 v2 | iOS GPU Family 3 v1 | OS X GPU Family 1 v1 |
---|---|---|---|---|---|---|
Maximum number of vertex attributes per vertex descriptor | 31 | |||||
Maximum number of entries in the buffer argument table, per render or compute command encoder | 31 | |||||
Maximum number of entries in the sampler state argument table, per render or compute command encoder | 16 | |||||
Maximum length of a data block for a function, per render or compute command encoder | 4096 B | |||||
Maximum number of 32-bit components that can be passed from a vertex function to a fragment function | 60 | |||||
Maximum number of texture layers per 1D or 2D texture array | 2048 | |||||
Maximum number of texture layers per 3D texture | 2048 | |||||
Maximum size of a point primitive | 511.0 | |||||
Maximum visibility query offset for | 65528 B | |||||
Maximum 3D texture width, height, and depth | 2048 px | |||||
Maximum buffer length | 256 MB | |||||
Maximum number of entries in the texture argument table, per render or compute command encoder | 31 | 128 | ||||
Maximum threads per threadgroup, per call to | 512 | 1024 | ||||
Maximum total threadgroup memory allocation, per call to | 16 KB | 32 KB | ||||
Minimum buffer offset alignment for a shader or compute function parameter | 4 B | 256 B | ||||
Maximum number of cube maps in a cube map texture array | — | 341 | ||||
Maximum memory allocation for a shader or compute function variable in the constant address space | No limit | 64 KB | ||||
Buffer alignment for creating a new texture from a buffer | 64 B | 16 B | — | |||
Buffer alignment for copying from an existing texture to a buffer | 64 B | 16 B | 256 B | |||
Maximum number of color render targets per render pass descriptor | 4 | 8 | ||||
Maximum total render target size, per pixel, when using multiple color render targets | 16 B | 32 B | No limit | |||
Maximum 1D texture width | 4096 px | 8192 px | 4096 px | 8192 px | 16384 px | |
Maximum 2D texture width and height | 4096 px | 8192 px | 4096 px | 8192 px | 16384 px | |
Maximum cube map texture width and height | 4096 px | 8192 px | 4096 px | 8192 px | 16384 px |
Pixel Format Capabilities
The tables in this section list and categorize pixel format support and capabilities in each GPU family.
-
Sample indicates whether a texture with that pixel format is filterable during sampling and can generate mipmaps.
-
Write indicates whether a compute shader can write to a texture that uses that pixel format.
-
Render indicates whether a texture with that pixel format is color-renderable. A color-renderable texture can be used as a color render target in a
MTLRenderPassAttachmentDescriptor
object. -
MSAA indicates whether a texture of type
MTLTextureType2DMultisample
that uses that pixel format can be allocated. -
Resolve indicates whether a texture of type
MTLTextureType2DMultisample
that uses that pixel format can perform a multisample resolve. An MSAA-resolve texture can be used for theresolveTexture
property of a render target with theMTLStoreActionMultisampleResolve
store action. -
Blend indicates whether a texture with that pixel format is blendable. A blendable texture can be used in a blend operation if the value of
blendingEnabled
isYES
.
Note: For any listed entry in Table 9-4 through Table 9-16, a ‘—’ indicates that the pixel format is not available in that specific feature set.
Pixel Format | iOS GPU Family 1 v1 iOS GPU Family 1 v2 | iOS GPU Family 2 v1 iOS GPU Family 2 v2 | iOS GPU Family 3 v1 | OS X GPU Family 1 v1 |
---|---|---|---|---|
| Sample | |||
| Sample Write Render MSAA Resolve Blend | |||
| Sample Render MSAA Resolve Blend | Sample Write Render MSAA Resolve Blend | — | |
| Sample Write Render MSAA Blend | Sample Write Render MSAA Resolve Blend | ||
| Write Render MSAA | |||
| Write Render MSAA |
Pixel Format | iOS GPU Family 1 v1 iOS GPU Family 1 v2 | iOS GPU Family 2 v1 iOS GPU Family 2 v2 | iOS GPU Family 3 v1 | OS X GPU Family 1 v1 |
---|---|---|---|---|
| Sample Write Render MSAA Blend | Sample Write Render MSAA Resolve Blend | ||
| Sample Write Render MSAA Blend | Sample Write Render MSAA Resolve Blend | ||
| Write Render MSAA | |||
| Write Render MSAA | |||
| Sample Write Render MSAA Resolve Blend | |||
| Sample Write Render MSAA Resolve Blend | |||
| Sample Render MSAA Resolve Blend | Sample Write Render MSAA Resolve Blend | — | |
| Sample Write Render MSAA Blend | Sample Write Render MSAA Resolve Blend | ||
| Write Render MSAA | |||
| Write Render MSAA |
Pixel Format | iOS GPU Family 1 v1 iOS GPU Family 1 v2 | iOS GPU Family 2 v1 iOS GPU Family 2 v2 | iOS GPU Family 3 v1 | OS X GPU Family 1 v1 |
---|---|---|---|---|
| Sample Render MSAA Resolve Blend | — | ||
| Sample Render MSAA Resolve Blend | — | ||
| Sample Render MSAA Resolve Blend | — | ||
| Sample Render MSAA Resolve Blend | — |
Pixel Format | iOS GPU Family 1 v1 iOS GPU Family 1 v2 | iOS GPU Family 2 v1 iOS GPU Family 2 v2 | iOS GPU Family 3 v1 | OS X GPU Family 1 v1 |
---|---|---|---|---|
| Write Render MSAA | |||
| Write Render MSAA | |||
| Write Render MSAA Blend | Sample Write Render MSAA Resolve Blend | ||
| Sample Write Render MSAA Blend | Sample Write Render MSAA Resolve Blend | ||
| Sample Write Render MSAA Blend | Sample Write Render MSAA Resolve Blend | ||
| Write Render MSAA | |||
| Write Render MSAA | |||
| Sample Write Render MSAA Resolve Blend | |||
| Sample Write Render MSAA Resolve Blend | |||
| Sample Render MSAA Resolve Blend | Sample Write Render MSAA Resolve Blend | Sample Render MSAA Resolve Blend | |
| Sample Write Render MSAA Blend | Sample Write Render MSAA Resolve Blend | ||
| Write Render MSAA | |||
| Write Render MSAA | |||
| Sample Write Render MSAA Resolve Blend | |||
| Sample Render MSAA Resolve Blend | Sample Write Render MSAA Resolve Blend | Sample Render MSAA Resolve Blend |
Pixel Format | iOS GPU Family 1 v1 iOS GPU Family 1 v2 | iOS GPU Family 2 v1 iOS GPU Family 2 v2 | iOS GPU Family 3 v1 | OS X GPU Family 1 v1 |
---|---|---|---|---|
| Sample Render MSAA Resolve Blend | Sample Write Render MSAA Resolve Blend | ||
| Render MSAA | Write Render MSAA | ||
| Sample Render MSAA Resolve Blend | Sample Write Render MSAA Resolve Blend | ||
| Sample Render MSAA Resolve Blend | Sample Write Render MSAA Resolve Blend | Sample |
Pixel Format | iOS GPU Family 1 v1 iOS GPU Family 1 v2 | iOS GPU Family 2 v1 iOS GPU Family 2 v2 | iOS GPU Family 3 v1 | OS X GPU Family 1 v1 |
---|---|---|---|---|
| Write Render MSAA | |||
| Write Render MSAA | |||
| Write Render MSAA Blend | Sample Write Render MSAA Resolve Blend | ||
| Sample Write Render MSAA Blend | Sample Write Render MSAA Resolve Blend | ||
| Sample Write Render MSAA Blend | Sample Write Render MSAA Resolve Blend | ||
| Write Render MSAA | |||
| Write Render MSAA | |||
| Sample Write Render MSAA Resolve Blend |
Pixel Format | iOS GPU Family 1 v1 iOS GPU Family 1 v2 | iOS GPU Family 2 v1 iOS GPU Family 2 v2 | iOS GPU Family 3 v1 | OS X GPU Family 1 v1 |
---|---|---|---|---|
| Write Render MSAA | |||
| Write Render MSAA | |||
| Write Render MSAA | Sample Write Render MSAA Resolve Blend |
Pixel Format | iOS GPU Family 1 v1 iOS GPU Family 1 v2 | iOS GPU Family 2 v1 iOS GPU Family 2 v2 | iOS GPU Family 3 v1 | OS X GPU Family 1 v1 |
---|---|---|---|---|
| — | Sample |
Pixel Format | iOS GPU Family 1 v1 iOS GPU Family 1 v2 | iOS GPU Family 2 v1 iOS GPU Family 2 v2 | iOS GPU Family 3 v1 | OS X GPU Family 1 v1 |
---|---|---|---|---|
| Sample | — |
Pixel Format | iOS GPU Family 1 v1 iOS GPU Family 1 v2 | iOS GPU Family 2 v1 iOS GPU Family 2 v2 | iOS GPU Family 3 v1 | OS X GPU Family 1 v1 |
---|---|---|---|---|
| Sample | — |
Pixel Format | iOS GPU Family 1 v1 iOS GPU Family 1 v2 | iOS GPU Family 2 v1 iOS GPU Family 2 v2 | iOS GPU Family 3 v1 | OS X GPU Family 1 v1 |
---|---|---|---|---|
| — | Sample | — |
Pixel Format | iOS GPU Family 1 v1 iOS GPU Family 1 v2 | iOS GPU Family 2 v1 iOS GPU Family 2 v2 | iOS GPU Family 3 v1 | OS X GPU Family 1 v1 |
---|---|---|---|---|
| Sample |
Pixel Format | iOS GPU Family 1 v1 iOS GPU Family 1 v2 | iOS GPU Family 2 v1 iOS GPU Family 2 v2 | iOS GPU Family 3 v1 | OS X GPU Family 1 v1 |
---|---|---|---|---|
| MSAA | MSAA Resolve | Sample MSAA Resolve | |
| MSAA | |||
| — | Sample MSAA Resolve | ||
| MSAA | MSAA Resolve | Sample MSAA Resolve |
Color-Renderable Pixel Format Sizes
Due to the tile-based rendering architecture of iOS GPUs, the contents of render target textures are temporarily cached in tile memory during a render pass. As listed in Table 9-3, this tile memory has a limited size; therefore, the summed size of all the render target pixel formats for a particular render pass must fit within this limit. (16 bytes per pixel in iOS GPU Family 1; 32 bytes per pixel in iOS GPU Family 2 and 3).
Some color-renderable pixel formats are expanded when temporarily stored in tile memory, and consume more space than inferred from their implicit size. In some cases, this size difference is further affected by whether or not the render target uses MSAA.Table 9-17 describes how much tile memory space each pixel format consumes, in bytes per pixel.
Note: These size differences are not applicable to OS X GPUs; they can accept up to any 8 textures as render targets, regardless of pixel format.
Typical texture memory size | Render target storage size (non-MSAA) | Render target storage size (MSAA) | |||
---|---|---|---|---|---|
Pixel Format | All Feature Sets | iOS GPU Family 1 v1 iOS GPU Family 1 v2 | iOS GPU Family 2 v1 iOS GPU Family 2 v2 iOS GPU Family 3 v1 | iOS GPU Family 1 v1 iOS GPU Family 1 v2 | iOS GPU Family 2 v1 iOS GPU Family 2 v2 iOS GPU Family 3 v1 |
| 1 | 4 | 4 | ||
| 2 | 4 | 4 | ||
| 2 | 4 | 4 | ||
| 2 | 4 | 8 | 4 | 8 |
| 4 | 4 | 4 | ||
| 4 | 4 | 4 | ||
| 4 | 4 | 4 | 8 | |
| 4 | 4 | 8 | ||
| 4 | 4 | 4 | ||
| 4 | 4 | 4 | 8 | |
| 4 | 4 | 8 | ||
| 4 | 8 | 8 | ||
| 4 | 4 | 4 | ||
| 4 | 8 | 8 | ||
| 8 | 8 | 8 | ||
| 8 | 8 | 8 | ||
| 16 | 16 | 16 |
This information is particularly important for multiple render target (MRT) techniques and g-buffer configurations. For example—a deferred shading algorithm might have these four render targets with different pixel formats:
-
Diffuse color (
RGBA16Unorm
) -
Surface normal (
RGBA8Unorm
) -
Linear depth (
R16Float
) -
Ambient occlusion (
R16Float
)
For this MRT configuration, the typical texture memory size total is 16 (8+4+2+2) and should fit within all the iOS feature set limits. However, the non-MSAA render target storage size total is actually 20 (8+4+4+4). This means that this MRT configuration is only valid for iOS GPU Family 2 and 3; it is not valid for iOS GPU Family 1.
Refer to the values listed in Table 9-3 and Table 9-17 in order to choose appropriate pixel formats for your own MRT configurations.