XG_RESOURCE_DESC Structure

Describes an XG resource.

Syntax

typedef struct XG_RESOURCE_DESC {
    XG_RESOURCE_DIMENSION Dimension;
    UINT64 Alignment;
    UINT64 Width;
    UINT Height;
    UINT16 DepthOrArraySize;
    UINT16 MipLevels;
    XG_FORMAT Format;
    XG_SAMPLE_DESC SampleDesc;
    XG_TEXTURE_LAYOUT Layout;
    XG12_RESOURCE_MISC_FLAG MiscFlags;
} XG_RESOURCE_DESC;  

Members

Dimension
The dimensionality of the resource, as a XG_RESOURCE_DIMENSION enumeration constant. Currently only texture dimensions are supported.

Alignment
The alignment of the resource, in bytes. Specify zero for default alignment.

Width
The width of the resource, in texels.

Height
The height of the resource, in texels.

DepthOrArraySize
For volume textures, the depth of the resource. For array textures, the number of array slices.

MipLevels
The number of mip levels in the resource. Specify zero for a full mip chain.

Format
The format, as an XG_FORMAT enumeration constant (equivalent to DXGI_FORMAT values).

SampleDesc
The description of the sample, as a XG_SAMPLE_DESC structure, which is equivalent to DXGI_SAMPLE_DESC.

Layout
The texture tiling mode, as an XG_TEXTURE_LAYOUT enumeration constant. To select the default tiling mode, specify XG_TEXTURE_LAYOUT_UNKNOWN.

MiscFlags
Flags, as a bitwise-OR’d combination of XG12_RESOURCE_MISC_FLAG enumeration constants, such as for “none”, “allow render target”, “allow depth stencil”, “allow unordered access”, or “deny shader resource”. XG12_RESOURCE_MISC_FLAG is equivalent to D3D12_RESOURCE_FLAGS.

Remarks

This structure is used by the following API items:

This structure is identical to D3D12_RESOURCE_DESC, and can describe a texture of any dimension to XG.

Requirements

Header: Declared in xg.h.