您的位置:首页 > Web前端

Metal Feature Set Tables

2015-11-04 14:38 721 查看
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.

Table 9-1 Metal feature sets by OS and GPU

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.

Table 9-2 Feature availability

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.

Table 9-3 Limits

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
setVisibilityResultMode:offset:

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
dispatchThreadgroups:threadsPerThreadgroup:

512
1024
Maximum total threadgroup memory allocation, per call to
setThreadgroupMemoryLength:atIndex:

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 the
resolveTexture
property
of a render target with the
MTLStoreActionMultisampleResolve
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
is
YES
.

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.

Table 9-4 Ordinary 8-bit pixel format capabilities

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
A8Unorm

Sample
R8Unorm

Sample

Write

Render

MSAA

Resolve

Blend
R8Unorm_sRGB

Sample

Render

MSAA

Resolve

Blend
Sample

Write

Render

MSAA

Resolve

Blend

R8Snorm

Sample

Write

Render

MSAA

Blend
Sample

Write

Render

MSAA

Resolve

Blend
R8Uint

Write

Render

MSAA
R8Sint

Write

Render

MSAA
Table 9-5 Ordinary 16-bit pixel format capabilities

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
R16Unorm

Sample

Write

Render

MSAA

Blend
Sample

Write

Render

MSAA

Resolve

Blend
R16Snorm

Sample

Write

Render

MSAA

Blend
Sample

Write

Render

MSAA

Resolve

Blend
R16Uint

Write

Render

MSAA
R16Sint

Write

Render

MSAA
R16Float

Sample

Write

Render

MSAA

Resolve

Blend
RG8Unorm

Sample

Write

Render

MSAA

Resolve

Blend
RG8Unorm_sRGB

Sample

Render

MSAA

Resolve

Blend
Sample

Write

Render

MSAA

Resolve

Blend

RG8Snorm

Sample

Write

Render

MSAA

Blend
Sample

Write

Render

MSAA

Resolve

Blend
RG8Uint

Write

Render

MSAA
RG8Sint

Write

Render

MSAA
Table 9-6 Packed 16-bit pixel format capabilities

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
B5G6R5Unorm

Sample

Render

MSAA

Resolve

Blend

A1BGR5Unorm

Sample

Render

MSAA

Resolve

Blend

ABGR4Unorm

Sample

Render

MSAA

Resolve

Blend

BGR5A1Unorm

Sample

Render

MSAA

Resolve

Blend

Table 9-7 Ordinary 32-bit pixel format capabilities

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
R32Uint

Write

Render

MSAA
R32Sint

Write

Render

MSAA
R32Float

Write

Render

MSAA

Blend
Sample

Write

Render

MSAA

Resolve

Blend
RG16Unorm

Sample

Write

Render

MSAA

Blend
Sample

Write

Render

MSAA

Resolve

Blend
RG16Snorm

Sample

Write

Render

MSAA

Blend
Sample

Write

Render

MSAA

Resolve

Blend
RG16Uint

Write

Render

MSAA
RG16Sint

Write

Render

MSAA
RG16Float

Sample

Write

Render

MSAA

Resolve

Blend
RGBA8Unorm

Sample

Write

Render

MSAA

Resolve

Blend
RGBA8Unorm_sRGB

Sample

Render

MSAA

Resolve

Blend
Sample

Write

Render

MSAA

Resolve

Blend
Sample

Render

MSAA

Resolve

Blend
RGBA8Snorm

Sample

Write

Render

MSAA

Blend
Sample

Write

Render

MSAA

Resolve

Blend
RGBA8Uint

Write

Render

MSAA
RGBA8Sint

Write

Render

MSAA
BGRA8Unorm

Sample

Write

Render

MSAA

Resolve

Blend
BGRA8Unorm_sRGB

Sample

Render

MSAA

Resolve

Blend
Sample

Write

Render

MSAA

Resolve

Blend
Sample

Render

MSAA

Resolve

Blend
Table 9-8 Packed 32-bit pixel format capabilities

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
RGB10A2Unorm

Sample

Render

MSAA

Resolve

Blend
Sample

Write

Render

MSAA

Resolve

Blend
RGB10A2Uint

Render

MSAA
Write

Render

MSAA
RG11B10Float

Sample

Render

MSAA

Resolve

Blend
Sample

Write

Render

MSAA

Resolve

Blend
RGB9E5Float

Sample

Render

MSAA

Resolve

Blend
Sample

Write

Render

MSAA

Resolve

Blend
Sample
Table 9-9 Ordinary 64-bit pixel format capabilities

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
RG32Uint

Write

Render

MSAA
RG32Sint

Write

Render

MSAA
RG32Float

Write

Render

MSAA

Blend
Sample

Write

Render

MSAA

Resolve

Blend
RGBA16Unorm

