Click to Rate and Give Feedback
MSDN
MSDN Library
DirectX
SDK Documentation
DirectX Graphics
DXGI
Reference
Enumerations
 DXGI_FORMAT

  Switch on low bandwidth view
DXGI_FORMAT
Bb173059.XDK_CHM_BANNER_left(en-us,VS.85).jpgBb173059.XDK_CHM_BANNER_right(en-us,VS.85).jpg

DXGI_FORMAT

Resource data formats which includes fully-typed and typeless formats. There is a list of format modifiers at the bottom of the page, that more fully describes each format type.

typedef enum DXGI_FORMAT
{
    DXGI_FORMAT_UNKNOWN = 0,
    DXGI_FORMAT_R32G32B32A32_TYPELESS = 1,
    DXGI_FORMAT_R32G32B32A32_FLOAT = 2,
    DXGI_FORMAT_R32G32B32A32_UINT = 3,
    DXGI_FORMAT_R32G32B32A32_SINT = 4,
    DXGI_FORMAT_R32G32B32_TYPELESS = 5,
    DXGI_FORMAT_R32G32B32_FLOAT = 6,
    DXGI_FORMAT_R32G32B32_UINT = 7,
    DXGI_FORMAT_R32G32B32_SINT = 8,
    DXGI_FORMAT_R16G16B16A16_TYPELESS = 9,
    DXGI_FORMAT_R16G16B16A16_FLOAT = 10,
    DXGI_FORMAT_R16G16B16A16_UNORM = 11,
    DXGI_FORMAT_R16G16B16A16_UINT = 12,
    DXGI_FORMAT_R16G16B16A16_SNORM = 13,
    DXGI_FORMAT_R16G16B16A16_SINT = 14,
    DXGI_FORMAT_R32G32_TYPELESS = 15,
    DXGI_FORMAT_R32G32_FLOAT = 16,
    DXGI_FORMAT_R32G32_UINT = 17,
    DXGI_FORMAT_R32G32_SINT = 18,
    DXGI_FORMAT_R32G8X24_TYPELESS = 19,
    DXGI_FORMAT_D32_FLOAT_S8X24_UINT = 20,
    DXGI_FORMAT_R32_FLOAT_X8X24_TYPELESS = 21,
    DXGI_FORMAT_X32_TYPELESS_G8X24_UINT = 22,
    DXGI_FORMAT_R10G10B10A2_TYPELESS = 23,
    DXGI_FORMAT_R10G10B10A2_UNORM = 24,
    DXGI_FORMAT_R10G10B10A2_UINT = 25,
    DXGI_FORMAT_R11G11B10_FLOAT = 26,
    DXGI_FORMAT_R8G8B8A8_TYPELESS = 27,
    DXGI_FORMAT_R8G8B8A8_UNORM = 28,
    DXGI_FORMAT_R8G8B8A8_UNORM_SRGB = 29,
    DXGI_FORMAT_R8G8B8A8_UINT = 30,
    DXGI_FORMAT_R8G8B8A8_SNORM = 31,
    DXGI_FORMAT_R8G8B8A8_SINT = 32,
    DXGI_FORMAT_R16G16_TYPELESS = 33,
    DXGI_FORMAT_R16G16_FLOAT = 34,
    DXGI_FORMAT_R16G16_UNORM = 35,
    DXGI_FORMAT_R16G16_UINT = 36,
    DXGI_FORMAT_R16G16_SNORM = 37,
    DXGI_FORMAT_R16G16_SINT = 38,
    DXGI_FORMAT_R32_TYPELESS = 39,
    DXGI_FORMAT_D32_FLOAT = 40,
    DXGI_FORMAT_R32_FLOAT = 41,
    DXGI_FORMAT_R32_UINT = 42,
    DXGI_FORMAT_R32_SINT = 43,
    DXGI_FORMAT_R24G8_TYPELESS = 44,
    DXGI_FORMAT_D24_UNORM_S8_UINT = 45,
    DXGI_FORMAT_R24_UNORM_X8_TYPELESS = 46,
    DXGI_FORMAT_X24_TYPELESS_G8_UINT = 47,
    DXGI_FORMAT_R8G8_TYPELESS = 48,
    DXGI_FORMAT_R8G8_UNORM = 49,
    DXGI_FORMAT_R8G8_UINT = 50,
    DXGI_FORMAT_R8G8_SNORM = 51,
    DXGI_FORMAT_R8G8_SINT = 52,
    DXGI_FORMAT_R16_TYPELESS = 53,
    DXGI_FORMAT_R16_FLOAT = 54,
    DXGI_FORMAT_D16_UNORM = 55,
    DXGI_FORMAT_R16_UNORM = 56,
    DXGI_FORMAT_R16_UINT = 57,
    DXGI_FORMAT_R16_SNORM = 58,
    DXGI_FORMAT_R16_SINT = 59,
    DXGI_FORMAT_R8_TYPELESS = 60,
    DXGI_FORMAT_R8_UNORM = 61,
    DXGI_FORMAT_R8_UINT = 62,
    DXGI_FORMAT_R8_SNORM = 63,
    DXGI_FORMAT_R8_SINT = 64,
    DXGI_FORMAT_A8_UNORM = 65,
    DXGI_FORMAT_R1_UNORM = 66,
    DXGI_FORMAT_R9G9B9E5_SHAREDEXP = 67,
    DXGI_FORMAT_R8G8_B8G8_UNORM = 68,
    DXGI_FORMAT_G8R8_G8B8_UNORM = 69,
    DXGI_FORMAT_BC1_TYPELESS = 70,
    DXGI_FORMAT_BC1_UNORM = 71,
    DXGI_FORMAT_BC1_UNORM_SRGB = 72,
    DXGI_FORMAT_BC2_TYPELESS = 73,
    DXGI_FORMAT_BC2_UNORM = 74,
    DXGI_FORMAT_BC2_UNORM_SRGB = 75,
    DXGI_FORMAT_BC3_TYPELESS = 76,
    DXGI_FORMAT_BC3_UNORM = 77,
    DXGI_FORMAT_BC3_UNORM_SRGB = 78,
    DXGI_FORMAT_BC4_TYPELESS = 79,
    DXGI_FORMAT_BC4_UNORM = 80,
    DXGI_FORMAT_BC4_SNORM = 81,
    DXGI_FORMAT_BC5_TYPELESS = 82,
    DXGI_FORMAT_BC5_UNORM = 83,
    DXGI_FORMAT_BC5_SNORM = 84,
    DXGI_FORMAT_B5G6R5_UNORM = 85,
    DXGI_FORMAT_B5G5R5A1_UNORM = 86,
    DXGI_FORMAT_B8G8R8A8_UNORM = 87,
    DXGI_FORMAT_B8G8R8X8_UNORM = 88,
    DXGI_FORMAT_FORCE_UINT = 0xffffffffUL,
} DXGI_FORMAT, *LPDXGI_FORMAT;

