DDS_HEADER_DXT10 structure

DDS header extension to handle resource arrays, DXGI pixel formats that don't map to the legacy Microsoft DirectDraw pixel format structures, and additional metadata.

Syntax

typedef struct {
  DXGI_FORMAT              dxgiFormat;
  D3D10_RESOURCE_DIMENSION resourceDimension;
  UINT                     miscFlag;
  UINT                     arraySize;
  UINT                     miscFlags2;
} DDS_HEADER_DXT10;

Members

dxgiFormat

Type: DXGI_FORMAT

The surface pixel format (see DXGI_FORMAT).

resourceDimension

Type: D3D10_RESOURCE_DIMENSION

Identifies the type of resource. The following values for this member are a subset of the values in the D3D10_RESOURCE_DIMENSION or D3D11_RESOURCE_DIMENSION enumeration:

Type Description Value
DDS_DIMENSION_TEXTURE1D (D3D10_RESOURCE_DIMENSION_TEXTURE1D) Resource is a 1D texture. The dwWidth member of DDS_HEADER specifies the size of the texture. Typically, you set the dwHeight member of DDS_HEADER to 1; you also must set the DDSD_HEIGHT flag in the dwFlags member of DDS_HEADER. 2
DDS_DIMENSION_TEXTURE2D (D3D10_RESOURCE_DIMENSION_TEXTURE2D) Resource is a 2D texture with an area specified by the dwWidth and dwHeight members of DDS_HEADER. You can also use this type to identify a cube-map texture. For more information about how to identify a cube-map texture, see miscFlag and arraySize members. 3
DDS_DIMENSION_TEXTURE3D (D3D10_RESOURCE_DIMENSION_TEXTURE3D) Resource is a 3D texture with a volume specified by the dwWidth, dwHeight, and dwDepth members of DDS_HEADER. You also must set the DDSD_DEPTH flag in the dwFlags member of DDS_HEADER. 4

miscFlag

Type: UINT

Identifies other, less common options for resources. The following value for this member is a subset of the values in the D3D10_RESOURCE_MISC_FLAG or D3D11_RESOURCE_MISC_FLAG enumeration:

Type Description Value
DDS_RESOURCE_MISC_TEXTURECUBE Indicates a 2D texture is a cube-map texture. 0x4

arraySize

Type: UINT

The number of elements in the array.

For a 2D texture that is also a cube-map texture, this number represents the number of cubes. This number is the same as the number in the NumCubes member of D3D10_TEXCUBE_ARRAY_SRV1 or D3D11_TEXCUBE_ARRAY_SRV). In this case, the DDS file contains arraySize*6 2D textures. For more information about this case, see the miscFlag description.

For a 3D texture, you must set this number to 1.

miscFlags2

Type: UINT

Contains additional metadata (formerly was reserved). The lower 3 bits indicate the alpha mode of the associated resource. The upper 29 bits are reserved and are typically 0.

Type Description Value
DDS_ALPHA_MODE_UNKNOWN Alpha channel content is unknown. This is the value for legacy files, which typically is assumed to be 'straight' alpha. 0x0
DDS_ALPHA_MODE_STRAIGHT Any alpha channel content is presumed to use straight alpha. 0x1
DDS_ALPHA_MODE_PREMULTIPLIED Any alpha channel content is using premultiplied alpha. The only legacy file formats that indicate this information are 'DX2' and 'DX4'. 0x2
DDS_ALPHA_MODE_OPAQUE Any alpha channel content is all set to fully opaque. 0x3
DDS_ALPHA_MODE_CUSTOM Any alpha channel content is being used as a 4th channel and is not intended to represent transparency (straight or premultiplied). 0x4

Note

The legacy D3DX 10 and D3DX 11 utility libraries will fail to load any .DDS file with miscFlags2 not equal to zero.

Remarks

Use this structure together with a DDS_HEADER to store a resource array in a DDS file. For more info, see texture arrays.

This header is present if the dwFourCC member of the DDS_PIXELFORMAT structure is set to 'DX10'.

Requirements

Requirement Value
Header
Dds.h

See also

Reference for DDS