Sample

Write

Render

MSAA

Blend
Sample

Write

Render

MSAA

Resolve

Blend
RGBA16Snorm

Sample

Write

Render

MSAA

Blend
Sample

Write

Render

MSAA

Resolve

Blend
RGBA16Uint

Write

Render

MSAA
RGBA16Sint

Write

Render

MSAA
RGBA16Float

Sample

Write

Render

MSAA

Resolve

Blend
Table 9-10 Ordinary 128-bit pixel format capabilities

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
RGBA32Uint

Write

Render

MSAA
RGBA32Sint

Write

Render

MSAA
RGBA32Float

Write

Render

MSAA
Sample

Write

Render

MSAA

Resolve

Blend
Table 9-11 Compressed BC pixel format capabilities

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
BC1_RGBA


BC1_RGBA_sRGB


BC2_RGBA


BC2_RGBA_sRGB


BC3_RGBA


BC3_RGBA_sRGB


BC4_RUnorm


BC4_RSnorm


BC5_RGUnorm


BC5_RGSnorm


BC6H_RGBFloat


BC6H_RGBUfloat


BC7_RGBAUnorm


BC7_RGBAUnorm_sRGB


Sample
Table 9-12 Compressed PVRTC pixel format capabilities

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
PVRTC_RGB_2BPP


PVRTC_RGB_2BPP_sRGB


PVRTC_RGB_4BPP


PVRTC_RGB_4BPP_sRGB


PVRTC_RGBA_2BPP


PVRTC_RGBA_2BPP_sRGB


PVRTC_RGBA_4BPP


PVRTC_RGBA_4BPP_sRGB

Sample

Table 9-13 Compressed ETC pixel format capabilities

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
EAC_R11Unorm


EAC_R11Snorm


EAC_RG11Unorm


EAC_RG11Snorm


EAC_RGBA8


EAC_RGBA8_sRGB


ETC2_RGB8


ETC2_RGB8_sRGB


ETC2_RGB8A1


ETC2_RGB8A1_sRGB

Sample

Table 9-14 Compressed ASTC pixel format capabilities

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
ASTC_4x4_sRGB


ASTC_5x4_sRGB


ASTC_5x5_sRGB


ASTC_6x5_sRGB


ASTC_6x6_sRGB


ASTC_8x5_sRGB


ASTC_8x6_sRGB


ASTC_8x8_sRGB


ASTC_10x5_sRGB


ASTC_10x6_sRGB


ASTC_10x8_sRGB


ASTC_10x10_sRGB


ASTC_12x10_sRGB


ASTC_12x12_sRGB


ASTC_4x4_LDR


ASTC_5x4_LDR


ASTC_5x5_LDR


ASTC_6x5_LDR


ASTC_6x6_LDR


ASTC_8x5_LDR


ASTC_8x6_LDR


ASTC_8x8_LDR


ASTC_10x5_LDR


ASTC_10x6_LDR


ASTC_10x8_LDR


ASTC_10x10_LDR


ASTC_12x10_LDR


ASTC_12x12_LDR


Sample

Table 9-15 YUV pixel format capabilities

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
GBGR422


BGRG422

Sample
Table 9-16 Depth and stencil pixel format capabilities

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
Depth32Float

MSAA
MSAA

Resolve
Sample

MSAA

Resolve
Stencil8

MSAA
Depth24Unorm_Stencil8


Sample

MSAA

Resolve
Depth32Float_Stencil8

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.

Table 9-17 Color-renderable pixel format sizes

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
R8Unorm


R8Unorm_sRGB


R8Snorm


R8Uint


R8Sint

1
4
4
R16Unorm


R16Snorm


R16Uint


R16Sint


R16Float

2
4
4
RG8Unorm


RG8Unorm_sRGB


RG8Snorm


RG8Uint


RG8Sint

2
4
4
B5G6R5Unorm


A1BGR5Unorm


ABGR4Unorm


BGR5A1Unorm

2
4
8
4
8
R32Uint


R32Sint


R32Float

4
4
4
RG16Unorm


RG16Snorm


RG16Uint


RG16Sint


RG16Float

4
4
4
RGBA8Unorm

4
4
4
8
RGBA8Unorm_sRGB


RGBA8Snorm

4
4
8
RGBA8Uint


RGBA8Sint

4
4
4
BGRA8Unorm

4
4
4
8
BGRA8Unorm_sRGB

4
4
8
RGB10A2Unorm

4
8
8
RGB10A2Uint

4
4
4
RG11B10Float


RGB9E5Float

4
8
8
RG32Uint


RG32Sint


RG32Float

8
8
8
RGBA16Unorm


RGBA16Snorm


RGBA16Uint


RGBA16Sint


RGBA16Float

8
8
8
RGBA32Uint


RGBA32Sint