Constants

DXGI_FORMAT_UNKNOWN
The format is not known.
DXGI_FORMAT_R32G32B32A32_TYPELESS
A four-component, 128-bit typeless format. 1
DXGI_FORMAT_R32G32B32A32_FLOAT
A four-component, 128-bit floating-point format. 1
DXGI_FORMAT_R32G32B32A32_UINT
A four-component, 128-bit unsigned-integer format. 1
DXGI_FORMAT_R32G32B32A32_SINT
A four-component, 128-bit signed-integer format. 1
DXGI_FORMAT_R32G32B32_TYPELESS
A three-component, 96-bit typeless format.
DXGI_FORMAT_R32G32B32_FLOAT
A three-component, 96-bit floating-point format.
DXGI_FORMAT_R32G32B32_UINT
A three-component, 96-bit unsigned-integer format.
DXGI_FORMAT_R32G32B32_SINT
A three-component, 96-bit signed-integer format.
DXGI_FORMAT_R16G16B16A16_TYPELESS
A four-component, 64-bit typeless format.
DXGI_FORMAT_R16G16B16A16_FLOAT
A four-component, 64-bit floating-point format.
DXGI_FORMAT_R16G16B16A16_UNORM
A four-component, 64-bit unsigned-integer format.
DXGI_FORMAT_R16G16B16A16_UINT
A four-component, 64-bit unsigned-integer format.
DXGI_FORMAT_R16G16B16A16_SNORM
A four-component, 64-bit signed-integer format.
DXGI_FORMAT_R16G16B16A16_SINT
A four-component, 64-bit signed-integer format.
DXGI_FORMAT_R32G32_TYPELESS
A two-component, 64-bit typeless format.
DXGI_FORMAT_R32G32_FLOAT
A two-component, 64-bit floating-point format.
DXGI_FORMAT_R32G32_UINT
A two-component, 64-bit unsigned-integer format.
DXGI_FORMAT_R32G32_SINT
A two-component, 64-bit signed-integer format.
DXGI_FORMAT_R32G8X24_TYPELESS
A two-component, 64-bit typeless format.
DXGI_FORMAT_D32_FLOAT_S8X24_UINT
A 32-bit floating-point component, and two unsigned-integer components (with an additional 32 bits).
DXGI_FORMAT_R32_FLOAT_X8X24_TYPELESS
A 32-bit floating-point component, and two typeless components (with an additional 32 bits).
DXGI_FORMAT_X32_TYPELESS_G8X24_UINT
A 32-bit typeless component, and two unsigned-integer components (with an additional 32 bits).
DXGI_FORMAT_R10G10B10A2_TYPELESS
A four-component, 32-bit typeless format.
DXGI_FORMAT_R10G10B10A2_UNORM
A four-component, 32-bit unsigned-integer format.
DXGI_FORMAT_R10G10B10A2_UINT
A four-component, 32-bit unsigned-integer format.
DXGI_FORMAT_R11G11B10_FLOAT
A three-component, 32-bit floating-point format.
DXGI_FORMAT_R8G8B8A8_TYPELESS
A three-component, 32-bit typeless format.
DXGI_FORMAT_R8G8B8A8_UNORM
A four-component, 32-bit unsigned-integer format.
DXGI_FORMAT_R8G8B8A8_UNORM_SRGB
A four-component, 32-bit unsigned-normalized integer sRGB format.
DXGI_FORMAT_R8G8B8A8_UINT
A four-component, 32-bit unsigned-integer format.
DXGI_FORMAT_R8G8B8A8_SNORM
A three-component, 32-bit signed-integer format.
DXGI_FORMAT_R8G8B8A8_SINT
A three-component, 32-bit signed-integer format.
DXGI_FORMAT_R16G16_TYPELESS
A two-component, 32-bit typeless format.
DXGI_FORMAT_R16G16_FLOAT
A two-component, 32-bit floating-point format.
DXGI_FORMAT_R16G16_UNORM
A two-component, 32-bit unsigned-integer format.
DXGI_FORMAT_R16G16_UINT
A two-component, 32-bit unsigned-integer format.
DXGI_FORMAT_R16G16_SNORM
A two-component, 32-bit signed-integer format.
DXGI_FORMAT_R16G16_SINT
A two-component, 32-bit signed-integer format.
DXGI_FORMAT_R32_TYPELESS
A single-component, 32-bit typeless format.
DXGI_FORMAT_D32_FLOAT
A single-component, 32-bit floating-point format.
DXGI_FORMAT_R32_FLOAT
A single-component, 32-bit floating-point format.
DXGI_FORMAT_R32_UINT
A single-component, 32-bit unsigned-integer format.
DXGI_FORMAT_R32_SINT
A single-component, 32-bit signed-integer format.
DXGI_FORMAT_R24G8_TYPELESS
A two-component, 32-bit typeless format.
DXGI_FORMAT_D24_UNORM_S8_UINT
A 32-bit z-buffer format that uses 24 bits for the depth channel and 8 bits for the stencil channel.
DXGI_FORMAT_R24_UNORM_X8_TYPELESS
A 32-bit format, that contains a 24 bit, single-component, unsigned-normalized integer, with an additional typeless 8 bits.
DXGI_FORMAT_X24_TYPELESS_G8_UINT
A 32-bit format, that contains a 24 bit, single-component, typeless format, with an additional 8 bit unsigned integer component.
DXGI_FORMAT_R8G8_TYPELESS
A two-component, 16-bit typeless format.
DXGI_FORMAT_R8G8_UNORM
A two-component, 16-bit unsigned-integer format.
DXGI_FORMAT_R8G8_UINT
A two-component, 16-bit unsigned-integer format.
DXGI_FORMAT_R8G8_SNORM
A two-component, 16-bit signed-integer format.
DXGI_FORMAT_R8G8_SINT
A two-component, 16-bit signed-integer format.
DXGI_FORMAT_R16_TYPELESS
A single-component, 16-bit typeless format.
DXGI_FORMAT_R16_FLOAT
A single-component, 16-bit floating-point format.
DXGI_FORMAT_D16_UNORM
A single-component, 16-bit unsigned-normalized integer format.
DXGI_FORMAT_R16_UNORM
A single-component, 16-bit unsigned-integer format.
DXGI_FORMAT_R16_UINT
A single-component, 16-bit unsigned-integer format.
DXGI_FORMAT_R16_SNORM
A single-component, 16-bit signed-integer format.
DXGI_FORMAT_R16_SINT
A single-component, 16-bit signed-integer format.
DXGI_FORMAT_R8_TYPELESS
A single-component, 8-bit typeless format.
DXGI_FORMAT_R8_UNORM
A single-component, 8-bit unsigned-integer format.
DXGI_FORMAT_R8_UINT
A single-component, 8-bit unsigned-integer format.
DXGI_FORMAT_R8_SNORM
A single-component, 8-bit signed-integer format.
DXGI_FORMAT_R8_SINT
A single-component, 8-bit signed-integer format.
DXGI_FORMAT_A8_UNORM
A single-component, 8-bit unsigned-integer format.
DXGI_FORMAT_R1_UNORM
A single-component, 1-bit unsigned-normalized integer format. 2.
DXGI_FORMAT_R9G9B9E5_SHAREDEXP
A four-component, 32-bit floating-point format. 2.
DXGI_FORMAT_R8G8_B8G8_UNORM
A four-component, 32-bit unsigned-normalized integer format. 3
DXGI_FORMAT_G8R8_G8B8_UNORM
A four-component, 32-bit unsigned-normalized integer format. 3
DXGI_FORMAT_BC1_TYPELESS
Four-component typeless block-compression format.
DXGI_FORMAT_BC1_UNORM
Four-component block-compression format.
DXGI_FORMAT_BC1_UNORM_SRGB
Four-component block-compression format for sRGB data.
DXGI_FORMAT_BC2_TYPELESS
Four-component typeless block-compression format.
DXGI_FORMAT_BC2_UNORM
Four-component block-compression format.
DXGI_FORMAT_BC2_UNORM_SRGB
Four-component block-compression format for sRGB data.
DXGI_FORMAT_BC3_TYPELESS
Four-component typeless block-compression format.
DXGI_FORMAT_BC3_UNORM
Four-component block-compression format.
DXGI_FORMAT_BC3_UNORM_SRGB
Four-component block-compression format for sRGB data.
DXGI_FORMAT_BC4_TYPELESS
One-component typeless block-compression format.
DXGI_FORMAT_BC4_UNORM
One-component block-compression format.
DXGI_FORMAT_BC4_SNORM
One-component block-compression format.
DXGI_FORMAT_BC5_TYPELESS
Two-component typeless block-compression format.
DXGI_FORMAT_BC5_UNORM
Two-component block-compression format.
DXGI_FORMAT_BC5_SNORM
Two-component block-compression format.
DXGI_FORMAT_B5G6R5_UNORM
A three-component, 16-bit unsigned-normalized integer format.
DXGI_FORMAT_B5G5R5A1_UNORM
A four-component, 16-bit unsigned-normalized integer format that supports 1-bit alpha.
DXGI_FORMAT_B8G8R8A8_UNORM
A four-component, 16-bit unsigned-normalized integer format that supports 8-bit alpha.
DXGI_FORMAT_B8G8R8X8_UNORM
A four-component, 16-bit unsigned-normalized integer format.
DXGI_FORMAT_FORCE_UINT
Forces this enumeration to compile to 32 bits in size. Without this value, some compilers would allow this enumeration to compile to a size other than 32 bits. This value is not used.

Remarks

A few formats have additional restrictions.

  1. A resource declared with the DXGI_FORMAT_R32G32B32 family of formats cannot be used simultaneously for vertex and texture data. That is, you may not create a buffer resource with the DXGI_FORMAT_R32G32B32 family of formats that uses any of the following bind flags: D3D10_BIND_VERTEX_BUFFER, D3D10_BIND_INDEX_BUFFER, D3D10_BIND_CONSTANT_BUFFER, or D3D10_BIND_STREAM_OUTPUT (see D3D10_BIND_FLAG).
  2. DXGI_FORMAT_R1_UNORM is designed specifically for text filtering, and must be used with a format-specific, configurable 8x8 filter mode. When calling an HLSL sampling function using this format, the address offset parameter must be set to (0,0).
  3. A resource using a sub-sampled format (such as DXGI_FORMAT_R8G8_B8G8) must have a size that is a multiple of 2 in the x dimension.
Format Modifiers

Each enumeration value contains a format modifier which describes the data type.

Format ModifiersDescription
_FLOATA floating-point value; which is interpreted in a shader as a 32-bit floating-point value, and is interpreted in a resource with a bit-depth that matches the format.
_SINTTwo's complement signed integer. For example, a 3-bit SINT represents the values -4, -3, -2, -1, 0, 1, 2, 3.
_SNORMSigned normalized integer; which is interpreted in a resource as a signed integer, and is interpreted in a shader as a signed normalized floating-point value in the range [-1, 1]. For an 2's complement number, the maximum value is 1.0f (a 5-bit value 01111 maps to 1.0f), and the minimum value is -1.0f (a 5-bit value 10000 maps to -1.0f). In addition, the second-minimum number maps to -1.0f (a 5-bit value 10001 maps to -1.0f). The resulting integer representations are evenly spaced floating-point values in the range (-1.0f...0.0f), and also a complementary set of representations for numbers in the range (0.0f...1.0f).
_SRGBStandard RGB data, which roughly displays colors in a linear ramp of luminosity levels such that an average observer, under average viewing conditions, can view them on an average display.