RGBA32Float

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.

NextPrevious

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.

Table 9-1 Metal feature sets by OS and GPU

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.

Table 9-2 Feature availability

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.

Table 9-3 Limits

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
setVisibilityResultMode:offset:

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
dispatchThreadgroups:threadsPerThreadgroup:

512
1024
Maximum total threadgroup memory allocation, per call to
setThreadgroupMemoryLength:atIndex:

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 the
resolveTexture
property
of a render target with the
MTLStoreActionMultisampleResolve
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
is
YES
.

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.

Table 9-4 Ordinary 8-bit pixel format capabilities

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
A8Unorm

Sample
R8Unorm

Sample

Write

Render

MSAA

Resolve

Blend
R8Unorm_sRGB

Sample

Render

MSAA

Resolve

Blend
Sample

Write

Render

MSAA

Resolve

Blend

R8Snorm

Sample

Write

Render

MSAA

Blend
Sample

Write

Render

MSAA

Resolve

Blend
R8Uint

Write

Render

MSAA
R8Sint

Write

Render

MSAA
Table 9-5 Ordinary 16-bit pixel format capabilities

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
R16Unorm

Sample

Write

Render

MSAA

Blend
Sample

Write

Render

MSAA

Resolve

Blend
R16Snorm

Sample

Write

Render

MSAA

Blend
Sample

Write

Render

MSAA

Resolve

Blend
R16Uint

Write

Render

MSAA
R16Sint

Write

Render

MSAA
R16Float

Sample

Write

Render

MSAA

Resolve

Blend
RG8Unorm

Sample

Write

Render

MSAA

Resolve

Blend
RG8Unorm_sRGB

Sample

Render

MSAA

Resolve

Blend
Sample

Write

Render

MSAA

Resolve

Blend

RG8Snorm

Sample

Write

Render

MSAA

Blend
Sample

Write

Render

MSAA

Resolve

Blend
RG8Uint

Write

Render

MSAA
RG8Sint

Write

Render

MSAA
Table 9-6 Packed 16-bit pixel format capabilities

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
B5G6R5Unorm

Sample

Render

MSAA

Resolve

Blend

A1BGR5Unorm

Sample

Render

MSAA

Resolve

Blend

ABGR4Unorm

Sample

Render

MSAA

Resolve

Blend

BGR5A1Unorm

Sample

Render

MSAA

Resolve

Blend

Table 9-7 Ordinary 32-bit pixel format capabilities

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
R32Uint

Write

Render

MSAA
R32Sint

Write

Render

MSAA
R32Float

Write

Render

MSAA

Blend
Sample

Write

Render

MSAA

Resolve

Blend
RG16Unorm

Sample

Write

Render

MSAA

Blend
Sample

Write

Render

MSAA

Resolve

Blend
RG16Snorm

Sample

Write

Render

MSAA

Blend
Sample

Write

Render

MSAA

Resolve

Blend
RG16Uint

Write

Render

MSAA
RG16Sint

Write

Render

MSAA
RG16Float

Sample

Write

Render

MSAA

Resolve

Blend
RGBA8Unorm

Sample

Write

Render

MSAA

Resolve

Blend
RGBA8Unorm_sRGB

Sample

Render

MSAA

Resolve

Blend
Sample

Write

Render

MSAA

Resolve

Blend
Sample

Render

MSAA

Resolve

Blend
RGBA8Snorm

Sample

Write

Render

MSAA

Blend
Sample

Write

Render

MSAA

Resolve

Blend
RGBA8Uint

Write

Render

MSAA
RGBA8Sint

Write

Render

MSAA
BGRA8Unorm

Sample

Write

Render

MSAA

Resolve

Blend
BGRA8Unorm_sRGB

Sample

Render

MSAA

Resolve

Blend
Sample

Write

Render

MSAA

Resolve

Blend
Sample

Render

MSAA

Resolve

Blend
Table 9-8 Packed 32-bit pixel format capabilities

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
RGB10A2Unorm

Sample

Render

MSAA

Resolve

Blend
Sample

Write

Render

MSAA

Resolve

Blend
RGB10A2Uint

Render

MSAA
Write

Render

MSAA
RG11B10Float

Sample

Render

MSAA

Resolve

Blend
Sample

Write

Render

MSAA

Resolve

Blend
RGB9E5Float

Sample

Render

MSAA

Resolve

Blend
Sample

Write

Render

MSAA

Resolve

Blend
Sample
Table 9-9 Ordinary 64-bit pixel format capabilities

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
RG32Uint

Write

Render

MSAA
RG32Sint

Write

Render

MSAA
RG32Float

Write

Render

MSAA

Blend
Sample

Write

Render

MSAA

Resolve

Blend
RGBA16Unorm

Sample

Write

Render

MSAA