All 0's maps to 0.0f, and all 1's maps to 1.0f. The sequence of unsigned integer encodings between all 0's and all 1's represent a nonlinear progression in the floating-point interpretation of the numbers between 0.0f to 1.0f. For more detail, see the SRGB color standard, IEC 61996-2-1, at IEC (International Electrotechnical Commission).

Conversion to or from sRGB space is automatically done by D3DX10 or D3DX9 texture-load functions. If the format has an alpha channel, the alpha data is also stored in sRGB color space.
_TYPELESSTypeless data, with a defined number of bits. Typeless formats are designed for creating typeless resources; that is, a resource whose size is known, but whose data type is not yet fully defined. When a typeless resource is bound to a shader, the application or shader must resolve the format type (which must match the number of bits per component in the typeless format).

A typeless format contains one or more subformats; each subformat resolves the data type. For example, in the R32G32B32 group, which defines types for three-component 96-bit data, there is one typeless format and three fully typed subformats.

    DXGI_FORMAT_R32G32B32_TYPELESS,
    DXGI_FORMAT_R32G32B32_FLOAT,
    DXGI_FORMAT_R32G32B32_UINT,
    DXGI_FORMAT_R32G32B32_SINT,
_UINTUnsigned integer. For instance, a 3-bit UINT represents the values 0, 1, 2, 3, 4, 5, 6, 7.
_UNORMUnsigned normalized integer; which is interpreted in a resource as an unsigned integer, and is interpreted in a shader as an unsigned normalized floating-point value in the range [0, 1]. All 0's maps to 0.0f, and all 1's maps to 1.0f. A sequence of evenly spaced floating-point values from 0.0f to 1.0f are represented. For instance, a 2-bit UNORM represents 0.0f, 1/3, 2/3, and 1.0f.
New Resource Formats

Direct3D 10 offers new data compression formats for compressing high-dynamic range (HDR) lighting data, normal maps and heightfields to a fraction of their original size. These compression types include:

  • Shared-Exponent high-dynamic range (HDR) format (RGBE)
  • New Block-Compressed 1-2 channel UNORM/SNORM formats

The block compression formats can be used for any of the 2D or 3D texture types ( Texture2D, Texture2DArray, Texture3D, or TextureCube) including mipmap surfaces. The block compression techniques require texture dimensions to be a multiple of 4 (since the implementation compresses on blocks of 4x4 texels). In the texture sampler, compressed formats are always decompressed before texture filtering.

Requirements

Header: Declared in DXGI.h.

See Also

Enumerations

© 2009 Microsoft Corporation. All rights reserved. Terms of Use  |  Trademarks  |  Privacy Statement
Page view tracker