Blend
Sample

Write

Render

MSAA

Resolve

Blend
RGBA16Snorm

Sample

Write

Render

MSAA

Blend
Sample

Write

Render

MSAA

Resolve

Blend
RGBA16Uint

Write

Render

MSAA
RGBA16Sint

Write

Render

MSAA
RGBA16Float

Sample

Write

Render

MSAA

Resolve

Blend
Table 9-10 Ordinary 128-bit pixel format capabilities

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
RGBA32Uint

Write

Render

MSAA
RGBA32Sint

Write

Render

MSAA
RGBA32Float

Write

Render

MSAA
Sample

Write

Render

MSAA

Resolve

Blend
Table 9-11 Compressed BC pixel format capabilities

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
BC1_RGBA


BC1_RGBA_sRGB


BC2_RGBA


BC2_RGBA_sRGB


BC3_RGBA


BC3_RGBA_sRGB


BC4_RUnorm


BC4_RSnorm


BC5_RGUnorm


BC5_RGSnorm


BC6H_RGBFloat


BC6H_RGBUfloat


BC7_RGBAUnorm


BC7_RGBAUnorm_sRGB


Sample
Table 9-12 Compressed PVRTC pixel format capabilities

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
PVRTC_RGB_2BPP


PVRTC_RGB_2BPP_sRGB


PVRTC_RGB_4BPP


PVRTC_RGB_4BPP_sRGB


PVRTC_RGBA_2BPP


PVRTC_RGBA_2BPP_sRGB


PVRTC_RGBA_4BPP


PVRTC_RGBA_4BPP_sRGB

Sample

Table 9-13 Compressed ETC pixel format capabilities

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
EAC_R11Unorm


EAC_R11Snorm


EAC_RG11Unorm


EAC_RG11Snorm


EAC_RGBA8


EAC_RGBA8_sRGB


ETC2_RGB8


ETC2_RGB8_sRGB


ETC2_RGB8A1


ETC2_RGB8A1_sRGB

Sample

Table 9-14 Compressed ASTC pixel format capabilities

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
ASTC_4x4_sRGB


ASTC_5x4_sRGB


ASTC_5x5_sRGB


ASTC_6x5_sRGB


ASTC_6x6_sRGB


ASTC_8x5_sRGB


ASTC_8x6_sRGB


ASTC_8x8_sRGB


ASTC_10x5_sRGB


ASTC_10x6_sRGB


ASTC_10x8_sRGB


ASTC_10x10_sRGB


ASTC_12x10_sRGB


ASTC_12x12_sRGB


ASTC_4x4_LDR


ASTC_5x4_LDR


ASTC_5x5_LDR


ASTC_6x5_LDR


ASTC_6x6_LDR


ASTC_8x5_LDR


ASTC_8x6_LDR


ASTC_8x8_LDR


ASTC_10x5_LDR


ASTC_10x6_LDR


ASTC_10x8_LDR


ASTC_10x10_LDR


ASTC_12x10_LDR


ASTC_12x12_LDR


Sample

Table 9-15 YUV pixel format capabilities

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
GBGR422


BGRG422

Sample
Table 9-16 Depth and stencil pixel format capabilities

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
Depth32Float

MSAA
MSAA

Resolve
Sample

MSAA

Resolve
Stencil8

MSAA
Depth24Unorm_Stencil8


Sample

MSAA

Resolve
Depth32Float_Stencil8

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.

Table 9-17 Color-renderable pixel format sizes

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
R8Unorm


R8Unorm_sRGB


R8Snorm


R8Uint


R8Sint

1
4
4
R16Unorm


R16Snorm


R16Uint


R16Sint


R16Float

2
4
4
RG8Unorm


RG8Unorm_sRGB


RG8Snorm


RG8Uint


RG8Sint

2
4
4
B5G6R5Unorm


A1BGR5Unorm


ABGR4Unorm


BGR5A1Unorm

2
4
8
4
8
R32Uint


R32Sint


R32Float

4
4
4
RG16Unorm


RG16Snorm


RG16Uint


RG16Sint


RG16Float

4
4
4
RGBA8Unorm

4
4
4
8
RGBA8Unorm_sRGB


RGBA8Snorm

4
4
8
RGBA8Uint


RGBA8Sint

4
4
4
BGRA8Unorm

4
4
4
8
BGRA8Unorm_sRGB

4
4
8
RGB10A2Unorm

4
8
8
RGB10A2Uint

4
4
4
RG11B10Float


RGB9E5Float

4
8
8
RG32Uint


RG32Sint


RG32Float

8
8
8
RGBA16Unorm


RGBA16Snorm


RGBA16Uint


RGBA16Sint


RGBA16Float

8
8
8
RGBA32Uint


RGBA32Sint


RGBA32Float

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.

NextPrevious
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: